Unverified Commit 887352f9 authored by Ramon Rüttimann's avatar Ramon Rüttimann Committed by GitHub
Browse files

fix: fish docs building

This commit adds `python3Packages.sphinx` to the build inputs for `fish`, as
that package is used to generate the man / help pages for fish builtins.

Before this, the fish build did not actually build documentation, since the
`sphinx` package is a required dependency for that.

There's been a bit of a back and forth about man-page building in the fish repo,
so I don't really follow why it's broken for Nix builds. From what I can tell,
there's been some changes to Sphinx in 4.2.0 that prompted a (temporary) fix in
4.2.1 fix (fish-shell/fish-shell@b9af3eca9f73297e0faab88c7587a08ac0ced64cto) to
add them back to the release tarball, before being completely removed in 4.3.0
(fish-shell/fish-shell#12088). The temporary fix in 4.2.1 might not actually fix
the problem fully (?) since the Nix release of 4.2.1 is broken as well.

I haven't tested 4.2.0 to see check whether that has man pages.

Either way, `fish` *needs* `sphinx` to generate the documentation, and we only
add it to the `nativeCheckInputs`, not the `nativeBuildInputs`.

I was able to fix this in my flake
(tommyknows/nixfiles@3896633989e8b36f547f5706d1215a5c14e328d6) by adding an
overlay that adds `python3Packages.sphinx` to the `nativeBuildInputs`. 

So this commit implements the same fix by moving `sphinx` from a
`nativeCheckInput` to a `nativeBuildInput`.
parent a3997241
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -298,6 +298,7 @@ stdenv.mkDerivation (finalAttrs: {
    pkg-config
    rustc
    rustPlatform.cargoSetupHook
    sphinx
    # Avoid warnings when building the manpages about HOME not being writable
    writableTmpDirAsHomeHook
  ];
@@ -350,7 +351,6 @@ stdenv.mkDerivation (finalAttrs: {
    glibcLocales
    (python3.withPackages (ps: [ ps.pexpect ]))
    procps
    sphinx
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [
    # For the getconf command, used in default-setup-path.fish