about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/interpreters/ruby/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/interpreters/ruby/default.nix')
-rw-r--r--nixpkgs/pkgs/development/interpreters/ruby/default.nix62
1 files changed, 5 insertions, 57 deletions
diff --git a/nixpkgs/pkgs/development/interpreters/ruby/default.nix b/nixpkgs/pkgs/development/interpreters/ruby/default.nix
index a562411cbb39..db611f66ad69 100644
--- a/nixpkgs/pkgs/development/interpreters/ruby/default.nix
+++ b/nixpkgs/pkgs/development/interpreters/ruby/default.nix
@@ -1,8 +1,9 @@
-{ stdenv, buildPackages, lib, defaultGemConfig, buildRubyGem
+{ stdenv, buildPackages, lib
 , fetchurl, fetchpatch, fetchFromSavannah, fetchFromGitHub
 , zlib, openssl, gdbm, ncurses, readline, groff, libyaml, libffi, jemalloc, autoreconfHook, bison
 , autoconf, libiconv, libobjc, libunwind, Foundation
-, buildEnv, bundler, bundix, makeWrapper, removeReferencesTo
+, buildEnv, bundler, bundix
+, makeWrapper, buildRubyGem, defaultGemConfig, removeReferencesTo
 } @ args:
 
 let
@@ -19,10 +20,6 @@ let
   generic = { version, sha256 }: let
     ver = version;
     tag = ver.gitTag;
-    isRuby20 = ver.majMin == "2.0";
-    isRuby21 = ver.majMin == "2.1";
-    atLeast25 = lib.versionAtLeast ver.majMin "2.5";
-    atLeast27 = lib.versionAtLeast ver.majMin "2.7";
     atLeast30 = lib.versionAtLeast ver.majMin "3.0";
     self = lib.makeOverridable (
       { stdenv, buildPackages, lib
@@ -92,14 +89,12 @@ let
 
         enableParallelBuilding = true;
 
-        hardeningDisable = lib.optional isRuby20 "format";
-
         patches =
           (import ./patchsets.nix {
             inherit patchSet useRailsExpress ops fetchpatch;
             patchLevel = ver.patchLevel;
           }).${ver.majMinTiny}
-          ++ op (atLeast27 && lib.versionOlder ver.majMin "3.1") ./do-not-regenerate-revision.h.patch
+          ++ op (lib.versionOlder ver.majMin "3.1") ./do-not-regenerate-revision.h.patch
           ++ op (atLeast30 && useBaseRuby) ./do-not-update-gems-baseruby.patch
           ++ ops (!atLeast30 && rubygemsSupport) [
             # We upgrade rubygems to a version that isn't compatible with the
@@ -121,16 +116,9 @@ let
           rm -rf $sourceRoot/{lib,test}/rubygems*
           cp -r ${rubygems}/lib/rubygems* $sourceRoot/lib
           cp -r ${rubygems}/test/rubygems $sourceRoot/test
-        '' + opString isRuby21 ''
-          rm "$sourceRoot/enc/unicode/name2ctype.h"
         '';
 
-        postPatch = if isRuby21 then ''
-          rm tool/config_files.rb
-          cp ${config}/config.guess tool/
-          cp ${config}/config.sub tool/
-        ''
-        else opString atLeast25 ''
+        postPatch = ''
           sed -i configure.ac -e '/config.guess/d'
           cp --remove-destination ${config}/config.guess tool/
           cp --remove-destination ${config}/config.sub tool/
@@ -275,46 +263,6 @@ in {
   mkRubyVersion = rubyVersion;
   mkRuby = generic;
 
-  ruby_1_9 = generic {
-    version = rubyVersion "1" "9" "3" "p551";
-    sha256 = "1s2ibg3s2iflzdv7rfxi1qqkvdbn2dq8gxdn0nxrb77ls5ffanxv";
-  };
-
-  ruby_2_0 = generic {
-    version = rubyVersion "2" "0" "0" "p648";
-    sha256 = "1y3n4c6xw2wki7pyjpq5zpbgxnw5i3jc8mcpj6rk7hs995mvv446";
-  };
-
-  ruby_2_1 = generic {
-    version = rubyVersion "2" "1" "10" "";
-    sha256 = "086x66w51lg41abjn79xb7f6xsryymkcc3nvakmkjnjyg96labpv";
-  };
-
-  ruby_2_2 = generic {
-    version = rubyVersion "2" "2" "9" "";
-    sha256 = "19m1ximl7vcrsvq595dgrjh4yb6kar944095wbywqh7waiqcfirg";
-  };
-
-  ruby_2_3 = generic {
-    version = rubyVersion "2" "3" "8" "";
-    sha256 = "1gwsqmrhpx1wanrfvrsj3j76rv888zh7jag2si2r14qf8ihns0dm";
-  };
-
-  ruby_2_4 = generic {
-    version = rubyVersion "2" "4" "9" "";
-    sha256 = "1bn6n5b920qy3lsx99jr8495jkc3sg89swgb96d5fgd579g6p6zr";
-  };
-
-  ruby_2_5 = generic {
-    version = rubyVersion "2" "5" "8" "";
-    sha256 = "16md4jspjwixjlbhx3pnd5iwpca07p23ghkxkqd82sbchw3xy2vc";
-  };
-
-  ruby_2_6 = generic {
-    version = rubyVersion "2" "6" "8" "";
-    sha256 = "0vfam28ifl6h2wxi6p70j0hm3f1pvsp432hf75m5j25wfy2vf1qq";
-  };
-
   ruby_2_7 = generic {
     version = rubyVersion "2" "7" "6" "";
     sha256 = "042xrdk7hsv4072bayz3f8ffqh61i8zlhvck10nfshllq063n877";