diff options
author | Shea Levy <shea@shealevy.com> | 2011-09-23 15:08:55 +0000 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2011-09-23 15:08:55 +0000 |
commit | f5e5bc24bebeb3d832cf6c3177d92ebda74da9e1 (patch) | |
tree | b291948074dee0ac90be7a409daf38ede850c7f1 /pkgs/development/interpreters/ruby/ruby-19.nix | |
parent | 730afe1f8b6008baa3c41348274d3481259d4239 (diff) | |
download | nixlib-f5e5bc24bebeb3d832cf6c3177d92ebda74da9e1.tar nixlib-f5e5bc24bebeb3d832cf6c3177d92ebda74da9e1.tar.gz nixlib-f5e5bc24bebeb3d832cf6c3177d92ebda74da9e1.tar.bz2 nixlib-f5e5bc24bebeb3d832cf6c3177d92ebda74da9e1.tar.lz nixlib-f5e5bc24bebeb3d832cf6c3177d92ebda74da9e1.tar.xz nixlib-f5e5bc24bebeb3d832cf6c3177d92ebda74da9e1.tar.zst nixlib-f5e5bc24bebeb3d832cf6c3177d92ebda74da9e1.zip |
Get ruby-1.9.2-p290 to build
svn path=/nixpkgs/trunk/; revision=29453
Diffstat (limited to 'pkgs/development/interpreters/ruby/ruby-19.nix')
-rw-r--r-- | pkgs/development/interpreters/ruby/ruby-19.nix | 52 |
1 files changed, 45 insertions, 7 deletions
diff --git a/pkgs/development/interpreters/ruby/ruby-19.nix b/pkgs/development/interpreters/ruby/ruby-19.nix index 82393fe95c76..d5ccb19caecd 100644 --- a/pkgs/development/interpreters/ruby/ruby-19.nix +++ b/pkgs/development/interpreters/ruby/ruby-19.nix @@ -1,14 +1,52 @@ -{ ruby18, fetchurl }: +{ stdenv, fetchurl +, zlib, zlibSupport ? true +, openssl, opensslSupport ? true +, gdbm, gdbmSupport ? true +, ncurses, readline, cursesSupport ? false +, groff, docSupport ? false +}: -ruby18.override rec { - version = "1.9.1-p243"; +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 = "ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-${version}.tar.gz"; - sha256 = "1r4bls76dg97lqgwkxi6kbxzirkvjm21d4i2qyz469lnncvqwn9i"; + url = "ftp://ftp.ruby-lang.org/pub/ruby/1.9/${name}.tar.gz"; + sha256 = "0zmxdqzprbdc5mvmba1i94mpqnqxxlh460jri7bx6i29bibigj0w"; + }; + + # 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"; + # Bundler tries to create this directory + postInstall = "mkdir -pv $out/${passthru.gemPath}"; + + meta = { + license = "Ruby"; + homepage = "http://www.ruby-lang.org/en/"; + description = "The Ruby language"; }; - passthru = { - libPath = "lib/ruby-1.9"; + passthru = rec { + majorVersion = "1.9"; + minorVersion = "2"; + patchLevel = "290"; + libPath = "lib/ruby/${majorVersion}"; + gemPath = "lib/ruby/gems/${majorVersion}"; }; } |