2020-04-24 23:36:52 +00:00
|
|
|
{ pkgs ? (import ./.. { }), nixpkgs ? { }}:
|
|
|
|
let
|
|
|
|
doc-support = import ./doc-support { inherit pkgs nixpkgs; };
|
|
|
|
in pkgs.stdenv.mkDerivation {
|
|
|
|
name = "nixpkgs-manual";
|
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
pandoc
|
|
|
|
graphviz
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
zip
|
|
|
|
jing
|
|
|
|
xmlformat
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
2021-06-06 07:54:09 +00:00
|
|
|
|
|
|
|
# Environment variables
|
|
|
|
PANDOC_LUA_FILTERS_DIR = "${pkgs.pandoc-lua-filters}/share/pandoc/filters";
|
2023-01-11 07:51:40 +00:00
|
|
|
PANDOC_LINK_MANPAGES_FILTER = import build-aux/pandoc-filters/link-manpages.nix { inherit pkgs; };
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|