Skip to content

Commit

Permalink
ruby_2_4: remove
Browse files Browse the repository at this point in the history
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 bcdc90a)
  • Loading branch information
zimbatm authored and worldofpeace committed Feb 10, 2020
1 parent 793fc88 commit f8f607b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 31 deletions.
2 changes: 2 additions & 0 deletions pkgs/applications/audio/sonic-pi/default.nix
Expand Up @@ -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;
};
}
21 changes: 3 additions & 18 deletions pkgs/development/interpreters/ruby/default.nix
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 = {
Expand Down
1 change: 0 additions & 1 deletion pkgs/development/ruby-modules/with-packages/test.nix
Expand Up @@ -6,7 +6,6 @@ let
stdenv = pkgs.stdenv;

rubyVersions = with pkgs; [
ruby_2_4
ruby_2_5
ruby_2_6
ruby_2_7
Expand Down
6 changes: 4 additions & 2 deletions 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 ];
Expand All @@ -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;
};
}
3 changes: 0 additions & 3 deletions pkgs/servers/http/unit/default.nix
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"}
Expand Down
6 changes: 4 additions & 2 deletions pkgs/top-level/aliases.nix
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f8f607b

Please sign in to comment.