Author: shlevy
Date: Mon Oct 3 15:35:50 2011
New Revision: 29600
URL: https://ssl.nixos.org/websvn/nix/?rev=29600&sc=1
Log:
Ruby: Separate 'install the current version of ruby' from 'install version x of
ruby' when x is also the current version
Added:
nixpkgs/trunk/pkgs/development/interpreters/ruby/ruby-19.nix
- copied unchanged from r29596,
nixpkgs/trunk/pkgs/development/interpreters/ruby/default.nix
Replaced:
nixpkgs/trunk/pkgs/development/interpreters/ruby/default.nix
Modified:
nixpkgs/trunk/pkgs/top-level/all-packages.nix
Added: nixpkgs/trunk/pkgs/development/interpreters/ruby/default.nix
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/development/interpreters/ruby/default.nix Mon Oct
3 15:35:50 2011 (r29600)
@@ -0,0 +1 @@
+import ./ruby-19.nix
Copied: nixpkgs/trunk/pkgs/development/interpreters/ruby/ruby-19.nix (from
r29596, nixpkgs/trunk/pkgs/development/interpreters/ruby/default.nix)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/development/interpreters/ruby/ruby-19.nix Mon Oct
3 15:35:50 2011 (r29600, copy of r29596,
nixpkgs/trunk/pkgs/development/interpreters/ruby/default.nix)
@@ -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}";
+ };
+}
Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix Mon Oct 3 15:30:10
2011 (r29599)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix Mon Oct 3 15:35:50
2011 (r29600)
@@ -2601,8 +2601,8 @@
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 { });
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits