Remove Haddock pages from website 📝
This was more of a developer tool than part of the documentation, so it makes sense to keep it off the main site. Also when modifying the palette generator, the documentation on the site would become out of sync with local changes anyway.
This commit is contained in:
parent
7e2d318e6a
commit
939669577c
3 changed files with 41 additions and 44 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, pkgsLib, coricamuLib, config, inputs, ... }:
|
||||
{ pkgs, pkgsLib, coricamuLib, inputs, ... }:
|
||||
|
||||
{
|
||||
baseUrl = "https://danth.github.io/stylix/";
|
||||
|
|
@ -11,7 +11,6 @@
|
|||
<a href="">Home</a>
|
||||
<a href="options.html">NixOS options</a>
|
||||
<a href="options-hm.html">Home Manager options</a>
|
||||
<a href="haddock/doc-index.html">Haskell internals</a>
|
||||
<a href="https://github.com/danth/stylix">GitHub repository</a>
|
||||
</nav>
|
||||
'';
|
||||
|
|
@ -76,24 +75,4 @@
|
|||
};
|
||||
}
|
||||
];
|
||||
|
||||
files.haddock =
|
||||
let
|
||||
ghc = pkgs.haskellPackages.ghcWithPackages
|
||||
(ps: with ps; [ json JuicyPixels random ]);
|
||||
in
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "palette-generator-haddock";
|
||||
src = ../palette-generator;
|
||||
buildInputs = [ ghc ];
|
||||
buildPhase = ''
|
||||
haddock $src/**/*.hs \
|
||||
--html \
|
||||
--ignore-all-exports \
|
||||
--use-contents '${config.baseUrl}' \
|
||||
--odir $out
|
||||
'';
|
||||
dontInstall = true;
|
||||
dontFixup = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
24
flake.nix
24
flake.nix
|
|
@ -31,32 +31,12 @@
|
|||
in recursiveUpdate docsOutputs {
|
||||
packages = genAttrs [ "aarch64-linux" "i686-linux" "x86_64-linux" ] (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
ghc =
|
||||
pkgs.haskellPackages.ghcWithPackages
|
||||
(ps: with ps; [ json JuicyPixels random ]);
|
||||
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
palette-generator = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "palette-generator";
|
||||
src = ./palette-generator;
|
||||
buildInputs = [ ghc ];
|
||||
buildPhase = ''
|
||||
ghc -O -threaded -Wall -Wno-type-defaults Stylix/Main.hs
|
||||
'';
|
||||
installPhase = ''
|
||||
install -D Stylix/Main $out/bin/palette-generator
|
||||
'';
|
||||
};
|
||||
palette-generator = pkgs.callPackage ./palette-generator { };
|
||||
}
|
||||
);
|
||||
|
||||
hydraJobs = {
|
||||
inherit (self.packages.x86_64-linux) docs palette-generator;
|
||||
};
|
||||
|
||||
nixosModules.stylix = { pkgs, ... }@args: {
|
||||
imports = [
|
||||
(import ./stylix/nixos {
|
||||
|
|
|
|||
38
palette-generator/default.nix
Normal file
38
palette-generator/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ haskellPackages, stdenvNoCC }:
|
||||
|
||||
let
|
||||
ghc = haskellPackages.ghcWithPackages (ps: with ps; [
|
||||
JuicyPixels
|
||||
json
|
||||
random
|
||||
]);
|
||||
|
||||
# `nix build .#palette-generator.passthru.docs` and open in a web browser
|
||||
docs = stdenvNoCC.mkDerivation {
|
||||
name = "palette-generator-haddock";
|
||||
|
||||
src = ./.;
|
||||
buildInputs = [ ghc ];
|
||||
|
||||
buildPhase = ''
|
||||
haddock $src/**/*.hs --html --ignore-all-exports --odir $out
|
||||
'';
|
||||
dontInstall = true;
|
||||
dontFixup = true;
|
||||
};
|
||||
|
||||
in stdenvNoCC.mkDerivation {
|
||||
name = "palette-generator";
|
||||
|
||||
src = ./.;
|
||||
buildInputs = [ ghc ];
|
||||
|
||||
buildPhase = ''
|
||||
ghc -O -threaded -Wall -Wno-type-defaults Stylix/Main.hs
|
||||
'';
|
||||
installPhase = ''
|
||||
install -D Stylix/Main $out/bin/palette-generator
|
||||
'';
|
||||
|
||||
passthru = { inherit docs; };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue