Reduce size of /nix/store for @latest
What problem are you trying to solve?
When using devbox in CI to build a production release, I often see transitive dependencies of the same version downloaded multiple times, for example:
...
/nix/store/3s3rjkl3mx05wp0lmxgwkaqhbz9sy6kk-gcc-13.3.0
/nix/store/x8rg4vhgd20i8vzykm1196f9qdb8klhh-gcc-13.3.0
...
This is creating lots of traffic and big caches.
It happens, because different packages listed in devbox.json are pointing to the commit hash in nixpkgs corresponding to their version. Even if that version is resolved from latest.
What solution would you like?
Here is an idea, which I'm not sure how practical it is:
Pin all packages using @latest version to the same nixpkgs commit hash.
This would allow them to share most of their transitive dependencies and therefore reduce download sizes.
Alternatives you've considered
Ditching devbox and using flakes directly, with extra inputs for software that I want to pin to a specific version.