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!
This commit is contained in:
Nicolas Mattia 2022-02-21 13:35:51 +01:00
parent 34f2eebd5b
commit 44b7d104b4

View file

@ -24,6 +24,9 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
export NIX_SSL_CERT_FILE="$NIX_LINK/etc/ca-bundle.crt" export NIX_SSL_CERT_FILE="$NIX_LINK/etc/ca-bundle.crt"
fi 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 if [ -n "${MANPATH-}" ]; then
export MANPATH="$NIX_LINK/share/man:$MANPATH" export MANPATH="$NIX_LINK/share/man:$MANPATH"
fi fi