ruby: add 2.2.2, bump patch levels

* Adds Ruby 2.2.2
* 1.9.3-p547 -> 1.9.3-p551
* 2.0.0-p481 -> 2.0.0-p645
This commit is contained in:
Charles Strahan 2015-07-07 01:58:05 -04:00
parent 4ea88cc526
commit 357324df26
4 changed files with 141 additions and 30 deletions

View file

@ -24,10 +24,10 @@ stdenv.mkDerivation rec {
owner = "ruby";
repo = "ruby";
rev = "v1_9_3_${passthru.patchLevel}";
sha256 = "040x67snfjrql5j7blizpm9j58jhwvh00v8h1h59aq90h52lkj68";
sha256 = "1r9xzzxmci2ajb34qb4y1w424mz878zdgzxkfp9w60agldxnb36s";
} else fetchurl {
url = "http://cache.ruby-lang.org/pub/ruby/1.9/${name}.tar.bz2";
sha256 = "0k7g0ahicjnd4sij2pml1p1dcb95ms3k3j1k3169n02kzz9qwn7g";
sha256 = "07kpvv2z7g6shflls7fyfga8giifahwlnl30l49qdm9i6izf7idh";
};
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
@ -52,24 +52,25 @@ stdenv.mkDerivation rec {
./ruby19-parallel-install.patch
./bitperfect-rdoc.patch
] ++ ops useRailsExpress [
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/01-fix-make-clean.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/02-railsbench-gc.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/03-display-more-detailed-stack-trace.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/04-fork-support-for-gc-logging.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/05-track-live-dataset-size.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/06-webrick_204_304_keep_alive_fix.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/07-export-a-few-more-symbols-for-ruby-prof.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/08-thread-variables.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/09-faster-loading.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/10-falcon-st-opt.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/11-falcon-sparse-array.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/12-falcon-array-queue.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/13-railsbench-gc-fixes.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/14-show-full-backtrace-on-stack-overflow.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/15-configurable-fiber-stack-sizes.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/16-backport-psych-20.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/17-fix-missing-c-return-event.patch"
"${patchSet}/patches/ruby/1.9.3/p547/railsexpress/18-fix-process-daemon-call.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/01-fix-make-clean.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/02-zero-broken-tests.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/03-railsbench-gc.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/04-display-more-detailed-stack-trace.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/05-fork-support-for-gc-logging.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/06-track-live-dataset-size.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/07-webrick_204_304_keep_alive_fix.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/08-export-a-few-more-symbols-for-ruby-prof.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/09-thread-variables.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/10-faster-loading.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/11-falcon-st-opt.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/12-falcon-sparse-array.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/13-falcon-array-queue.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/14-railsbench-gc-fixes.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/15-show-full-backtrace-on-stack-overflow.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/16-configurable-fiber-stack-sizes.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/17-backport-psych-20.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/18-fix-missing-c-return-event.patch"
"${patchSet}/patches/ruby/1.9.3/p${passthru.patchLevel}/railsexpress/19-fix-process-daemon-call.patch"
];
configureFlags = [ "--enable-shared" "--enable-pthread" ]
@ -113,7 +114,7 @@ stdenv.mkDerivation rec {
majorVersion = "1";
minorVersion = "9";
teenyVersion = "3";
patchLevel = "547";
patchLevel = "551";
rubyEngine = "ruby";
libPath = "lib/${rubyEngine}/${majorVersion}.${minorVersion}.${teenyVersion}";
gemPath = "lib/${rubyEngine}/gems/${majorVersion}.${minorVersion}.${teenyVersion}";

View file

@ -25,10 +25,10 @@ stdenv.mkDerivation rec {
owner = "ruby";
repo = "ruby";
rev = "v2_0_0_${passthru.patchLevel}";
sha256 = "07ccnxgiqxn5ycmq2wl7j3aqmndm4n358y35kzaivb488ayjg3pj";
sha256 = "14bnas1iif2shyaz4ylb0832x96y2mda52x0v0aglkvqmcz1cfxb";
} else fetchurl {
url = "http://cache.ruby-lang.org/pub/ruby/2.0/${name}.tar.bz2";
sha256 = "1qnqccyfhx0fykxqbzlxq0yvyvq6q9v32givyfyr303dx7bxlqh7";
url = "https://cache.ruby-lang.org/pub/ruby/2.0/${name}.tar.bz2";
sha256 = "1sc36qxqhziqbrvp99z4qdx9j0f8r1xhcbb6scb3m4nb02cwzk9d";
};
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
@ -51,11 +51,10 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
patches = ops useRailsExpress [
"${patchSet}/patches/ruby/2.0.0/p481/railsexpress/01-zero-broken-tests.patch"
"${patchSet}/patches/ruby/2.0.0/p481/railsexpress/02-railsexpress-gc.patch"
"${patchSet}/patches/ruby/2.0.0/p481/railsexpress/03-display-more-detailed-stack-trace.patch"
"${patchSet}/patches/ruby/2.0.0/p481/railsexpress/04-show-full-backtrace-on-stack-overflow.patch"
"${patchSet}/patches/ruby/2.0.0/p481/railsexpress/05-fix-missing-c-return-event.patch"
"${patchSet}/patches/ruby/2.0.0/p${passthru.patchLevel}/railsexpress/01-zero-broken-tests.patch"
"${patchSet}/patches/ruby/2.0.0/p${passthru.patchLevel}/railsexpress/02-railsexpress-gc.patch"
"${patchSet}/patches/ruby/2.0.0/p${passthru.patchLevel}/railsexpress/03-display-more-detailed-stack-trace.patch"
"${patchSet}/patches/ruby/2.0.0/p${passthru.patchLevel}/railsexpress/04-show-full-backtrace-on-stack-overflow.patch"
];
configureFlags = ["--enable-shared" ]
@ -96,7 +95,7 @@ stdenv.mkDerivation rec {
majorVersion = "2";
minorVersion = "0";
teenyVersion = "0";
patchLevel = "481";
patchLevel = "645";
rubyEngine = "ruby";
libPath = "lib/${rubyEngine}/${majorVersion}.${minorVersion}.${teenyVersion}";
gemPath = "lib/${rubyEngine}/gems/${majorVersion}.${minorVersion}.${teenyVersion}";

View file

@ -0,0 +1,110 @@
{ stdenv, lib, fetchurl, fetchgit, fetchFromGitHub
, zlib, zlibSupport ? true
, openssl, opensslSupport ? true
, gdbm, gdbmSupport ? true
, ncurses, readline, cursesSupport ? true
, groff, docSupport ? false
, libyaml, yamlSupport ? true
, libffi, fiddleSupport ? true
, ruby_2_2_2, autoreconfHook, bison, useRailsExpress ? true
}:
let
op = stdenv.lib.optional;
ops = stdenv.lib.optionals;
patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; };
config = import ./config.nix fetchgit;
baseruby = ruby_2_2_2.override { useRailsExpress = false; };
in
stdenv.mkDerivation rec {
version = with passthru; "${majorVersion}.${minorVersion}.${teenyVersion}-p${patchLevel}";
name = "ruby-${version}";
src = if useRailsExpress then fetchFromGitHub {
owner = "ruby";
repo = "ruby";
rev = "v2_2_2";
sha256 = "08mw1ql2ghy483cp8xzzm78q17simn4l6phgm2gah7kjh9y3vbrn";
} else fetchurl {
url = "http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz";
sha256 = "0i4v7l8pnam0by2cza12zldlhrffqchwb2m9shlnp7j2gqqhzz2z";
};
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
NROFF = "${groff}/bin/nroff";
buildInputs = ops useRailsExpress [ autoreconfHook bison ]
++ (op fiddleSupport libffi)
++ (ops cursesSupport [ ncurses readline ])
++ (op docSupport groff)
++ (op zlibSupport zlib)
++ (op opensslSupport openssl)
++ (op gdbmSupport gdbm)
++ (op yamlSupport libyaml)
# 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
# running on darwin
++ (op (!cursesSupport && stdenv.isDarwin) readline);
enableParallelBuilding = true;
patches = ops useRailsExpress [
"${patchSet}/patches/ruby/2.2.2/railsexpress/01-zero-broken-tests.patch"
"${patchSet}/patches/ruby/2.2.2/railsexpress/02-improve-gc-stats.patch"
"${patchSet}/patches/ruby/2.2.2/railsexpress/03-display-more-detailed-stack-trace.patch"
"${patchSet}/patches/ruby/2.2.2/railsexpress/04-backported-bugfixes-222.patch"
];
postPatch = ops useRailsExpress ''
sed -i configure.in -e '/config.guess/d'
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
# that tk is installed
++ ( if stdenv.isDarwin then [ "--with-out-ext=tk " ] else [ ]);
installFlags = stdenv.lib.optionalString docSupport "install-doc";
# Bundler tries to create this directory
postInstall = ''
# Bundler tries to create this directory
mkdir -pv $out/${passthru.gemPath}
mkdir -p $out/nix-support
cat > $out/nix-support/setup-hook <<EOF
addGemPath() {
addToSearchPath GEM_PATH \$1/${passthru.gemPath}
}
envHooks+=(addGemPath)
EOF
'' + lib.optionalString useRailsExpress ''
rbConfig=$(find $out/lib/ruby -name rbconfig.rb)
# Prevent the baseruby from being included in the closure.
sed -i '/^ CONFIG\["BASERUBY"\]/d' $rbConfig
sed -i "s|'--with-baseruby=${baseruby}/bin/ruby'||" $rbConfig
'';
meta = {
license = stdenv.lib.licenses.ruby;
homepage = "http://www.ruby-lang.org/en/";
description = "The Ruby language";
platforms = stdenv.lib.platforms.all;
};
passthru = rec {
majorVersion = "2";
minorVersion = "2";
teenyVersion = "0";
patchLevel = "0";
rubyEngine = "ruby";
libPath = "lib/${rubyEngine}/${majorVersion}.${minorVersion}.${teenyVersion}";
gemPath = "lib/${rubyEngine}/gems/${majorVersion}.${minorVersion}.${teenyVersion}";
};
}

View file

@ -5090,6 +5090,7 @@ let
ruby_2_1_3 = lowPrio (callPackage ../development/interpreters/ruby/ruby-2.1.3.nix { });
ruby_2_1_6 = lowPrio (callPackage ../development/interpreters/ruby/ruby-2.1.6.nix { });
ruby_2_2_0 = lowPrio (callPackage ../development/interpreters/ruby/ruby-2.2.0.nix { });
ruby_2_2_2 = lowPrio (callPackage ../development/interpreters/ruby/ruby-2.2.2.nix { });
# Ruby aliases
ruby = ruby_2_1;