diff --git a/doc/languages-frameworks/ruby.section.md b/doc/languages-frameworks/ruby.section.md index 36b794458cba..5e2f72ed61ec 100644 --- a/doc/languages-frameworks/ruby.section.md +++ b/doc/languages-frameworks/ruby.section.md @@ -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. diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index ba132acf722f..b6010cf32d10 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -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 = { diff --git a/pkgs/development/interpreters/ruby/patchsets.nix b/pkgs/development/interpreters/ruby/patchsets.nix index 5c2992bb859b..3ea358c349a3 100644 --- a/pkgs/development/interpreters/ruby/patchsets.nix +++ b/pkgs/development/interpreters/ruby/patchsets.nix @@ -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" diff --git a/pkgs/development/ruby-modules/with-packages/test.nix b/pkgs/development/ruby-modules/with-packages/test.nix index bcd9a787f7d3..ca2934b6f61c 100644 --- a/pkgs/development/ruby-modules/with-packages/test.nix +++ b/pkgs/development/ruby-modules/with-packages/test.nix @@ -6,7 +6,6 @@ let stdenv = pkgs.stdenv; rubyVersions = with pkgs; [ - ruby_2_6 ruby_2_7 ]; diff --git a/pkgs/servers/http/unit/default.nix b/pkgs/servers/http/unit/default.nix index d08161c76b24..4503d362dc63 100644 --- a/pkgs/servers/http/unit/default.nix +++ b/pkgs/servers/http/unit/default.nix @@ -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"} ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a2627771d7c5..e80d7f53abb7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13465,14 +13465,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;