* nixos-rebuild: before building NixOS, first build the latest Nix and

use that one to build NixOS.  This will make it easier to use
  bleeding-edge features in the NixOS expressions.

svn path=/nixos/trunk/; revision=9336
This commit is contained in:
Eelco Dolstra 2007-09-18 15:38:05 +00:00
parent f2780fdc62
commit b9dd7509b6
2 changed files with 12 additions and 0 deletions

View file

@ -26,6 +26,8 @@ in
config
;
nixFallback = system.nix;
manifests = system.config.get ["installer" "manifests"]; # exported here because nixos-rebuild uses it
upstartJobsCombined = system.upstartJobs;

View file

@ -40,6 +40,13 @@ if test -z "$NIXOS_NO_PULL"; then
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
PATH=$HOME/nix-tmp/bin:$PATH
# Either upgrade the configuration in the system profile (for "switch"
# or "boot"), or just build it and create a symlink "result" in the
# current directory (for "build" and "test").
@ -69,3 +76,6 @@ active system configuration may be garbage collected! This may render
the system inoperable (though a reboot will fix things).
EOF
fi
rm -f $HOME/nix-tmp