Troubleshooting fetch* commands (like fetchFromGitHub)

This is by design. It’s called a fixed-output derivation and it’s identified by its hash and not how it’s build. If you pass the same sha256 to two derivations Nix will think they are just two ways to build the same thing.

I opened a thread about this earlier and proposed a solution:

Actually, I think including the URL in the hash would have the same effect, since it would cause new builders to download the new files when the URL changes since the expression hash no longer is in the cache.

I think doing the above would help prevent a lot of confusion. I’m considering simply opening a PR to do this. Any objections?

1 Like