Merge pull request #142414 from trofi/drop-ruby-2.6

conduit-nginx
Sandro 2021-10-22 15:15:51 +02:00 committed by GitHub
commit 3b10c17870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 33 deletions

View File

@ -8,7 +8,7 @@ In the Nixpkgs tree, Ruby packages can be found throughout, depending on what th
There are two main approaches for using Ruby with gems. One is to use a specifically locked `Gemfile` for an application that has very strict dependencies. The other is to depend on the common gems, which we'll explain further down, and rely on them being updated regularly.
The interpreters have common attributes, namely `gems`, and `withPackages`. So you can refer to `ruby.gems.nokogiri`, or `ruby_2_6.gems.nokogiri` to get the Nokogiri gem already compiled and ready to use.
The interpreters have common attributes, namely `gems`, and `withPackages`. So you can refer to `ruby.gems.nokogiri`, or `ruby_2_7.gems.nokogiri` to get the Nokogiri gem already compiled and ready to use.
Since not all gems have executables like `nokogiri`, it's usually more convenient to use the `withPackages` function like this: `ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the Ruby in your environment will be able to find the gem and it can be used in your Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"` as usual.

View File

@ -26,7 +26,6 @@ let
generic = { version, sha256 }: let
ver = version;
tag = ver.gitTag;
atLeast27 = lib.versionAtLeast ver.majMin "2.7";
atLeast30 = lib.versionAtLeast ver.majMin "3.0";
baseruby = self.override {
useRailsExpress = false;
@ -105,7 +104,7 @@ let
inherit patchSet useRailsExpress ops fetchpatch;
patchLevel = ver.patchLevel;
}).${ver.majMinTiny}
++ op atLeast27 ./do-not-regenerate-revision.h.patch
++ [ ./do-not-regenerate-revision.h.patch ]
++ op (atLeast30 && useRailsExpress) ./do-not-update-gems-baseruby.patch
# Ruby prior to 3.0 has a bug the installer (tools/rbinstall.rb) but
# the resulting error was swallowed. Newer rubygems no longer swallows
@ -252,14 +251,6 @@ let
) args; in self;
in {
ruby_2_6 = generic {
version = rubyVersion "2" "6" "8" "";
sha256 = {
src = "0vfam28ifl6h2wxi6p70j0hm3f1pvsp432hf75m5j25wfy2vf1qq";
git = "0rc3n6sk8632r0libpv8jwslc7852hgk64rvbdrspc9razjwx21c";
};
};
ruby_2_7 = generic {
version = rubyVersion "2" "7" "4" "";
sha256 = {

View File

@ -1,11 +1,6 @@
{ patchSet, useRailsExpress, ops, patchLevel, fetchpatch }:
{
"2.6.8" = ops useRailsExpress [
"${patchSet}/patches/ruby/2.6/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch"
"${patchSet}/patches/ruby/2.6/head/railsexpress/02-improve-gc-stats.patch"
"${patchSet}/patches/ruby/2.6/head/railsexpress/03-more-detailed-stacktrace.patch"
];
"2.7.4" = ops useRailsExpress [
"${patchSet}/patches/ruby/2.7/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/02-improve-gc-stats.patch"

View File

@ -6,7 +6,6 @@ let
stdenv = pkgs.stdenv;
rubyVersions = with pkgs; [
ruby_2_6
ruby_2_7
];

View File

@ -7,7 +7,6 @@
, withPerl532 ? false, perl532
, withPerl534 ? true, perl534
, withPerldevel ? false, perldevel
, withRuby_2_6 ? true, ruby_2_6
, withRuby_2_7 ? false, ruby_2_7
, withSSL ? true, openssl ? null
, withIPv6 ? true
@ -50,7 +49,6 @@ in stdenv.mkDerivation rec {
++ optional withPerl532 perl532
++ optional withPerl534 perl534
++ optional withPerldevel perldevel
++ optional withRuby_2_6 ruby_2_6
++ optional withRuby_2_7 ruby_2_7
++ optional withSSL openssl;
@ -75,7 +73,6 @@ in stdenv.mkDerivation rec {
${optionalString withPerl532 "./configure perl --module=perl532 --perl=${perl532}/bin/perl"}
${optionalString withPerl534 "./configure perl --module=perl534 --perl=${perl534}/bin/perl"}
${optionalString withPerldevel "./configure perl --module=perldev --perl=${perldevel}/bin/perl"}
${optionalString withRuby_2_6 "./configure ruby --module=ruby26 --ruby=${ruby_2_6}/bin/ruby"}
${optionalString withRuby_2_7 "./configure ruby --module=ruby27 --ruby=${ruby_2_7}/bin/ruby"}
'';

View File

@ -777,17 +777,6 @@ mapAliases ({
rkt = throw "rkt was archived by upstream"; # added 2020-05-16
rpiboot-unstable = rpiboot; # added 2021-07-30
rtv = throw "rtv was archived by upstream. Consider using tuir, an actively maintained fork"; # added 2021-08-08
ruby_2_0_0 = throw "ruby_2_0_0 was deprecated on 2018-02-13: use a newer version of ruby";
ruby_2_1_0 = throw "ruby_2_1_0 was deprecated on 2018-02-13: use a newer version of ruby";
ruby_2_2_9 = throw "ruby_2_2_9 was deprecated on 2018-02-13: use a newer version of ruby";
ruby_2_3_6 = throw "ruby_2_3_6 was deprecated on 2018-02-13: use a newer version of ruby";
ruby_2_3 = throw "ruby_2_3 was deprecated on 2019-09-06: use a newer version of ruby";
ruby_2_4_3 = throw "ruby_2_4_3 was deprecated on 2018-02-13: use a newer version of ruby";
ruby_2_4 = throw "ruby_2_4 was deprecated in 2019-12: use a newer version of ruby";
ruby_2_5_0 = throw "ruby_2_5_0 was deprecated on 2018-02-13: use a newer version of ruby";
rubyPackages_2_4 = throw "rubyPackages_2_4 was deprecated in 2019-12: use a newer version of rubyPackages instead";
ruby_2_5 = throw "ruby_2_5 was deprecated in 2021-02: use a newer version of ruby";
rubyPackages_2_5 = throw "rubyPackages_2_5 was deprecated in 2021-02: use a newer version of rubyPackages instead";
rubygems = throw "rubygems was deprecated on 2016-03-02: rubygems is now bundled with ruby";
rubyMinimal = throw "rubyMinimal was removed due to being unused";
runCommandNoCC = runCommand;

View File

@ -13504,14 +13504,12 @@ with pkgs;
autoreconfHook = buildPackages.autoreconfHook269;
bison = buildPackages.bison_3_5;
})
ruby_2_6
ruby_2_7
ruby_3_0;
ruby = ruby_2_7;
rubyPackages = rubyPackages_2_7;
rubyPackages_2_6 = recurseIntoAttrs ruby_2_6.gems;
rubyPackages_2_7 = recurseIntoAttrs ruby_2_7.gems;
rubyPackages_3_0 = recurseIntoAttrs ruby_3_0.gems;