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
Hash mismatch with builtins.fetchUrl and .xz file #2393
Comments
I can't upgrade nix because of this bug. Is there any way to circumvent it while upgrading to the version where it is fixed? |
Hm, why can't you upgrade? |
@edolstra Because nix depends on bootstrap-tools which refused to build because of this. I get the the error about mismatching hash for bootstrap-tools whenever I try to build anything on my raspberry pi. However I managed to work around it by changing the |
I'm having the same issue on my raspberry pi during initial installation |
@dali99 if you are running armv7l images on your pi, there is a procedure to bootstrap a separate nix in the linked issue. Be prepared for long build times. |
@anka-213 Got example of how you did this? I've been stuck on this error for too long. Thank you. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
Since the most recent update of Nix unstable in nixpkgs, I have started having issues building fetchUrl derivations with files with the
.xz
extension. They are being decompressed even when the unpack attribute is not set, which causes them to have the wrong hash.These commands demonstrate the problem:
This bug was introduced by d3761f5, which creates a decompression sink for
.xz
files even when theunpack
attribute is not set. The.xz
logic used to be inside theunpack
if statement, preventing this problem. I don't understand the code well enough to know the most elegant solution, but this issue can be trivially fixed by adding theunpack
condition to the condition that defines whether a decompression sink is used.The text was updated successfully, but these errors were encountered: