diff options
author | Nicolas Mattia <nicolas@nmattia.com> | 2022-02-21 13:35:51 +0100 |
---|---|---|
committer | Nicolas Mattia <nicolas@nmattia.com> | 2022-02-21 13:35:55 +0100 |
commit | 44b7d104b403062bf9ad57363f76464e355bc9a2 (patch) | |
tree | 25389f519d473439b886161da7883592d93f0ee1 /scripts | |
parent | 34f2eebd5be06658c04aa7846753d5de124d7195 (diff) |
Document usage of MANPATH in nix-profile.sh
While trying to figure out how `nix-env`/`nix profile` work I had a hard
time understand how man pages were being installed.
Took me quite some time to figure this out, thought it might be useful
to others too!
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/nix-profile.sh.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in index 8cba1c522..45cbcbe74 100644 --- a/scripts/nix-profile.sh.in +++ b/scripts/nix-profile.sh.in @@ -24,6 +24,9 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then export NIX_SSL_CERT_FILE="$NIX_LINK/etc/ca-bundle.crt" fi + # 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 [ -n "${MANPATH-}" ]; then export MANPATH="$NIX_LINK/share/man:$MANPATH" fi |