mirror of
https://github.com/NixOS/nix.git
synced 2024-11-21 22:32:26 +00:00
Set $MANPATH (#1005)
Currently, man has issues finding man pages for Nix-installed application (also, `nix-env --help` doesn't work). The issue is caused by custom `$MANPATH` set by my system. That makes man use it instead of searching in default location. Either of next lines workaround the issue: ```sh unset MANPATH export MANPATH=$HOME/.nix-profile/share/man:$MANPATH ``` This patch adds the later line to the `nix-profile.sh` if user has `MANPATH` set. (Not clearing `MANPATH` as that would be disrespect of user's preferences.) As a side-effect, host's man might find man pages installed by Nix.
This commit is contained in:
parent
ee22a91ab8
commit
eef754813f
@ -81,6 +81,10 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
|
||||
export SSL_CERT_FILE="$NIX_LINK/etc/ca-bundle.crt"
|
||||
fi
|
||||
|
||||
if [ -n ${MANPATH} ]; then
|
||||
export MANPATH="$NIX_LINK/share/man:$MANPATH"
|
||||
fi
|
||||
|
||||
export PATH="$NIX_LINK/bin:$NIX_LINK/sbin:$__savedpath"
|
||||
unset __savedpath NIX_LINK NIX_USER_PROFILE_DIR NIX_PROFILES
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user