mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
Add support for uncompressed NARs in binary caches
Issue NixOS/hydra#102.
This commit is contained in:
parent
7986711632
commit
5116214343
6 changed files with 31 additions and 17 deletions
|
@ -34,6 +34,8 @@ for (my $n = 0; $n < scalar @ARGV; $n++) {
|
|||
exec "man nix-push" or die;
|
||||
} elsif ($arg eq "--bzip2") {
|
||||
$compressionType = "bzip2";
|
||||
} elsif ($arg eq "--none") {
|
||||
$compressionType = "none";
|
||||
} elsif ($arg eq "--force") {
|
||||
$force = 1;
|
||||
} elsif ($arg eq "--dest") {
|
||||
|
@ -202,7 +204,7 @@ for (my $n = 0; $n < scalar @storePaths2; $n++) {
|
|||
$compressedHash =~ /^[0-9a-z]+$/ or die "invalid hash";
|
||||
close HASH;
|
||||
|
||||
my $narName = "$compressedHash.nar." . ($compressionType eq "xz" ? "xz" : "bz2");
|
||||
my $narName = "$compressedHash.nar" . ($compressionType eq "xz" ? ".xz" : $compressionType eq "bzip2" ? ".bz2" : "");
|
||||
|
||||
my $narFile = "$narDir/$narName";
|
||||
(-f $narFile) or die "NAR file for $storePath not found";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue