aboutsummaryrefslogtreecommitdiff
path: root/scripts/nix-pull
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-pull')
-rw-r--r--scripts/nix-pull10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/nix-pull b/scripts/nix-pull
index 59773a2ba..a15af6302 100644
--- a/scripts/nix-pull
+++ b/scripts/nix-pull
@@ -6,6 +6,8 @@ my $tmpfile = "$prefix/var/nix/pull.tmp";
my $conffile = "$etcdir/prebuilts.conf";
+my @subs;
+
open CONFFILE, "<$conffile";
while (<CONFFILE>) {
@@ -55,8 +57,9 @@ while (<CONFFILE>) {
chomp $nhash;
die unless $nhash =~ /^([0-9a-z]{32})$/;
- system "nix --substitute $hash $nhash";
- if ($?) { die "`nix --substitute' failed"; }
+ push @subs, $hash;
+ push @subs, $nhash;
+
}
close INDEX;
@@ -65,3 +68,6 @@ while (<CONFFILE>) {
}
}
+
+system "nix --substitute @subs";
+if ($?) { die "`nix --substitute' failed"; }