Author: shlevy
Date: Thu Sep 29 21:55:12 2011
New Revision: 29543
URL: https://ssl.nixos.org/websvn/nix/?rev=29543&sc=1

Log:
Use ruby 1.9 as the default

Added:
   nixpkgs/trunk/pkgs/development/interpreters/ruby/ruby-18.nix
      - copied unchanged from r29542, 
nixpkgs/trunk/pkgs/development/interpreters/ruby/default.nix
Replaced:
   nixpkgs/trunk/pkgs/development/interpreters/ruby/default.nix
      - copied unchanged from r29542, 
nixpkgs/trunk/pkgs/development/interpreters/ruby/ruby-19.nix
Deleted:
   nixpkgs/trunk/pkgs/development/interpreters/ruby/ruby-19.nix
Modified:
   nixpkgs/trunk/pkgs/development/interpreters/ruby/rubygems.nix
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Copied: nixpkgs/trunk/pkgs/development/interpreters/ruby/default.nix (from 
r29542, nixpkgs/trunk/pkgs/development/interpreters/ruby/ruby-19.nix)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/development/interpreters/ruby/default.nix        Thu Sep 
29 21:55:12 2011        (r29543, copy of r29542, 
nixpkgs/trunk/pkgs/development/interpreters/ruby/ruby-19.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}";
+  };
+}

Copied: nixpkgs/trunk/pkgs/development/interpreters/ruby/ruby-18.nix (from 
r29542, 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-18.nix        Thu Sep 
29 21:55:12 2011        (r29543, copy of r29542, 
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.8/${name}.tar.gz";;
+    sha256 = "0qf50wa1ziziagnxarj8z6yrsivrhchq1j9017ff3z2z7d31l9kc";
+  };
+
+  # 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.8";
+    minorVersion = "7";
+    patchLevel = "330";
+    libPath = "lib/ruby/${majorVersion}";
+    gemPath = "lib/ruby/gems/${majorVersion}";
+  };
+}

Modified: nixpkgs/trunk/pkgs/development/interpreters/ruby/rubygems.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/interpreters/ruby/rubygems.nix       Thu Sep 
29 21:48:33 2011        (r29542)
+++ nixpkgs/trunk/pkgs/development/interpreters/ruby/rubygems.nix       Thu Sep 
29 21:55:12 2011        (r29543)
@@ -1,16 +1,12 @@
 args : with args; 
 rec {
 
-  # some packages (eg ruby-debug) still require 1.8. So let's stick to that for
-  # now if nobody has different requirements
-
   version = "1.8.10";
   src = fetchurl {
     url = "http://production.cf.rubygems.org/rubygems/${name}.tgz";;
     sha256 = "0ll5swf4mi4nbgnr5jcyzmnlwb1zr2md9kvsgy3d1f485bb1n59q";
   };
 
-
   buildInputs = [ruby makeWrapper];
   configureFlags = [];
 

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Thu Sep 29 21:48:33 
2011        (r29542)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Thu Sep 29 21:55:12 
2011        (r29543)
@@ -2601,9 +2601,9 @@
 
   regina = callPackage ../development/interpreters/regina {};
 
-  ruby18 = callPackage ../development/interpreters/ruby { };
-  ruby19 = callPackage ../development/interpreters/ruby/ruby-19.nix { };
-  ruby = ruby18;
+  ruby18 = callPackage ../development/interpreters/ruby/ruby-18.nix { };
+  ruby19 = callPackage ../development/interpreters/ruby { };
+  ruby = ruby19;
 
   rubyLibs = recurseIntoAttrs (callPackage 
../development/interpreters/ruby/libs.nix { });
 
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to