lix/scripts/nix-profile.sh.in
Eelco Dolstra f83c5e3e5f * Implemented Eelco V.'s `-p' command to switch profiles. It switches
the symlink ~/.nix-userenv to the given argument (which defaults to
  .../links/current).  /etc/profile.d/nix-profile creates this symlink
  if it doesn't exist yet.  Example use:

  $ nix-env -l my_profile -i foo.nix subversion quake
  $ nix-env -p my_profile

  I don't like the term "profile".  Let's deprecate it :-)
2004-01-05 11:18:59 +00:00

12 lines
288 B
Bash

if test -n "$HOME"; then
NIX_LINK="$HOME/.nix-userenv"
if ! test -a "$NIX_LINK"; then
echo "creating $NIX_LINK"
_NIX_DEF_LINK=@localstatedir@/nix/links/current
ln -s "$_NIX_DEF_LINK" "$NIX_LINK"
fi
export PATH=$NIX_LINK/bin:@prefix@/bin:$PATH
fi