summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2013-12-10 13:00:02 +0100
committerVladimír Čunát <vcunat@gmail.com>2013-12-10 13:00:02 +0100
commit089da3ee5c25f5d36d660d6c679cb0c963617fa7 (patch)
treec21e0b5ec1b1daa2cb08d2a9fdb460aa13d10c7f /pkgs/development
parentdb32c7ca8bf7daad6792c3e9597c68768aafd271 (diff)
parent393dcd9c84e104ab7ff7e35f5612dc221e58d29b (diff)
downloadnixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar
nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar.gz
nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar.bz2
nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar.lz
nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar.xz
nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar.zst
nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.zip
Merge master into x-updates
Conflicts (simple):
	pkgs/top-level/all-packages.nix
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/jdk/jdk7-linux.nix134
-rw-r--r--pkgs/development/libraries/apr-util/default.nix4
-rw-r--r--pkgs/development/libraries/faac/default.nix4
-rw-r--r--pkgs/development/libraries/giflib/4.1.nix10
-rw-r--r--pkgs/development/libraries/gmime/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/IntervalMap/default.nix16
-rw-r--r--pkgs/development/libraries/haskell/ex-pool/default.nix17
-rw-r--r--pkgs/development/libraries/haskell/extensible-effects/default.nix20
-rw-r--r--pkgs/development/libraries/haskell/haskelldb/default.nix15
-rw-r--r--pkgs/development/libraries/libopus/default.nix13
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.80/default.nix (renamed from pkgs/development/tools/build-managers/gnumake-3.80/default.nix)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.80/log.patch (renamed from pkgs/development/tools/build-managers/gnumake-3.80/log.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.81/default.nix (renamed from pkgs/development/tools/build-managers/gnumake/3.81.nix)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.81/impure-dirs.patch (renamed from pkgs/development/tools/build-managers/gnumake/impure-dirs.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.81/log-3.81.patch (renamed from pkgs/development/tools/build-managers/gnumake/log-3.81.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/MAKEFLAGS-reexec.patch (renamed from pkgs/development/tools/build-managers/gnumake/MAKEFLAGS-reexec.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/archives-many-objs.patch (renamed from pkgs/development/tools/build-managers/gnumake/archives-many-objs.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/construct-command-line.patch (renamed from pkgs/development/tools/build-managers/gnumake/construct-command-line.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/copy-on-expand.patch (renamed from pkgs/development/tools/build-managers/gnumake/copy-on-expand.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/darwin-library_search-dylib.patch (renamed from pkgs/development/tools/build-managers/gnumake/darwin-library_search-dylib.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/default.nix (renamed from pkgs/development/tools/build-managers/gnumake/default.nix)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/glob-speedup.patch (renamed from pkgs/development/tools/build-managers/gnumake/glob-speedup.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/impure-dirs.patch34
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/intermediate-parallel.patch (renamed from pkgs/development/tools/build-managers/gnumake/intermediate-parallel.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/log.patch (renamed from pkgs/development/tools/build-managers/gnumake/log.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/long-command-line.patch (renamed from pkgs/development/tools/build-managers/gnumake/long-command-line.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/memory-corruption.patch (renamed from pkgs/development/tools/build-managers/gnumake/memory-corruption.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/oneshell.patch (renamed from pkgs/development/tools/build-managers/gnumake/oneshell.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/parallel-remake.patch (renamed from pkgs/development/tools/build-managers/gnumake/parallel-remake.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/4.0/darwin-library_search-dylib.patch17
-rw-r--r--pkgs/development/tools/build-managers/gnumake/4.0/default.nix49
-rw-r--r--pkgs/development/tools/build-managers/gnumake/4.0/impure-dirs.patch34
-rw-r--r--pkgs/development/tools/build-managers/simple-build-tool/default.nix2
33 files changed, 363 insertions, 10 deletions
diff --git a/pkgs/development/compilers/jdk/jdk7-linux.nix b/pkgs/development/compilers/jdk/jdk7-linux.nix
new file mode 100644
index 000000000000..a7a5eccee9d5
--- /dev/null
+++ b/pkgs/development/compilers/jdk/jdk7-linux.nix
@@ -0,0 +1,134 @@
+{ swingSupport ? true
+, stdenv
+, requireFile
+, unzip
+, xlibs ? null
+, installjdk ? true
+, pluginSupport ? true
+, installjce ? false
+}:
+
+assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
+assert swingSupport -> xlibs != null;
+
+let
+
+  /**
+   * The JRE libraries are in directories that depend on the CPU.
+   */
+  architecture =
+    if stdenv.system == "i686-linux" then
+      "i386"
+    else if stdenv.system == "x86_64-linux" then
+      "amd64"
+    else
+      abort "jdk requires i686-linux or x86_64 linux";
+
+  jce =
+    if installjce then
+      requireFile {
+        name = "UnlimitedJCEPolicyJDK7.zip";
+        url = http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html;
+        sha256 = "0qljzfxbikm8br5k7rkamibp1vkyjrf6blbxpx6hn4k46f62bhnh";
+      }
+    else
+      null;
+in
+
+stdenv.mkDerivation {
+  name =
+    if installjdk then "jdk-1.7.0_45" else "jre-1.7.0_45";
+
+  src =
+    if stdenv.system == "i686-linux" then
+      requireFile {
+        name = "jdk-7u45-linux-i586.tar.gz";
+        url = http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html;
+        sha256 = "1q0nw2rwmavcrssyigq76p1h00hm8kd3rhb5bdv7rbdcs0jxrjsa";
+      }
+    else if stdenv.system == "x86_64-linux" then
+      requireFile {
+        name = "jdk-7u45-linux-x64.tar.gz";
+        url = http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html;
+        sha256 = "06jbz536zycqkdpc7zriay0jidmj9nriqva60afsgpv93kcf9spj";
+      }
+    else
+      abort "jdk requires i686-linux or x86_64 linux";
+
+  buildInputs = if installjce then [ unzip ] else [];
+
+  installPhase = ''
+    cd ..
+    if test -z "$installjdk"; then
+      mv $sourceRoot/jre $out
+    else
+      mv $sourceRoot $out
+    fi
+
+    for file in $out/*
+    do
+      if test -f $file ; then
+        rm $file
+      fi
+    done
+
+    if test -n "$installjdk"; then
+      for file in $out/jre/*
+      do
+        if test -f $file ; then
+          rm $file
+        fi
+      done
+    fi
+
+    # construct the rpath
+    rpath=
+    for i in $libraries; do
+        rpath=$rpath''${rpath:+:}$i/lib
+    done
+
+    if test -z "$installjdk"; then
+      jrePath=$out
+    else
+      jrePath=$out/jre
+    fi
+
+    if test -n "$jce"; then
+      unzip $jce
+      cp -v jce/*.jar $jrePath/lib/security
+    fi
+
+    rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/jli
+
+    # set all the dynamic linkers
+    find $out -type f -perm +100 \
+        -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+        --set-rpath "$rpath" {} \;
+
+    find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
+
+    if test -z "$pluginSupport"; then
+      rm -f $out/bin/javaws
+      if test -n "$installjdk"; then
+        rm -f $out/jre/bin/javaws
+      fi
+    fi
+
+    mkdir $jrePath/lib/${architecture}/plugins
+    ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins
+  '';
+
+  inherit installjdk pluginSupport;
+
+  /**
+   * libXt is only needed on amd64
+   */
+  libraries =
+    [stdenv.gcc.libc] ++
+    (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt] else []);
+
+  passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
+
+  meta.license = "unfree";
+}
+
diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix
index 8e49d3984606..89c2c31ef7a9 100644
--- a/pkgs/development/libraries/apr-util/default.nix
+++ b/pkgs/development/libraries/apr-util/default.nix
@@ -9,11 +9,11 @@ assert bdbSupport -> db4 != null;
 assert ldapSupport -> openldap != null;
 
 stdenv.mkDerivation rec {
-  name = "apr-util-1.5.2";
+  name = "apr-util-1.5.3";
 
   src = fetchurl {
     url = "mirror://apache/apr/${name}.tar.bz2";
-    md5 = "89c1348aa79e898d7c34a6206311c9c2";
+    sha256 = "0s1rpqjy5xr03k9s4xrsm5wvhj5286vlkf6jvqayw99yy5sb3vbq";
   };
 
   configureFlags = ''
diff --git a/pkgs/development/libraries/faac/default.nix b/pkgs/development/libraries/faac/default.nix
index 8e79afb5f9ef..8bfaaf3ea497 100644
--- a/pkgs/development/libraries/faac/default.nix
+++ b/pkgs/development/libraries/faac/default.nix
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Open source MPEG-4 and MPEG-2 AAC encoder";
     homepage = http://www.audiocoding.com/faac.html;
-    license = "LGPL";
+    # Incompatible with GPL. Some changes to the base code, included in faac,
+    # are under LGPL though.
+    license = "unfree";
   };
 }
diff --git a/pkgs/development/libraries/giflib/4.1.nix b/pkgs/development/libraries/giflib/4.1.nix
new file mode 100644
index 000000000000..35d66b3647b4
--- /dev/null
+++ b/pkgs/development/libraries/giflib/4.1.nix
@@ -0,0 +1,10 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation {
+  name = "giflib-4.1.6";
+  src = fetchurl {
+    url = mirror://sourceforge/giflib/giflib-4.1.6.tar.bz2;
+    sha256 = "1v9b7ywz7qg8hli0s9vv1b8q9xxb2xvqq2mg1zpr73xwqpcwxhg1";
+  };
+}
+
diff --git a/pkgs/development/libraries/gmime/default.nix b/pkgs/development/libraries/gmime/default.nix
index 99859b9f34ef..a8a3943e409e 100644
--- a/pkgs/development/libraries/gmime/default.nix
+++ b/pkgs/development/libraries/gmime/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, glib, zlib, libgpgerror }:
 
 stdenv.mkDerivation rec {
-  name = "gmime-2.6.15";
+  name = "gmime-2.6.19";
 
   src = fetchurl {
     url = "mirror://gnome/sources/gmime/2.6/${name}.tar.xz";
-    sha256 = "16n9gmlwn6rphi59hrwy6dpn785s3r13h2kmrn3k61l2kfws1hml";
+    sha256 = "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/libraries/haskell/IntervalMap/default.nix b/pkgs/development/libraries/haskell/IntervalMap/default.nix
new file mode 100644
index 000000000000..e2b94abd7c8d
--- /dev/null
+++ b/pkgs/development/libraries/haskell/IntervalMap/default.nix
@@ -0,0 +1,16 @@
+{ cabal, Cabal, deepseq, QuickCheck }:
+
+cabal.mkDerivation (self: {
+  pname = "IntervalMap";
+  version = "0.3.0.2";
+  sha256 = "14pbq5n2cn9gxjkmqpnbn7dx9963wp3sdbb180wm9l5xqi338s0l";
+  buildDepends = [ deepseq ];
+  testDepends = [ Cabal deepseq QuickCheck ];
+  meta = {
+    homepage = "http://www.chr-breitkopf.de/comp/IntervalMap";
+    description = "Maps from Intervals to values, with efficient search";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.ocharles ];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/ex-pool/default.nix b/pkgs/development/libraries/haskell/ex-pool/default.nix
new file mode 100644
index 000000000000..9bf966e749af
--- /dev/null
+++ b/pkgs/development/libraries/haskell/ex-pool/default.nix
@@ -0,0 +1,17 @@
+{ cabal, exceptions, hashable, stm, time, transformers, vector }:
+
+cabal.mkDerivation (self: {
+  pname = "ex-pool";
+  version = "0.1.0.2";
+  sha256 = "11q63yfr59r6cfzi635xj75nhcc2yi83snc75k638wyamxgvxng4";
+  buildDepends = [
+    exceptions hashable stm time transformers vector
+  ];
+  meta = {
+    homepage = "https://github.com/kim/ex-pool";
+    description = "Another fork of resource-pool, with a MonadIO and MonadCatch constraint";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.ocharles ];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/extensible-effects/default.nix b/pkgs/development/libraries/haskell/extensible-effects/default.nix
new file mode 100644
index 000000000000..f97b5cd5e28c
--- /dev/null
+++ b/pkgs/development/libraries/haskell/extensible-effects/default.nix
@@ -0,0 +1,20 @@
+{ cabal, HUnit, QuickCheck, testFramework, testFrameworkHunit
+, testFrameworkQuickcheck2
+}:
+
+cabal.mkDerivation (self: {
+  pname = "extensible-effects";
+  version = "1.2.1";
+  sha256 = "066977hjhcg44v47hkjpf2gs48xsry74l4h8hp753jsvbfsv0030";
+  testDepends = [
+    HUnit QuickCheck testFramework testFrameworkHunit
+    testFrameworkQuickcheck2
+  ];
+  meta = {
+    homepage = "https://github.com/RobotGymnast/extensible-effects";
+    description = "An Alternative to Monad Transformers";
+    license = self.stdenv.lib.licenses.mit;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.ocharles ];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/haskelldb/default.nix b/pkgs/development/libraries/haskell/haskelldb/default.nix
new file mode 100644
index 000000000000..fde1d71b2b03
--- /dev/null
+++ b/pkgs/development/libraries/haskell/haskelldb/default.nix
@@ -0,0 +1,15 @@
+{ cabal, mtl, time }:
+
+cabal.mkDerivation (self: {
+  pname = "haskelldb";
+  version = "2.2.2";
+  sha256 = "1nwy05wsffagv62kbi8ahm6s591wal7cdl19p0fqi86qz05y9hkm";
+  buildDepends = [ mtl time ];
+  meta = {
+    homepage = "https://github.com/m4dc4p/haskelldb";
+    description = "A library of combinators for generating and executing SQL statements";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.ocharles ];
+  };
+})
diff --git a/pkgs/development/libraries/libopus/default.nix b/pkgs/development/libraries/libopus/default.nix
index 11f7a370efa9..b1bf65d0fe67 100644
--- a/pkgs/development/libraries/libopus/default.nix
+++ b/pkgs/development/libraries/libopus/default.nix
@@ -1,15 +1,20 @@
 { stdenv, fetchurl, fixedPoint ? false }:
 
+let
+  version = "1.1";
+in
 stdenv.mkDerivation rec {
-  name = "libopus-1.0.3";
-  
+  name = "libopus-${version}";
+
   src = fetchurl {
-    url = "http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz";
-    sha256 = "175l7hv7d03c4iz60g185nqvwrabc39ksil0d7g07i6vjaf0h6hr";
+    url = "http://downloads.xiph.org/releases/opus/opus-${version}.tar.gz";
+    sha256 = "158xprn2086arvdib3vbbygz7z6jqkw2nci7nlywzzwallap0wmr";
   };
 
   configureFlags = stdenv.lib.optionalString fixedPoint "--enable-fixed-point";
 
+  doCheck = true;
+
   meta = {
     description = "Open, royalty-free, highly versatile audio codec";
     license = "BSD";
diff --git a/pkgs/development/tools/build-managers/gnumake-3.80/default.nix b/pkgs/development/tools/build-managers/gnumake/3.80/default.nix
index b0926a7f531c..b0926a7f531c 100644
--- a/pkgs/development/tools/build-managers/gnumake-3.80/default.nix
+++ b/pkgs/development/tools/build-managers/gnumake/3.80/default.nix
diff --git a/pkgs/development/tools/build-managers/gnumake-3.80/log.patch b/pkgs/development/tools/build-managers/gnumake/3.80/log.patch
index fa90acfe8de5..fa90acfe8de5 100644
--- a/pkgs/development/tools/build-managers/gnumake-3.80/log.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.80/log.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/3.81.nix b/pkgs/development/tools/build-managers/gnumake/3.81/default.nix
index 56d2326c916b..56d2326c916b 100644
--- a/pkgs/development/tools/build-managers/gnumake/3.81.nix
+++ b/pkgs/development/tools/build-managers/gnumake/3.81/default.nix
diff --git a/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch b/pkgs/development/tools/build-managers/gnumake/3.81/impure-dirs.patch
index f6646f1d0126..f6646f1d0126 100644
--- a/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.81/impure-dirs.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/log-3.81.patch b/pkgs/development/tools/build-managers/gnumake/3.81/log-3.81.patch
index b98d85a08265..b98d85a08265 100644
--- a/pkgs/development/tools/build-managers/gnumake/log-3.81.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.81/log-3.81.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/MAKEFLAGS-reexec.patch b/pkgs/development/tools/build-managers/gnumake/3.82/MAKEFLAGS-reexec.patch
index a2f59657d4ca..a2f59657d4ca 100644
--- a/pkgs/development/tools/build-managers/gnumake/MAKEFLAGS-reexec.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/MAKEFLAGS-reexec.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/archives-many-objs.patch b/pkgs/development/tools/build-managers/gnumake/3.82/archives-many-objs.patch
index 73c0381ced45..73c0381ced45 100644
--- a/pkgs/development/tools/build-managers/gnumake/archives-many-objs.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/archives-many-objs.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/construct-command-line.patch b/pkgs/development/tools/build-managers/gnumake/3.82/construct-command-line.patch
index aa4a1afe3fd0..aa4a1afe3fd0 100644
--- a/pkgs/development/tools/build-managers/gnumake/construct-command-line.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/construct-command-line.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/copy-on-expand.patch b/pkgs/development/tools/build-managers/gnumake/3.82/copy-on-expand.patch
index 3f202b4db96b..3f202b4db96b 100644
--- a/pkgs/development/tools/build-managers/gnumake/copy-on-expand.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/copy-on-expand.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/darwin-library_search-dylib.patch b/pkgs/development/tools/build-managers/gnumake/3.82/darwin-library_search-dylib.patch
index de7e4f615212..de7e4f615212 100644
--- a/pkgs/development/tools/build-managers/gnumake/darwin-library_search-dylib.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/darwin-library_search-dylib.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/default.nix b/pkgs/development/tools/build-managers/gnumake/3.82/default.nix
index 4f3c7defa488..4f3c7defa488 100644
--- a/pkgs/development/tools/build-managers/gnumake/default.nix
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/default.nix
diff --git a/pkgs/development/tools/build-managers/gnumake/glob-speedup.patch b/pkgs/development/tools/build-managers/gnumake/3.82/glob-speedup.patch
index 45971f33590b..45971f33590b 100644
--- a/pkgs/development/tools/build-managers/gnumake/glob-speedup.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/glob-speedup.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/3.82/impure-dirs.patch b/pkgs/development/tools/build-managers/gnumake/3.82/impure-dirs.patch
new file mode 100644
index 000000000000..f6646f1d0126
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/impure-dirs.patch
@@ -0,0 +1,34 @@
+diff -rc read.c read.c
+*** read.c	2006-03-17 15:24:20.000000000 +0100
+--- read.c	2007-05-24 17:16:31.000000000 +0200
+***************
+*** 99,107 ****
+--- 99,109 ----
+  #endif
+      INCLUDEDIR,
+  #ifndef _AMIGA
++ #if 0    
+      "/usr/gnu/include",
+      "/usr/local/include",
+      "/usr/include",
++ #endif    
+  #endif
+      0
+    };
+diff -rc reremake.c
+*** remake.c	2006-03-20 03:36:37.000000000 +0100
+--- remake.c	2007-05-24 17:06:54.000000000 +0200
+***************
+*** 1452,1460 ****
+--- 1452,1462 ----
+    static char *dirs[] =
+      {
+  #ifndef _AMIGA
++ #if 0
+        "/lib",
+        "/usr/lib",
+  #endif
++ #endif
+  #if defined(WINDOWS32) && !defined(LIBDIR)
+  /*
+   * This is completely up to the user at product install time. Just define
diff --git a/pkgs/development/tools/build-managers/gnumake/intermediate-parallel.patch b/pkgs/development/tools/build-managers/gnumake/3.82/intermediate-parallel.patch
index 9bb7add0bde2..9bb7add0bde2 100644
--- a/pkgs/development/tools/build-managers/gnumake/intermediate-parallel.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/intermediate-parallel.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/log.patch b/pkgs/development/tools/build-managers/gnumake/3.82/log.patch
index e6197fd8e78f..e6197fd8e78f 100644
--- a/pkgs/development/tools/build-managers/gnumake/log.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/log.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/long-command-line.patch b/pkgs/development/tools/build-managers/gnumake/3.82/long-command-line.patch
index 39ea05843bfd..39ea05843bfd 100644
--- a/pkgs/development/tools/build-managers/gnumake/long-command-line.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/long-command-line.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/memory-corruption.patch b/pkgs/development/tools/build-managers/gnumake/3.82/memory-corruption.patch
index b28c07353ec2..b28c07353ec2 100644
--- a/pkgs/development/tools/build-managers/gnumake/memory-corruption.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/memory-corruption.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/oneshell.patch b/pkgs/development/tools/build-managers/gnumake/3.82/oneshell.patch
index fbade127ce61..fbade127ce61 100644
--- a/pkgs/development/tools/build-managers/gnumake/oneshell.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/oneshell.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/parallel-remake.patch b/pkgs/development/tools/build-managers/gnumake/3.82/parallel-remake.patch
index a19fe7b7d629..a19fe7b7d629 100644
--- a/pkgs/development/tools/build-managers/gnumake/parallel-remake.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/parallel-remake.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/4.0/darwin-library_search-dylib.patch b/pkgs/development/tools/build-managers/gnumake/4.0/darwin-library_search-dylib.patch
new file mode 100644
index 000000000000..de7e4f615212
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gnumake/4.0/darwin-library_search-dylib.patch
@@ -0,0 +1,17 @@
+Fixed default libpatttern on Darwin, imported from prefix overlay.
+Got merged upstream:
+https://savannah.gnu.org/bugs/?37197
+--- default.c.orig	2009-05-02 12:25:24 +0200
++++ default.c	2009-05-02 12:25:58 +0200
+@@ -509,7 +509,11 @@
+ #ifdef __MSDOS__
+     ".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
+ #else
++#ifdef __APPLE__
++    ".LIBPATTERNS", "lib%.dylib lib%.a",
++#else
+     ".LIBPATTERNS", "lib%.so lib%.a",
++#endif
+ #endif
+ #endif
+ 
diff --git a/pkgs/development/tools/build-managers/gnumake/4.0/default.nix b/pkgs/development/tools/build-managers/gnumake/4.0/default.nix
new file mode 100644
index 000000000000..6a76fa0302b6
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gnumake/4.0/default.nix
@@ -0,0 +1,49 @@
+{stdenv, fetchurl}:
+
+let version = "4.0"; in
+stdenv.mkDerivation {
+  name = "gnumake-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnu/make/make-${version}.tar.bz2";
+    sha256 = "1nyvn8mknw0mf7727lprva3lisl1y0n03lvar342rrpdmz3qc1p6";
+  };
+
+  /* On Darwin, there are 3 test failures that haven't been investigated
+     yet.  */
+  doCheck = !stdenv.isDarwin && !stdenv.isFreeBSD;
+
+  patches =
+    [
+      # Purity: don't look for library dependencies (of the form
+      # `-lfoo') in /lib and /usr/lib.  It's a stupid feature anyway.
+      # Likewise, when searching for included Makefiles, don't look in
+      # /usr/include and friends.
+      ./impure-dirs.patch
+
+      # a bunch of patches from Gentoo, mostly should be from upstream (unreleased)
+      ./darwin-library_search-dylib.patch
+    ];
+  patchFlags = "-p0";
+
+  meta = {
+    description = "GNU Make, a program controlling the generation of non-source files from sources";
+
+    longDescription =
+      '' Make is a tool which controls the generation of executables and
+         other non-source files of a program from the program's source files.
+
+         Make gets its knowledge of how to build your program from a file
+         called the makefile, which lists each of the non-source files and
+         how to compute it from other files. When you write a program, you
+         should write a makefile for it, so that it is possible to use Make
+         to build and install the program.
+      '';
+
+    homepage = http://www.gnu.org/software/make/;
+
+    license = "GPLv3+";
+    maintainers = [ stdenv.lib.maintainers.ludo ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/tools/build-managers/gnumake/4.0/impure-dirs.patch b/pkgs/development/tools/build-managers/gnumake/4.0/impure-dirs.patch
new file mode 100644
index 000000000000..f6646f1d0126
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gnumake/4.0/impure-dirs.patch
@@ -0,0 +1,34 @@
+diff -rc read.c read.c
+*** read.c	2006-03-17 15:24:20.000000000 +0100
+--- read.c	2007-05-24 17:16:31.000000000 +0200
+***************
+*** 99,107 ****
+--- 99,109 ----
+  #endif
+      INCLUDEDIR,
+  #ifndef _AMIGA
++ #if 0    
+      "/usr/gnu/include",
+      "/usr/local/include",
+      "/usr/include",
++ #endif    
+  #endif
+      0
+    };
+diff -rc reremake.c
+*** remake.c	2006-03-20 03:36:37.000000000 +0100
+--- remake.c	2007-05-24 17:06:54.000000000 +0200
+***************
+*** 1452,1460 ****
+--- 1452,1462 ----
+    static char *dirs[] =
+      {
+  #ifndef _AMIGA
++ #if 0
+        "/lib",
+        "/usr/lib",
+  #endif
++ #endif
+  #if defined(WINDOWS32) && !defined(LIBDIR)
+  /*
+   * This is completely up to the user at product install time. Just define
diff --git a/pkgs/development/tools/build-managers/simple-build-tool/default.nix b/pkgs/development/tools/build-managers/simple-build-tool/default.nix
index 13a216799a2d..8f01486cfe72 100644
--- a/pkgs/development/tools/build-managers/simple-build-tool/default.nix
+++ b/pkgs/development/tools/build-managers/simple-build-tool/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
     cat > $out/bin/sbt << EOF
     #!/bin/sh
     SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M"
-    ${jre}/bin/java $SBT_OPTS -jar ${src} "\$@"
+    ${jre}/bin/java \$SBT_OPTS -jar ${src} "\$@"
     EOF
     chmod +x $out/bin/sbt
   '';