mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
* Performance enhancement.
This commit is contained in:
parent
1d1c3691d2
commit
8511571f65
1 changed files with 8 additions and 2 deletions
|
@ -6,6 +6,8 @@ my $tmpfile = "$prefix/var/nix/pull.tmp";
|
||||||
|
|
||||||
my $conffile = "$etcdir/prebuilts.conf";
|
my $conffile = "$etcdir/prebuilts.conf";
|
||||||
|
|
||||||
|
my @subs;
|
||||||
|
|
||||||
open CONFFILE, "<$conffile";
|
open CONFFILE, "<$conffile";
|
||||||
|
|
||||||
while (<CONFFILE>) {
|
while (<CONFFILE>) {
|
||||||
|
@ -55,8 +57,9 @@ while (<CONFFILE>) {
|
||||||
chomp $nhash;
|
chomp $nhash;
|
||||||
die unless $nhash =~ /^([0-9a-z]{32})$/;
|
die unless $nhash =~ /^([0-9a-z]{32})$/;
|
||||||
|
|
||||||
system "nix --substitute $hash $nhash";
|
push @subs, $hash;
|
||||||
if ($?) { die "`nix --substitute' failed"; }
|
push @subs, $nhash;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close INDEX;
|
close INDEX;
|
||||||
|
@ -65,3 +68,6 @@ while (<CONFFILE>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
system "nix --substitute @subs";
|
||||||
|
if ($?) { die "`nix --substitute' failed"; }
|
||||||
|
|
Loading…
Reference in a new issue