From bf0ad8aabca67b4faabe3a1ac3c57884ae9924f4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 15 Jan 2014 14:34:49 +0100 Subject: nix-profile.sh: Add the Nixpkgs channel to $NIX_PATH --- scripts/nix-profile.sh.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in index 16eb754c5da9..06e7bdb7b808 100644 --- a/scripts/nix-profile.sh.in +++ b/scripts/nix-profile.sh.in @@ -8,10 +8,15 @@ if test -n "$HOME"; then @coreutils@/ln -s "$_NIX_DEF_LINK" "$NIX_LINK" fi + export PATH=$NIX_LINK/bin:$PATH + # Subscribe the root user to the Nixpkgs channel by default. if [ ! -e $HOME/.nix-channels ]; then echo "http://nixos.org/channels/nixpkgs-unstable nixpkgs" > $HOME/.nix-channels fi - export PATH=$NIX_LINK/bin:$PATH + # Append ~/.nix-defexpr/channels/nixpkgs to $NIX_PATH so that + # paths work when the user has fetched the Nixpkgs + # channel. + export NIX_PATH=${NIX_PATH:+$NIX_PATH:}nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs fi -- cgit 1.4.1