about summary refs log tree commit diff
path: root/scripts/nix-push.in
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-07-01T19·02+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-07-01T19·03+0200
commit5116214343ecce70a3cb7037f223313314a0a614 (patch)
treefe35411b06a074849b0cb538e4c5a9fc425346a4 /scripts/nix-push.in
parent798671163254d9766f711f4e8101bc72bcf4bd5c (diff)
Add support for uncompressed NARs in binary caches
Issue NixOS/hydra#102.
Diffstat (limited to 'scripts/nix-push.in')
-rwxr-xr-xscripts/nix-push.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in
index 7a6670f67bd3..2c392c4155d7 100755
--- a/scripts/nix-push.in
+++ b/scripts/nix-push.in
@@ -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";