diff --git a/doc/common.nix b/doc/common.nix new file mode 100644 index 000000000000..56f723eb6bd7 --- /dev/null +++ b/doc/common.nix @@ -0,0 +1,4 @@ +{ + outputPath = "share/doc/nixpkgs"; + indexPath = "manual.html"; +} diff --git a/doc/default.nix b/doc/default.nix index 8efa406ec1ea..f4270ae856d5 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -3,6 +3,8 @@ let inherit (pkgs) lib; inherit (lib) hasPrefix removePrefix; + common = import ./common.nix; + lib-docs = import ./doc-support/lib-function-docs.nix { inherit pkgs nixpkgs; libsets = [ @@ -132,15 +134,15 @@ in pkgs.stdenv.mkDerivation { ''; installPhase = '' - dest="$out/share/doc/nixpkgs" + dest="$out/${common.outputPath}" mkdir -p "$(dirname "$dest")" mv out "$dest" - mv "$dest/index.html" "$dest/manual.html" + mv "$dest/index.html" "$dest/${common.indexPath}" 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 ${common.indexPath}" >> $out/nix-support/hydra-build-products echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products ''; }