about summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorCharles Strahan <charles.c.strahan@gmail.com>2014-09-18 11:43:16 -0400
committerCharles Strahan <charles.c.strahan@gmail.com>2014-09-18 11:43:16 -0400
commite38d7cbfb264ee42f31b3a0bd7171a38e10a7091 (patch)
tree022dbc8d8dda2beeab20ddda4b693f2130941d5c /pkgs/development/interpreters
parenteca58fd02f7648fe19fd737f7ce543967b8e8ebf (diff)
downloadnixlib-e38d7cbfb264ee42f31b3a0bd7171a38e10a7091.tar
nixlib-e38d7cbfb264ee42f31b3a0bd7171a38e10a7091.tar.gz
nixlib-e38d7cbfb264ee42f31b3a0bd7171a38e10a7091.tar.bz2
nixlib-e38d7cbfb264ee42f31b3a0bd7171a38e10a7091.tar.lz
nixlib-e38d7cbfb264ee42f31b3a0bd7171a38e10a7091.tar.xz
nixlib-e38d7cbfb264ee42f31b3a0bd7171a38e10a7091.tar.zst
nixlib-e38d7cbfb264ee42f31b3a0bd7171a38e10a7091.zip
Fix the new Ruby interpreters (fixes #3509).
Ruby >= 2.1.0 will try to download config.{sub,guess} if not already present.
This provides both files in a pure manner, and also deletes the download script
to prevent any future confusion.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/ruby/config.nix6
-rw-r--r--pkgs/development/interpreters/ruby/ruby-2.1.0.nix10
-rw-r--r--pkgs/development/interpreters/ruby/ruby-2.1.1.nix10
-rw-r--r--pkgs/development/interpreters/ruby/ruby-2.1.2.nix10
4 files changed, 33 insertions, 3 deletions
diff --git a/pkgs/development/interpreters/ruby/config.nix b/pkgs/development/interpreters/ruby/config.nix
new file mode 100644
index 000000000000..c03c0520d7ae
--- /dev/null
+++ b/pkgs/development/interpreters/ruby/config.nix
@@ -0,0 +1,6 @@
+# Ruby >= 2.1.0 tries to download config.{guess,sub}
+fetchgit: fetchgit {
+  url = "git://git.sv.gnu.org/config.git";
+  rev = "576c839acca0e082e536fd27568b90a446ce5b96";
+  sha256 = "11bjngchjhj0qq0ppp8c37rfw0yhp230nvhs2jvlx15i9qbf56a0";
+}
diff --git a/pkgs/development/interpreters/ruby/ruby-2.1.0.nix b/pkgs/development/interpreters/ruby/ruby-2.1.0.nix
index e0a9531d225d..fd0c278133bc 100644
--- a/pkgs/development/interpreters/ruby/ruby-2.1.0.nix
+++ b/pkgs/development/interpreters/ruby/ruby-2.1.0.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub
+{ stdenv, fetchurl, fetchgit, fetchFromGitHub
 , zlib, zlibSupport ? true
 , openssl, opensslSupport ? true
 , gdbm, gdbmSupport ? true
@@ -12,6 +12,7 @@ let
   op = stdenv.lib.optional;
   ops = stdenv.lib.optionals;
   patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; };
+  config = import ./config.nix fetchgit;
   baseruby = ruby_2_1_0.override { useRailsExpress = false; };
 in
 
@@ -63,6 +64,13 @@ stdenv.mkDerivation rec {
     "${patchSet}/patches/ruby/2.1.0/railsexpress/12-backport-r44370.patch"
   ];
 
+  # Ruby >= 2.1.0 tries to download config.{guess,sub}
+  postPatch = ''
+    rm tool/config_files.rb
+    cp ${config}/config.guess tool/
+    cp ${config}/config.sub tool/
+  '';
+
   configureFlags = ["--enable-shared" ]
     ++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby"
     # on darwin, we have /usr/include/tk.h -- so the configure script detects
diff --git a/pkgs/development/interpreters/ruby/ruby-2.1.1.nix b/pkgs/development/interpreters/ruby/ruby-2.1.1.nix
index 1a7a507f49c3..c60a6cb313d4 100644
--- a/pkgs/development/interpreters/ruby/ruby-2.1.1.nix
+++ b/pkgs/development/interpreters/ruby/ruby-2.1.1.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub
+{ stdenv, fetchurl, fetchgit, fetchFromGitHub
 , zlib, zlibSupport ? true
 , openssl, opensslSupport ? true
 , gdbm, gdbmSupport ? true
@@ -12,6 +12,7 @@ let
   op = stdenv.lib.optional;
   ops = stdenv.lib.optionals;
   patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; };
+  config = import ./config.nix fetchgit;
   baseruby = ruby_2_1_1.override { useRailsExpress = false; };
 in
 
@@ -62,6 +63,13 @@ stdenv.mkDerivation rec {
     "${patchSet}/patches/ruby/2.1.0/railsexpress/11-backport-r44370.patch"
   ];
 
+  # Ruby >= 2.1.0 tries to download config.{guess,sub}
+  postPatch = ''
+    rm tool/config_files.rb
+    cp ${config}/config.guess tool/
+    cp ${config}/config.sub tool/
+  '';
+
   configureFlags = ["--enable-shared" ]
     ++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby"
     # on darwin, we have /usr/include/tk.h -- so the configure script detects
diff --git a/pkgs/development/interpreters/ruby/ruby-2.1.2.nix b/pkgs/development/interpreters/ruby/ruby-2.1.2.nix
index 62159cb97860..1738606bf140 100644
--- a/pkgs/development/interpreters/ruby/ruby-2.1.2.nix
+++ b/pkgs/development/interpreters/ruby/ruby-2.1.2.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub
+{ stdenv, fetchurl, fetchgit, fetchFromGitHub
 , zlib, zlibSupport ? true
 , openssl, opensslSupport ? true
 , gdbm, gdbmSupport ? true
@@ -12,6 +12,7 @@ let
   op = stdenv.lib.optional;
   ops = stdenv.lib.optionals;
   patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; };
+  config = import ./config.nix fetchgit;
   baseruby = ruby_2_1_2.override { useRailsExpress = false; };
 in
 
@@ -61,6 +62,13 @@ stdenv.mkDerivation rec {
     "${patchSet}/patches/ruby/2.1.2/railsexpress/10-funny-falcon-method-cache.patch"
   ];
 
+  # Ruby >= 2.1.0 tries to download config.{guess,sub}
+  postPatch = ''
+    rm tool/config_files.rb
+    cp ${config}/config.guess tool/
+    cp ${config}/config.sub tool/
+  '';
+
   configureFlags = ["--enable-shared" ]
     ++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby"
     # on darwin, we have /usr/include/tk.h -- so the configure script detects