* Add a NarSize field to Hydra manifests. This allows nix-env

to predict how much disk space a package will require.
* Compute the output / closure size using the info stored in the
  Nix database (rather than doing a slow "du").
This commit is contained in:
Eelco Dolstra
2010-11-19 15:44:20 +00:00
parent ba31684153
commit a93e272364
4 changed files with 17 additions and 24 deletions

View File

@ -21,7 +21,7 @@ sub process {
"}\n";
foreach my $path (@paths) {
my ($hash, $deriver, $refs) = queryPathInfo $path;
my ($deriver, $hash, $time, $narSize, $refs) = Nix::queryPathInfo $path;
# Escape the characters that are allowed to appear in a Nix
# path name but have special meaning in a URI.
@ -40,6 +40,7 @@ sub process {
(defined $deriver ? " Deriver: $deriver\n" : "") .
" NarURL: $url\n" .
" NarHash: $hash\n" .
($narSize != 0 ? " NarSize: $narSize\n" : "") .
"}\n";
}