Merge pull request #3509 from cstrahan/ruby-interpreters
improve ruby support
This commit is contained in:
commit
3ddb56f1d1
94
pkgs/development/interpreters/ruby/ruby-1.8.7.nix
Normal file
94
pkgs/development/interpreters/ruby/ruby-1.8.7.nix
Normal file
@ -0,0 +1,94 @@
|
||||
{ stdenv, fetchurl, fetchFromGitHub
|
||||
, zlib, zlibSupport ? true
|
||||
, openssl, opensslSupport ? true
|
||||
, gdbm, gdbmSupport ? true
|
||||
, ncurses, readline, cursesSupport ? false
|
||||
, groff, docSupport ? false
|
||||
, ruby_1_8_7, autoreconfHook, bison, useRailsExpress ? true
|
||||
}:
|
||||
|
||||
let
|
||||
op = stdenv.lib.optional;
|
||||
ops = stdenv.lib.optionals;
|
||||
patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; };
|
||||
baseruby = ruby_1_8_7.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 = "v1_8_7_${passthru.patchLevel}";
|
||||
sha256 = "1xddhxr0j26hpxfixvhqdscwk2ri846w2129fcfwfjzvy19igswx";
|
||||
} else fetchurl {
|
||||
url = "http://cache.ruby-lang.org/pub/ruby/1.8/${name}.tar.bz2";
|
||||
sha256 = "1qq7khilwkayrhwmzlxk83scrmiqfi7lgsn4c63znyvz2c1lgqxl";
|
||||
};
|
||||
|
||||
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
|
||||
NROFF = "${groff}/bin/nroff";
|
||||
|
||||
buildInputs = ops useRailsExpress [ autoreconfHook bison ]
|
||||
++ (ops cursesSupport [ ncurses readline ] )
|
||||
++ (op docSupport groff )
|
||||
++ (op zlibSupport zlib)
|
||||
++ (op opensslSupport openssl)
|
||||
++ (op gdbmSupport gdbm);
|
||||
|
||||
patches = ops useRailsExpress [
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/01-ignore-generated-files.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/02-fix-tests-for-osx.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/03-sigvtalrm-fix.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/04-railsbench-gc-patch.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/05-display-full-stack-trace.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/06-better-source-file-tracing.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/07-heap-dump-support.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/08-fork-support-for-gc-logging.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/09-track-malloc-size.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/10-track-object-allocation.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/11-expose-heap-slots.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/12-fix-heap-size-growth-logic.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/13-heap-slot-size.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/14-add-trace-stats-enabled-methods.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/15-track-live-dataset-size.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/16-add-object-size-information-to-heap-dump.patch"
|
||||
"${patchSet}/patches/ruby/1.8.7/p374/railsexpress/17-caller-for-all-threads.patch"
|
||||
];
|
||||
|
||||
configureFlags = [ "--enable-shared" "--enable-pthread" ]
|
||||
++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby";
|
||||
|
||||
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = "Ruby";
|
||||
homepage = "http://www.ruby-lang.org/en/";
|
||||
description = "The Ruby language";
|
||||
};
|
||||
|
||||
passthru = rec {
|
||||
majorVersion = "1";
|
||||
minorVersion = "8";
|
||||
teenyVersion = "7";
|
||||
patchLevel = "374";
|
||||
libPath = "lib/ruby/${majorVersion}.${minorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}.${minorVersion}";
|
||||
};
|
||||
}
|
112
pkgs/development/interpreters/ruby/ruby-1.9.3.nix
Normal file
112
pkgs/development/interpreters/ruby/ruby-1.9.3.nix
Normal file
@ -0,0 +1,112 @@
|
||||
{ stdenv, fetchurl, fetchFromGitHub
|
||||
, zlib, zlibSupport ? true
|
||||
, openssl, opensslSupport ? true
|
||||
, gdbm, gdbmSupport ? true
|
||||
, ncurses, readline, cursesSupport ? false
|
||||
, groff, docSupport ? false
|
||||
, libyaml, yamlSupport ? true
|
||||
, ruby_1_9_3, autoreconfHook, bison, useRailsExpress ? true
|
||||
}:
|
||||
|
||||
let
|
||||
op = stdenv.lib.optional;
|
||||
ops = stdenv.lib.optionals;
|
||||
patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; };
|
||||
baseruby = ruby_1_9_3.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 = "v1_9_3_${passthru.patchLevel}";
|
||||
sha256 = "040x67snfjrql5j7blizpm9j58jhwvh00v8h1h59aq90h52lkj68";
|
||||
} else fetchurl {
|
||||
url = "http://cache.ruby-lang.org/pub/ruby/1.9/${name}.tar.bz2";
|
||||
sha256 = "0k7g0ahicjnd4sij2pml1p1dcb95ms3k3j1k3169n02kzz9qwn7g";
|
||||
};
|
||||
|
||||
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
|
||||
NROFF = "${groff}/bin/nroff";
|
||||
|
||||
buildInputs = ops useRailsExpress [ autoreconfHook bison ]
|
||||
++ (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 = [
|
||||
./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"
|
||||
];
|
||||
|
||||
configureFlags = [ "--enable-shared" "--enable-pthread" ]
|
||||
++ 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";
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = "Ruby";
|
||||
homepage = "http://www.ruby-lang.org/en/";
|
||||
description = "The Ruby language";
|
||||
maintainers = with stdenv.lib.maintainers; [ lovek323 ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
|
||||
passthru = rec {
|
||||
majorVersion = "1";
|
||||
minorVersion = "9";
|
||||
teenyVersion = "3";
|
||||
patchLevel = "547";
|
||||
libPath = "lib/ruby/${majorVersion}.${minorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}.${minorVersion}";
|
||||
};
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
{ stdenv, fetchurl
|
||||
, zlib, zlibSupport ? true
|
||||
, openssl, opensslSupport ? true
|
||||
, gdbm, gdbmSupport ? true
|
||||
, ncurses, readline, cursesSupport ? false
|
||||
, groff, docSupport ? false
|
||||
}:
|
||||
|
||||
let
|
||||
op = stdenv.lib.optional;
|
||||
ops = stdenv.lib.optionals;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = with passthru; "${majorVersion}.${minorVersion}-p${patchLevel}";
|
||||
|
||||
name = "ruby-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://cache.ruby-lang.org/pub/ruby/1.8/${name}.tar.bz2";
|
||||
sha256 = "b4e34703137f7bfb8761c4ea474f7438d6ccf440b3d35f39cc5e4d4e239c07e3";
|
||||
};
|
||||
|
||||
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
|
||||
NROFF = "${groff}/bin/nroff";
|
||||
|
||||
buildInputs = (ops cursesSupport [ ncurses readline ] )
|
||||
++ (op docSupport groff )
|
||||
++ (op zlibSupport zlib)
|
||||
++ (op opensslSupport openssl)
|
||||
++ (op gdbmSupport gdbm);
|
||||
|
||||
configureFlags = ["--enable-shared" "--enable-pthread"];
|
||||
|
||||
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = "Ruby";
|
||||
homepage = "http://www.ruby-lang.org/en/";
|
||||
description = "The Ruby language";
|
||||
};
|
||||
|
||||
passthru = rec {
|
||||
majorVersion = "1.8";
|
||||
minorVersion = "7";
|
||||
patchLevel = "374";
|
||||
libPath = "lib/ruby/${majorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}";
|
||||
};
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
{ stdenv, fetchurl
|
||||
, zlib, zlibSupport ? true
|
||||
, openssl, opensslSupport ? true
|
||||
, gdbm, gdbmSupport ? true
|
||||
, ncurses, readline, cursesSupport ? false
|
||||
, groff, docSupport ? false
|
||||
, libyaml, yamlSupport ? true
|
||||
}:
|
||||
|
||||
let
|
||||
op = stdenv.lib.optional;
|
||||
ops = stdenv.lib.optionals;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = with passthru; "${majorVersion}.${minorVersion}-p${patchLevel}";
|
||||
|
||||
name = "ruby-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://cache.ruby-lang.org/pub/ruby/1.9/${name}.tar.bz2";
|
||||
sha256 = "0fdc6e860d0023ba7b94c7a0cf1f7d32908b65b526246de9dfd5bb39d0d7922b";
|
||||
};
|
||||
|
||||
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
|
||||
NROFF = "${groff}/bin/nroff";
|
||||
|
||||
buildInputs = (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 = [ ./ruby19-parallel-install.patch
|
||||
./bitperfect-rdoc.patch
|
||||
];
|
||||
|
||||
configureFlags = [ "--enable-shared" "--enable-pthread" ]
|
||||
# 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";
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = "Ruby";
|
||||
homepage = "http://www.ruby-lang.org/en/";
|
||||
description = "The Ruby language";
|
||||
maintainers = with stdenv.lib.maintainers; [ lovek323 ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
|
||||
passthru = rec {
|
||||
majorVersion = "1.9";
|
||||
minorVersion = "3";
|
||||
patchLevel = "484";
|
||||
libPath = "lib/ruby/${majorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}";
|
||||
};
|
||||
}
|
@ -1,31 +1,40 @@
|
||||
{ stdenv, fetchurl
|
||||
{ stdenv, fetchurl, fetchFromGitHub
|
||||
, zlib, zlibSupport ? true
|
||||
, openssl, opensslSupport ? true
|
||||
, gdbm, gdbmSupport ? true
|
||||
, ncurses, readline, cursesSupport ? false
|
||||
, groff, docSupport ? false
|
||||
, libyaml, yamlSupport ? true
|
||||
, ruby_2_0_0, autoreconfHook, bison, useRailsExpress ? true
|
||||
}:
|
||||
|
||||
let
|
||||
op = stdenv.lib.optional;
|
||||
ops = stdenv.lib.optionals;
|
||||
patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; };
|
||||
baseruby = ruby_2_0_0.override { useRailsExpress = false; };
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = with passthru; "${majorVersion}.${minorVersion}-p${patchLevel}";
|
||||
|
||||
version = with passthru; "${majorVersion}.${minorVersion}.${teenyVersion}-p${patchLevel}";
|
||||
|
||||
name = "ruby-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
|
||||
src = if useRailsExpress then fetchFromGitHub {
|
||||
owner = "ruby";
|
||||
repo = "ruby";
|
||||
rev = "v2_0_0_${passthru.patchLevel}";
|
||||
sha256 = "07ccnxgiqxn5ycmq2wl7j3aqmndm4n358y35kzaivb488ayjg3pj";
|
||||
} else fetchurl {
|
||||
url = "http://cache.ruby-lang.org/pub/ruby/2.0/${name}.tar.bz2";
|
||||
sha256 = "3de4e4d9aff4682fa4f8ed2b70bd0d746fae17452fc3d3a8e8f505ead9105ad9";
|
||||
sha256 = "1qnqccyfhx0fykxqbzlxq0yvyvq6q9v32givyfyr303dx7bxlqh7";
|
||||
};
|
||||
|
||||
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
|
||||
NROFF = "${groff}/bin/nroff";
|
||||
|
||||
buildInputs = (ops cursesSupport [ ncurses readline ] )
|
||||
buildInputs = ops useRailsExpress [ autoreconfHook bison ]
|
||||
++ (ops cursesSupport [ ncurses readline ] )
|
||||
++ (op docSupport groff )
|
||||
++ (op zlibSupport zlib)
|
||||
++ (op opensslSupport openssl)
|
||||
@ -38,8 +47,17 @@ stdenv.mkDerivation rec {
|
||||
++ (op (!cursesSupport && stdenv.isDarwin) readline);
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
||||
patches = ops useRailsExpress [
|
||||
"${patchSet}/patches/ruby/2.0.0/p481/01-zero-broken-tests.patch"
|
||||
"${patchSet}/patches/ruby/2.0.0/p481/02-railsexpress-gc.patch"
|
||||
"${patchSet}/patches/ruby/2.0.0/p481/03-display-more-detailed-stack-trace.patch"
|
||||
"${patchSet}/patches/ruby/2.0.0/p481/04-show-full-backtrace-on-stack-overflow.patch"
|
||||
"${patchSet}/patches/ruby/2.0.0/p481/05-fix-missing-c-return-event.patch"
|
||||
];
|
||||
|
||||
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 [ ]);
|
||||
@ -67,10 +85,11 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
passthru = rec {
|
||||
majorVersion = "2.0";
|
||||
majorVersion = "2";
|
||||
minorVersion = "0";
|
||||
patchLevel = "353";
|
||||
libPath = "lib/ruby/${majorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}";
|
||||
teenyVersion = "0";
|
||||
patchLevel = "481";
|
||||
libPath = "lib/ruby/${majorVersion}.${minorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}.${minorVersion}";
|
||||
};
|
||||
}
|
102
pkgs/development/interpreters/ruby/ruby-2.1.0.nix
Normal file
102
pkgs/development/interpreters/ruby/ruby-2.1.0.nix
Normal file
@ -0,0 +1,102 @@
|
||||
{ stdenv, fetchurl, fetchFromGitHub
|
||||
, zlib, zlibSupport ? true
|
||||
, openssl, opensslSupport ? true
|
||||
, gdbm, gdbmSupport ? true
|
||||
, ncurses, readline, cursesSupport ? false
|
||||
, groff, docSupport ? false
|
||||
, libyaml, yamlSupport ? true
|
||||
, ruby_2_1_0, autoreconfHook, bison, useRailsExpress ? true
|
||||
}:
|
||||
|
||||
let
|
||||
op = stdenv.lib.optional;
|
||||
ops = stdenv.lib.optionals;
|
||||
patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; };
|
||||
baseruby = ruby_2_1_0.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_1_0";
|
||||
sha256 = "12sn532yvznqfz85378ys0b9ggmj7w8ddhzc1pnnlx7mbyy7r2hx";
|
||||
} else fetchurl {
|
||||
url = "http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.0.tar.gz";
|
||||
sha256 = "17fhfbw8sr13rxfn58wvrhk2f5i88lkna2afn3gdjvprd8gyqf1m";
|
||||
};
|
||||
|
||||
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
|
||||
NROFF = "${groff}/bin/nroff";
|
||||
|
||||
buildInputs = ops useRailsExpress [ autoreconfHook bison ]
|
||||
++ (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.1.0/railsexpress/01-current-2.1.1-fixes.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/02-zero-broken-tests.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/03-improve-gc-stats.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/04-display-more-detailed-stack-trace.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/05-show-full-backtrace-on-stack-overflow.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/06-fix-missing-c-return-event.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/07-backport-006e66b6680f60adfb434ee7397f0dbc77de7873.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/08-funny-falcon-stc-density.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/09-funny-falcon-stc-pool-allocation.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/10-aman-opt-aset-aref-str.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/11-funny-falcon-method-cache.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/12-backport-r44370.patch"
|
||||
];
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = "Ruby";
|
||||
homepage = "http://www.ruby-lang.org/en/";
|
||||
description = "The Ruby language";
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
|
||||
passthru = rec {
|
||||
majorVersion = "2";
|
||||
minorVersion = "1";
|
||||
teenyVersion = "0";
|
||||
patchLevel = "0";
|
||||
libPath = "lib/ruby/${majorVersion}.${minorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}.${minorVersion}";
|
||||
};
|
||||
}
|
101
pkgs/development/interpreters/ruby/ruby-2.1.1.nix
Normal file
101
pkgs/development/interpreters/ruby/ruby-2.1.1.nix
Normal file
@ -0,0 +1,101 @@
|
||||
{ stdenv, fetchurl, fetchFromGitHub
|
||||
, zlib, zlibSupport ? true
|
||||
, openssl, opensslSupport ? true
|
||||
, gdbm, gdbmSupport ? true
|
||||
, ncurses, readline, cursesSupport ? false
|
||||
, groff, docSupport ? false
|
||||
, libyaml, yamlSupport ? true
|
||||
, ruby_2_1_1, autoreconfHook, bison, useRailsExpress ? true
|
||||
}:
|
||||
|
||||
let
|
||||
op = stdenv.lib.optional;
|
||||
ops = stdenv.lib.optionals;
|
||||
patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; };
|
||||
baseruby = ruby_2_1_1.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_1_1";
|
||||
sha256 = "1v2ffvyd0xx1h1qd70431zczhvsdiyyw5kjxih4rszd5avzh5grl";
|
||||
} else fetchurl {
|
||||
url = "http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz";
|
||||
sha256 = "0hc9x3mazyvnk94gs19q8mbnanlzk8mv0hii77slkvc8mqqxyhy8";
|
||||
};
|
||||
|
||||
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
|
||||
NROFF = "${groff}/bin/nroff";
|
||||
|
||||
buildInputs = ops useRailsExpress [ autoreconfHook bison ]
|
||||
++ (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.1.0/railsexpress/01-zero-broken-tests.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/02-improve-gc-stats.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/03-display-more-detailed-stack-trace.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/04-show-full-backtrace-on-stack-overflow.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/05-fix-missing-c-return-event.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/06-backport-006e66b6680f60adfb434ee7397f0dbc77de7873.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/07-funny-falcon-stc-density.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/08-funny-falcon-stc-pool-allocation.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/09-aman-opt-aset-aref-str.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/10-funny-falcon-method-cache.patch"
|
||||
"${patchSet}/patches/ruby/2.1.0/railsexpress/11-backport-r44370.patch"
|
||||
];
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = "Ruby";
|
||||
homepage = "http://www.ruby-lang.org/en/";
|
||||
description = "The Ruby language";
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
|
||||
passthru = rec {
|
||||
majorVersion = "2";
|
||||
minorVersion = "1";
|
||||
teenyVersion = "1";
|
||||
patchLevel = "0";
|
||||
libPath = "lib/ruby/${majorVersion}.${minorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}.${minorVersion}";
|
||||
};
|
||||
}
|
@ -1,28 +1,40 @@
|
||||
{ stdenv, fetchurl
|
||||
{ stdenv, fetchurl, fetchFromGitHub
|
||||
, zlib, zlibSupport ? true
|
||||
, openssl, opensslSupport ? true
|
||||
, gdbm, gdbmSupport ? true
|
||||
, ncurses, readline, cursesSupport ? false
|
||||
, groff, docSupport ? false
|
||||
, libyaml, yamlSupport ? true
|
||||
, ruby_2_1_2, autoreconfHook, bison, useRailsExpress ? true
|
||||
}:
|
||||
|
||||
let
|
||||
op = stdenv.lib.optional;
|
||||
ops = stdenv.lib.optionals;
|
||||
patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; };
|
||||
baseruby = ruby_2_1_2.override { useRailsExpress = false; };
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ruby-2.1.2";
|
||||
src = fetchurl {
|
||||
url = "http://cache.ruby-lang.org/pub/ruby/2.1/${name}.tar.bz2";
|
||||
sha256 = "6948b02570cdfb89a8313675d4aa665405900e27423db408401473f30fc6e901";
|
||||
version = with passthru; "${majorVersion}.${minorVersion}.${teenyVersion}-p${patchLevel}";
|
||||
|
||||
name = "ruby-${version}";
|
||||
|
||||
src = if useRailsExpress then fetchFromGitHub {
|
||||
owner = "ruby";
|
||||
repo = "ruby";
|
||||
rev = "v2_1_2";
|
||||
sha256 = "14f8w3zwngnxsgigffh6h9z3ng53xq8mk126xmwrsmz9n3ypm6l0";
|
||||
} else fetchurl {
|
||||
url = "http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz";
|
||||
sha256 = "0db6krc2bd7yha8p96lcqrahjpsz7g7abhni134g708sh53n8apj";
|
||||
};
|
||||
|
||||
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
|
||||
NROFF = "${groff}/bin/nroff";
|
||||
|
||||
buildInputs = (ops cursesSupport [ ncurses readline ] )
|
||||
buildInputs = ops useRailsExpress [ autoreconfHook bison ]
|
||||
++ (ops cursesSupport [ ncurses readline ] )
|
||||
++ (op docSupport groff )
|
||||
++ (op zlibSupport zlib)
|
||||
++ (op opensslSupport openssl)
|
||||
@ -36,7 +48,21 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patches = ops useRailsExpress [
|
||||
"${patchSet}/patches/ruby/2.1.2/railsexpress/01-zero-broken-tests.patch"
|
||||
"${patchSet}/patches/ruby/2.1.2/railsexpress/02-improve-gc-stats.patch"
|
||||
"${patchSet}/patches/ruby/2.1.2/railsexpress/03-display-more-detailed-stack-trace.patch"
|
||||
"${patchSet}/patches/ruby/2.1.2/railsexpress/04-show-full-backtrace-on-stack-overflow.patch"
|
||||
"${patchSet}/patches/ruby/2.1.2/railsexpress/05-fix-missing-c-return-event.patch"
|
||||
"${patchSet}/patches/ruby/2.1.2/railsexpress/06-backport-006e66b6680f60adfb434ee7397f0dbc77de7873.patch"
|
||||
"${patchSet}/patches/ruby/2.1.2/railsexpress/07-funny-falcon-stc-density.patch"
|
||||
"${patchSet}/patches/ruby/2.1.2/railsexpress/08-funny-falcon-stc-pool-allocation.patch"
|
||||
"${patchSet}/patches/ruby/2.1.2/railsexpress/09-aman-opt-aset-aref-str.patch"
|
||||
"${patchSet}/patches/ruby/2.1.2/railsexpress/10-funny-falcon-method-cache.patch"
|
||||
];
|
||||
|
||||
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 [ ]);
|
||||
@ -64,9 +90,11 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
passthru = rec {
|
||||
majorVersion = "2.1";
|
||||
minorVersion = "2";
|
||||
libPath = "lib/ruby/${majorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}";
|
||||
majorVersion = "2";
|
||||
minorVersion = "1";
|
||||
teenyVersion = "2";
|
||||
patchLevel = "353";
|
||||
libPath = "lib/ruby/${majorVersion}.${minorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}.${minorVersion}";
|
||||
};
|
||||
}
|
||||
|
8
pkgs/development/interpreters/ruby/rvm-patchsets.nix
Normal file
8
pkgs/development/interpreters/ruby/rvm-patchsets.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ fetchFromGitHub }:
|
||||
|
||||
fetchFromGitHub {
|
||||
owner = "skaes";
|
||||
repo = "rvm-patchsets";
|
||||
rev = "13d535bbc060b1b8166673932fe7098abf4216b8";
|
||||
sha256 = "0hf1m2bsdgdnyi4427gknvpd8cfribw77lf2k980flb1z9g5d7ib";
|
||||
}
|
@ -3820,12 +3820,19 @@ let
|
||||
wrapPython = pythonPackages.wrapPython;
|
||||
};
|
||||
|
||||
ruby18 = callPackage ../development/interpreters/ruby/ruby-18.nix { };
|
||||
ruby19 = callPackage ../development/interpreters/ruby/ruby-19.nix { };
|
||||
ruby2 = lowPrio (callPackage ../development/interpreters/ruby/ruby-2.0.nix { });
|
||||
ruby21 = callPackage ../development/interpreters/ruby/ruby-2.1.2.nix { };
|
||||
ruby_1_8_7 = callPackage ../development/interpreters/ruby/ruby-1.8.7.nix { };
|
||||
ruby_1_9_3 = callPackage ../development/interpreters/ruby/ruby-1.9.3.nix { };
|
||||
ruby_2_0_0 = lowPrio (callPackage ../development/interpreters/ruby/ruby-2.0.0.nix { });
|
||||
ruby_2_1_0 = lowPrio (callPackage ../development/interpreters/ruby/ruby-2.1.0.nix { });
|
||||
ruby_2_1_1 = lowPrio (callPackage ../development/interpreters/ruby/ruby-2.1.1.nix { });
|
||||
ruby_2_1_2 = lowPrio (callPackage ../development/interpreters/ruby/ruby-2.1.2.nix { });
|
||||
|
||||
ruby = ruby19;
|
||||
# Ruby aliases
|
||||
ruby = ruby_1_9;
|
||||
ruby_1_8 = ruby_1_8_7;
|
||||
ruby_1_9 = ruby_1_9_3;
|
||||
ruby_2_0 = ruby_2_0_0;
|
||||
ruby_2_1 = ruby_2_1_2;
|
||||
|
||||
rubyLibs = recurseIntoAttrs (callPackage ../development/interpreters/ruby/libs.nix { });
|
||||
|
||||
@ -4391,7 +4398,7 @@ let
|
||||
uncrustify = callPackage ../development/tools/misc/uncrustify { };
|
||||
|
||||
vagrant = callPackage ../development/tools/vagrant {
|
||||
ruby = ruby2;
|
||||
ruby = ruby_2_0_0;
|
||||
};
|
||||
|
||||
gdb = callPackage ../development/tools/misc/gdb {
|
||||
@ -9575,7 +9582,7 @@ let
|
||||
pcmanfm = callPackage ../applications/misc/pcmanfm { };
|
||||
|
||||
ruby_gpgme = callPackage ../development/libraries/ruby_gpgme {
|
||||
ruby = ruby19;
|
||||
ruby = ruby_1_9_3;
|
||||
hoe = rubyLibs.hoe;
|
||||
};
|
||||
|
||||
@ -9586,7 +9593,7 @@ let
|
||||
smplayer = callPackage ../applications/video/smplayer { };
|
||||
|
||||
sup = with rubyLibs; callPackage ../applications/networking/mailreaders/sup {
|
||||
ruby = ruby19.override {
|
||||
ruby = ruby_1_9_3.override {
|
||||
cursesSupport = true;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user