about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nix-push.in5
-rw-r--r--scripts/readmanifest.pm.in3
2 files changed, 7 insertions, 1 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in
index c7da528b56b8..6760baa7e937 100644
--- a/scripts/nix-push.in
+++ b/scripts/nix-push.in
@@ -193,6 +193,10 @@ for (my $n = 0; $n < scalar @storePaths; $n++) {
     die "cannot query hash for `$storePath'" if $? != 0;
     chomp $narHash;
 
+    my $narSize = `$binDir/nix-store --query --size '$storePath'`;
+    die "cannot query size for `$storePath'" if $? != 0;
+    chomp $narSize;
+
     my $url;
     if ($localCopy) {
         $url = "$targetArchivesUrl/$narName";
@@ -204,6 +208,7 @@ for (my $n = 0; $n < scalar @storePaths; $n++) {
         , hash => "$hashAlgo:$narbz2Hash"
         , size => $narbz2Size
         , narHash => "$narHash"
+        , narSize => $narSize
         , references => $references
         , deriver => $deriver
         }
diff --git a/scripts/readmanifest.pm.in b/scripts/readmanifest.pm.in
index 7244984ead6a..2e6968c7d06b 100644
--- a/scripts/readmanifest.pm.in
+++ b/scripts/readmanifest.pm.in
@@ -165,8 +165,9 @@ sub writeManifest {
             print MANIFEST "  StorePath: $storePath\n";
             print MANIFEST "  NarURL: $narFile->{url}\n";
             print MANIFEST "  Hash: $narFile->{hash}\n" if defined $narFile->{hash};
-            print MANIFEST "  NarHash: $narFile->{narHash}\n";
             print MANIFEST "  Size: $narFile->{size}\n" if defined $narFile->{size};
+            print MANIFEST "  NarHash: $narFile->{narHash}\n";
+            print MANIFEST "  NarSize: $narFile->{narSize}\n" if $narFile->{narSize};
             print MANIFEST "  References: $narFile->{references}\n"
                 if defined $narFile->{references} && $narFile->{references} ne "";
             print MANIFEST "  Deriver: $narFile->{deriver}\n"