closureInfo: Report the total closure size.

This can be useful for e.g. preallocating disk image sizes.
This commit is contained in:
Shea Levy 2018-02-23 10:52:37 -05:00
parent d12c9911df
commit adf8074abe
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27

View File

@ -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
'';