From c5839752b9d5099d4b5e7bcfc853581673e779f6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 10 Feb 2014 10:50:29 +0100 Subject: [PATCH] Binary tarball: Automatically fetch the Nixpkgs channel --- scripts/install-nix-from-closure.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh index 41e596e5f..00f23e0f4 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