Merge pull request #273819 from kirillrdy/ruby

ruby_3_3: preview3 -> rc1
This commit is contained in:
Mario Rodas 2023-12-16 18:42:16 -05:00 committed by GitHub
commit 81d07ef48f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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