nix: make /etc/profile.d/nix.sh not use word splitting

This will not work e.g. if the script is sourced by zsh.
Instead, just adjust $PATH twice.

Fixes #10336.
This commit is contained in:
Leah Neukirchen 2018-01-01 23:23:37 +01:00
parent 01e5f8892c
commit 85fc0a2c24
2 changed files with 3 additions and 6 deletions

View file

@ -15,11 +15,8 @@ if ! test -L $HOME/.nix-profile; then
fi
fi
export NIX_PROFILES="/nix/var/nix/profiles/default $HOME/.nix-profile"
for i in $NIX_PROFILES; do
export PATH=$i/bin:$PATH
done
export PATH=/nix/var/nix/profiles/default/bin:$PATH
export PATH=$HOME/.nix-profile/bin:$PATH
if [ "$USER" = root -a ! -e $HOME/.nix-channels ]; then
echo "http://nixos.org/channels/nixpkgs-unstable nixpkgs" \

View file

@ -1,7 +1,7 @@
# Template file for 'nix'
pkgname=nix
version=1.11.16
revision=1
revision=2
build_style=gnu-configure
# Use /nix/var as suggested by the official Manual.
configure_args="--localstatedir=/nix/var"