[Nix-dev] Getting the size of a store path + depths

Lluís Batlle viriketo at gmail.com
Wed Jan 20 23:12:25 CET 2010


El 20 de gener de 2010 21:56, Eelco Dolstra <e.dolstra at tudelft.nl> ha escrit:
> Hi,
>
> Michael Raskin wrote:
>
>> Lluís Batlle wrote:
>>> some days ago niksnut talked about "the size of the stdenv closure".
>>> How can I get the size of a closure, containing all its dependencies?
>>> I have not found any easy way, and I imagine there may be such.
>>
>> nix-store -qR /nix/store/path | xargs du -s | cut -f 1 | xargs | sed -e
>> 's/ /+/' | bc
>
> Even simpler: du -sch $(nix-store -qR $path)
Ahhh! "print all paths necessary to realise the path". I thought this
had to do with build time dependencies somehow.
Clear!

Thank you!

(Michael, thanks for the tip on doing the addition. I once made a
program that adds all the numbers taken into stdin, and that is what I
used until this. )



More information about the nix-dev mailing list