>Hi! I am managing an nixpkgs branch and this branch become more and
>more older. There already were issues where I had to change mirror
>urls because of missing sources. I'd like to store as much as possible
>into local repository in order to protect myself from such situations.
>Is there a way to recursively traverse nix expression tree and collect
>(and fetch) all the 'src' tarballs automatically?

It's relatively simple.

First, instantiate everything. Then find derivations (drv files) 
containing "md5" "sha1" or "sha256". Next, realise them: this will lead
to downloading everything.

For the benefit of future archive readers:

The commands to read about are:

nix-instantiate 
nix-store -r

Something similar is done in the script
https://github.com/NixOS/nix/blob/master/scripts/nix-reduce-build.in



_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to