about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install-nix-from-closure.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh
index 41e596e5fffd..00f23e0f4c7f 100644
--- a/scripts/install-nix-from-closure.sh
+++ b/scripts/install-nix-from-closure.sh
@@ -15,6 +15,12 @@ if ! $nix/bin/nix-env -i @nix@; then
     exit 1
 fi
 
+# Subscribe the user to the Nixpkgs channel and fetch it.
+if ! $nix/bin/nix-channel --list | grep -q "^nixpkgs "; then
+    $nix/bin/nix-channel --add http://nixos.org/channels/nixpkgs-unstable
+fi
+$nix/bin/nix-channel --update nixpkgs
+
 # Add nix.sh to the shell's profile.d directory.
 p=$NIX_LINK/etc/profile.d/nix.sh
 
@@ -31,4 +37,4 @@ variables are set, please add the line
 
 to your shell profile (e.g. ~/.profile).
 EOF
-fi
\ No newline at end of file
+fi