Ruby: Separate 'install the current version of ruby' from 'install version x of ruby' when x is also the current version
svn path=/nixpkgs/trunk/; revision=29600
This commit is contained in:
parent
4d2b6a350b
commit
936c460abb
@ -1,52 +1 @@
|
||||
{ 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 = "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 = rec {
|
||||
majorVersion = "1.9";
|
||||
minorVersion = "2";
|
||||
patchLevel = "290";
|
||||
libPath = "lib/ruby/${majorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}";
|
||||
};
|
||||
}
|
||||
import ./ruby-19.nix
|
||||
|
52
pkgs/development/interpreters/ruby/ruby-19.nix
Normal file
52
pkgs/development/interpreters/ruby/ruby-19.nix
Normal file
@ -0,0 +1,52 @@
|
||||
{ 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 = "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 = rec {
|
||||
majorVersion = "1.9";
|
||||
minorVersion = "2";
|
||||
patchLevel = "290";
|
||||
libPath = "lib/ruby/${majorVersion}";
|
||||
gemPath = "lib/ruby/gems/${majorVersion}";
|
||||
};
|
||||
}
|
@ -2601,8 +2601,8 @@ let
|
||||
regina = callPackage ../development/interpreters/regina {};
|
||||
|
||||
ruby18 = callPackage ../development/interpreters/ruby/ruby-18.nix { };
|
||||
ruby19 = callPackage ../development/interpreters/ruby { };
|
||||
ruby = ruby19;
|
||||
ruby19 = callPackage ../development/interpreters/ruby/ruby-19.nix { };
|
||||
ruby = callPackage ../development/interpreters/ruby { };
|
||||
|
||||
rubyLibs = recurseIntoAttrs (callPackage ../development/interpreters/ruby/libs.nix { });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user