···
# Contains the ruby version heuristics
rubyVersion = import ./ruby-version.nix { inherit lib; };
-
generic = { version, sha256, cargoSha256 ? null }: let
atLeast30 = lib.versionAtLeast ver.majMin "3.0";
atLeast31 = lib.versionAtLeast ver.majMin "3.1";
···
url = "https://cache.ruby-lang.org/pub/ruby/${ver.majMin}/ruby-${ver}.tar.gz";
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
···
# Ruby 3.0 adds `-fdeclspec` to $CC instead of $CFLAGS. Fixed in later versions.
url = "https://github.com/ruby/ruby/commit/0acc05caf7518cd0d63ab02bfa036455add02346.patch";
-
sha256 = "sha256-43hI9L6bXfeujgmgKFVmiWhg7OXvshPCCtQ4TxqK1zk=";
++ ops (!atLeast30 && rubygemsSupport) [
···
# See https://github.com/ruby/ruby/pull/2930
url = "https://github.com/ruby/ruby/commit/261d8dd20afd26feb05f00a560abd99227269c1c.patch";
-
sha256 = "0wrii25cxcz2v8bgkrf7ibcanjlxwclzhayin578bf0qydxdm9qy";
···
cargoDeps = if yjitSupport then rustPlatform.fetchCargoTarball {
sourceRoot = "${pname}-${version}/${cargoRoot}";
postUnpack = opString rubygemsSupport ''
···
version = rubyVersion "2" "7" "8" "";
-
sha256 = "sha256-wtq2PLyPKgVSYQitQZ76Y6Z+1AdNu8+fwrHKZky0W6A=";
version = rubyVersion "3" "1" "4" "";
-
sha256 = "sha256-o9VYeaDfqx1xQf3xDSKgfb+OXNxEFdob3gYSfVzDx7Y=";
version = rubyVersion "3" "2" "2" "";
-
sha256 = "sha256-lsV1WIcaZ0jeW8nydOk/S1qtBs2PN776Do2U57ikI7w=";
-
cargoSha256 = "sha256-6du7RJo0DH+eYMOoh3L31F3aqfR5+iG1iKauSV1uNcQ=";
-
version = rubyVersion "3" "3" "0" "preview3";
-
sha256 = "sha256-CWkUG+kuZ+DtuEqPs1SsyY8BvXjmAqI6DxNgRcgvSAk=";
-
cargoSha256 = "sha256-GeelTMRFIyvz1QS2L+Q3KAnyQy7jc0ejhx3TdEFVEbk=";