ruby: move towards ruby 3
Currently, `pkgs.ruby` is ruby 2.7.6, which is in 'security updates only' mode and scheduled to go EOL April 2023. Updating `pkgs.ruby` to be ruby 3.1 would be a rather large change, but using ruby 3 to bootstrap building ruby itself would be a nice first step in that direction. Tested with asciidoctor that this indeed now allows building a ruby application without getting ruby 2.7 in the build closure. Also fixes #192729
This commit is contained in:
parent
ae1dc133ea
commit
c5e2f3c066
|
@ -48,7 +48,7 @@ let
|
||||||
, buildEnv, bundler, bundix
|
, buildEnv, bundler, bundix
|
||||||
, libiconv, libobjc, libunwind, Foundation
|
, libiconv, libobjc, libunwind, Foundation
|
||||||
, makeWrapper, buildRubyGem, defaultGemConfig
|
, makeWrapper, buildRubyGem, defaultGemConfig
|
||||||
, baseRuby ? buildPackages.ruby.override {
|
, baseRuby ? buildPackages.ruby_3_1.override {
|
||||||
useRailsExpress = false;
|
useRailsExpress = false;
|
||||||
docSupport = false;
|
docSupport = false;
|
||||||
rubygemsSupport = false;
|
rubygemsSupport = false;
|
||||||
|
|
|
@ -35,7 +35,9 @@
|
||||||
}@args:
|
}@args:
|
||||||
|
|
||||||
let
|
let
|
||||||
basicEnv = (callPackage ../bundled-common {}) args;
|
basicEnv = (callPackage ../bundled-common {
|
||||||
|
inherit ruby;
|
||||||
|
}) args;
|
||||||
|
|
||||||
cmdArgs = removeAttrs args [ "pname" "postBuild" "gemConfig" "passthru" "gemset" "gemdir" ] // {
|
cmdArgs = removeAttrs args [ "pname" "postBuild" "gemConfig" "passthru" "gemset" "gemdir" ] // {
|
||||||
inherit preferLocalBuild allowSubstitutes; # pass the defaults
|
inherit preferLocalBuild allowSubstitutes; # pass the defaults
|
||||||
|
|
|
@ -4855,7 +4855,13 @@ with pkgs;
|
||||||
enableExtraPlugins = true;
|
enableExtraPlugins = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
asciidoctor = callPackage ../tools/typesetting/asciidoctor { };
|
asciidoctor = callPackage ../tools/typesetting/asciidoctor {
|
||||||
|
bundlerApp = bundlerApp.override {
|
||||||
|
# asciidoc supports both ruby 2 and 3,
|
||||||
|
# but we don't want to be stuck on it:
|
||||||
|
ruby = ruby_3_1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
asciidoctor-with-extensions = callPackage ../tools/typesetting/asciidoctor-with-extensions { };
|
asciidoctor-with-extensions = callPackage ../tools/typesetting/asciidoctor-with-extensions { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue