The H
variant - self-modification of Nix-code from builtins.exec
in case of outdated lock-file - can be extended to managing sha256
of fetch*
-functions, removing this burden from people too:
If the url
passed to fetch*
function exists in <nixpkgs/fetch.lock>
- it will be used, otherwise - calculated and added.
Also, fetch.lock
would be the single source of truth for everything that nixpkgs downloads, for offline installation (it is of demand: Offline build "source closure", Using NixOS in an isolated environment, …)
Deleting of fetch.lock
would initiate mass-test for dead and changed links.