diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-08-04 12:29:04 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-08-04 12:29:04 +0000 |
commit | c4f98941ed7e5e07786d92fc0be4435878f9b3cd (patch) | |
tree | 55d95e84f9ac65711144dd9456f71b0acc516ef8 /src/nix-env | |
parent | 03427e76f11fe1d918020d28bdb69b2fb348ee96 (diff) |
* nix-env --dry-run: show the total size of the substituter
downloads.
Diffstat (limited to 'src/nix-env')
-rw-r--r-- | src/nix-env/nix-env.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index ee870f690..085d83a5b 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -540,7 +540,8 @@ static void printMissing(EvalState & state, const DrvInfos & elems) targets.insert(i->queryOutPath(state)); } - queryMissing(targets, willBuild, willSubstitute, unknown); + unsigned long long downloadSize; + queryMissing(targets, willBuild, willSubstitute, unknown, downloadSize); if (!willBuild.empty()) { printMsg(lvlInfo, format("the following derivations will be built:")); @@ -549,7 +550,8 @@ static void printMissing(EvalState & state, const DrvInfos & elems) } if (!willSubstitute.empty()) { - printMsg(lvlInfo, format("the following paths will be downloaded/copied:")); + printMsg(lvlInfo, format("the following paths will be downloaded/copied (%.2f MiB):") % + (downloadSize / (1024.0 * 1024.0))); foreach (PathSet::iterator, i, willSubstitute) printMsg(lvlInfo, format(" %1%") % *i); } |