mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 20:23:02 +00:00
9b9b5e2f53
svn path=/nixpkgs/trunk/; revision=25533
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{ 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 = "1.8.7-p302";
|
|
|
|
name = "ruby-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "ftp://ftp.ruby-lang.org/pub/ruby/1.8/${name}.tar.gz";
|
|
sha256 = "18a4w0n1n0sij7gkb3196dnqav5zr0c5p26f08k7cw6y0i9dz0sq";
|
|
};
|
|
|
|
# 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";
|
|
|
|
meta = {
|
|
license = "Ruby";
|
|
homepage = "http://www.ruby-lang.org/en/";
|
|
description = "The Ruby language";
|
|
};
|
|
|
|
passthru = {
|
|
# install ruby libs into "$out/${ruby.libPath}"
|
|
libPath = "lib/ruby-1.8";
|
|
};
|
|
}
|