about summary refs log tree commit diff
path: root/scripts/nix-push.in
diff options
context:
space:
mode:
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";