diff --git a/scripts/nix-pull b/scripts/nix-pull index 59773a2bad..a15af63020 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 () { @@ -55,8 +57,9 @@ while () { 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 () { } } + +system "nix --substitute @subs"; +if ($?) { die "`nix --substitute' failed"; }