From 35f5252630ac4bc4cfe376f050953e1599d63527 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 2 Jan 2008 15:30:31 +0000 Subject: [PATCH] * If building nixFallback fails, use nixUnstable from Nixpkgs as a last-chance fallback. svn path=/nixos/trunk/; revision=10050 --- installer/nixos-rebuild.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/installer/nixos-rebuild.sh b/installer/nixos-rebuild.sh index 4330295bc4e2..6a3b3a400500 100644 --- a/installer/nixos-rebuild.sh +++ b/installer/nixos-rebuild.sh @@ -44,7 +44,9 @@ fi # First build Nix, since NixOS may require a newer version than the # current one. Of course, the same goes for Nixpkgs, but Nixpkgs is # more conservative. -nix-build $NIXOS -A nixFallback -o $HOME/nix-tmp +if ! nix-build $NIXOS -A nixFallback -o $HOME/nix-tmp; then + nix-build /etc/nixos/nixpkgs -A nixUnstable -o $HOME/nix-tmp +fi PATH=$HOME/nix-tmp/bin:$PATH