summary refs log tree commit diff
path: root/pkgs/development/interpreters/ruby
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2018-12-27 18:11:34 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2018-12-27 18:11:34 +0100
commit10afccf1455167972b559f32b3b1495a07593cf1 (patch)
treeb0f0d3e167586472e629f336337a1e15f750a318 /pkgs/development/interpreters/ruby
parente039310f9673d8e4d4975c0aa97e7b294536e4b5 (diff)
parent22d2b84f0f76acc11c57c71ded207e2653bbef33 (diff)
downloadnixpkgs-10afccf1455167972b559f32b3b1495a07593cf1.tar
nixpkgs-10afccf1455167972b559f32b3b1495a07593cf1.tar.gz
nixpkgs-10afccf1455167972b559f32b3b1495a07593cf1.tar.bz2
nixpkgs-10afccf1455167972b559f32b3b1495a07593cf1.tar.lz
nixpkgs-10afccf1455167972b559f32b3b1495a07593cf1.tar.xz
nixpkgs-10afccf1455167972b559f32b3b1495a07593cf1.tar.zst
nixpkgs-10afccf1455167972b559f32b3b1495a07593cf1.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/interpreters/ruby')
-rw-r--r--pkgs/development/interpreters/ruby/default.nix15
-rw-r--r--pkgs/development/interpreters/ruby/patchsets.nix2
2 files changed, 14 insertions, 3 deletions
diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix
index 1ee5c0b57ac..7365cd52273 100644
--- a/pkgs/development/interpreters/ruby/default.nix
+++ b/pkgs/development/interpreters/ruby/default.nix
@@ -32,7 +32,7 @@ let
   generic = { version, sha256 }: let
     ver = version;
     tag = ver.gitTag;
-    isRuby25 = ver.majMin == "2.5";
+    atLeast25 = lib.versionAtLeast ver.majMin "2.5";
     baseruby = self.override { useRailsExpress = false; };
     self = lib.makeOverridable (
       { stdenv, buildPackages, lib
@@ -56,7 +56,7 @@ let
           rev    = tag;
           sha256 = sha256.git;
         } else fetchurl {
-          url = "http://cache.ruby-lang.org/pub/ruby/${ver.majMin}/ruby-${ver}.tar.gz";
+          url = "https://cache.ruby-lang.org/pub/ruby/${ver.majMin}/ruby-${ver}.tar.gz";
           sha256 = sha256.src;
         };
       in
@@ -83,6 +83,7 @@ let
           ++ (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
@@ -105,7 +106,7 @@ let
           popd
         '';
 
-        postPatch = if isRuby25 then ''
+        postPatch = if atLeast25 then ''
           sed -i configure.ac -e '/config.guess/d'
           cp --remove-destination ${config}/config.guess tool/
           cp --remove-destination ${config}/config.sub tool/
@@ -220,4 +221,12 @@ in {
       git = "0r9mgvqk6gj8pc9q6qmy7j2kbln7drc8wy67sb2ij8ciclcw9nn2";
     };
   };
+
+  ruby_2_6 = generic {
+    version = rubyVersion "2" "6" "0" "";
+    sha256 = {
+      src = "0wn0gxlx6xhhqrm2caxp0h6cj4nw7knnv5gh27qqzj0i9a95phzk";
+      git = "0bwbl4hz18dd5aij2l4s6xy90dc17d03kk577gdl34l9mbd9m7mn";
+    };
+  };
 }
diff --git a/pkgs/development/interpreters/ruby/patchsets.nix b/pkgs/development/interpreters/ruby/patchsets.nix
index c87cb120b40..8afc64edb3f 100644
--- a/pkgs/development/interpreters/ruby/patchsets.nix
+++ b/pkgs/development/interpreters/ruby/patchsets.nix
@@ -16,4 +16,6 @@ rec {
     "${patchSet}/patches/ruby/2.5/head/railsexpress/02-improve-gc-stats.patch"
     "${patchSet}/patches/ruby/2.5/head/railsexpress/03-more-detailed-stacktrace.patch"
   ];
+  "2.6.0" = ops useRailsExpress [ # no Rails Express patchset yet (2018-12-26)
+  ];
 }