New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "fetchzip and friends: Set "name" to "source" by default" #31004
Conversation
NixOS@c3255fe#commitcomment-25286020 This change invalidated all fetch* hashes, and nothing could be built.
This makes them produce the same store paths as builtins.fetchgit, builtins.fetchTarball etc. See NixOS/nix@65b5f17.
/cc @edolstra. |
I don't understand why this should be reverted, isn't that what staging is for? |
@domenkozar: the claim is that it would require us to rewrite all the hashes in sources. |
@domenkozar The value of
That commit changed names of all fetch derivations without updating their hashes. |
This is incorrect. The output hash does not depend on For example, building
without requiring a change to the |
Do you have an example of a particular package that fails to build? |
@orivej I suspect you'll also get the same hash mismatch if you force a rebuild of the sources.
|
I think Hydra will discover the failing fetches soon on staging, and we'll have to fix those individual hashes. Probably hunspell and lua failures from here: https://hydra.nixos.org/eval/1406150?compare=1406145#tabs-now-fail |
@LnL7 Indeed. The rebuild failed with hash mismatch, I knew that the hash in the nix store depends on derivation name, but I did not consider that it may be computed from the specified
The Still, the motivation for c3255fe is not clear to me. How is that useful? Readable names in nix store are definitely desirable (e.g. a860360) — I would not like to turn |
@orivej For the motivation, see Domen's NixCon talk. We currently have 5 different names/store paths generated for the same tree (in builtins.fetchTarball, builtins.fetchGit, Nixpkgs nix-prefetch-git, Hydra nix-prefetch-git, or using ./.). Thus, for example, the same tree built via |
The original commit is now in master, though some fallback hasn't been resolved yet. Some of it are just uncovering of force-updated git tags upstream and similar stuff, some are packages assuming that the name of the source has a particular format – with some special cases where you have multiple sources and thus get a new name collision during unpacking (example: dmd). Having the less descriptive name is a disadvantage. Perhaps in future we could devise a nicer scheme for default naming that's also consistent among all the fetching mechanisms... |
For what it's worth, this does actually have a nontrivial effect on some derivations. Most notably for me are image builds, which actually care about the store path in question to inject a channel into the image being built. Not a big deal, but it was confusing for a bit 😄 |
c3255fe#commitcomment-25286020
This change invalidated all fetch* hashes, and nothing in staging could be built.