about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/nix-switch.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/nix-switch.in b/scripts/nix-switch.in
index 55305418c7f6..2ccb6b4e5786 100755
--- a/scripts/nix-switch.in
+++ b/scripts/nix-switch.in
@@ -15,6 +15,9 @@ $hash || die "no package hash specified";
 my $linkdir = "@localstatedir@/nix/links";
 
 # Build the specified package, and all its dependencies.
+system "nix -ih $hash";
+if ($?) { die "`nix -ih' failed"; }
+
 my $pkgdir = `nix -qph $hash`;
 if ($?) { die "`nix -qph' failed"; }
 chomp $pkgdir;