mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
* Fix for too long command lines when calling `nix-store
--register-[substitutes|successors].
This commit is contained in:
parent
00d4f907e1
commit
feaab52203
1 changed files with 16 additions and 4 deletions
|
@ -139,11 +139,23 @@ $? == 0 or die "nix-instantiate failed";
|
||||||
|
|
||||||
# Register all substitutes.
|
# Register all substitutes.
|
||||||
print STDERR "registering substitutes...\n";
|
print STDERR "registering substitutes...\n";
|
||||||
system "nix-store --substitute @subs";
|
while (scalar @subs > 0) {
|
||||||
if ($?) { die "`nix-store --substitute' failed"; }
|
my $n = scalar @subs;
|
||||||
|
if ($n > 256) { $n = 256 };
|
||||||
|
my @subs2 = @subs[0..$n - 1];
|
||||||
|
@subs = @subs[$n..scalar @subs - 1];
|
||||||
|
system "nix-store --substitute @subs2";
|
||||||
|
if ($?) { die "`nix-store --substitute' failed"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Register all successors.
|
# Register all successors.
|
||||||
print STDERR "registering successors...\n";
|
print STDERR "registering successors...\n";
|
||||||
system "nix-store --successor @sucs";
|
while (scalar @sucs > 0) {
|
||||||
if ($?) { die "`nix-store --successor' failed"; }
|
my $n = scalar @sucs;
|
||||||
|
if ($n > 256) { $n = 256 };
|
||||||
|
my @sucs2 = @sucs[0..$n - 1];
|
||||||
|
@sucs = @sucs[$n..scalar @sucs - 1];
|
||||||
|
system "nix-store --successor @sucs";
|
||||||
|
if ($?) { die "`nix-store --successor' failed"; }
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue