From b5bd640a9258b12f09f11e6c7fddf8a85129c265 Mon Sep 17 00:00:00 2001 From: anthony Date: Tue, 20 May 2025 13:10:36 +0200 Subject: [PATCH] doc: fix nixpkgs-manual not being built under `index.html` (#400816) This fixes the anchor links referencing `index.html` while being in `manual.html`. --- doc/doc-support/package.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/doc-support/package.nix b/doc/doc-support/package.nix index 65fb0fb38ed7..023be3a3a116 100644 --- a/doc/doc-support/package.nix +++ b/doc/doc-support/package.nix @@ -16,7 +16,6 @@ roboto, treefmt, }: - stdenvNoCC.mkDerivation ( finalAttrs: let @@ -100,14 +99,14 @@ stdenvNoCC.mkDerivation ( dest="$out/share/doc/nixpkgs" mkdir -p "$(dirname "$dest")" mv out "$dest" - mv "$dest/index.html" "$dest/manual.html" + cp "$dest/index.html" "$dest/manual.html" cp ${roboto.src}/web/Roboto\[ital\,wdth\,wght\].ttf "$dest/Roboto.ttf" 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 index.html" >> $out/nix-support/hydra-build-products echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products runHook postInstall @@ -126,7 +125,7 @@ stdenvNoCC.mkDerivation ( let devmode' = devmode.override { buildArgs = toString ../.; - open = "/share/doc/nixpkgs/manual.html"; + open = "/share/doc/nixpkgs/index.html"; }; nixos-render-docs-redirects' = writeShellScriptBin "redirects" "${lib.getExe nixos-render-docs-redirects} --file ${toString ../redirects.json} $@"; in