2010-09-08 11:56:46 +02:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, zlib, zlibSupport ? true
|
|
|
|
, openssl, opensslSupport ? true
|
|
|
|
, gdbm, gdbmSupport ? true
|
|
|
|
, ncurses, readline, cursesSupport ? false
|
|
|
|
, groff, docSupport ? false
|
2008-04-11 11:21:27 +02:00
|
|
|
}:
|
2005-05-05 01:36:28 +02:00
|
|
|
|
2010-09-08 11:56:46 +02:00
|
|
|
let
|
|
|
|
op = stdenv.lib.optional;
|
|
|
|
ops = stdenv.lib.optionals;
|
|
|
|
in
|
|
|
|
|
2009-11-20 13:51:14 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2010-09-08 11:56:46 +02:00
|
|
|
version = "1.8.7-p302";
|
2009-11-20 13:51:14 +01:00
|
|
|
|
2008-08-03 00:25:54 +02:00
|
|
|
name = "ruby-${version}";
|
2009-11-20 13:51:14 +01:00
|
|
|
|
2005-05-05 01:36:28 +02:00
|
|
|
src = fetchurl {
|
2008-08-14 13:47:51 +02:00
|
|
|
url = "ftp://ftp.ruby-lang.org/pub/ruby/1.8/${name}.tar.gz";
|
2010-09-08 11:56:46 +02:00
|
|
|
sha256 = "18a4w0n1n0sij7gkb3196dnqav5zr0c5p26f08k7cw6y0i9dz0sq";
|
2005-05-05 01:36:28 +02:00
|
|
|
};
|
2006-05-11 02:16:23 +02:00
|
|
|
|
2010-09-08 11:56:46 +02:00
|
|
|
buildInputs = (ops cursesSupport [ ncurses readline ] )
|
|
|
|
++ (op docSupport groff )
|
|
|
|
++ (op zlibSupport zlib)
|
|
|
|
++ (op opensslSupport openssl)
|
|
|
|
++ (op gdbmSupport gdbm);
|
2009-11-20 13:51:14 +01:00
|
|
|
|
|
|
|
configureFlags = ["--enable-shared" "--enable-pthread"];
|
2008-08-03 00:25:54 +02:00
|
|
|
|
2010-09-08 11:56:46 +02:00
|
|
|
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
2008-08-03 00:25:54 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
license = "Ruby";
|
|
|
|
homepage = "http://www.ruby-lang.org/en/";
|
|
|
|
description = "The Ruby language";
|
|
|
|
};
|
2009-08-20 22:18:58 +02:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
# install ruby libs into "$out/${ruby.libPath}"
|
|
|
|
libPath = "lib/ruby-1.8";
|
|
|
|
};
|
2005-05-05 01:36:28 +02:00
|
|
|
}
|