bundix icon indicating copy to clipboard operation
bundix copied to clipboard

Use the rubygems.org API to get the sha256 hashes

Open cstrahan opened this issue 9 years ago • 3 comments

The version endpoint includes the corresponding sha256 hash (base16 encoded). We ought to use that, instead of using nix-prefetch-url.

If you'll asign this to me, I'll try to get to it when I have time.

cstrahan avatar Apr 17 '16 23:04 cstrahan

Oh, just realized I could do that myself :).

cstrahan avatar Apr 17 '16 23:04 cstrahan

You can get the hashes, but resolving with Bundler requires the gemspecs, so downloading the gems is inevitable...

manveru avatar Apr 18 '16 08:04 manveru

Played around a bit more, and I think the mistake I made is that I wasn't selecting the right platform for some gems that have more... That gave me the wrong hash in some cases.

nix-hash --type sha256 --base32 --to-base32 $(curl -s https://rubygems.org/api/v1/versions/bcrypt.json | jq -r '.[] | select(.number == "3.1.11" and .platform == "ruby") | .sha')

Still doesn't change the fact that you cannot resolve Gemfile groups without the gems themselves :(

manveru avatar Apr 18 '16 09:04 manveru