From f8f607b824841943c53ed44fb7753c9e6814fbc9 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Sat, 28 Dec 2019 12:29:24 +0100 Subject: [PATCH] ruby_2_4: remove According to https://endoflife.software/programming-languages/server-side-scripting/ruby ruby 2.4 will go end-of-life in march, where the new release of nixpkgs will be cut. We won't be able to support it for security updates. Remove all references to ruby_2_4 and add ruby_2_7 instead where missing. Mark packages that depend on ruby 2.4 as broken: * chefdk * sonic-pi (cherry picked from commit bcdc90a3a7dba95a56db91dcd53b4b9f0e6d35aa) --- pkgs/applications/audio/sonic-pi/default.nix | 2 ++ .../development/interpreters/ruby/default.nix | 21 +++---------------- .../ruby-modules/with-packages/test.nix | 1 - pkgs/development/tools/chefdk/default.nix | 6 ++++-- pkgs/servers/http/unit/default.nix | 3 --- pkgs/top-level/aliases.nix | 6 ++++-- pkgs/top-level/all-packages.nix | 6 +----- 7 files changed, 14 insertions(+), 31 deletions(-) diff --git a/pkgs/applications/audio/sonic-pi/default.nix b/pkgs/applications/audio/sonic-pi/default.nix index ac72a26b0eecf4..534ea135880358 100644 --- a/pkgs/applications/audio/sonic-pi/default.nix +++ b/pkgs/applications/audio/sonic-pi/default.nix @@ -105,5 +105,7 @@ mkDerivation rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ Phlogistique kamilchm ]; platforms = lib.platforms.linux; + # sonic-pi depends on ruby 2.4 which we don't support anymore + broken = true; }; } diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 8b8e7ccc8bb07b..8ddd19bb40cc9a 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; - atLeast25 = lib.versionAtLeast ver.majMin "2.5"; atLeast27 = lib.versionAtLeast ver.majMin "2.7"; baseruby = self.override { useRailsExpress = false; @@ -77,14 +76,13 @@ let nativeBuildInputs = [ autoreconfHook bison ] ++ (op docSupport groff) ++ op (stdenv.buildPlatform != stdenv.hostPlatform) buildPackages.ruby; - buildInputs = - (op fiddleSupport libffi) + buildInputs = [ autoconf ] + ++ (op fiddleSupport libffi) ++ (ops cursesSupport [ ncurses readline ]) ++ (op zlibSupport zlib) ++ (op opensslSupport openssl) ++ (op gdbmSupport gdbm) ++ (op yamlSupport libyaml) - ++ (op atLeast25 autoconf) # Looks like ruby fails to build on darwin without readline even if curses # support is not enabled, so add readline to the build inputs if curses # support is disabled (if it's enabled, we already have it) and we're @@ -106,15 +104,10 @@ let cp -r ${rubygems}/test/rubygems $sourceRoot/test ''; - postPatch = if atLeast25 then '' + postPatch = '' sed -i configure.ac -e '/config.guess/d' cp --remove-destination ${config}/config.guess tool/ cp --remove-destination ${config}/config.sub tool/ - '' - else opString useRailsExpress '' - sed -i configure.in -e '/config.guess/d' - cp ${config}/config.guess tool/ - cp ${config}/config.sub tool/ ''; # Force the revision.h generation. Somehow `revision.tmp` is an empty @@ -230,14 +223,6 @@ let ) args; in self; in { - ruby_2_4 = generic { - version = rubyVersion "2" "4" "9" ""; - sha256 = { - src = "1bn6n5b920qy3lsx99jr8495jkc3sg89swgb96d5fgd579g6p6zr"; - git = "066kb1iki7mx7qkm10xhj5b6v8s47wg68v43l3nc36y2hyim1w2c"; - }; - }; - ruby_2_5 = generic { version = rubyVersion "2" "5" "7" ""; sha256 = { diff --git a/pkgs/development/ruby-modules/with-packages/test.nix b/pkgs/development/ruby-modules/with-packages/test.nix index dc1da3de492409..946854e4545ff9 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_4 ruby_2_5 ruby_2_6 ruby_2_7 diff --git a/pkgs/development/tools/chefdk/default.nix b/pkgs/development/tools/chefdk/default.nix index d30c0aaeb49646..5f6c2b156f3618 100644 --- a/pkgs/development/tools/chefdk/default.nix +++ b/pkgs/development/tools/chefdk/default.nix @@ -1,9 +1,9 @@ -{ lib, bundlerEnv, bundlerUpdateScript, ruby_2_4, perl, autoconf }: +{ lib, bundlerEnv, bundlerUpdateScript, ruby, perl, autoconf }: bundlerEnv { name = "chef-dk-2.4.17"; - ruby = ruby_2_4; + inherit ruby; gemdir = ./.; buildInputs = [ perl autoconf ]; @@ -16,5 +16,7 @@ bundlerEnv { license = licenses.asl20; maintainers = with maintainers; [ offline nicknovitski ]; platforms = platforms.unix; + # chefdk depends on ruby 2.4 which we don't support anymore + broken = true; }; } diff --git a/pkgs/servers/http/unit/default.nix b/pkgs/servers/http/unit/default.nix index c3af0d55543864..ab11481ccf32d0 100644 --- a/pkgs/servers/http/unit/default.nix +++ b/pkgs/servers/http/unit/default.nix @@ -6,7 +6,6 @@ , withPerl528 ? false, perl528 , withPerl530 ? true, perl530 , withPerldevel ? false, perldevel -, withRuby_2_4 ? false, ruby_2_4 , withRuby_2_5 ? false, ruby_2_5 , withRuby_2_6 ? true, ruby_2_6 , withRuby_2_7 ? true, ruby_2_7 @@ -43,7 +42,6 @@ stdenv.mkDerivation rec { ++ optional withPerl528 perl528 ++ optional withPerl530 perl530 ++ optional withPerldevel perldevel - ++ optional withRuby_2_4 ruby_2_4 ++ optional withRuby_2_5 ruby_2_5 ++ optional withRuby_2_6 ruby_2_6 ++ optional withRuby_2_7 ruby_2_7 @@ -66,7 +64,6 @@ stdenv.mkDerivation rec { ${optionalString withPerl528 "./configure perl --module=perl528 --perl=${perl528}/bin/perl"} ${optionalString withPerl530 "./configure perl --module=perl530 --perl=${perl530}/bin/perl"} ${optionalString withPerldevel "./configure perl --module=perldev --perl=${perldevel}/bin/perl"} - ${optionalString withRuby_2_4 "./configure ruby --module=ruby24 --ruby=${ruby_2_4}/bin/ruby"} ${optionalString withRuby_2_5 "./configure ruby --module=ruby25 --ruby=${ruby_2_5}/bin/ruby"} ${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/aliases.nix b/pkgs/top-level/aliases.nix index 43a0f829416053..8c7a728654aef5 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -378,8 +378,10 @@ mapAliases ({ ruby_2_2_9 = throw "deprecated 2018-0213: use a newer version of ruby"; ruby_2_3_6 = throw "deprecated 2018-0213: use a newer version of ruby"; ruby_2_3 = throw "deprecated 2019-09-06: use a newer version of ruby"; - ruby_2_4_3 = throw "deprecated 2018-0213: use ruby_2_4 instead"; - ruby_2_5_0 = throw "deprecated 2018-0213: use ruby_2_5 instead"; + ruby_2_4_3 = throw "deprecated 2018-0213: use a newer version of ruby"; + ruby_2_4 = throw "deprecated 2019-12: use a newer version of ruby"; + ruby_2_5_0 = throw "deprecated 2018-0213: use a newer version of ruby"; + rubyPackages_2_4 = throw "deprecated 2019-12: use a newer version of rubyPackages instead"; rubygems = throw "deprecated 2016-03-02: rubygems is now bundled with ruby"; rxvt_unicode_with-plugins = rxvt-unicode; # added 2020-02-02 rxvt_unicode = rxvt-unicode-unwrapped; # added 2020-02-02 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b325f77a87afdf..0cd67572edef84 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9426,7 +9426,6 @@ in inherit (darwin) libiconv libobjc libunwind; inherit (darwin.apple_sdk.frameworks) Foundation; }) - ruby_2_4 ruby_2_5 ruby_2_6 ruby_2_7; @@ -9447,7 +9446,6 @@ in ruby = ruby_2_6; rubyPackages = rubyPackages_2_6; - rubyPackages_2_4 = recurseIntoAttrs ruby_2_4.gems; rubyPackages_2_5 = recurseIntoAttrs ruby_2_5.gems; rubyPackages_2_6 = recurseIntoAttrs ruby_2_6.gems; rubyPackages_2_7 = recurseIntoAttrs ruby_2_7.gems; @@ -21349,9 +21347,7 @@ in wavebox = callPackage ../applications/networking/instant-messengers/wavebox { }; - sonic-pi = libsForQt5.callPackage ../applications/audio/sonic-pi { - ruby = ruby_2_4; # sonic-pi build breaks with ruby 2.5 and 2.6 - }; + sonic-pi = libsForQt5.callPackage ../applications/audio/sonic-pi { }; st = callPackage ../applications/misc/st { conf = config.st.conf or null;