nixpkgs manual: extract some build paths

Co-authored-by: Shahar "Dawn" Or <mightyiampresence@gmail.com>

Changed files
+9 -3
doc
+4
doc/common.nix
···
···
+
{
+
outputPath = "share/doc/nixpkgs";
+
indexPath = "manual.html";
+
}
+5 -3
doc/default.nix
···
inherit (pkgs) lib;
inherit (lib) hasPrefix removePrefix;
lib-docs = import ./doc-support/lib-function-docs.nix {
inherit pkgs nixpkgs;
libsets = [
···
'';
installPhase = ''
-
dest="$out/share/doc/nixpkgs"
mkdir -p "$(dirname "$dest")"
mv out "$dest"
-
mv "$dest/index.html" "$dest/manual.html"
cp ${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
'';
}
···
inherit (pkgs) lib;
inherit (lib) hasPrefix removePrefix;
+
common = import ./common.nix;
+
lib-docs = import ./doc-support/lib-function-docs.nix {
inherit pkgs nixpkgs;
libsets = [
···
'';
installPhase = ''
+
dest="$out/${common.outputPath}"
mkdir -p "$(dirname "$dest")"
mv out "$dest"
+
mv "$dest/index.html" "$dest/${common.indexPath}"
cp ${epub} "$dest/nixpkgs-manual.epub"
mkdir -p $out/nix-support/
+
echo "doc manual $dest ${common.indexPath}" >> $out/nix-support/hydra-build-products
echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products
'';
}