diff options
author | Shea Levy <shea@shealevy.com> | 2018-02-23 10:52:37 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-02-23 10:52:37 -0500 |
commit | adf8074abeed31453739dcecdd4f4a32c8c53eb6 (patch) | |
tree | 49935555cb5eea1fdd40ede64928f42f72ebbebc | |
parent | d12c9911dfcb336243c9d13b8bc7042be3f3d4b2 (diff) |
closureInfo: Report the total closure size.
This can be useful for e.g. preallocating disk image sizes.
-rw-r--r-- | pkgs/build-support/closure-info.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/build-support/closure-info.nix b/pkgs/build-support/closure-info.nix index 54b1fe59b66d3..96c37bccf2e94 100644 --- a/pkgs/build-support/closure-info.nix +++ b/pkgs/build-support/closure-info.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation { mkdir $out + jq -r ".closure | map(.narSize) | add" < .attrs.json > $out/total-nar-size jq -r '.closure | map([.path, .narHash, .narSize, "", (.references | length)] + .references) | add | map("\(.)\n") | add' < .attrs.json | head -n -1 > $out/registration jq -r .closure[].path < .attrs.json > $out/store-paths ''; |