about summary refs log tree commit diff
path: root/scripts/copy-from-other-stores.pl.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/copy-from-other-stores.pl.in')
-rw-r--r--scripts/copy-from-other-stores.pl.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/copy-from-other-stores.pl.in b/scripts/copy-from-other-stores.pl.in
index a6a14c3dc228..10130c0893ea 100644
--- a/scripts/copy-from-other-stores.pl.in
+++ b/scripts/copy-from-other-stores.pl.in
@@ -63,10 +63,15 @@ if ($ARGV[0] eq "--query") {
                 `@bindir@/nix-store --query --references $storePath`;
             die "cannot query references of `$storePath'" if $? != 0;
 
+            my $narSize = `@bindir@/nix-store --query --size $storePath`;
+            die "cannot query size of `$storePath'" if $? != 0;
+            chomp $narSize;
+
             print "$deriver\n";
             print scalar @references, "\n";
             print "$_\n" foreach @references;
-            print "0\n"; # !!! showing size not supported (yet)
+            print "$narSize\n";
+            print "$narSize\n";
         }
 
         else { die "unknown command `$cmd'"; }