-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
unison-ucm: 1.0.M1h-alpha -> 1.0.M1j-alpha #85940
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hash is mismatching on x86_64-linux (see the Checks results).
} | ||
else | ||
fetchurl { | ||
url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/unison-linux64.tar.gz"; | ||
sha256 = "0fb84c1yn8pidflh7kq696j3v4blkvbk1fsqp36h30p7vv676yci"; | ||
sha256 = "0ybs7y7p4wlhzl3vsn60wx9icf8pv09g2r6qcr2pyar76vd142sw"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hash should be 1xpblx405cp3mv0vrhcqwjlxvrhgmc77mxbvcy93srxja3qai1af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ nix-prefetch-url https://github.com/unisonweb/unison/releases/download/release/M1j/unison-linux64.tar.gz
[7.2 MiB DL]
path is '/nix/store/d6r6vvd6w1lamg37hh9dqqg4gi3mls8n-unison-linux64.tar.gz'
1xpblx405cp3mv0vrhcqwjlxvrhgmc77mxbvcy93srxja3qai1af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. I had done nix-prefetch-url --unpack https://github.com/unisonweb/unison/releases/download/release/M1j/unison-linux64.tar.gz
, which resulted in a different hash. When should you use --unpack
and when shouldn't you? I tried finding more information on this and couldn't find much. I think that I did the same for the Darwin file, so maybe that needs to change too? But it worked fine for me when I ran it locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh never mind, looking at my shell history I didn't do the same for Darwin, so it's probably right. Still if someone could shed some light on when to --unpack
and when not to, I'd appreciate it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ceedubs --unpack
is a hash of the content. You will need to use --unpack
to get hashes for fetchzip
, since that hashes the content. Not using --unpack
is a hash of the archive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@virusdave @worldofpeace
Sorry to butt in, but could/would someone help me understand the nix hashing here better? When I try to compute it using shasum
(which is what we use for the ucm homebrew formula), I get a different result from any of the above:
$ wget https://github.com/unisonweb/unison/releases/download/release/M1j/unison-linux64.tar.gz
$ shasum -a 256 unison-linux64.tar.gz
4e85a8f050b2673d92677bf57a0eab0fe6dda9e498c1bcc1aee3b20248a7ebf6 unison-linux64.tar.gz
$ shasum -a 1 unison-linux64.tar.gz
17d7b14f0eed55eb5edc31088db67ebc77168935 unison-linux64.tar.gz
Any ideas why? Thanks in advance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, hm, I guess it has to do with the encoding of the hash; shasum is using base16, and nix is using... base32, maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it doesn't seem to match according to any base32 alphabet I can find (rfc4648 base32, z-base-32, crockford's, base32hex, geohash). 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess nix uses its own alphabet, though I still can't seem to make the hash bits match up; but maybe it's enough to say that the appropriate hash comes from the nix tools (and not from elsewhere) and that's okay :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@virusdave @worldofpeace
Sorry to butt in, but could/would someone help me understand the nix hashing here better? When I try to compute it usingshasum
(which is what we use for the ucm homebrew formula), I get a different result from any of the above:$ wget https://github.com/unisonweb/unison/releases/download/release/M1j/unison-linux64.tar.gz $ shasum -a 256 unison-linux64.tar.gz 4e85a8f050b2673d92677bf57a0eab0fe6dda9e498c1bcc1aee3b20248a7ebf6 unison-linux64.tar.gz
$ nix-hash --to-base16 --type sha256 1xpblx405cp3mv0vrhcqwjlxvrhgmc77mxbvcy93srxja3qai1af
4e85a8f050b2673d92677bf57a0eab0fe6dda9e498c1bcc1aee3b20248a7ebf6
$ nix-hash --to-base32 --type sha256 4e85a8f050b2673d92677bf57a0eab0fe6dda9e498c1bcc1aee3b20248a7ebf6
1xpblx405cp3mv0vrhcqwjlxvrhgmc77mxbvcy93srxja3qai1af
They match :)
@GrahamcOfBorg build unison-ucm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Follow-up to NixOS#85940. There were a couple of issues with the 1.0.M1j-alpha release that were promptly fixed.
Replaces #84235
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)