aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nix-pull.in10
1 files changed, 2 insertions, 8 deletions
diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in
index e5c9cac53..eb14a1739 100644
--- a/scripts/nix-pull.in
+++ b/scripts/nix-pull.in
@@ -1,7 +1,6 @@
#! @perl@ -w -I@libexecdir@/nix
use strict;
-use IPC::Open2;
use POSIX qw(tmpnam);
use readmanifest;
@@ -74,11 +73,9 @@ print "$size store paths in manifest\n";
# Register all substitutes.
print STDERR "registering substitutes...\n";
-my $pid = open2(\*READ, \*WRITE, "$binDir/nix-store --register-substitutes")
+my $pid = open(WRITE, "|$binDir/nix-store --register-substitutes")
or die "cannot run nix-store";
-close READ;
-
foreach my $storePath (keys %narFiles) {
my $narFileList = $narFiles{$storePath};
foreach my $narFile (@{$narFileList}) {
@@ -95,7 +92,4 @@ foreach my $storePath (keys %narFiles) {
}
}
-close WRITE;
-
-waitpid $pid, 0;
-$? == 0 or die "nix-store failed";
+close WRITE or die "nix-store failed: $?";