nix path-info: Show download sizes for binary cache stores

E.g.

  $ nix path-info --json --store https://cache.nixos.org nixpkgs.thunderbird -S
  ...
      "downloadHash": "sha256:1jlixpzi225wwa0f4xdrwrqgi47ip1qpj9p06fyxxg07sfmyi4q0",
      "downloadSize": 43047620,
      "closureDownloadSize": 84745960
    }
  ]
This commit is contained in:
Eelco Dolstra 2017-07-14 17:36:49 +02:00
parent fdc9da034f
commit 766ad5db3b
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 30 additions and 9 deletions

View file

@ -84,7 +84,7 @@ struct CmdPathInfo : StorePathsCommand, MixJSON
std::cout << '\t' << std::setw(11) << info->narSize;
if (showClosureSize)
std::cout << '\t' << std::setw(11) << store->getClosureSize(storePath);
std::cout << '\t' << std::setw(11) << store->getClosureSize(storePath).first;
if (showSigs) {
std::cout << '\t';