bundix
bundix copied to clipboard
Use the rubygems.org API to get the sha256 hashes
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.
Oh, just realized I could do that myself :).
You can get the hashes, but resolving with Bundler requires the gemspecs, so downloading the gems is inevitable...
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 :(