Skip to content

Commit

Permalink
Add INFOPATH & XDG_DATA_DIRS to nix-profile.sh
Browse files Browse the repository at this point in the history
This is helpful for locating resources with Nix, especially in
unmanaged situations like on macOS or non-NixOS Linux. Like MANPATH,
it should be harmless to have these set when the directory doesn’t
exist.
  • Loading branch information
matthewbauer committed Sep 23, 2018
1 parent a48c2e3 commit d319ec2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/nix-profile.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
if [ -n "${MANPATH}" ]; then
export MANPATH="$NIX_LINK/share/man:$MANPATH"
fi
if [ -n "${INFOPATH}" ]; then
export INFOPATH="$NIX_LINK/share/info:$INFOPATH"
fi
if [ -n "${XDG_DATA_DIRS}" ]; then
export XDG_DATA_DIRS="$NIX_LINK/share:$XDG_DATA_DIRS"
fi

export PATH="$NIX_LINK/bin:$__savedpath"
unset __savedpath NIX_LINK NIX_USER_PROFILE_DIR NIX_PROFILES
Expand Down

0 comments on commit d319ec2

Please sign in to comment.