From 51c6383ebd10ea58094e80bdb0ead73b838f8b9c Mon Sep 17 00:00:00 2001 From: Rickard Nilsson Date: Mon, 11 Jan 2016 19:43:05 +0100 Subject: nixos-rebuild: Build only the 'out' output of nix (not 'doc' and 'debug' too) This fixes the failing NixOS installer tests. --- nixos/modules/installer/tools/nixos-rebuild.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/installer/tools/nixos-rebuild.sh b/nixos/modules/installer/tools/nixos-rebuild.sh index 1071460097e8d..105d1cd162526 100644 --- a/nixos/modules/installer/tools/nixos-rebuild.sh +++ b/nixos/modules/installer/tools/nixos-rebuild.sh @@ -270,9 +270,9 @@ remotePATH= if [ -n "$buildNix" ]; then echo "building Nix..." >&2 nixDrv= - if ! nixDrv="$(nix-instantiate '' --add-root $tmpDir/nixdrv --indirect -A config.nix.package "${extraBuildFlags[@]}")"; then - if ! nixDrv="$(nix-instantiate '' --add-root $tmpDir/nixdrv --indirect -A nixFallback "${extraBuildFlags[@]}")"; then - if ! nixDrv="$(nix-instantiate '' --add-root $tmpDir/nixdrv --indirect -A nix "${extraBuildFlags[@]}")"; then + if ! nixDrv="$(nix-instantiate '' --add-root $tmpDir/nix.drv --indirect -A config.nix.package "${extraBuildFlags[@]}")"; then + if ! nixDrv="$(nix-instantiate '' --add-root $tmpDir/nix.drv --indirect -A nixFallback "${extraBuildFlags[@]}")"; then + if ! nixDrv="$(nix-instantiate '' --add-root $tmpDir/nix.drv --indirect -A nix "${extraBuildFlags[@]}")"; then nixStorePath="$(prebuiltNix "$(uname -m)")" if ! nix-store -r $nixStorePath --add-root $tmpDir/nix --indirect \ --option extra-binary-caches https://cache.nixos.org/; then @@ -293,7 +293,7 @@ if [ -n "$buildNix" ]; then fi fi if [ -a "$nixDrv" ]; then - nix-store -r "$nixDrv" --add-root $tmpDir/nix --indirect >/dev/null + nix-store -r "$nixDrv"'!'"out" --add-root $tmpDir/nix --indirect >/dev/null if [ -n "$buildHost" ]; then nix-copy-closure --to "$buildHost" "$nixDrv" # The nix build produces multiple outputs, we add them all to the remote path -- cgit 1.4.1