From 470c521bccd8c97ed33edb43278d6476ac6f4322 Mon Sep 17 00:00:00 2001 From: Illia Bobyr Date: Mon, 13 Jan 2025 19:23:06 -0800 Subject: [PATCH] nix-profile-daemon.fish: Set MANPATH There seems to be no good reason for `nix-profile.fish` to set `$MANPATH` while it being unset when `nix-profile-daemon.fish` is used. --- scripts/nix-profile-daemon.fish.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/nix-profile-daemon.fish.in b/scripts/nix-profile-daemon.fish.in index 2ecab0077..3fb727151 100644 --- a/scripts/nix-profile-daemon.fish.in +++ b/scripts/nix-profile-daemon.fish.in @@ -62,6 +62,13 @@ else end end +# Only use MANPATH if it is already set. In general `man` will just simply +# pick up `.nix-profile/share/man` because is it close to `.nix-profile/bin` +# which is in the $PATH. For more info, run `manpath -d`. +if set --query MANPATH + set --export --prepend --path MANPATH "$NIX_LINK/share/man" +end + add_path "@localstatedir@/nix/profiles/default/bin" add_path "$NIX_LINK/bin"