mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 08:33:54 +00:00
5a5decd2eb
Running `make -C doc` to build the manual locally leaves .xml artifacts in the tree. These are ignored by git, but they still get included in the build when not using flakes, which causes the corresponding chapters not to be built.
40 lines
1.0 KiB
Nix
40 lines
1.0 KiB
Nix
{ pkgs ? (import ./.. { }), nixpkgs ? { }}:
|
|
let
|
|
doc-support = import ./doc-support { inherit pkgs nixpkgs; };
|
|
in pkgs.stdenv.mkDerivation {
|
|
name = "nixpkgs-manual";
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
pandoc
|
|
graphviz
|
|
libxml2
|
|
libxslt
|
|
zip
|
|
jing
|
|
xmlformat
|
|
];
|
|
|
|
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
|
|
|
|
postPatch = ''
|
|
ln -s ${doc-support} ./doc-support/result
|
|
'';
|
|
|
|
installPhase = ''
|
|
dest="$out/share/doc/nixpkgs"
|
|
mkdir -p "$(dirname "$dest")"
|
|
mv out/html "$dest"
|
|
mv "$dest/index.html" "$dest/manual.html"
|
|
|
|
mv out/epub/manual.epub "$dest/nixpkgs-manual.epub"
|
|
|
|
mkdir -p $out/nix-support/
|
|
echo "doc manual $dest manual.html" >> $out/nix-support/hydra-build-products
|
|
echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products
|
|
'';
|
|
|
|
# Environment variables
|
|
PANDOC_LUA_FILTERS_DIR = "${pkgs.pandoc-lua-filters}/share/pandoc/filters";
|
|
PANDOC_LINK_MANPAGES_FILTER = import build-aux/pandoc-filters/link-manpages.nix { inherit pkgs; };
|
|
}
|