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