How to correctly cache build-time dependencies using Nix -

1 Like

A possible adverse edge-case here would be that if you were hacking on i.e. stdenv before and had its build deps in the store, those would get uploaded to the store too eventhough they were never used in the build of the project on your machine.

It’d probably be better and overall more robust to cache all transitive build inputs that are not present on instead.

Any easy way to do that?

I’m not aware of an easier one than iterating through the list of dependencies and querying<long hash>.narinfo.

Hosted by Flying Circus.