NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.86k stars 1.52k forks source link

Shallow realisations should go back to using regular drv paths #11897

Open Ericson2314 opened 4 days ago

Ericson2314 commented 4 days ago

This works especially nicely in conjunction with https://github.com/NixOS/nix/issues/11896

For deep realisations, using "derivation hashes modulo" helps save space. But for shallow ones, it achieves nothing, since those are already keyed on resolved derivations, which are always distinct modulo ways of producing inputs.

For shallow ones, we should just go back to using store paths, which will be simpler, and save implementations that only care about CA derivations from having to implement the cumbersome and ATerm-encumbered "derivation hash modulo" algorithm.

This is tantamount to reverting bab1cda0e6c30e25460b5a9c809589d3948f35df for shallow realisations; note that that affects all derivations.