From 9a175a002d2f3611a190669d45395a9524eed32e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carles=20Pag=C3=A8s?= <page@cubata.homelinux.net>
Date: Mon, 1 Apr 2013 17:52:57 +0200
Subject: [PATCH 001/123] openal-soft: update to 1.15.1

---
 pkgs/development/libraries/openal-soft/default.nix | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/pkgs/development/libraries/openal-soft/default.nix b/pkgs/development/libraries/openal-soft/default.nix
index 59851eda25aa..b9b08433a626 100644
--- a/pkgs/development/libraries/openal-soft/default.nix
+++ b/pkgs/development/libraries/openal-soft/default.nix
@@ -1,15 +1,16 @@
 { stdenv, fetchurl, cmake, alsaLib }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
 #The current release is still in a testing phase, though it should be stable
 # (neither the ABI or API will break). Please try it out and let me know how it
 #  works. :-)
 
-  name = "openal-soft-1.1.93";
+  version = "1.15.1";
+  name = "openal-soft-${version}";
 
   src = fetchurl {
-    url = http://kcat.strangesoft.net/openal-releases/openal-soft-1.1.93.tar.bz2;
-    sha256 = "162nyv4jy6qzi7s5q3wpdawfph6npyn1n4wjf21haxdxq0mmp6l7";
+    url = "http://kcat.strangesoft.net/openal-releases/${name}.tar.bz2";
+    sha256 = "0mmhdqiyb3c9dzvxspm8h2v8jibhi8pfjxnf6m0wn744y1ia2a8f";
   };
 
   buildInputs = [ cmake alsaLib ];

From 8f2662d4800fb55d175075cc5610b0baaae719d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carles=20Pag=C3=A8s?= <page@cubata.homelinux.net>
Date: Mon, 1 Apr 2013 17:56:34 +0200
Subject: [PATCH 002/123] dhewm3: add current master from github

This is a port of the Doom 3 source code released under GPL. Amongst others,
this makes use of SDL to be multiplatform, and supports amd64.
---
 pkgs/games/dhewm3/default.nix   | 27 +++++++++++++++++++++++++++
 pkgs/top-level/all-packages.nix |  2 ++
 2 files changed, 29 insertions(+)
 create mode 100644 pkgs/games/dhewm3/default.nix

diff --git a/pkgs/games/dhewm3/default.nix b/pkgs/games/dhewm3/default.nix
new file mode 100644
index 000000000000..67e840d8862d
--- /dev/null
+++ b/pkgs/games/dhewm3/default.nix
@@ -0,0 +1,27 @@
+{stdenv, fetchurl, unzip, cmake, SDL, zlib, libjpeg, libogg, libvorbis
+, openalSoft , curl }:
+
+stdenv.mkDerivation rec {
+  hash = "92a41322f4aa8bd45395d8088721c9a2bf43c79b";
+  name = "dhewm3-20130113-${hash}";
+  src = fetchurl {
+    url = "https://github.com/dhewm/dhewm3/zipball/${hash}";
+    sha256 = "0c17k60xhimpqi1xi9s1l7jbc97pqjnk4lgwyjb0agc3dkr73zwd";
+    #name  = "dhewm-dhewm3-92a4132.zip";
+  };
+
+  unpackPhase = ''
+    unzip ${src}
+    cd */neo
+  '';
+
+  buildInputs = [ unzip cmake SDL zlib libjpeg libogg libvorbis openalSoft
+    curl ];
+
+  meta = {
+    homepage = https://github.com/dhewm/dhewm3;
+    description = "Doom 3 port to SDL";
+    license = "GPLv3";
+  };
+}
+
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 32646212ad77..f9e0043eeaec 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8202,6 +8202,8 @@ let
 
   crrcsim = callPackage ../games/crrcsim {};
 
+  dhewm3 = callPackage ../games/dhewm3 {};
+
   drumkv1 = callPackage ../applications/audio/drumkv1 { };
 
   dwarf_fortress = callPackage_i686 ../games/dwarf-fortress { };

From 1717b494bf3bd69ae187e7758992e0ed99906c1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carles=20Pag=C3=A8s?= <page@cubata.homelinux.net>
Date: Tue, 2 Apr 2013 22:52:50 +0200
Subject: [PATCH 003/123] dhewm3: add mesa to build inputs

I also removed an unused line I left over in previous commits.
---
 pkgs/games/dhewm3/default.nix | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/pkgs/games/dhewm3/default.nix b/pkgs/games/dhewm3/default.nix
index 67e840d8862d..38b9f35e488c 100644
--- a/pkgs/games/dhewm3/default.nix
+++ b/pkgs/games/dhewm3/default.nix
@@ -1,5 +1,5 @@
-{stdenv, fetchurl, unzip, cmake, SDL, zlib, libjpeg, libogg, libvorbis
-, openalSoft , curl }:
+{stdenv, fetchurl, unzip, cmake, SDL, mesa, zlib, libjpeg, libogg, libvorbis
+, openalSoft, curl }:
 
 stdenv.mkDerivation rec {
   hash = "92a41322f4aa8bd45395d8088721c9a2bf43c79b";
@@ -7,7 +7,6 @@ stdenv.mkDerivation rec {
   src = fetchurl {
     url = "https://github.com/dhewm/dhewm3/zipball/${hash}";
     sha256 = "0c17k60xhimpqi1xi9s1l7jbc97pqjnk4lgwyjb0agc3dkr73zwd";
-    #name  = "dhewm-dhewm3-92a4132.zip";
   };
 
   unpackPhase = ''
@@ -15,7 +14,7 @@ stdenv.mkDerivation rec {
     cd */neo
   '';
 
-  buildInputs = [ unzip cmake SDL zlib libjpeg libogg libvorbis openalSoft
+  buildInputs = [ unzip cmake SDL mesa zlib libjpeg libogg libvorbis openalSoft
     curl ];
 
   meta = {

From 12409aa7cbbf3b5f05b83b07592d2d9537d91983 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Thu, 4 Apr 2013 22:10:09 +0200
Subject: [PATCH 004/123] ffmpeg: adding manpage generation

---
 pkgs/development/libraries/ffmpeg/1.1.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/ffmpeg/1.1.nix b/pkgs/development/libraries/ffmpeg/1.1.nix
index 9266250527e6..31a163922d82 100644
--- a/pkgs/development/libraries/ffmpeg/1.1.nix
+++ b/pkgs/development/libraries/ffmpeg/1.1.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, yasm, zlib, bzip2, alsaLib
+{ stdenv, fetchurl, pkgconfig, yasm, zlib, bzip2, alsaLib, texinfo, perl
 , mp3Support ? true, lame ? null
 , speexSupport ? true, speex ? null
 , theoraSupport ? true, libtheora ? null
@@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
     ++ stdenv.lib.optional x11grabSupport "--enable-x11grab"
     ++ stdenv.lib.optional playSupport "--enable-ffplay";
 
-  buildInputs = [ pkgconfig lame yasm zlib bzip2 alsaLib ]
+  buildInputs = [ pkgconfig lame yasm zlib bzip2 alsaLib texinfo perl ]
     ++ stdenv.lib.optional mp3Support lame
     ++ stdenv.lib.optional speexSupport speex
     ++ stdenv.lib.optional theoraSupport libtheora

From 37de48e43d18dce5e88f7fb7815f51be2e2916cc Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sun, 31 Mar 2013 11:10:48 +0200
Subject: [PATCH 005/123] linux-3.0: upgrade to 3.0.71

---
 pkgs/os-specific/linux/kernel/linux-3.0.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-3.0.nix b/pkgs/os-specific/linux/kernel/linux-3.0.nix
index 4495e8177f48..4f68048be672 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.0.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.0.nix
@@ -231,7 +231,7 @@ in
 import ./generic.nix (
 
   rec {
-    version = "3.0.70";
+    version = "3.0.71";
 
     preConfigure = ''
       substituteInPlace scripts/depmod.sh --replace '-b "$INSTALL_MOD_PATH"' ""
@@ -239,7 +239,7 @@ import ./generic.nix (
 
     src = fetchurl {
       url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-      sha256 = "0hxb457mixpcq43dg0lnbkfdjnzqw4ajfcfkyyfgdzn5496li6va";
+      sha256 = "1qavk6kp84h02bs0clhpri148lfj7zdzj7jjy07vw0h48lmj1405";
     };
 
     config = configWithPlatform stdenv.platform;

From d0c6308da7f7562aa0ea25d7a846b3e70451a086 Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sun, 31 Mar 2013 11:11:01 +0200
Subject: [PATCH 006/123] linux-3.4: upgrade to 3.4.38

---
 pkgs/os-specific/linux/kernel/linux-3.4.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-3.4.nix b/pkgs/os-specific/linux/kernel/linux-3.4.nix
index aef013bf50a8..2223f14b043d 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.4.nix
@@ -245,7 +245,7 @@ in
 import ./generic.nix (
 
   rec {
-    version = "3.4.37";
+    version = "3.4.38";
     testing = false;
 
     preConfigure = ''
@@ -254,7 +254,7 @@ import ./generic.nix (
 
     src = fetchurl {
       url = "mirror://kernel/linux/kernel/v3.x/${if testing then "testing/" else ""}linux-${version}.tar.xz";
-      sha256 = "0f7gbspi28a29vvvv0x2818pwhyjry4wzdm5d1nknf3a0cdi8an7";
+      sha256 = "1j3389frp98f7l4l4mp1lyw5g1g9yll6fayiyz7dsnx8fkxsga4h";
     };
 
     config = configWithPlatform stdenv.platform;

From 6ef9c6b1fc0979603831cb5e685b94671904302d Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sun, 31 Mar 2013 11:11:13 +0200
Subject: [PATCH 007/123] linux-3.8: upgrade to 3.8.5

---
 pkgs/os-specific/linux/kernel/linux-3.8.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-3.8.nix b/pkgs/os-specific/linux/kernel/linux-3.8.nix
index 54550885fa65..d0926f267ea4 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.8.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.8.nix
@@ -261,7 +261,7 @@ import ./generic.nix (
 
     src = fetchurl {
       url = "mirror://kernel/linux/kernel/v3.x/${if testing then "testing/" else ""}linux-${version}.tar.xz";
-      sha256 = "1f1b6e09cb6ba656b28a41eb9e16e11576879f14574c0cb861b24734f3c5899f";
+      sha256 = "17w9qprk8ixjc6w0qk2p2jgqfxhmw4b9xss1iar5d9kbrc4nw6qz";
     };
 
     config = configWithPlatform stdenv.platform;

From 4154fbfabd39ae2689499c1b57c59f6d54897650 Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sun, 31 Mar 2013 11:11:31 +0200
Subject: [PATCH 008/123] linux-3.9: upgrade to 3.9-rc4

---
 pkgs/os-specific/linux/kernel/linux-3.9.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-3.9.nix b/pkgs/os-specific/linux/kernel/linux-3.9.nix
index 6340e71bf8a2..b6da87f4578d 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.9.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.9.nix
@@ -252,8 +252,8 @@ in
 import ./generic.nix (
 
   rec {
-    version = "3.9-rc3";
-    modDirVersion = "3.9.0-rc3";
+    version = "3.9-rc4";
+    modDirVersion = "3.9.0-rc4";
     testing = true;
 
     preConfigure = ''
@@ -262,7 +262,7 @@ import ./generic.nix (
 
     src = fetchurl {
       url = "mirror://kernel/linux/kernel/v3.x/${if testing then "testing/" else ""}linux-${version}.tar.xz";
-      sha256 = "1fbg952zzn6nkch2fpd1fzkwc6xsf66fnmkxrmc77yz8d29qddi5";
+      sha256 = "15mjsxa8xl233k004a2myg24l1x5rp22icdpy5r165rhbknbb1as";
     };
 
     config = configWithPlatform stdenv.platform;

From 5431663e12e3512671c29f60f52820994dbd091e Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sun, 31 Mar 2013 14:45:14 +0200
Subject: [PATCH 009/123] e17/e_dbus: make sure depending packages can find
 (propagated) dbus

---
 pkgs/desktops/e17/e_dbus/default.nix   | 1 +
 pkgs/desktops/e17/e_dbus/setup-hook.sh | 8 ++++++++
 2 files changed, 9 insertions(+)
 create mode 100644 pkgs/desktops/e17/e_dbus/setup-hook.sh

diff --git a/pkgs/desktops/e17/e_dbus/default.nix b/pkgs/desktops/e17/e_dbus/default.nix
index 44eaf2328ec2..cfc0203b3e0f 100644
--- a/pkgs/desktops/e17/e_dbus/default.nix
+++ b/pkgs/desktops/e17/e_dbus/default.nix
@@ -9,6 +9,7 @@ stdenv.mkDerivation rec {
   };
   buildInputs = [ pkgconfig zlib libjpeg expat ecore eina evas ];
   propagatedBuildInputs = [ dbus_libs ];
+  setupHook = ./setup-hook.sh;
   configureFlags = ''
     --disable-edbus-test
     --disable-edbus-test-client
diff --git a/pkgs/desktops/e17/e_dbus/setup-hook.sh b/pkgs/desktops/e17/e_dbus/setup-hook.sh
new file mode 100644
index 000000000000..d98f24b4c04b
--- /dev/null
+++ b/pkgs/desktops/e17/e_dbus/setup-hook.sh
@@ -0,0 +1,8 @@
+addDbusIncludePath () {
+    if test -d "$1/include/dbus-1.0"
+    then
+        export NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE} -I$1/include/dbus-1.0 -I $1/lib/dbus-1.0/include"
+    fi
+}
+
+envHooks=(${envHooks[@]} addDbusIncludePath)

From d0b30155a5fbf65459c0a652d28c7ef72774b007 Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sun, 31 Mar 2013 22:19:29 +0200
Subject: [PATCH 010/123] e17/emotion: enable vlc video backend

we should probably make this configurable, but for now enabling (and
testing) at least 1 backend is better than none, as emotion without
backends won't anything at all
---
 pkgs/desktops/e17/emotion/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/desktops/e17/emotion/default.nix b/pkgs/desktops/e17/emotion/default.nix
index 42790162171c..9ec3631b1e78 100644
--- a/pkgs/desktops/e17/emotion/default.nix
+++ b/pkgs/desktops/e17/emotion/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, ecore, evas, eet, eina, edje }:
+{ stdenv, fetchurl, pkgconfig, ecore, evas, eet, eina, edje, vlc }:
 stdenv.mkDerivation rec {
   name = "emotion-${version}";
   version = "1.7.5";
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
     url = "http://download.enlightenment.org/releases/${name}.tar.bz2";
     sha256 = "1sfw8kpj2fcqymzd6q7p51xxib1n2arvjl1hnwhqkvwhlsq2b4sw";
   };
-  buildInputs = [ pkgconfig ecore evas eet eina edje ];
+  buildInputs = [ pkgconfig ecore evas eet eina edje vlc ];
   meta = {
     description = "A library to easily integrate media playback into EFL applications";
     longDescription = ''

From 6dcddbf3b5ae0e7d2b137a8ceda54ecc5421bb8d Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sun, 31 Mar 2013 14:11:03 +0200
Subject: [PATCH 011/123] e17/ethumb: add optional dependency on e_dbus

ethumb_client depends on it, but will fail (skip on installation)
silently when not found
---
 pkgs/desktops/e17/ethumb/default.nix | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pkgs/desktops/e17/ethumb/default.nix b/pkgs/desktops/e17/ethumb/default.nix
index 3d1114e01717..2c5bb2ebd7bf 100644
--- a/pkgs/desktops/e17/ethumb/default.nix
+++ b/pkgs/desktops/e17/ethumb/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, eina, evas, ecore, edje, eet }:
+{ stdenv, fetchurl, pkgconfig, eina, evas, ecore, edje, eet, e_dbus }:
 stdenv.mkDerivation rec {
   name = "ethumb-${version}";
   version = "1.7.5";
@@ -7,6 +7,7 @@ stdenv.mkDerivation rec {
     sha256 = "0prka3knz8p2n46dfrzgwn55khhhrhjny4vvnzkjcwmhvz7kgc9l";
   };
   buildInputs = [ pkgconfig eina evas ecore edje eet ];
+  propagatedBuildInputs = [ e_dbus ];
   meta = {
     description = "A thumbnail generation library";
     longDescription = ''
@@ -14,7 +15,7 @@ stdenv.mkDerivation rec {
       * create thumbnails with a predefined frame (possibly an edje frame);
       * have an option to create fdo-like thumbnails;
       * have a client/server utility;
-      * TODO: make thumbnails from edje backgrounds, icons and themes; 
+      * TODO: make thumbnails from edje backgrounds, icons and themes;
     '';
     homepage = http://enlightenment.org/;
     license = stdenv.lib.licenses.lgpl21;

From 07c50d5124cb2ee6b9ee26655c0ebae0613c9740 Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sun, 31 Mar 2013 22:46:27 +0200
Subject: [PATCH 012/123] e17/ethumb: support video thumbnails and exif

---
 pkgs/desktops/e17/ethumb/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/desktops/e17/ethumb/default.nix b/pkgs/desktops/e17/ethumb/default.nix
index 2c5bb2ebd7bf..344abe1e3f12 100644
--- a/pkgs/desktops/e17/ethumb/default.nix
+++ b/pkgs/desktops/e17/ethumb/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, eina, evas, ecore, edje, eet, e_dbus }:
+{ stdenv, fetchurl, pkgconfig, eina, evas, ecore, edje, eet, e_dbus, emotion, libexif }:
 stdenv.mkDerivation rec {
   name = "ethumb-${version}";
   version = "1.7.5";
@@ -6,8 +6,8 @@ stdenv.mkDerivation rec {
     url = "http://download.enlightenment.org/releases/${name}.tar.bz2";
     sha256 = "0prka3knz8p2n46dfrzgwn55khhhrhjny4vvnzkjcwmhvz7kgc9l";
   };
-  buildInputs = [ pkgconfig eina evas ecore edje eet ];
-  propagatedBuildInputs = [ e_dbus ];
+  buildInputs = [ pkgconfig eina evas ecore edje eet emotion libexif ];
+  propagatedBuildInputs = [ e_dbus libexif ];
   meta = {
     description = "A thumbnail generation library";
     longDescription = ''

From a288311c0bf5acbdec31665706e3b3db81de2095 Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sun, 31 Mar 2013 13:46:37 +0200
Subject: [PATCH 013/123] add terminology: e17 terminal emulator

---
 pkgs/desktops/e17/default.nix             |  1 +
 pkgs/desktops/e17/terminology/default.nix | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 pkgs/desktops/e17/terminology/default.nix

diff --git a/pkgs/desktops/e17/default.nix b/pkgs/desktops/e17/default.nix
index f241f3ff0a6d..648a35778635 100644
--- a/pkgs/desktops/e17/default.nix
+++ b/pkgs/desktops/e17/default.nix
@@ -36,6 +36,7 @@ rec {
 
   #### APPLICATIONS
 
+  terminology = callPackage ./terminology { };
 
 
 
diff --git a/pkgs/desktops/e17/terminology/default.nix b/pkgs/desktops/e17/terminology/default.nix
new file mode 100644
index 000000000000..f060d81bd00e
--- /dev/null
+++ b/pkgs/desktops/e17/terminology/default.nix
@@ -0,0 +1,17 @@
+{ stdenv, fetchurl, pkgconfig, elementary, eina, eet, evas, edje, emotion, ecore, ethumb, efreet }:
+
+stdenv.mkDerivation rec {
+  name = "terminology-${version}";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://download.enlightenment.org/releases/${name}.tar.gz";
+    sha256 = "1dn5bjswqgnqza7bngc6afqza47yh27xfwf5qg2kzfgs008hp1bp";
+  };
+  buildInputs = [ pkgconfig elementary eina eet evas ecore edje emotion ecore ethumb efreet ];
+
+  meta = {
+    description = "Terminology, the E17 terminal emulator";
+    homepage = http://www.enlightenment.org/p.php?p=about/terminology;
+    license = stdenv.lib.licenses.bsd2;  # not sure
+  };
+}

From bbbedf56c6c4aa36606f54389e28e996d4e28cb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Thu, 4 Apr 2013 22:25:02 +0200
Subject: [PATCH 014/123] dhewm3: adding enableParallelBuilding

---
 pkgs/games/dhewm3/default.nix | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pkgs/games/dhewm3/default.nix b/pkgs/games/dhewm3/default.nix
index 38b9f35e488c..5509c3db1e4f 100644
--- a/pkgs/games/dhewm3/default.nix
+++ b/pkgs/games/dhewm3/default.nix
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
   buildInputs = [ unzip cmake SDL mesa zlib libjpeg libogg libvorbis openalSoft
     curl ];
 
+  enableParallelBuilding = true;
+
   meta = {
     homepage = https://github.com/dhewm/dhewm3;
     description = "Doom 3 port to SDL";

From d0d4e66652bc48b561138d6588525f9af3f0acea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Thu, 4 Apr 2013 22:57:08 +0200
Subject: [PATCH 015/123] ffmpeg: update to 1.2 (and patching mplayer2)

Simple patch required by mplayer2 to build with ffmpeg 1.2.
---
 pkgs/applications/video/mplayer2/default.nix           |  2 ++
 pkgs/development/libraries/ffmpeg/{1.1.nix => 1.x.nix} |  4 ++--
 pkgs/top-level/all-packages.nix                        | 10 +++++-----
 3 files changed, 9 insertions(+), 7 deletions(-)
 rename pkgs/development/libraries/ffmpeg/{1.1.nix => 1.x.nix} (97%)

diff --git a/pkgs/applications/video/mplayer2/default.nix b/pkgs/applications/video/mplayer2/default.nix
index 79c25d65c05c..2f35d02eb906 100644
--- a/pkgs/applications/video/mplayer2/default.nix
+++ b/pkgs/applications/video/mplayer2/default.nix
@@ -74,6 +74,8 @@ stdenv.mkDerivation rec {
 
   prePatch = ''
     sed -i /^_install_strip/d configure
+
+    sed -i '/stdlib/a#include <ctype.h>/' sub/sub*.c
   '';
 
   buildInputs = with stdenv.lib;
diff --git a/pkgs/development/libraries/ffmpeg/1.1.nix b/pkgs/development/libraries/ffmpeg/1.x.nix
similarity index 97%
rename from pkgs/development/libraries/ffmpeg/1.1.nix
rename to pkgs/development/libraries/ffmpeg/1.x.nix
index 31a163922d82..119e785ea4f7 100644
--- a/pkgs/development/libraries/ffmpeg/1.1.nix
+++ b/pkgs/development/libraries/ffmpeg/1.x.nix
@@ -29,11 +29,11 @@ assert x11grabSupport -> libXext != null && libXfixes != null;
 assert playSupport -> SDL != null;
 
 stdenv.mkDerivation rec {
-  name = "ffmpeg-1.1.3";
+  name = "ffmpeg-1.2";
   
   src = fetchurl {
     url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
-    sha256 = "03s1zsprz5p6gjgwwqcf7b6cvzwwid6l8k7bamx9i0f1iwkgdm0j";
+    sha256 = "1bssxbn4p813xlgb8whg4b60j90yzfy92x70b4q8j35fgp0gnfcs";
   };
   
   # `--enable-gpl' (as well as the `postproc' and `swscale') mean that
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 7b3fc7cbd521..beb1bfcf7265 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -556,7 +556,7 @@ let
 
   cfdg = builderDefsPackage ../tools/graphics/cfdg {
     inherit libpng bison flex;
-    ffmpeg = ffmpeg_1_1;
+    ffmpeg = ffmpeg_1;
   };
 
   checkinstall = callPackage ../tools/package-management/checkinstall { };
@@ -3653,7 +3653,7 @@ let
     vpxSupport = !stdenv.isMips;
   };
 
-  ffmpeg_1_1 = callPackage ../development/libraries/ffmpeg/1.1.nix {
+  ffmpeg_1 = callPackage ../development/libraries/ffmpeg/1.x.nix {
     vpxSupport = !stdenv.isMips;
   };
 
@@ -4618,7 +4618,7 @@ let
   mkvtoolnix = callPackage ../applications/video/mkvtoolnix { };
 
   mlt = callPackage ../development/libraries/mlt {
-    ffmpeg = ffmpeg_1_1;
+    ffmpeg = ffmpeg_1;
   };
 
   libmpeg2 = callPackage ../development/libraries/libmpeg2 { };
@@ -7504,7 +7504,7 @@ let
   };
 
   mplayer2 = callPackage ../applications/video/mplayer2 {
-    ffmpeg = ffmpeg_1_1;
+    ffmpeg = ffmpeg_1;
   };
 
   MPlayerPlugin = browser:
@@ -7974,7 +7974,7 @@ let
   };
 
   vlc = callPackage ../applications/video/vlc {
-    ffmpeg = ffmpeg_1_1;
+    ffmpeg = ffmpeg_1;
   };
 
   vnstat = callPackage ../applications/networking/vnstat { };

From 3db052eb7a41db596ada9db3b89748c6ada55ca8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Thu, 4 Apr 2013 23:06:40 +0200
Subject: [PATCH 016/123] dhewm3: linking with mesa (for non-nvidia cards)

It was just doing a dlopen(libGL), so mesa wasn't in the rpath.
Now it is.
---
 pkgs/games/dhewm3/default.nix | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pkgs/games/dhewm3/default.nix b/pkgs/games/dhewm3/default.nix
index 5509c3db1e4f..6036d7fabd55 100644
--- a/pkgs/games/dhewm3/default.nix
+++ b/pkgs/games/dhewm3/default.nix
@@ -9,6 +9,11 @@ stdenv.mkDerivation rec {
     sha256 = "0c17k60xhimpqi1xi9s1l7jbc97pqjnk4lgwyjb0agc3dkr73zwd";
   };
 
+  # Add mesa linking
+  patchPhase = ''
+    sed -i 's/\<idlib\()\?\)$/idlib GL\1/' CMakeLists.txt
+  '';
+
   unpackPhase = ''
     unzip ${src}
     cd */neo
@@ -24,5 +29,5 @@ stdenv.mkDerivation rec {
     description = "Doom 3 port to SDL";
     license = "GPLv3";
   };
-}
 
+}

From 5aacc334066f1bb0922ef6b9bba7117dbe1c6cbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Thu, 4 Apr 2013 23:32:53 +0200
Subject: [PATCH 017/123] dwm: fix SDL games with fullscreen

It worked quite bad when the game resolution was different than the
current.
---
 pkgs/applications/window-managers/dwm/default.nix | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pkgs/applications/window-managers/dwm/default.nix b/pkgs/applications/window-managers/dwm/default.nix
index db4692683507..82eb9e56935f 100644
--- a/pkgs/applications/window-managers/dwm/default.nix
+++ b/pkgs/applications/window-managers/dwm/default.nix
@@ -1,7 +1,10 @@
 {stdenv, fetchurl, libX11, libXinerama, patches ? []}:
 
-stdenv.mkDerivation rec {
+let
   name = "dwm-6.0";
+in
+stdenv.mkDerivation {
+  inherit name;
  
   src = fetchurl {
     url = "http://dl.suckless.org/dwm/${name}.tar.gz";
@@ -13,7 +16,7 @@ stdenv.mkDerivation rec {
   prePatch = ''sed -i "s@/usr/local@$out@" config.mk'';
 
   # Allow users set their own list of patches
-  inherit patches;
+  patches = [ ./confnotify-6.0.patch ] ++ patches;
 
   buildPhase = " make ";
  

From ecc136b172821fd25700bef8c7e73fcab0bdb926 Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Fri, 5 Apr 2013 00:17:04 +0200
Subject: [PATCH 018/123] aangifte2012: preload library which seems needed

The last step "gegevens verzenden" will segfault otherwise.
---
 pkgs/applications/taxes/aangifte-2012/default.nix | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgs/applications/taxes/aangifte-2012/default.nix b/pkgs/applications/taxes/aangifte-2012/default.nix
index 056ad81feb59..8f36fd485ddd 100644
--- a/pkgs/applications/taxes/aangifte-2012/default.nix
+++ b/pkgs/applications/taxes/aangifte-2012/default.nix
@@ -27,7 +27,8 @@ stdenv.mkDerivation {
     ''
       mkdir -p $out
       cp -prvd * $out/
-      wrapProgram $out/bin/ib2012ux --prefix PATH : ${xdg_utils}/bin
+      wrapProgram $out/bin/ib2012ux --prefix PATH : ${xdg_utils}/bin \
+                                    --prefix LD_PRELOAD : $(cat $NIX_GCC/nix-support/orig-gcc)/lib/libgcc_s.so.1
     '';
 
   meta = {

From 742d198def859da2ba3d74fbc11134c89ab42e5a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= <goibhniu@fsfe.org>
Date: Fri, 5 Apr 2013 01:24:36 +0200
Subject: [PATCH 019/123] Add mid2key: a tool which maps midi notes to
 keystrokes

---
 pkgs/applications/audio/mid2key/default.nix | 25 +++++++++++++++++++++
 pkgs/top-level/all-packages.nix             |  2 ++
 2 files changed, 27 insertions(+)
 create mode 100644 pkgs/applications/audio/mid2key/default.nix

diff --git a/pkgs/applications/audio/mid2key/default.nix b/pkgs/applications/audio/mid2key/default.nix
new file mode 100644
index 000000000000..1e163391a397
--- /dev/null
+++ b/pkgs/applications/audio/mid2key/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, alsaLib, libX11, libXi, libXtst, xextproto }:
+
+stdenv.mkDerivation rec {
+  name = "mid2key-r1";
+
+  src = fetchurl {
+    url = "http://mid2key.googlecode.com/files/${name}.tar.gz";
+    sha256 = "0j2vsjvdgx51nd1qmaa18mcy0yw9pwrhbv2mdwnf913bwsk4y904";
+  };
+
+  unpackPhase = "tar xvzf $src";
+
+  buildInputs = [ alsaLib libX11 libXi libXtst xextproto ];
+
+  buildPhase = "make";
+
+  installPhase = "mkdir -p $out/bin && mv mid2key $out/bin";
+
+  meta = with stdenv.lib; {
+    homepage = http://code.google.com/p/mid2key/;
+    description = "A simple tool which maps midi notes to simulated keystrokes";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index beb1bfcf7265..e125faf33495 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7427,6 +7427,8 @@ let
 
   mhwaveedit = callPackage ../applications/audio/mhwaveedit {};
 
+  mid2key = callPackage ../applications/audio/mid2key { };
+
   midori = builderDefsPackage (import ../applications/networking/browsers/midori) {
     inherit imagemagick intltool python pkgconfig webkit libxml2
       which gettext makeWrapper file libidn sqlite docutils libnotify

From 47e93cd27e5fc6225a85b156ec9340f190e6242c Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 08:56:40 +0200
Subject: [PATCH 020/123] rcs: update to version 5.8.2

It's profoundly satisfying to know that we have the very latest version of RCS.
RCS users, you see, live on the bleeding edge.
---
 pkgs/applications/version-management/rcs/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/applications/version-management/rcs/default.nix b/pkgs/applications/version-management/rcs/default.nix
index 65625ff27695..afc7bca2d1ab 100644
--- a/pkgs/applications/version-management/rcs/default.nix
+++ b/pkgs/applications/version-management/rcs/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "rcs-5.8.1";
+  name = "rcs-5.8.2";
 
   src = fetchurl {
     url = "mirror://gnu/rcs/${name}.tar.gz";
-    sha256 = "1b1y6s4gy3miv2bvx0z01kvnv58h35sw766lccdkxkalk43cml04";
+    sha256 = "1p4kqqrvc7plc3n6ls4xwp6d3mw1jcx9p36pilwd65q31mgbs07a";
   };
 
   doCheck = true;

From 0013355b19673aeabad6b5762c03cadab4f696ee Mon Sep 17 00:00:00 2001
From: Rickard Nilsson <rickynils@gmail.com>
Date: Fri, 5 Apr 2013 09:36:45 +0200
Subject: [PATCH 021/123] gmpc: Add meta.platforms

---
 pkgs/applications/audio/gmpc/default.nix | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pkgs/applications/audio/gmpc/default.nix b/pkgs/applications/audio/gmpc/default.nix
index cc80a96306f3..10a2f0dcee94 100644
--- a/pkgs/applications/audio/gmpc/default.nix
+++ b/pkgs/applications/audio/gmpc/default.nix
@@ -46,5 +46,6 @@ stdenv.mkDerivation rec {
     description = "A GTK2 frontend for Music Player Daemon";
     license = licenses.gpl2;
     maintainers = [ maintainers.rickynils ];
+    platforms = platforms.linux;
   };
 }

From 48f534bce9a0f03fe644c2c31b357a7b695138f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Thu, 4 Apr 2013 12:50:09 +0200
Subject: [PATCH 022/123] mplayer2: add reference to libXxf86vm

Otherwise, playing h264 with vdpau complains about not able to sync to vsync.
---
 pkgs/applications/video/mplayer2/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/applications/video/mplayer2/default.nix b/pkgs/applications/video/mplayer2/default.nix
index 2f35d02eb906..9e89d5384147 100644
--- a/pkgs/applications/video/mplayer2/default.nix
+++ b/pkgs/applications/video/mplayer2/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, fetchgit, freetype, pkgconfig, yasm, freefont_ttf, ffmpeg, libass
 , python3, docutils, which
-, x11Support ? true, libX11 ? null, libXext ? null, mesa ? null
+, x11Support ? true, libX11 ? null, libXext ? null, mesa ? null, libXxf86vm ? null
 , xineramaSupport ? true, libXinerama ? null
 , xvSupport ? true, libXv ? null
 , alsaSupport ? true, alsaLib ? null
@@ -17,7 +17,7 @@
 , useUnfreeCodecs ? false
 }:
 
-assert x11Support -> (libX11 != null && libXext != null && mesa != null);
+assert x11Support -> (libX11 != null && libXext != null && mesa != null && libXxf86vm != null);
 assert xineramaSupport -> (libXinerama != null && x11Support);
 assert xvSupport -> (libXv != null && x11Support);
 assert alsaSupport -> alsaLib != null;
@@ -80,7 +80,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = with stdenv.lib;
     [ freetype pkgconfig ffmpeg libass docutils which ]
-    ++ optionals x11Support [ libX11 libXext mesa ]
+    ++ optionals x11Support [ libX11 libXext mesa libXxf86vm ]
     ++ optional alsaSupport alsaLib
     ++ optional xvSupport libXv
     ++ optional theoraSupport libtheora

From 410d1a073e291d4ef833558e8b740fc89bd44a53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Fri, 5 Apr 2013 10:42:51 +0200
Subject: [PATCH 023/123] qemu-kvm: fix USB passthrough with a patch

I saw the same symptoms as https://bugs.launchpad.net/qemu/+bug/1033727 ,
and the patch there proposed fixes my case.
---
 pkgs/os-specific/linux/qemu-kvm/default.nix   |  2 +-
 .../linux/qemu-kvm/fix-usb-passthrough.patch  | 45 +++++++++++++++++++
 2 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 pkgs/os-specific/linux/qemu-kvm/fix-usb-passthrough.patch

diff --git a/pkgs/os-specific/linux/qemu-kvm/default.nix b/pkgs/os-specific/linux/qemu-kvm/default.nix
index 6c2c8d57fc50..eeaeacd46601 100644
--- a/pkgs/os-specific/linux/qemu-kvm/default.nix
+++ b/pkgs/os-specific/linux/qemu-kvm/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
       ncurses python glib libaio mesa texinfo perl
     ] ++ stdenv.lib.optionals spiceSupport [ spice_protocol spice ];
 
-  patches = [ ./fix-librt-check.patch ];
+  patches = [ ./fix-librt-check.patch ./fix-usb-passthrough.patch ];
 
   postPatch = "patchShebangs .;"
     + stdenv.lib.optionalString spiceSupport ''
diff --git a/pkgs/os-specific/linux/qemu-kvm/fix-usb-passthrough.patch b/pkgs/os-specific/linux/qemu-kvm/fix-usb-passthrough.patch
new file mode 100644
index 000000000000..a73df310629d
--- /dev/null
+++ b/pkgs/os-specific/linux/qemu-kvm/fix-usb-passthrough.patch
@@ -0,0 +1,45 @@
+https://bugs.launchpad.net/qemu/+bug/1033727
+
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Wed, 12 Sep 2012 13:08:40 +0000 (+0200)
+Subject: uhci: Don't queue up packets after one with the SPD flag set
+X-Git-Tag: v1.3.0-rc0~483^2
+X-Git-Url: http://git.qemu.org/?p=qemu.git;a=commitdiff_plain;h=72a04d0c178f01908d74539230d9de64ffc6da19
+Bug-Debian: http://bugs.debian.org/683983
+
+uhci: Don't queue up packets after one with the SPD flag set
+
+Don't queue up packets after a packet with the SPD (short packet detect)
+flag set. Since we won't know if the packet will actually be short until it
+has completed, and if it is short we should stop the queue.
+
+This fixes a miniature photoframe emulating a USB cdrom with the windows
+software for it not working.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+---
+
+diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
+index c7c8786..cdc8bc3 100644
+--- a/hw/usb/hcd-uhci.c
++++ b/hw/usb/hcd-uhci.c
+@@ -1000,6 +1000,9 @@ static void uhci_fill_queue(UHCIState *s, UHCI_TD *td)
+         }
+         assert(ret == TD_RESULT_ASYNC_START);
+         assert(int_mask == 0);
++        if (ptd.ctrl & TD_CTRL_SPD) {
++            break;
++        }
+         plink = ptd.link;
+     }
+ }
+@@ -1097,7 +1100,7 @@ static void uhci_process_frame(UHCIState *s)
+ 
+         case TD_RESULT_ASYNC_START:
+             trace_usb_uhci_td_async(curr_qh & ~0xf, link & ~0xf);
+-            if (is_valid(td.link)) {
++            if (is_valid(td.link) && !(td.ctrl & TD_CTRL_SPD)) {
+                 uhci_fill_queue(s, &td);
+             }
+             link = curr_qh ? qh.link : td.link;

From 2d38aee71b55a0fa7c905a5dd2747392a905f93d Mon Sep 17 00:00:00 2001
From: Shea Levy <shea@shealevy.com>
Date: Fri, 5 Apr 2013 06:49:23 -0400
Subject: [PATCH 024/123] xpra: Use new ffmpeg attribute

It still builds, but it's a pythonPackage so who knows if it works
right. Was breaking the tarball, though.

Signed-off-by: Shea Levy <shea@shealevy.com>
---
 pkgs/tools/X11/xpra/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix
index 8427386fe860..e0881e5aa9b8 100644
--- a/pkgs/tools/X11/xpra/default.nix
+++ b/pkgs/tools/X11/xpra/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, buildPythonPackage
 , python, cython, pkgconfig
 , xorg, gtk, glib, pango, cairo, gdk_pixbuf, pygtk, atk, pygobject, pycairo
-, ffmpeg_1_1, x264, libvpx, pil, libwebp }:
+, ffmpeg_1, x264, libvpx, pil, libwebp }:
 
 buildPythonPackage rec {
   name = "xpra-0.8.8";
@@ -21,7 +21,7 @@ buildPythonPackage rec {
 
     pango cairo gdk_pixbuf atk gtk glib
 
-    ffmpeg_1_1 libvpx x264 libwebp
+    ffmpeg_1 libvpx x264 libwebp
   ];
 
   propagatedBuildInputs = [ 

From 2187716c537c16904e4b33ca1c1461aa8b664e1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Fri, 5 Apr 2013 12:50:19 +0200
Subject: [PATCH 025/123] dwm: adding a patch I missed in a recent commit

---
 .../window-managers/dwm/confnotify-6.0.patch  | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 pkgs/applications/window-managers/dwm/confnotify-6.0.patch

diff --git a/pkgs/applications/window-managers/dwm/confnotify-6.0.patch b/pkgs/applications/window-managers/dwm/confnotify-6.0.patch
new file mode 100644
index 000000000000..5b5e2ebb68a7
--- /dev/null
+++ b/pkgs/applications/window-managers/dwm/confnotify-6.0.patch
@@ -0,0 +1,36 @@
+Fix SDL fullscreen problems when the resolution changes:
+https://groups.google.com/d/msg/wmii/nJBrSjrnnq8/ZEYWOWE5pj4J
+
+diff -r ec4baab78314 dwm.c
+--- a/dwm.c	Mon Dec 19 15:38:30 2011 +0100
++++ b/dwm.c	Sat Jan 14 12:35:50 2012 +0100
+@@ -397,9 +397,10 @@
+ 		showhide(m->stack);
+ 	else for(m = mons; m; m = m->next)
+ 		showhide(m->stack);
+-	if(m)
++	if(m) {
+ 		arrangemon(m);
+-	else for(m = mons; m; m = m->next)
++		restack(m);
++	} else for(m = mons; m; m = m->next)
+ 		arrangemon(m);
+ }
+ 
+@@ -408,7 +409,6 @@
+ 	strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol);
+ 	if(m->lt[m->sellt]->arrange)
+ 		m->lt[m->sellt]->arrange(m);
+-	restack(m);
+ }
+ 
+ void
+@@ -1827,6 +1827,8 @@
+ 		.event_mask = ButtonPressMask|ExposureMask
+ 	};
+ 	for(m = mons; m; m = m->next) {
++		if (m->barwin)
++			continue;
+ 		m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen),
+ 		                          CopyFromParent, DefaultVisual(dpy, screen),
+ 		                          CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);

From 05e5f5d515b0766d3867b5eaf470a532b20e3c7f Mon Sep 17 00:00:00 2001
From: Shea Levy <shea@shealevy.com>
Date: Fri, 5 Apr 2013 06:59:16 -0400
Subject: [PATCH 026/123] Fix tarball

libiconvOrLibc is null on ppc

Signed-off-by: Shea Levy <shea@shealevy.com>
---
 pkgs/applications/search/recoll/default.nix | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix
index 966d41315a1c..6bfa7c7905b0 100644
--- a/pkgs/applications/search/recoll/default.nix
+++ b/pkgs/applications/search/recoll/default.nix
@@ -3,6 +3,8 @@
 , djvulibre, groff, libxslt, unzip, xpdf, antiword, catdoc, lyx
 , ghostscript, gawk, gnugrep, gnused, gnutar, gzip, libiconvOrLibc }:
 
+assert stdenv.system != "powerpc-linux";
+
 stdenv.mkDerivation rec {
   ver = "1.18.1";
   name = "recoll-${ver}";

From fad10ddb82c6d7b7ba5c28a3cbd19e2d9a207b96 Mon Sep 17 00:00:00 2001
From: Shea Levy <shea@shealevy.com>
Date: Fri, 5 Apr 2013 07:16:05 -0400
Subject: [PATCH 027/123] postgresql-9.2.x: Build the world

This builds the man pages as well as contributed program like pg_upgrade

Signed-off-by: Shea Levy <shea@shealevy.com>
---
 pkgs/servers/sql/postgresql/9.2.x.nix | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/pkgs/servers/sql/postgresql/9.2.x.nix b/pkgs/servers/sql/postgresql/9.2.x.nix
index 89de740b3032..1bf3de527a3e 100644
--- a/pkgs/servers/sql/postgresql/9.2.x.nix
+++ b/pkgs/servers/sql/postgresql/9.2.x.nix
@@ -14,13 +14,11 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  LC_ALL = "C";
+  makeFlags = [ "world" ];
 
-  postInstall =
-    ''
-      mkdir -p $out/share/man
-      cp -rvd doc/src/sgml/man1 $out/share/man
-    '';
+  installTargets = [ "install-world" ];
+
+  LC_ALL = "C";
 
   passthru = {
     inherit readline;

From a32e208ded95b0b7e5e0ba72f014b3c9c7f3c953 Mon Sep 17 00:00:00 2001
From: Shea Levy <shea@shealevy.com>
Date: Fri, 5 Apr 2013 07:48:44 -0400
Subject: [PATCH 028/123] Set psqlSchema properly for postgres 9.2.x

Signed-off-by: Shea Levy <shea@shealevy.com>
---
 pkgs/servers/sql/postgresql/9.2.x.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/servers/sql/postgresql/9.2.x.nix b/pkgs/servers/sql/postgresql/9.2.x.nix
index 1bf3de527a3e..46a6aa0c032c 100644
--- a/pkgs/servers/sql/postgresql/9.2.x.nix
+++ b/pkgs/servers/sql/postgresql/9.2.x.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
 
   passthru = {
     inherit readline;
-    psqlSchema = "9.1";
+    psqlSchema = "9.2";
   };
 
   meta = {

From d5a036d63d6c03cfa4973ee6d6778f070dd702e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Fri, 5 Apr 2013 16:02:16 +0200
Subject: [PATCH 029/123] Adding Skype Call Recorder.

---
 .../skype-call-recorder/default.nix           | 23 +++++++++++++++++++
 pkgs/top-level/all-packages.nix               |  2 ++
 2 files changed, 25 insertions(+)
 create mode 100644 pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix

diff --git a/pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix b/pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix
new file mode 100644
index 000000000000..eb9cd5945bca
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, cmake, lame, id3lib, libvorbis, qt4, libogg }:
+
+stdenv.mkDerivation {
+  name = "skype-call-recorder-0.8";
+  src = fetchurl {
+    url = "http://atdot.ch/scr/files/0.8/skype-call-recorder-0.8.tar.gz";
+    sha256 = "1iijkhq3aj9gr3bx6zl8ryvzkqcdhsm9yisimakwq0lnw0lgf5di";
+  };
+
+  patchPhase = ''
+    sed -i -e '/ADD_EXECUTABLE/aSET(LIBRARIES ''${LIBRARIES} ogg)' CMakeLists.txt
+  '';
+
+  buildInputs = [ cmake lame id3lib libvorbis qt4 libogg ];
+
+  meta = {
+    homepage = http://atdot.ch/scr/;
+    description = "Open source tool to record your Skype calls on Linux";
+    license = "GPLv2+"
+    platforms = with stdenv.lib.platforms; linux;
+    maintainers = with stdenv.lib.maintainers; [viric];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e125faf33495..84adc0c75b5b 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7748,6 +7748,8 @@ let
     usePulseAudio = config.pulseaudio or true;
   };
 
+  skype_call_recorder = callPackage ../applications/networking/instant-messengers/skype-call-recorder { };
+
   st = callPackage ../applications/misc/st { };
 
   dropbox = callPackage ../applications/networking/dropbox { };

From ad5b5bcf0a7e0624bf2b50b41d872d52d013ccc5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Fri, 5 Apr 2013 16:11:03 +0200
Subject: [PATCH 030/123] skype-call-recorder: fix expression and improve
 conferences

I missed a semicolon; I also add an upstream patch about
improving the hosted conferences support:
http://repo.or.cz/w/skype-call-recorder.git/commit/abd67f1d44eef81baf2e9729f95e002c4ecc7350
---
 .../instant-messengers/skype-call-recorder/default.nix    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix b/pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix
index eb9cd5945bca..2fa82e1251bc 100644
--- a/pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix
+++ b/pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix
@@ -7,16 +7,20 @@ stdenv.mkDerivation {
     sha256 = "1iijkhq3aj9gr3bx6zl8ryvzkqcdhsm9yisimakwq0lnw0lgf5di";
   };
 
-  patchPhase = ''
+  # Keep an rpath reference to the used libogg
+  prePatch = ''
     sed -i -e '/ADD_EXECUTABLE/aSET(LIBRARIES ''${LIBRARIES} ogg)' CMakeLists.txt
   '';
 
+  # Better support for hosted conferences
+  patches = [ ./conference.patch ];
+
   buildInputs = [ cmake lame id3lib libvorbis qt4 libogg ];
 
   meta = {
     homepage = http://atdot.ch/scr/;
     description = "Open source tool to record your Skype calls on Linux";
-    license = "GPLv2+"
+    license = "GPLv2+";
     platforms = with stdenv.lib.platforms; linux;
     maintainers = with stdenv.lib.maintainers; [viric];
   };

From c7be8b8afb88a61c3bd55f751858838880535e65 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= <cillian.deroiste@gmail.com>
Date: Fri, 5 Apr 2013 16:50:23 +0200
Subject: [PATCH 031/123] Update Radeon Firmware

It was changed on 04.02
---
 pkgs/os-specific/linux/firmware/radeon-r700/default.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/os-specific/linux/firmware/radeon-r700/default.nix b/pkgs/os-specific/linux/firmware/radeon-r700/default.nix
index 09342f687e95..79b16b1dceaa 100644
--- a/pkgs/os-specific/linux/firmware/radeon-r700/default.nix
+++ b/pkgs/os-specific/linux/firmware/radeon-r700/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://people.freedesktop.org/~agd5f/radeon_ucode/R700_rlc.bin";
-    sha256 = "1lbgrlbhqijizg16z0g0qa6ggznpdy844cawnwdp1b0fkwhrbkga";
+    sha256 = "1sbpq39cvjnpfp1iamhq9k9266jkaaywnm8d2pw95ayw56a77976";
   };
 
   unpackPhase = "true";

From 8a912c272df65f1c1fe20b8f64528de545c77a29 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= <cillian.deroiste@gmail.com>
Date: Fri, 5 Apr 2013 17:12:36 +0200
Subject: [PATCH 032/123] libmspack: fix download url and update

It is now hosted on http://www.cabextract.org.uk
---
 pkgs/development/libraries/libmspack/default.nix | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/libmspack/default.nix b/pkgs/development/libraries/libmspack/default.nix
index 1d34b07b2a4c..7a8b2d361438 100644
--- a/pkgs/development/libraries/libmspack/default.nix
+++ b/pkgs/development/libraries/libmspack/default.nix
@@ -1,9 +1,16 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation {
-  name = "libmspack-0.0.20040308alpha";
+  name = "libmspack-0.3alpha";
   src = fetchurl {
-    url = http://www.kyz.uklinux.net/downloads/libmspack-0.0.20040308alpha.tar.gz;
-    md5 = "4d8e967649df0f6ade83df7da4b7511c";
+    url = http://www.cabextract.org.uk/libmspack/libmspack-0.3alpha.tar.gz;
+    sha256 = "03rlzhvzd3qm7sb029gs14syq1z6xjmczvwb9kbz5sl20sjngidh";
   };
+
+  meta = {
+    description = "A de/compression library for various Microsoft formats";
+    homepage = http://www.cabextract.org.uk/libmspack;
+    license = "LGPL2";
+  };
+
 }

From 77b62dd985aae231cd9a4be65d3cda4a166f74cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Fri, 5 Apr 2013 17:53:09 +0200
Subject: [PATCH 033/123] skype-call-recorder: I forgot another patch. grmbl

---
 .../skype-call-recorder/conference.patch      | 148 ++++++++++++++++++
 1 file changed, 148 insertions(+)
 create mode 100644 pkgs/applications/networking/instant-messengers/skype-call-recorder/conference.patch

diff --git a/pkgs/applications/networking/instant-messengers/skype-call-recorder/conference.patch b/pkgs/applications/networking/instant-messengers/skype-call-recorder/conference.patch
new file mode 100644
index 000000000000..8b8ce8fd7bbf
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/skype-call-recorder/conference.patch
@@ -0,0 +1,148 @@
+From abd67f1d44eef81baf2e9729f95e002c4ecc7350 Mon Sep 17 00:00:00 2001
+From: jlh <jlh@gmx.ch>
+Date: Fri, 16 Oct 2009 17:40:54 +0200
+Subject: [PATCH] Rudimentary support for recording hosted conference calls
+
+---
+ call.cpp |   37 +++++++++++++++++++++++++++++++++++--
+ call.h   |   11 ++++++++++-
+ 2 files changed, 45 insertions(+), 3 deletions(-)
+
+diff --git a/call.cpp b/call.cpp
+index c2b02f2..663c1c1 100644
+--- a/call.cpp
++++ b/call.cpp
+@@ -90,9 +90,10 @@ void AutoSync::reset() {
+ 
+ // Call class
+ 
+-Call::Call(QObject *p, Skype *sk, CallID i) :
+-	QObject(p),
++Call::Call(CallHandler *h, Skype *sk, CallID i) :
++	QObject(h),
+ 	skype(sk),
++	handler(h),
+ 	id(i),
+ 	status("UNKNOWN"),
+ 	writer(NULL),
+@@ -119,6 +120,13 @@ Call::Call(QObject *p, Skype *sk, CallID i) :
+ 		debug(QString("Call %1: cannot get partner display name").arg(id));
+ 		displayName = "Unnamed Caller";
+ 	}
++
++	// Skype does not properly send updates when the CONF_ID property
++	// changes.  since we need this information, check it now on all calls
++	handler->updateConfIDs();
++	// this call isn't yet in the list of calls, thus we need to
++	// explicitely check its CONF_ID
++	updateConfID();
+ }
+ 
+ Call::~Call() {
+@@ -134,6 +142,10 @@ Call::~Call() {
+ 	// QT takes care of deleting servers and sockets
+ }
+ 
++void Call::updateConfID() {
++	confID = skype->getObject(QString("CALL %1 CONF_ID").arg(id)).toLong();
++}
++
+ bool Call::okToDelete() const {
+ 	// this is used for checking whether past calls may now be deleted.
+ 	// when a past call hasn't been decided yet whether it should have been
+@@ -270,6 +282,11 @@ void Call::startRecording(bool force) {
+ 	if (isRecording)
+ 		return;
+ 
++	if (handler->isConferenceRecording(confID)) {
++		debug(QString("Call %1: call is part of a conference that is already being recorded").arg(id));
++		return;
++	}
++
+ 	if (force) {
+ 		emit showLegalInformation();
+ 	} else {
+@@ -589,6 +606,22 @@ CallHandler::~CallHandler() {
+ 	delete legalInformationDialog;
+ }
+ 
++void CallHandler::updateConfIDs() {
++	QList<Call *> list = calls.values();
++	for (int i = 0; i < list.size(); i++)
++		list.at(i)->updateConfID();
++}
++
++bool CallHandler::isConferenceRecording(CallID id) const {
++	QList<Call *> list = calls.values();
++	for (int i = 0; i < list.size(); i++) {
++		Call *c = list.at(i);
++		if (c->getConfID() == id && c->getIsRecording())
++			return true;
++	}
++	return false;
++}
++
+ void CallHandler::callCmd(const QStringList &args) {
+ 	CallID id = args.at(0).toInt();
+ 
+diff --git a/call.h b/call.h
+index cb8396d..b746f46 100644
+--- a/call.h
++++ b/call.h
+@@ -43,6 +43,8 @@ class QTcpServer;
+ class QTcpSocket;
+ class LegalInformationDialog;
+ 
++class CallHandler;
++
+ typedef int CallID;
+ 
+ class AutoSync {
+@@ -68,18 +70,21 @@ private:
+ class Call : public QObject {
+ 	Q_OBJECT
+ public:
+-	Call(QObject *, Skype *, CallID);
++	Call(CallHandler *, Skype *, CallID);
+ 	~Call();
+ 	void startRecording(bool = false);
+ 	void stopRecording(bool = true);
++	void updateConfID();
+ 	bool okToDelete() const;
+ 	void setStatus(const QString &);
+ 	QString getStatus() const { return status; }
+ 	bool statusDone() const;
+ 	bool statusActive() const;
+ 	CallID getID() const { return id; }
++	CallID getConfID() const { return confID; }
+ 	void removeFile();
+ 	void hideConfirmation(int);
++	bool getIsRecording() const { return isRecording; }
+ 
+ signals:
+ 	void startedCall(int, const QString &);
+@@ -99,10 +104,12 @@ private:
+ 
+ private:
+ 	Skype *skype;
++	CallHandler *handler;
+ 	CallID id;
+ 	QString status;
+ 	QString skypeName;
+ 	QString displayName;
++	CallID confID;
+ 	AudioFileWriter *writer;
+ 	bool isRecording;
+ 	int stereo;
+@@ -140,6 +147,8 @@ class CallHandler : public QObject {
+ public:
+ 	CallHandler(QObject *, Skype *);
+ 	~CallHandler();
++	void updateConfIDs();
++	bool isConferenceRecording(CallID) const;
+ 	void callCmd(const QStringList &);
+ 
+ signals:
+-- 
+1.6.5.GIT
+

From 477c53cec0a59c5f2e454bb14fb6f2ef9b1bba66 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Fri, 5 Apr 2013 19:38:07 +0200
Subject: [PATCH 034/123] sudo: Fix building outside of a chroot

---
 pkgs/tools/security/sudo/default.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/tools/security/sudo/default.nix b/pkgs/tools/security/sudo/default.nix
index 9206a5e44520..e361746c57b9 100644
--- a/pkgs/tools/security/sudo/default.nix
+++ b/pkgs/tools/security/sudo/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
     EOF
 
     makeFlags="install_uid=$(id -u) install_gid=$(id -g)"
-    installFlags="sudoers_uid=$(id -u) sudoers_gid=$(id -g) sysconfdir=$out/etc"
+    installFlags="sudoers_uid=$(id -u) sudoers_gid=$(id -g) sysconfdir=$out/etc timedir=$TMPDIR/dummy"
   '';
 
   buildInputs = [ coreutils pam groff ];

From 18b65bfd0bb39594ad75c564f4ea26b869f4bb68 Mon Sep 17 00:00:00 2001
From: Shea Levy <shea@shealevy.com>
Date: Fri, 5 Apr 2013 14:54:23 -0400
Subject: [PATCH 035/123] Add pika pythonPackage

For some reason tests don't run

Signed-off-by: Shea Levy <shea@shealevy.com>
---
 pkgs/top-level/python-packages.nix | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 6dc8d0298217..e9bf9a3fabe1 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2734,6 +2734,18 @@ pythonPackages = python.modules // rec {
   };
 
 
+  pika = buildPythonPackage {
+    name = "pika-0.9.12";
+    src = fetchurl {
+      url = https://pypi.python.org/packages/source/p/pika/pika-0.9.12.tar.gz;
+      md5 = "7174fc7cc5570314fa3cfaa729106482";
+    };
+    buildInputs = [ nose mock pyyaml ];
+
+    propagatedBuildInputs = [ unittest2 ];
+  };
+
+
   pillow = buildPythonPackage rec {
     name = "Pillow-1.7.8";
 

From 65c008f6532a3e29769f152f7c110ff200953861 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Fri, 5 Apr 2013 22:53:12 +0200
Subject: [PATCH 036/123] Adding d1x-rebirth, Descent 1 source port.

---
 pkgs/games/d1x-rebirth/default.nix | 23 +++++++++++++++++++++++
 pkgs/top-level/all-packages.nix    |  2 ++
 2 files changed, 25 insertions(+)
 create mode 100644 pkgs/games/d1x-rebirth/default.nix

diff --git a/pkgs/games/d1x-rebirth/default.nix b/pkgs/games/d1x-rebirth/default.nix
new file mode 100644
index 000000000000..471eca78cf1b
--- /dev/null
+++ b/pkgs/games/d1x-rebirth/default.nix
@@ -0,0 +1,23 @@
+{stdenv, fetchurl, scons, pkgconfig, SDL, mesa, physfs, SDL_mixer }:
+
+stdenv.mkDerivation rec {
+  name = "d1x-rebirth-0.57.3";
+  src = fetchurl {
+    url = "http://www.dxx-rebirth.com/download/dxx/d1x-rebirth_v0.57.3-src.tar.gz";
+    sha256 = "07dbjza5flsczdsas0adb5xhn13gmhlpixa8ycp8hjm20y9kw1za";
+  };
+
+  buildInputs = [ scons pkgconfig SDL mesa physfs SDL_mixer ];
+
+  installPhase = ''
+    scons prefix=$out install
+  '';
+
+  meta = {
+    homepage = http://www.dxx-rebirth.com/;
+    description = "Source Port of the Descent 1 engine";
+    license = "BSD"; # Parallax license, like BSD I think
+    platforms = with stdenv.lib.platforms; linux;
+    maintainers = with stdenv.lib.maintainers; [viric];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 84adc0c75b5b..349d115fb5f9 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8224,6 +8224,8 @@ let
 
   dwarf_fortress = callPackage_i686 ../games/dwarf-fortress { };
 
+  d1x_rebirth = callPackage ../games/d1x-rebirth { };
+
   eduke32 = callPackage ../games/eduke32 {
     stdenv = overrideGCC stdenv gcc47;
   };

From 04d41f95d00ea52d2ef85925b9289b170c4a464d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Fri, 5 Apr 2013 22:58:43 +0200
Subject: [PATCH 037/123] Adding d2x-rebirth, source port of the Descent 2
 engine

---
 pkgs/games/d2x-rebirth/default.nix | 23 +++++++++++++++++++++++
 pkgs/top-level/all-packages.nix    |  2 ++
 2 files changed, 25 insertions(+)
 create mode 100644 pkgs/games/d2x-rebirth/default.nix

diff --git a/pkgs/games/d2x-rebirth/default.nix b/pkgs/games/d2x-rebirth/default.nix
new file mode 100644
index 000000000000..b52e29951983
--- /dev/null
+++ b/pkgs/games/d2x-rebirth/default.nix
@@ -0,0 +1,23 @@
+{stdenv, fetchurl, scons, pkgconfig, SDL, mesa, physfs, SDL_mixer }:
+
+stdenv.mkDerivation rec {
+  name = "d2x-rebirth-0.57.3";
+  src = fetchurl {
+    url = "http://www.dxx-rebirth.com/download/dxx/d2x-rebirth_v0.57.3-src.tar.gz";
+    sha256 = "0yyandmxz12bbpnd746nddjlqh5i7dylwm006shixis3w3giz77c";
+  };
+
+  buildInputs = [ scons pkgconfig SDL mesa physfs SDL_mixer ];
+
+  installPhase = ''
+    scons prefix=$out install
+  '';
+
+  meta = {
+    homepage = http://www.dxx-rebirth.com/;
+    description = "Source Port of the Descent 2 engine";
+    license = "BSD"; # Parallax license, like BSD I think
+    platforms = with stdenv.lib.platforms; linux;
+    maintainers = with stdenv.lib.maintainers; [viric];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 349d115fb5f9..4a6d5b9ab9b7 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8226,6 +8226,8 @@ let
 
   d1x_rebirth = callPackage ../games/d1x-rebirth { };
 
+  d2x_rebirth = callPackage ../games/d2x-rebirth { };
+
   eduke32 = callPackage ../games/eduke32 {
     stdenv = overrideGCC stdenv gcc47;
   };

From 130c081966baef86c07becee8d1043207126e0fd Mon Sep 17 00:00:00 2001
From: Domen Kozar <domen@dev.si>
Date: Sat, 6 Apr 2013 00:34:50 +0200
Subject: [PATCH 038/123] add thinkfan package

---
 pkgs/tools/system/thinkfan/default.nix | 29 ++++++++++++++++++++++++++
 pkgs/top-level/all-packages.nix        |  2 ++
 2 files changed, 31 insertions(+)
 create mode 100644 pkgs/tools/system/thinkfan/default.nix

diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix
new file mode 100644
index 000000000000..47687ec76d78
--- /dev/null
+++ b/pkgs/tools/system/thinkfan/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl }:
+
+let
+
+  version = "0.8.1";
+  
+in
+
+stdenv.mkDerivation {
+  name = "thinkfan-${version}";
+
+  src = fetchurl {
+    url = "http://downloads.sourceforge.net/project/thinkfan/thinkfan-${version}.tar.gz";
+    sha256 = "04akla66r8k10x0jvmcpfi92hj2sppygcl7hhwn8n8zsvvf0yqxs";
+  };
+  
+  installPhase = ''
+    mkdir -p $out/bin
+    mv thinkfan $out/bin/
+  '';
+
+  meta = {
+    description = "";
+    license = stdenv.lib.licences.gpl3;
+    homePage = "http://thinkfan.sourceforge.net/";
+    maintainers = with stdenv.lib.maintainers; [ iElectric ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 4a6d5b9ab9b7..6ee3afa97568 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -9100,6 +9100,8 @@ let
     inherit texLive unzip;
   };
 
+  thinkfan = callPackage ../tools/system/thinkfan { };
+
   vice = callPackage ../misc/emulators/vice { };
 
   viewnior = callPackage ../applications/graphics/viewnior { };

From f8faea23f845e86c1076a37d92236e6ccfce6af1 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 01:22:18 +0200
Subject: [PATCH 039/123] emacs-cedet: update to version 1.1 to fix the build

---
 pkgs/applications/editors/emacs-modes/cedet/default.nix | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pkgs/applications/editors/emacs-modes/cedet/default.nix b/pkgs/applications/editors/emacs-modes/cedet/default.nix
index 46381dfc648d..779fc8a146e1 100644
--- a/pkgs/applications/editors/emacs-modes/cedet/default.nix
+++ b/pkgs/applications/editors/emacs-modes/cedet/default.nix
@@ -1,14 +1,14 @@
-{ fetchurl, stdenv, emacs }:
+{ fetchurl, stdenv, emacs, python }:
 
 stdenv.mkDerivation rec {
-  name = "cedet-1.0pre6";
+  name = "cedet-1.1";
 
   src = fetchurl {
     url = "mirror://sourceforge/cedet/${name}.tar.gz";
-    sha256 = "0pvd54rjlba12cxgqibm8v4i8x43r5c239z891lgcbafjvkzpdxb";
+    sha256 = "0p2bwlpwwa019axvgj09xkxbr53j0pq23d46s4la9jfhl47nbh22";
   };
 
-  buildInputs = [ emacs ];
+  buildInputs = [ emacs python ];
 
   doCheck = true;
   checkPhase = "make utest";

From 509ea2888aa6b25457c4904210d80e17e6d2e3a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= <goibhniu@fsfe.org>
Date: Sat, 6 Apr 2013 01:41:53 +0200
Subject: [PATCH 040/123] PureData: Update to 0.44, add support for JACK and
 fix wrapper

---
 pkgs/applications/audio/puredata/default.nix | 21 +++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/pkgs/applications/audio/puredata/default.nix b/pkgs/applications/audio/puredata/default.nix
index e2563b8fe06f..b1df008398db 100644
--- a/pkgs/applications/audio/puredata/default.nix
+++ b/pkgs/applications/audio/puredata/default.nix
@@ -1,24 +1,31 @@
-{ stdenv, fetchurl, alsaLib, autoconf, automake, fftw, gettext, glib,
-libX11, libtool, tcl, tk }:
+{ stdenv, fetchurl, alsaLib, autoconf, automake, fftw, gettext, glib
+, jackaudio, libX11, libtool, makeWrapper, pkgconfig, tcl, tk
+}:
 
 stdenv.mkDerivation  rec {
   name = "puredata-${version}";
-  version = "0.43-0";
+  version = "0.44-0";
 
   src = fetchurl {
     url = "mirror://sourceforge/pure-data/pd-${version}.src.tar.gz";
-    sha256 = "1qfq7x8vj12kr0cdrnbvmxfhc03flicc6vcc8bz6hwrrakwciyz2";
+    sha256 = "031bvqfnlpfx0y5n0l5rmslziqc6jgmk99x1prgh1rmhjhjdnijw";
   };
 
-  buildInputs = [ alsaLib autoconf automake fftw gettext glib libX11
-    libtool tcl tk ];
+  buildInputs = [
+    alsaLib autoconf automake fftw gettext glib jackaudio libX11
+    libtool makeWrapper pkgconfig tcl tk
+  ];
 
   preConfigure = ''
     ./autogen.sh
   '';
 
+  postInstall = ''
+    wrapProgram $out/bin/pd --prefix PATH : ${tk}/bin
+  '';
+
   meta = with stdenv.lib; {
-    description = ''Real-time graphical programming environment for
+    description = ''A real-time graphical programming environment for
                     audio, video, and graphical processing'';
     homepage = http://puredata.info;
     license = licenses.bsd3;

From 41c6d26e16e646744187338629fe79a21a80726f Mon Sep 17 00:00:00 2001
From: Domen Kozar <domen@dev.si>
Date: Sat, 6 Apr 2013 08:19:57 +0200
Subject: [PATCH 041/123] garden

---
 pkgs/tools/system/thinkfan/default.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix
index 47687ec76d78..a13f500c34f8 100644
--- a/pkgs/tools/system/thinkfan/default.nix
+++ b/pkgs/tools/system/thinkfan/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
 
   meta = {
     description = "";
-    license = stdenv.lib.licences.gpl3;
+    license = stdenv.lib.licenses.gpl3;
     homePage = "http://thinkfan.sourceforge.net/";
     maintainers = with stdenv.lib.maintainers; [ iElectric ];
     platforms = stdenv.lib.platforms.linux;

From 49c9e98e12e06a2dc69a5ec0e19e9a46ae4e5e8b Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 08:58:18 +0200
Subject: [PATCH 042/123] haskell-cryptohash: update to version 0.9.0

---
 pkgs/development/libraries/haskell/cryptohash/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/cryptohash/default.nix b/pkgs/development/libraries/haskell/cryptohash/default.nix
index 77a1ecd9ff4e..1ce1a46fc40b 100644
--- a/pkgs/development/libraries/haskell/cryptohash/default.nix
+++ b/pkgs/development/libraries/haskell/cryptohash/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "cryptohash";
-  version = "0.8.4";
-  sha256 = "0h58apxcrvpkyj3s2c7l68g7biv80snkn53g6jya1s687xff8fmn";
+  version = "0.9.0";
+  sha256 = "0ipzrp83pz33qc7gmn9bmhbmc1f0hfvagyfr5bnmhgrh6lgy9s7l";
   buildDepends = [ cereal cryptoApi tagged ];
   testDepends = [
     HUnit QuickCheck testFramework testFrameworkHunit

From 6553e372356bdcd46a95b08934f43d622fe7be63 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 08:58:18 +0200
Subject: [PATCH 043/123] haskell-shakespeare-js: update to version 1.1.3

---
 pkgs/development/libraries/haskell/shakespeare-js/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/shakespeare-js/default.nix b/pkgs/development/libraries/haskell/shakespeare-js/default.nix
index c187854be064..12a48605d036 100644
--- a/pkgs/development/libraries/haskell/shakespeare-js/default.nix
+++ b/pkgs/development/libraries/haskell/shakespeare-js/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "shakespeare-js";
-  version = "1.1.2.1";
-  sha256 = "049nn0p236wbm2majkih87n2c7h65xrnf6gydsi7najxccjl7y8z";
+  version = "1.1.3";
+  sha256 = "091yygp2gfp290m76iwpjddzgn7qjq1h5f8ma8sd3lvy6pv2pzcz";
   buildDepends = [ aeson shakespeare text ];
   testDepends = [ aeson hspec HUnit shakespeare text ];
   meta = {

From c541bf804a4ac6d28814b7cfc3be2400ab29b965 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 08:58:18 +0200
Subject: [PATCH 044/123] haskell-shakespeare: update to version 1.0.4

---
 pkgs/development/libraries/haskell/shakespeare/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/shakespeare/default.nix b/pkgs/development/libraries/haskell/shakespeare/default.nix
index 4b8a29b6abff..3c300cdea03a 100644
--- a/pkgs/development/libraries/haskell/shakespeare/default.nix
+++ b/pkgs/development/libraries/haskell/shakespeare/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "shakespeare";
-  version = "1.0.3.1";
-  sha256 = "08w1g19k9v9dvdy45j32kdic8vjhc10ad4g20q5ya0id4cd13qfs";
+  version = "1.0.4";
+  sha256 = "0aqcgfx3y9sbp7wvjmx6rxwi4r13qrfxs9a40gc00np03bpk1hxb";
   buildDepends = [ parsec text ];
   testDepends = [ hspec parsec text ];
   meta = {

From f808ba588bfad5b297a3632958ccd765a131fc3c Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 19:14:38 +0200
Subject: [PATCH 045/123] Cabal-1.16.0.3: disable unit test suite

The release archive is missing a Setup.hs file, which makes the test
suite fail. Thanks to Kevin Quick for finding this issue!
---
 pkgs/development/libraries/haskell/Cabal/1.16.0.3.nix | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pkgs/development/libraries/haskell/Cabal/1.16.0.3.nix b/pkgs/development/libraries/haskell/Cabal/1.16.0.3.nix
index 16facf73f9fc..c1689817dcc9 100644
--- a/pkgs/development/libraries/haskell/Cabal/1.16.0.3.nix
+++ b/pkgs/development/libraries/haskell/Cabal/1.16.0.3.nix
@@ -11,6 +11,7 @@ cabal.mkDerivation (self: {
     extensibleExceptions filepath HUnit QuickCheck testFramework
     testFrameworkHunit testFrameworkQuickcheck2
   ];
+  doCheck = false;
   meta = {
     homepage = "http://www.haskell.org/cabal/";
     description = "A framework for packaging Haskell software";

From e2b6f3ebed998138e0c9a26cf841a95b766f0303 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 20:07:05 +0200
Subject: [PATCH 046/123] haskell-primitive: drop obsolete versions 0.4.1 and
 0.5

---
 .../libraries/haskell/primitive/0.4.1.nix       | 17 -----------------
 .../libraries/haskell/primitive/0.5.nix         | 17 -----------------
 pkgs/top-level/haskell-packages.nix             |  4 +---
 3 files changed, 1 insertion(+), 37 deletions(-)
 delete mode 100644 pkgs/development/libraries/haskell/primitive/0.4.1.nix
 delete mode 100644 pkgs/development/libraries/haskell/primitive/0.5.nix

diff --git a/pkgs/development/libraries/haskell/primitive/0.4.1.nix b/pkgs/development/libraries/haskell/primitive/0.4.1.nix
deleted file mode 100644
index ab8dc18ad0ae..000000000000
--- a/pkgs/development/libraries/haskell/primitive/0.4.1.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ cabal }:
-
-cabal.mkDerivation (self: {
-  pname = "primitive";
-  version = "0.4.1";
-  sha256 = "06999i59xhvjwfdbnr1n09zkvg7lnim64nqxqlvk0x6slkidb7f6";
-  meta = {
-    homepage = "http://code.haskell.org/primitive";
-    description = "Wrappers for primitive operations";
-    license = self.stdenv.lib.licenses.bsd3;
-    platforms = self.ghc.meta.platforms;
-    maintainers = [
-      self.stdenv.lib.maintainers.andres
-      self.stdenv.lib.maintainers.simons
-    ];
-  };
-})
diff --git a/pkgs/development/libraries/haskell/primitive/0.5.nix b/pkgs/development/libraries/haskell/primitive/0.5.nix
deleted file mode 100644
index 2a7ce3532d40..000000000000
--- a/pkgs/development/libraries/haskell/primitive/0.5.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ cabal }:
-
-cabal.mkDerivation (self: {
-  pname = "primitive";
-  version = "0.5";
-  sha256 = "0m2gv7lac7q24cy02bbc7hq41awjxzs8dcjc6j2nv8xiq14cp3mk";
-  meta = {
-    homepage = "http://code.haskell.org/primitive";
-    description = "Primitive memory-related operations";
-    license = self.stdenv.lib.licenses.bsd3;
-    platforms = self.ghc.meta.platforms;
-    maintainers = [
-      self.stdenv.lib.maintainers.andres
-      self.stdenv.lib.maintainers.simons
-    ];
-  };
-})
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index bdd875f0df51..076eba9433cc 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -162,7 +162,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
     alex         = self.alex_3_0_5;             # 7.6 ok
     haddock      = self.haddock_2_13_1;         # 7.6 ok
     happy        = self.happy_1_18_10;          # 7.6 ok
-    primitive    = self.primitive_0_5_0_1; # semi-official, but specified
+    primitive    = self.primitive_0_5_0_1;      # semi-official, but specified
   };
 
   haskellPlatformArgs_2012_4_0_0 = self : {
@@ -1477,8 +1477,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   punycode = callPackage ../development/libraries/haskell/punycode {};
 
-  primitive_0_4_1 = callPackage ../development/libraries/haskell/primitive/0.4.1.nix {};
-  primitive_0_5   = callPackage ../development/libraries/haskell/primitive/0.5.nix   {};
   primitive_0_5_0_1 = callPackage ../development/libraries/haskell/primitive/0.5.0.1.nix   {};
   primitive = self.primitive_0_5_0_1;
 

From 8792406e8ffe2e771110084970b27512dfb9529a Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 20:09:21 +0200
Subject: [PATCH 047/123] haskell-postgresql-libpq: link with client library
 from PostgreSQL 9.2

---
 pkgs/top-level/haskell-packages.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 076eba9433cc..3936e92d4d03 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -1466,7 +1466,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
   poolConduit = callPackage ../development/libraries/haskell/pool-conduit {};
 
   postgresqlLibpq = callPackage ../development/libraries/haskell/postgresql-libpq {
-    postgresql = pkgs.postgresql91;
+    inherit (pkgs) postgresql;
   };
 
   postgresqlSimple = callPackage ../development/libraries/haskell/postgresql-simple {};

From 50f65f62d8c57bb40f59eaa9730ec53acb31e421 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 20:10:00 +0200
Subject: [PATCH 048/123] haskell-graphviz: link with latest version of
 polyparse

---
 pkgs/top-level/haskell-packages.nix | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 3936e92d4d03..e3a79a732953 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -973,10 +973,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   Graphalyze = callPackage ../development/libraries/haskell/Graphalyze {};
 
-  graphviz = callPackage ../development/libraries/haskell/graphviz {
-    fgl = self.fgl_5_4_2_4;
-    polyparse = self.polyparse_1_7;
-  };
+  graphviz = callPackage ../development/libraries/haskell/graphviz {};
 
   groupoids = callPackage ../development/libraries/haskell/groupoids {};
 

From e99909002f939e80b8780c9dcab72063fc3b366a Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 20:10:08 +0200
Subject: [PATCH 049/123] xdot: link with latest version of polyparse

---
 pkgs/top-level/haskell-packages.nix | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index e3a79a732953..c2907c8ee9db 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -1947,9 +1947,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   xdgBasedir = callPackage ../development/libraries/haskell/xdg-basedir {};
 
-  xdot = callPackage ../development/libraries/haskell/xdot {
-    polyparse = self.polyparse_1_7;
-  };
+  xdot = callPackage ../development/libraries/haskell/xdot {};
 
   xhtml_3000_2_0_1 = callPackage ../development/libraries/haskell/xhtml/3000.2.0.1.nix {};
   xhtml_3000_2_0_4 = callPackage ../development/libraries/haskell/xhtml/3000.2.0.4.nix {};

From 8f2719a1c3dc83db09b9dbe23395117006227141 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 20:10:28 +0200
Subject: [PATCH 050/123] haskell-polyparse: drop obsolete version 1.7

---
 .../libraries/haskell/polyparse/1.7.nix        | 18 ------------------
 .../haskell/polyparse/{1.8.nix => default.nix} |  0
 pkgs/top-level/haskell-packages.nix            |  4 +---
 3 files changed, 1 insertion(+), 21 deletions(-)
 delete mode 100644 pkgs/development/libraries/haskell/polyparse/1.7.nix
 rename pkgs/development/libraries/haskell/polyparse/{1.8.nix => default.nix} (100%)

diff --git a/pkgs/development/libraries/haskell/polyparse/1.7.nix b/pkgs/development/libraries/haskell/polyparse/1.7.nix
deleted file mode 100644
index b27dc9cc6952..000000000000
--- a/pkgs/development/libraries/haskell/polyparse/1.7.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ cabal, text }:
-
-cabal.mkDerivation (self: {
-  pname = "polyparse";
-  version = "1.7";
-  sha256 = "de8ed0ce54f1f81bb0783dd97b7b22eca28df4a238684a26b37c5af2d17a364b";
-  buildDepends = [ text ];
-  meta = {
-    homepage = "http://code.haskell.org/~malcolm/polyparse/";
-    description = "A variety of alternative parser combinator libraries";
-    license = "LGPL";
-    platforms = self.ghc.meta.platforms;
-    maintainers = [
-      self.stdenv.lib.maintainers.andres
-      self.stdenv.lib.maintainers.simons
-    ];
-  };
-})
diff --git a/pkgs/development/libraries/haskell/polyparse/1.8.nix b/pkgs/development/libraries/haskell/polyparse/default.nix
similarity index 100%
rename from pkgs/development/libraries/haskell/polyparse/1.8.nix
rename to pkgs/development/libraries/haskell/polyparse/default.nix
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index c2907c8ee9db..93e44e9b7dd9 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -1456,9 +1456,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   pgm = callPackage ../development/libraries/haskell/pgm {};
 
-  polyparse_1_7 = callPackage ../development/libraries/haskell/polyparse/1.7.nix {};
-  polyparse_1_8 = callPackage ../development/libraries/haskell/polyparse/1.8.nix {};
-  polyparse = self.polyparse_1_8;
+  polyparse = callPackage ../development/libraries/haskell/polyparse {};
 
   poolConduit = callPackage ../development/libraries/haskell/pool-conduit {};
 

From 00674a8608874241c43e3dc957255c4f455d071a Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 22:43:27 +0200
Subject: [PATCH 051/123] haskell-cmdargs: update to version 0.10.3

---
 pkgs/development/libraries/haskell/cmdargs/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/cmdargs/default.nix b/pkgs/development/libraries/haskell/cmdargs/default.nix
index f9053fa31748..df9f7f5865f0 100644
--- a/pkgs/development/libraries/haskell/cmdargs/default.nix
+++ b/pkgs/development/libraries/haskell/cmdargs/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "cmdargs";
-  version = "0.10.2";
-  sha256 = "0vn7c569akyabij2bh9myyvnx08w67dwdvx5g5q36b3ixzp0lrg4";
+  version = "0.10.3";
+  sha256 = "1cglfbkmgbsv3k32vdfg4xk6b5g5c2z8pm0xgbmdb4bbg765lrh6";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ filepath transformers ];

From 841d07492d417a1ea7c20fe2c30d0e80da432284 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 22:43:27 +0200
Subject: [PATCH 052/123] haskell-crypto-conduit: update to version 0.5.1

---
 .../libraries/haskell/crypto-conduit/default.nix     | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/pkgs/development/libraries/haskell/crypto-conduit/default.nix b/pkgs/development/libraries/haskell/crypto-conduit/default.nix
index efea0bb0d8a1..eca7e52fe90e 100644
--- a/pkgs/development/libraries/haskell/crypto-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/crypto-conduit/default.nix
@@ -1,15 +1,15 @@
-{ cabal, cereal, conduit, cryptoApi, cryptocipher, cryptohash
-, hspec, skein, transformers
+{ cabal, cereal, conduit, cryptoApi, cryptocipher
+, cryptohashCryptoapi, hspec, skein, transformers
 }:
 
 cabal.mkDerivation (self: {
   pname = "crypto-conduit";
-  version = "0.5.0";
-  sha256 = "0mlf2l784w0wyfjqsxzfdwmn1wb0z1s6mb8kdhw8x1z4a8gy9a92";
+  version = "0.5.1";
+  sha256 = "04z8z7bipa40xnjr8civ1sj3df2iyvlv929ibkrdqv87gj0qv2dp";
   buildDepends = [ cereal conduit cryptoApi transformers ];
   testDepends = [
-    cereal conduit cryptoApi cryptocipher cryptohash hspec skein
-    transformers
+    cereal conduit cryptoApi cryptocipher cryptohashCryptoapi hspec
+    skein transformers
   ];
   doCheck = false;
   meta = {

From 64657fe0361406596ef4db2dfdad19070bddb520 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 22:43:27 +0200
Subject: [PATCH 053/123] haskell-hopenssl: update to version 1.6.2

---
 pkgs/development/libraries/haskell/hopenssl/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/haskell/hopenssl/default.nix b/pkgs/development/libraries/haskell/hopenssl/default.nix
index fec3f5dccf49..b65abe6aa3e8 100644
--- a/pkgs/development/libraries/haskell/hopenssl/default.nix
+++ b/pkgs/development/libraries/haskell/hopenssl/default.nix
@@ -2,12 +2,12 @@
 
 cabal.mkDerivation (self: {
   pname = "hopenssl";
-  version = "1.6.1";
-  sha256 = "75ba42c5e9b02c09057c5aa25f577bdfe5214533fbd2921ac555897ade85958a";
+  version = "1.6.2";
+  sha256 = "0b9xdm7jgkadx53vwszjnisyblzsqk99s3zqppgp0iqqf9955s4w";
   buildDepends = [ mtl ];
   extraLibraries = [ openssl ];
   meta = {
-    homepage = "http://gitorious.org/hopenssl";
+    homepage = "http://github.com/peti/hopenssl";
     description = "FFI bindings to OpenSSL's EVP digest interface";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;

From 9c23cc6ef4d83310967e41e27ce0337ff7628a67 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 22:43:27 +0200
Subject: [PATCH 054/123] haskell-hsemail: update to version 1.7.6

---
 pkgs/development/libraries/haskell/hsemail/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/haskell/hsemail/default.nix b/pkgs/development/libraries/haskell/hsemail/default.nix
index 3880537e7eaf..1d823d6f8404 100644
--- a/pkgs/development/libraries/haskell/hsemail/default.nix
+++ b/pkgs/development/libraries/haskell/hsemail/default.nix
@@ -2,12 +2,12 @@
 
 cabal.mkDerivation (self: {
   pname = "hsemail";
-  version = "1.7.5";
-  sha256 = "0ls6y48bndwgb7ng29wxim4h36rs6b07dqi6ic4hqgbb7lg6fma4";
+  version = "1.7.6";
+  sha256 = "0v4c6ljrzc7680i85wyxq7fkfs2j00941ps3rn8r16x3x2r8di04";
   buildDepends = [ mtl parsec ];
   testDepends = [ doctest hspec parsec ];
   meta = {
-    homepage = "http://gitorious.org/hsemail";
+    homepage = "http://github.com/peti/hsemail";
     description = "Internet Message Parsers";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;

From 5014149810387861789687ec821e762dea77b55f Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 22:43:27 +0200
Subject: [PATCH 055/123] haskell-streamproc: update to version 1.6.2

---
 pkgs/development/libraries/haskell/streamproc/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/haskell/streamproc/default.nix b/pkgs/development/libraries/haskell/streamproc/default.nix
index fef81d92212f..2b37be487e6a 100644
--- a/pkgs/development/libraries/haskell/streamproc/default.nix
+++ b/pkgs/development/libraries/haskell/streamproc/default.nix
@@ -2,10 +2,10 @@
 
 cabal.mkDerivation (self: {
   pname = "streamproc";
-  version = "1.6";
-  sha256 = "0bb1rdzzpjggw7dk4q3hwa1j1bvkfqhz6vrd45shcp57ixqlp6ws";
+  version = "1.6.2";
+  sha256 = "1wl44n4nav4h203mzfdf1bd5nh4v23dib54lvxka1rl3zymgyvp7";
   meta = {
-    homepage = "http://gitorious.org/streamproc";
+    homepage = "http://github.com/peti/streamproc";
     description = "Stream Processer Arrow";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;

From f88d383b31431b8c47ec90bf835287faf693afb8 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 5 Apr 2013 23:13:05 +0200
Subject: [PATCH 056/123] haskell-cryptohash-cryptoapi: add version 0.1.0

---
 .../haskell/cryptohash-cryptoapi/default.nix       | 14 ++++++++++++++
 pkgs/top-level/haskell-packages.nix                |  2 ++
 2 files changed, 16 insertions(+)
 create mode 100644 pkgs/development/libraries/haskell/cryptohash-cryptoapi/default.nix

diff --git a/pkgs/development/libraries/haskell/cryptohash-cryptoapi/default.nix b/pkgs/development/libraries/haskell/cryptohash-cryptoapi/default.nix
new file mode 100644
index 000000000000..e21e026080bf
--- /dev/null
+++ b/pkgs/development/libraries/haskell/cryptohash-cryptoapi/default.nix
@@ -0,0 +1,14 @@
+{ cabal, cereal, cryptoApi, cryptohash, tagged }:
+
+cabal.mkDerivation (self: {
+  pname = "cryptohash-cryptoapi";
+  version = "0.1.0";
+  sha256 = "06b62ddwx2mp71dzaj8h88vw2c6nv3rj8n6d3d9vmqa7cws3mjkx";
+  buildDepends = [ cereal cryptoApi cryptohash tagged ];
+  meta = {
+    homepage = "http://github.com/vincenthz/hs-cryptohash-cryptoapi";
+    description = "Crypto-api interfaces for cryptohash";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 93e44e9b7dd9..8933176ac969 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -669,6 +669,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   cryptohash = callPackage ../development/libraries/haskell/cryptohash {};
 
+  cryptohashCryptoapi = callPackage ../development/libraries/haskell/cryptohash-cryptoapi {};
+
   cryptoNumbers = callPackage ../development/libraries/haskell/crypto-numbers {};
 
   cryptoPubkeyTypes = callPackage ../development/libraries/haskell/crypto-pubkey-types {};

From fd184188416a5991fd33554a69921ba98db1d0a2 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 10:32:41 +0200
Subject: [PATCH 057/123] haskell-hakyll: jailbreak to fix the build

---
 pkgs/development/libraries/haskell/hakyll/default.nix | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pkgs/development/libraries/haskell/hakyll/default.nix b/pkgs/development/libraries/haskell/hakyll/default.nix
index ce81a4c68320..4f50ab449508 100644
--- a/pkgs/development/libraries/haskell/hakyll/default.nix
+++ b/pkgs/development/libraries/haskell/hakyll/default.nix
@@ -26,6 +26,9 @@ cabal.mkDerivation (self: {
     testFrameworkQuickcheck2 text time
   ];
   doCheck = false;
+  patchPhase = ''
+    sed -i -e 's|cryptohash .*,|cryptohash,|' hakyll.cabal
+  '';
   meta = {
     homepage = "http://jaspervdj.be/hakyll";
     description = "A static website compiler library";

From 78827836cc499016a0dbf165687dd029a81212b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Sat, 6 Apr 2013 12:09:07 +0200
Subject: [PATCH 058/123] openlierox: fixing and updating.

---
 pkgs/games/openlierox/default.nix | 67 ++++++++++++-------------------
 pkgs/top-level/all-packages.nix   |  6 +--
 2 files changed, 26 insertions(+), 47 deletions(-)

diff --git a/pkgs/games/openlierox/default.nix b/pkgs/games/openlierox/default.nix
index 751941bdfc1e..0c7e46ae0740 100644
--- a/pkgs/games/openlierox/default.nix
+++ b/pkgs/games/openlierox/default.nix
@@ -1,56 +1,39 @@
-a :  
-let 
-  fetchurl = a.fetchurl;
+{ stdenv, fetchurl, libX11, xproto, gd, SDL, SDL_image, SDL_mixer, zlib
+, libxml2, pkgconfig, curl, cmake, libzip }:
 
-  version = a.lib.attrByPath ["version"] "0.57beta8" a; 
-  buildInputs = with a; [
-    libX11 xproto gd SDL SDL_image SDL_mixer zlib libxml2
-    pkgconfig
-  ];
+stdenv.mkDerivation {
+  name = "openlierox-0.58rc3";
 
-in
-rec {
   src = fetchurl {
-    url = "http://downloads.sourceforge.net/project/openlierox/openlierox/OpenLieroX%200.57%20Beta8/OpenLieroX_0.57_beta8.src.tar.bz2";
-    sha256 = "1a3p03bi5v2mca7323mrckab9wsj83fjfcr6akrh9a6nlljcdn8d";
+    url = "mirror://sourceforge/openlierox/OpenLieroX_0.58_rc3.src.tar.bz2";
+    sha256 = "1k35xppfqi3qfysv81xq3hj4qdy9j2ciinbkfdcmwclcsf3nh94z";
   };
 
-  inherit buildInputs;
-  configureFlags = [];
+  NIX_CFLAGS_COMPILE = "-I${libxml2}/include/libxml2";
 
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doInstall"];
+  # The breakpad fails to build on x86_64, and it's only to report bugs upstream
+  cmakeFlags = [ "-DBREAKPAD=0" ];
 
-  setParams = a.noDepEntry (''
-    export SYSTEM_DATA_DIR="$out/share"
-    export BIN_DIR="$out/bin"
-    export DOC_DIR="$out/share/doc"
-    export PIXMAP_DIR="$out/share/pixmap"
+  preConfigure = ''
+    cmakeFlags="$cmakeFlags -DSYSTEM_DATA_DIR=$out/share"
+  '';
 
-    export HAWKNL_BUILTIN=1
-    export LIBZIP_BUILTIN=1
-    export X11=1
-    export DEBUG=1
-  '');
-  
-  doBuild=a.fullDepEntry (''
-    sed -re 's/ -1/ 255 /g' -i *.sh
+  patchPhase = ''
+    sed -i s,curl/types.h,curl/curl.h, include/HTTP.h src/common/HTTP.cpp
+  '';
 
-    source functions.sh
-    export INCLUDE_PATH=$(echo $NIX_CFLAGS_COMPILE | grep_param -I)
-    
-    bash compile.sh
-  '') ["doUnpack" "addInputs" "setParams"];
+  installPhase = ''
+    ensureDir $out/bin $out/share/OpenLieroX
+    cp bin/* $out/bin
+    cp -R ../share/gamedir/* $out/share/OpenLieroX
+  '';
+
+  buildInputs = [ libX11 xproto gd SDL SDL_image SDL_mixer zlib libxml2
+    pkgconfig curl cmake libzip ];
 
-  doInstall = a.fullDepEntry (''
-    mkdir -p $BIN_DIR $SYSTEM_DATA_DIR $DOC_DIR $PIXMAP_DIR
-    bash install.sh
-  '') ["doBuild" "addInputs" "setParams" "defEnsureDir"];
-      
-  name = "openlierox-" + version;
   meta = {
+    homepage = http://openlierox.net;
     description = "Real-time game with Worms-like shooting";
-    maintainers = [
-    ];
+    license = "LGPLv2+";
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 6ee3afa97568..b1f42e2ade60 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4724,11 +4724,7 @@ let
 
   openldap = callPackage ../development/libraries/openldap { };
 
-  openlierox = builderDefsPackage ../games/openlierox {
-    inherit (xlibs) libX11 xproto;
-    inherit gd SDL SDL_image SDL_mixer zlib libxml2
-      pkgconfig;
-  };
+  openlierox = callPackage ../games/openlierox { };
 
   libopensc_dnie = callPackage ../development/libraries/libopensc-dnie {
     opensc = opensc_0_11_7;

From d81e8a9cc3dbf5ce82dff877ad91f90963d21df2 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 15:09:25 +0200
Subject: [PATCH 059/123] gnulib: update to version 0.0-7901-g076ac82

---
 pkgs/development/tools/gnulib/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/tools/gnulib/default.nix b/pkgs/development/tools/gnulib/default.nix
index f416a7a113e3..757925788792 100644
--- a/pkgs/development/tools/gnulib/default.nix
+++ b/pkgs/development/tools/gnulib/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchgit }:
 
 stdenv.mkDerivation {
-  name = "gnulib-0.0-7899-g34f8464";
+  name = "gnulib-0.0-7901-g076ac82";
 
   src = fetchgit {
     url = "http://git.savannah.gnu.org/r/gnulib.git";
-    rev = "34f84640cd015eee3d9aed3b1eddf6f361576890";
-    sha256 = "9267827d6b3f0eb97957eae7851afd4e5ac8aa714a83e3be52e7b660cc27851d";
+    rev = "076ac82d1d7f4df54630f1b4917b3c14f227f032";
+    sha256 = "023q3gqjrs8zdk31d81d3bcv9n5770nns0h5vq31saa5391qbpvn";
   };
 
   buildPhase = ":";

From cde41fe551a5c27e48e8318ec4f8cf8e0cb5e901 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 15:24:11 +0200
Subject: [PATCH 060/123] perl-packages.nix, all-packages.nix: generally refer
 to 'postgresql' instead of 'postgresql92'

This allows users to override the 'postgres' attribute with a different version
and have the effect propagated to all other packages that depend on it.
---
 pkgs/top-level/all-packages.nix  | 8 +++-----
 pkgs/top-level/perl-packages.nix | 3 +--
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index b1f42e2ade60..5feb863ecb1f 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5547,9 +5547,7 @@ let
 
   postgresql_jdbc = callPackage ../servers/sql/postgresql/jdbc { };
 
-  psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc {
-    postgresql = postgresql91;
-  };
+  psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc { };
 
   pyIRCt = builderDefsPackage (import ../servers/xmpp/pyIRCt) {
     inherit xmpppy pythonIRClib python makeWrapper;
@@ -7693,7 +7691,7 @@ let
   ratpoison = callPackage ../applications/window-managers/ratpoison { };
 
   rawtherapee = callPackage ../applications/graphics/rawtherapee {
-    fftw = fftw.override {float = true;}; 
+    fftw = fftw.override {float = true;};
   };
 
   rcs = callPackage ../applications/version-management/rcs { };
@@ -7993,7 +7991,7 @@ let
 
   wings = callPackage ../applications/graphics/wings {
     erlang = erlangR14B04;
-    esdl = esdl.override { erlang = erlangR14B04; }; 
+    esdl = esdl.override { erlang = erlangR14B04; };
   };
 
   wmname = callPackage ../applications/misc/wmname { };
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 2856ae88e374..80f7410d4ac0 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -1518,8 +1518,7 @@ rec {
   };
 
   DBDPg = import ../development/perl-modules/DBD-Pg {
-    inherit stdenv fetchurl buildPerlPackage DBI;
-    postgresql = pkgs.postgresql92;
+    inherit stdenv fetchurl buildPerlPackage DBI postgresql;
   };
 
   DBFile = import ../development/perl-modules/DB_File {

From fcdd1d5343e603546aa4f877784a5e99aaddf353 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 15:28:02 +0200
Subject: [PATCH 061/123] perl-packages.nix: fix misplaced attribute from
 previous commit

---
 pkgs/top-level/perl-packages.nix | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 80f7410d4ac0..4091ecda5840 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -1518,7 +1518,8 @@ rec {
   };
 
   DBDPg = import ../development/perl-modules/DBD-Pg {
-    inherit stdenv fetchurl buildPerlPackage DBI postgresql;
+    inherit stdenv fetchurl buildPerlPackage DBI;
+    inherit (pkgs) postgresql;
   };
 
   DBFile = import ../development/perl-modules/DB_File {

From dc70e15f8b1d9f6ea606fce1c5ea14bd5a9dbb2b Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 11:13:19 +0200
Subject: [PATCH 062/123] haskell-hspec: update to version 1.5.3

---
 pkgs/development/libraries/haskell/hspec/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/haskell/hspec/default.nix b/pkgs/development/libraries/haskell/hspec/default.nix
index bd517ababa67..9e2f6188761f 100644
--- a/pkgs/development/libraries/haskell/hspec/default.nix
+++ b/pkgs/development/libraries/haskell/hspec/default.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "hspec";
-  version = "1.5.2";
-  sha256 = "1bndznbq7qyqr4j4mnsxf3dabmjyzah0bsiyynrc00ay1pf033l8";
+  version = "1.5.3";
+  sha256 = "138qjfw3kq87dvmb2ig1nsnrjpyqayvbqrjkmswn0sg8qh5cgbgb";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
@@ -18,7 +18,7 @@ cabal.mkDerivation (self: {
     hspecMeta HUnit QuickCheck quickcheckIo random setenv silently time
     transformers
   ];
-  doCheck = self.stdenv.system == "x86_64-linux";
+  doCheck = false;
   meta = {
     homepage = "http://hspec.github.com/";
     description = "Behavior-Driven Development for Haskell";

From 1ebb9259398fd5e7e10385242e7127d9d5b42306 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 15:56:27 +0200
Subject: [PATCH 063/123] haskell-cabal2nix: update to version 1.49

---
 pkgs/development/tools/haskell/cabal2nix/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/tools/haskell/cabal2nix/default.nix b/pkgs/development/tools/haskell/cabal2nix/default.nix
index 31cbb94c7292..ae7ded65655a 100644
--- a/pkgs/development/tools/haskell/cabal2nix/default.nix
+++ b/pkgs/development/tools/haskell/cabal2nix/default.nix
@@ -3,8 +3,8 @@
 
 cabal.mkDerivation (self: {
   pname = "cabal2nix";
-  version = "1.48";
-  sha256 = "0175bprjisjzs0y1xga1xqcy5jx6xlbrvsw6095j12xvyrvzrggr";
+  version = "1.49";
+  sha256 = "1zrxgaw1lqnnyk4xd0skdc72yq3xfx3vfg1sfgrs3235njraa20i";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [ Cabal filepath hackageDb HTTP mtl regexPosix ];

From dc3bdd43ab631539930aad2ba23710e095170d81 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 16:04:35 +0200
Subject: [PATCH 064/123] haskell-platform-2010.2.0.0.nix: fix download URL

---
 .../libraries/haskell/haskell-platform/2010.2.0.0.nix          | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/haskell-platform/2010.2.0.0.nix b/pkgs/development/libraries/haskell/haskell-platform/2010.2.0.0.nix
index 3a47f2a39c9d..8f00f5fb48b1 100644
--- a/pkgs/development/libraries/haskell/haskell-platform/2010.2.0.0.nix
+++ b/pkgs/development/libraries/haskell/haskell-platform/2010.2.0.0.nix
@@ -7,7 +7,7 @@ cabal.mkDerivation (self : {
   pname = "haskell-platform";
   version = "2010.2.0.0";
   src = fetchurl {
-    url = "http://hackage.haskell.org/platform/${self.version}/cabal/${self.pname}-${self.version}.tar.gz";
+    url = "http://pkgs.fedoraproject.org/repo/pkgs/haskell-platform/haskell-platform-2010.2.0.0.tar.gz/9c9c6422ebfe1a5e78e69ae017f4d54b/haskell-platform-2010.2.0.0.tar.gz";
     sha256 = "c0b0b45151e74cff759ae25083c2ff7a7af4d2f74c19294b78730c879864f3c0";
   };
   propagatedBuildInputs = [
@@ -21,4 +21,3 @@ cabal.mkDerivation (self : {
     maintainers = [self.stdenv.lib.maintainers.andres];
   };
 })
-

From fc4f73863c6bfcef00bf689f26b86db342e1d6e3 Mon Sep 17 00:00:00 2001
From: Rok Garbas <rok@garbas.si>
Date: Sat, 6 Apr 2013 17:58:03 +0200
Subject: [PATCH 065/123] python-virtualenv: update to 1.9.1

---
 pkgs/top-level/python-packages.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index e9bf9a3fabe1..1a18f3cdb9c7 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -4307,10 +4307,10 @@ pythonPackages = python.modules // rec {
   });
 
   virtualenv = buildPythonPackage rec {
-    name = "virtualenv-1.8.4";
+    name = "virtualenv-1.9.1";
     src = fetchurl {
       url = "http://pypi.python.org/packages/source/v/virtualenv/${name}.tar.gz";
-      md5 = "1c7e56a7f895b2e71558f96e365ee7a7";
+      md5 = "07e09df0adfca0b2d487e39a4bf2270a";
     };
 
     patches = [ ../development/python-modules/virtualenv-change-prefix.patch ];

From abf49f299ea9f755d0164722ad63a1eef29ba082 Mon Sep 17 00:00:00 2001
From: Rok Garbas <rok@garbas.si>
Date: Sat, 6 Apr 2013 17:59:23 +0200
Subject: [PATCH 066/123] plone43Packages.zc_buildout: 2.1.0

---
 pkgs/development/web/plone/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/web/plone/default.nix b/pkgs/development/web/plone/default.nix
index bd2b8063ea87..8740240075a0 100644
--- a/pkgs/development/web/plone/default.nix
+++ b/pkgs/development/web/plone/default.nix
@@ -5603,10 +5603,10 @@ let plone43rc1Packages = python.modules // rec {
   };
 
   zc_buildout = buildPythonPackage rec {
-    name = "zc.buildout-1.7.0";
+    name = "zc.buildout-2.1.0";
     src = fetchurl {
-      url = "http://pypi.python.org/packages/source/z/zc.buildout/zc.buildout-1.7.0.tar.gz";
-      md5 = "4e3b521600e475c56a0a66459a5fc7bb";
+      url = "http://pypi.python.org/packages/source/z/zc.buildout/zc.buildout-2.1.0.tar.gz";
+      md5 = "1f0ec4b9dc663b444107edf9b7f811a4";
     };
     buildInputs = [  ];
     propagatedBuildInputs = [ setuptools ];

From 8092bc2dd767c98256a740bcfed58813dabd2bec Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sat, 6 Apr 2013 20:39:36 +0200
Subject: [PATCH 067/123] linux-3.8: upgrade to 3.8.6

---
 pkgs/os-specific/linux/kernel/linux-3.8.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-3.8.nix b/pkgs/os-specific/linux/kernel/linux-3.8.nix
index d0926f267ea4..d69738a25b7d 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.8.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.8.nix
@@ -252,7 +252,7 @@ in
 import ./generic.nix (
 
   rec {
-    version = "3.8.5";
+    version = "3.8.6";
     testing = false;
 
     preConfigure = ''
@@ -261,7 +261,7 @@ import ./generic.nix (
 
     src = fetchurl {
       url = "mirror://kernel/linux/kernel/v3.x/${if testing then "testing/" else ""}linux-${version}.tar.xz";
-      sha256 = "17w9qprk8ixjc6w0qk2p2jgqfxhmw4b9xss1iar5d9kbrc4nw6qz";
+      sha256 = "036i1hx2b49ssymw3xv73dz628n5yxbsngbfvsp4l7ww6brria5g";
     };
 
     config = configWithPlatform stdenv.platform;

From 4eff34e602689100f64a56e4d9dc7720df8c6390 Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sat, 6 Apr 2013 20:40:08 +0200
Subject: [PATCH 068/123] linux-3.4: upgrade to 3.4.39

---
 pkgs/os-specific/linux/kernel/linux-3.4.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-3.4.nix b/pkgs/os-specific/linux/kernel/linux-3.4.nix
index 2223f14b043d..b7ae959fa1b1 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.4.nix
@@ -245,7 +245,7 @@ in
 import ./generic.nix (
 
   rec {
-    version = "3.4.38";
+    version = "3.4.39";
     testing = false;
 
     preConfigure = ''
@@ -254,7 +254,7 @@ import ./generic.nix (
 
     src = fetchurl {
       url = "mirror://kernel/linux/kernel/v3.x/${if testing then "testing/" else ""}linux-${version}.tar.xz";
-      sha256 = "1j3389frp98f7l4l4mp1lyw5g1g9yll6fayiyz7dsnx8fkxsga4h";
+      sha256 = "16k1ssink1ka3593vgr1nzywc8laag58k0qz4hx0ad0sa0f7kz38";
     };
 
     config = configWithPlatform stdenv.platform;

From a99ea7a0eee1af202afb9ca78cdc0af60770fbf9 Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sat, 6 Apr 2013 20:40:22 +0200
Subject: [PATCH 069/123] linux-3.0: update to 3.0.72

---
 pkgs/os-specific/linux/kernel/linux-3.0.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-3.0.nix b/pkgs/os-specific/linux/kernel/linux-3.0.nix
index 4f68048be672..9aaea16262ee 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.0.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.0.nix
@@ -231,7 +231,7 @@ in
 import ./generic.nix (
 
   rec {
-    version = "3.0.71";
+    version = "3.0.72";
 
     preConfigure = ''
       substituteInPlace scripts/depmod.sh --replace '-b "$INSTALL_MOD_PATH"' ""
@@ -239,7 +239,7 @@ import ./generic.nix (
 
     src = fetchurl {
       url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-      sha256 = "1qavk6kp84h02bs0clhpri148lfj7zdzj7jjy07vw0h48lmj1405";
+      sha256 = "17whpcxibn6z1i1zjwx0vim33al9vgjp3jlvmam06qlxrl4i2q6w";
     };
 
     config = configWithPlatform stdenv.platform;

From d8fe87bbe1f84b63b8866a867d9c7d9d282707ef Mon Sep 17 00:00:00 2001
From: Rok Garbas <rok@garbas.si>
Date: Sat, 6 Apr 2013 23:03:33 +0200
Subject: [PATCH 070/123] Revert "plone43Packages.zc_buildout: 2.1.0"

new zc_buildout doesn't pick eggs from "system" site-packages

This reverts commit abf49f299ea9f755d0164722ad63a1eef29ba082.
---
 pkgs/development/web/plone/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/web/plone/default.nix b/pkgs/development/web/plone/default.nix
index 8740240075a0..bd2b8063ea87 100644
--- a/pkgs/development/web/plone/default.nix
+++ b/pkgs/development/web/plone/default.nix
@@ -5603,10 +5603,10 @@ let plone43rc1Packages = python.modules // rec {
   };
 
   zc_buildout = buildPythonPackage rec {
-    name = "zc.buildout-2.1.0";
+    name = "zc.buildout-1.7.0";
     src = fetchurl {
-      url = "http://pypi.python.org/packages/source/z/zc.buildout/zc.buildout-2.1.0.tar.gz";
-      md5 = "1f0ec4b9dc663b444107edf9b7f811a4";
+      url = "http://pypi.python.org/packages/source/z/zc.buildout/zc.buildout-1.7.0.tar.gz";
+      md5 = "4e3b521600e475c56a0a66459a5fc7bb";
     };
     buildInputs = [  ];
     propagatedBuildInputs = [ setuptools ];

From 55d380644139019c16a29cbac1a2ba77759eb76c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= <goibhniu@fsfe.org>
Date: Sun, 7 Apr 2013 01:02:14 +0200
Subject: [PATCH 071/123] Add python-rtmidi: A Python wrapper for the RtMidi
 C++ library written with Cython

---
 pkgs/top-level/python-packages.nix | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 1a18f3cdb9c7..1551b3ab8860 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1002,6 +1002,27 @@ pythonPackages = python.modules // rec {
   };
 
 
+  rtmidi = buildPythonPackage rec {
+    version = "0.3a";
+    name = "rtmidi-${version}";
+
+    src = fetchurl {
+      url = "http://chrisarndt.de/projects/python-rtmidi/download/python-${name}.tar.bz2";
+      sha256 = "0d2if633m3kbiricd5hgn1csccd8xab6lnab1bq9prdr9ks9i8h6";
+    };
+
+    buildInputs = [ pkgs.alsaLib pkgs.jackaudio ];
+
+    meta = with stdenv.lib; {
+      description = "A Python wrapper for the RtMidi C++ library written with Cython";
+      homepage = http://trac.chrisarndt.de/code/wiki/python-rtmidi;
+      license = licenses.mit;
+      maintainers = [ maintainers.goibhniu ];
+    };
+  };
+
+
+
   repoze_sphinx_autointerface = buildPythonPackage rec {
     name = "repoze.sphinx.autointerface-0.7.1";
 

From e3e160ace344aeff9ba6788f4dee8059e3f6246f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= <goibhniu@fsfe.org>
Date: Sun, 7 Apr 2013 01:52:52 +0200
Subject: [PATCH 072/123] Fix ordering: rt(midi) comes after re(poze)

also fix the order of some other packages, for my sins
---
 pkgs/top-level/python-packages.nix | 198 +++++++++++++++--------------
 1 file changed, 100 insertions(+), 98 deletions(-)

diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 1551b3ab8860..bb7dbcde2f71 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -21,11 +21,16 @@ pythonPackages = python.modules // rec {
   wrapPython = pkgs.makeSetupHook
     { deps = pkgs.makeWrapper;
       substitutions.libPrefix = python.libPrefix;
-    }
-    ../development/python-modules/generic/wrap.sh;
+    } 
+   ../development/python-modules/generic/wrap.sh;
 
   # specials
 
+  offlineDistutils = import ../development/python-modules/offline-distutils {
+    inherit (pkgs) stdenv;
+    inherit python;
+  };
+
   recursivePthLoader = import ../development/python-modules/recursive-pth-loader {
     inherit (pkgs) stdenv;
     inherit python;
@@ -41,11 +46,6 @@ pythonPackages = python.modules // rec {
     inherit python setuptools;
   };
 
-  offlineDistutils = import ../development/python-modules/offline-distutils {
-    inherit (pkgs) stdenv;
-    inherit python;
-  };
-
   # packages defined elsewhere
 
   ipython = import ../shells/ipython {
@@ -329,39 +329,6 @@ pythonPackages = python.modules // rec {
 
   };
 
-  logilab_astng = buildPythonPackage rec {
-    name = "logilab-astng-0.24.1";
-
-    src = fetchurl {
-      url = "http://download.logilab.org/pub/astng/${name}.tar.gz";
-      sha256 = "00qxaxsax80sknwv25xl1r49lc4gbhkxs1kjywji4ad8y1npax0s";
-    };
-
-    propagatedBuildInputs = [ logilab_common ];
-  };
-
-
-  beets = buildPythonPackage rec {
-    name = "beets-1.0.0";
-
-    src = fetchurl {
-      url = "http://pypi.python.org/packages/source/b/beets/${name}.tar.gz";
-      md5 = "88ad09a93aa0d69ce813205cf23b2a6c";
-    };
-
-    # tests depend on $HOME setting
-    configurePhase = "export HOME=$TMPDIR";
-
-    propagatedBuildInputs = [ pyyaml unidecode mutagen munkres musicbrainzngs python.modules.sqlite3 python.modules.readline ];
-
-    meta = {
-      homepage = http://beets.radbox.org;
-      description = "Music tagger and library organizer";
-      license = pkgs.lib.licenses.mit;
-      maintainers = [ stdenv.lib.maintainers.iElectric ];
-    };
-  };
-
 
   beautifulsoup = buildPythonPackage (rec {
     name = "beautifulsoup-3.2.1";
@@ -400,6 +367,52 @@ pythonPackages = python.modules // rec {
     };
   });
 
+
+  beaker = buildPythonPackage rec {
+    name = "Beaker-1.6.4";
+
+    src = fetchurl {
+      url = "http://pypi.python.org/packages/source/B/Beaker/${name}.tar.gz";
+      md5 = "c2e102870ed4c53104dec48ceadf8e9d";
+    };
+
+    buildInputs = [ sqlalchemy pycryptopp nose mock webtest ];
+
+    # http://hydra.nixos.org/build/4511591/log/raw
+    doCheck = false;
+
+    meta = {
+      maintainers = [
+        stdenv.lib.maintainers.garbas
+        stdenv.lib.maintainers.iElectric
+      ];
+      platforms = stdenv.lib.platforms.all;
+    };
+  };
+
+
+  beets = buildPythonPackage rec {
+    name = "beets-1.0.0";
+
+    src = fetchurl {
+      url = "http://pypi.python.org/packages/source/b/beets/${name}.tar.gz";
+      md5 = "88ad09a93aa0d69ce813205cf23b2a6c";
+    };
+
+    # tests depend on $HOME setting
+    configurePhase = "export HOME=$TMPDIR";
+
+    propagatedBuildInputs = [ pyyaml unidecode mutagen munkres musicbrainzngs python.modules.sqlite3 python.modules.readline ];
+
+    meta = {
+      homepage = http://beets.radbox.org;
+      description = "Music tagger and library organizer";
+      license = pkgs.lib.licenses.mit;
+      maintainers = [ stdenv.lib.maintainers.iElectric ];
+    };
+  };
+
+
   # euca2ools (and maybe Nova) needs boto 1.9, 2.0 doesn't work.
   boto_1_9 = buildPythonPackage (rec {
     name = "boto-1.9b";
@@ -848,6 +861,18 @@ pythonPackages = python.modules // rec {
   };
 
 
+  logilab_astng = buildPythonPackage rec {
+    name = "logilab-astng-0.24.1";
+
+    src = fetchurl {
+      url = "http://download.logilab.org/pub/astng/${name}.tar.gz";
+      sha256 = "00qxaxsax80sknwv25xl1r49lc4gbhkxs1kjywji4ad8y1npax0s";
+    };
+
+    propagatedBuildInputs = [ logilab_common ];
+  };
+
+
   peppercorn = buildPythonPackage rec {
     name = "peppercorn-0.4";
 
@@ -905,24 +930,6 @@ pythonPackages = python.modules // rec {
   };
 
 
-  pyramid_jinja2 = buildPythonPackage rec {
-    name = "pyramid_jinja2-1.6";
-
-    src = fetchurl {
-      url = "http://pypi.python.org/packages/source/p/pyramid_jinja2/${name}.zip";
-      md5 = "b7df1ab97f90f39529d27ba6da1f6b1c";
-    };
-
-    buildInputs = [ pkgs.unzip webtest ];
-    propagatedBuildInputs = [ jinja2 pyramid ];
-
-    meta = {
-      maintainers = [ stdenv.lib.maintainers.iElectric ];
-      platforms = stdenv.lib.platforms.all;
-    };
-  };
-
-
   pyramid_beaker = buildPythonPackage rec {
     name = "pyramid_beaker-0.7";
 
@@ -940,20 +947,19 @@ pythonPackages = python.modules // rec {
   };
 
 
-  pyramid_tm = buildPythonPackage rec {
-    name = "pyramid_tm-0.7";
+  pyramid_jinja2 = buildPythonPackage rec {
+    name = "pyramid_jinja2-1.6";
 
     src = fetchurl {
-      url = "http://pypi.python.org/packages/source/p/pyramid_tm/${name}.tar.gz";
-      md5 = "6dc917d262c69366630c542bd21859a3";
+      url = "http://pypi.python.org/packages/source/p/pyramid_jinja2/${name}.zip";
+      md5 = "b7df1ab97f90f39529d27ba6da1f6b1c";
     };
 
-    propagatedBuildInputs = [ transaction pyramid ];
+    buildInputs = [ pkgs.unzip webtest ];
+    propagatedBuildInputs = [ jinja2 pyramid ];
+
     meta = {
-      maintainers = [
-        stdenv.lib.maintainers.garbas
-        stdenv.lib.maintainers.iElectric
-      ];
+      maintainers = [ stdenv.lib.maintainers.iElectric ];
       platforms = stdenv.lib.platforms.all;
     };
   };
@@ -979,19 +985,15 @@ pythonPackages = python.modules // rec {
   };
 
 
-  beaker = buildPythonPackage rec {
-    name = "Beaker-1.6.4";
+  pyramid_tm = buildPythonPackage rec {
+    name = "pyramid_tm-0.7";
 
     src = fetchurl {
-      url = "http://pypi.python.org/packages/source/B/Beaker/${name}.tar.gz";
-      md5 = "c2e102870ed4c53104dec48ceadf8e9d";
+      url = "http://pypi.python.org/packages/source/p/pyramid_tm/${name}.tar.gz";
+      md5 = "6dc917d262c69366630c542bd21859a3";
     };
 
-    buildInputs = [ sqlalchemy pycryptopp nose mock webtest ];
-
-    # http://hydra.nixos.org/build/4511591/log/raw
-    doCheck = false;
-
+    propagatedBuildInputs = [ transaction pyramid ];
     meta = {
       maintainers = [
         stdenv.lib.maintainers.garbas
@@ -1002,22 +1004,20 @@ pythonPackages = python.modules // rec {
   };
 
 
-  rtmidi = buildPythonPackage rec {
-    version = "0.3a";
-    name = "rtmidi-${version}";
+  repoze_lru = buildPythonPackage rec {
+    name = "repoze.lru-0.4";
 
     src = fetchurl {
-      url = "http://chrisarndt.de/projects/python-rtmidi/download/python-${name}.tar.bz2";
-      sha256 = "0d2if633m3kbiricd5hgn1csccd8xab6lnab1bq9prdr9ks9i8h6";
+      url = "http://pypi.python.org/packages/source/r/repoze.lru/${name}.tar.gz";
+      md5 = "9f6ab7a4ff871ba795cadf56c20fb0f0";
     };
 
-    buildInputs = [ pkgs.alsaLib pkgs.jackaudio ];
-
-    meta = with stdenv.lib; {
-      description = "A Python wrapper for the RtMidi C++ library written with Cython";
-      homepage = http://trac.chrisarndt.de/code/wiki/python-rtmidi;
-      license = licenses.mit;
-      maintainers = [ maintainers.goibhniu ];
+    meta = {
+      maintainers = [
+        stdenv.lib.maintainers.garbas
+        stdenv.lib.maintainers.iElectric
+      ];
+      platforms = stdenv.lib.platforms.all;
     };
   };
 
@@ -1040,20 +1040,22 @@ pythonPackages = python.modules // rec {
   };
 
 
-  repoze_lru = buildPythonPackage rec {
-    name = "repoze.lru-0.4";
+  rtmidi = buildPythonPackage rec {
+    version = "0.3a";
+    name = "rtmidi-${version}";
 
     src = fetchurl {
-      url = "http://pypi.python.org/packages/source/r/repoze.lru/${name}.tar.gz";
-      md5 = "9f6ab7a4ff871ba795cadf56c20fb0f0";
+      url = "http://chrisarndt.de/projects/python-rtmidi/download/python-${name}.tar.bz2";
+      sha256 = "0d2if633m3kbiricd5hgn1csccd8xab6lnab1bq9prdr9ks9i8h6";
     };
 
-    meta = {
-      maintainers = [
-        stdenv.lib.maintainers.garbas
-        stdenv.lib.maintainers.iElectric
-      ];
-      platforms = stdenv.lib.platforms.all;
+    buildInputs = [ pkgs.alsaLib pkgs.jackaudio ];
+
+    meta = with stdenv.lib; {
+      description = "A Python wrapper for the RtMidi C++ library written with Cython";
+      homepage = http://trac.chrisarndt.de/code/wiki/python-rtmidi;
+      license = licenses.mit;
+      maintainers = [ maintainers.goibhniu ];
     };
   };
 

From 71c171be691e0848f2ec2aceabf380f33c626e8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= <goibhniu@fsfe.org>
Date: Sun, 7 Apr 2013 02:14:18 +0200
Subject: [PATCH 073/123] Add evdev: Provides bindings to the generic input
 event interface in Linux

---
 pkgs/top-level/python-packages.nix | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index bb7dbcde2f71..637e29a97b18 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -861,6 +861,30 @@ pythonPackages = python.modules // rec {
   };
 
 
+  evdev = buildPythonPackage rec {
+    version = "0.3.2";
+    name = "evdev-${version}";
+
+    src = fetchurl {
+      url = "https://pypi.python.org/packages/source/e/evdev/${name}.tar.gz";
+      sha256 = "07gmynz764sln2sq18aafx13yawkv5nkqrkk06rj71sq71fsr9h9";
+    };
+
+    buildInputs = [ pkgs.linuxHeaders ];
+
+    patchPhase = "sed -e 's#/usr/include/linux/input.h#${pkgs.linuxHeaders}/include/linux/input.h#' -i setup.py";
+
+    doCheck = false;
+
+    meta = with stdenv.lib; {
+      description = "Provides bindings to the generic input event interface in Linux";
+      homepage = http://pythonhosted.org/evdev;
+      license = licenses.bsd3;
+      maintainers = [ maintainers.goibhniu ];
+    };
+  };
+
+
   logilab_astng = buildPythonPackage rec {
     name = "logilab-astng-0.24.1";
 

From ec25d38261d4d12c50601ed4a3a7096e494b82e6 Mon Sep 17 00:00:00 2001
From: Domen Kozar <domen@dev.si>
Date: Sun, 7 Apr 2013 11:13:24 +0200
Subject: [PATCH 074/123] python 3.3.1rc1 -> 3.3.1

---
 pkgs/development/interpreters/python/3.3/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/interpreters/python/3.3/default.nix b/pkgs/development/interpreters/python/3.3/default.nix
index d81033a59139..1471abe287a7 100644
--- a/pkgs/development/interpreters/python/3.3/default.nix
+++ b/pkgs/development/interpreters/python/3.3/default.nix
@@ -17,7 +17,7 @@ with stdenv.lib;
 
 let
   majorVersion = "3.3";
-  version = "${majorVersion}.1rc1";
+  version = "${majorVersion}.1";
 
   buildInputs = filter (p: p != null) [
     zlib bzip2 gdbm sqlite db4 readline ncurses openssl tcl tk libX11 xproto
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://www.python.org/ftp/python/3.3.1/Python-${version}.tar.bz2";
-    sha256 = "1pnsbdzbd3750jcy32sv1760lv7am4x3f33jn1kmdmd82za279gv";
+    sha256 = "0mm7nvdd85p6b26jwshy2dhicf0b06mb5lrl564i3c5q7jgs1vll";
   };
 
   preConfigure = ''

From 93cabe848ff1b4fb50f89e4c8c86da00504430f6 Mon Sep 17 00:00:00 2001
From: Rob Vermaas <rob.vermaas@gmail.com>
Date: Sun, 7 Apr 2013 15:34:35 +0200
Subject: [PATCH 075/123] Upgrade aws-cli and dependencies

---
 pkgs/top-level/python-packages.nix | 73 ++++++++++++++++++++----------
 1 file changed, 49 insertions(+), 24 deletions(-)

diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 637e29a97b18..b36b8a8362c7 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -317,15 +317,15 @@ pythonPackages = python.modules // rec {
   });
 
   awscli = buildPythonPackage rec {
-    name = "awscli-0.5.0";
+    name = "awscli-0.8.3";
     namePrefix = "";
 
     src = fetchurl {
-      url = https://github.com/aws/aws-cli/archive/0.5.0.tar.gz;
-      sha256 = "0smgcisl2p7p2y2i299x7g271kdmgs0hnzngw5030phvh0lq202i";
+      url = https://github.com/aws/aws-cli/archive/0.8.3.tar.gz;
+      sha256 = "0v7igh00zja560v8qz315g3m7x9six1hprrrb10cpp9sy8n58xnn";
     };
 
-    propagatedBuildInputs = [ argparse botocore ];
+    propagatedBuildInputs = [ argparse botocore colorama ];
 
   };
 
@@ -468,14 +468,14 @@ pythonPackages = python.modules // rec {
 
 
   botocore = buildPythonPackage rec {
-    name = "botocore-0.5.2";
+    name = "botocore-0.8.3";
 
     src = fetchurl {
-      url = https://github.com/boto/botocore/archive/0.5.2.tar.gz;
-      sha256 = "18073mydin0mwk1d7vdlmsiz3rvhjzxkaaqrmxw440acbipnngq2";
+      url = https://github.com/boto/botocore/archive/0.8.3.tar.gz;
+      sha256 = "0dbm2clrh7zs4brqqj3xssz3nymdg24ff2lww27s3wliirwqdiv1";
     };
 
-    propagatedBuildInputs = [ dateutil requests014 ];
+    propagatedBuildInputs = [ dateutil requests jmespath ];
 
     meta = {
       homepage = https://github.com/boto/botocore;
@@ -642,6 +642,27 @@ pythonPackages = python.modules // rec {
     };
   });
 
+
+  colorama = buildPythonPackage rec {
+    name = "clientform-0.2.10";
+
+    src = fetchurl {
+      url = "https://pypi.python.org/packages/source/c/colorama/colorama-0.2.5.tar.gz";
+      md5 = "308c6e38917bdbfc4d3b0783c614897d";
+    };
+
+    propagatedBuildInputs = [ clientform ];
+
+    doCheck = false;
+
+    meta = {
+      homepage = http://code.google.com/p/colorama/;
+      license = "bsd";
+      description = "Cross-platform colored terminal text";
+    };
+  };
+
+
   coilmq = buildPythonPackage (rec {
     name = "coilmq-0.6.1";
 
@@ -1887,6 +1908,24 @@ pythonPackages = python.modules // rec {
   };
 
 
+  jmespath = buildPythonPackage rec {
+    name = "jmespath-0.0.1";
+
+    src = fetchurl {
+      url = "https://github.com/boto/jmespath/archive/0.0.1.tar.gz";
+      sha256 = "1a5d62qbgfjbaw8wgkfh78gairnpy6bbdsygwm1prqwap1kyq6ch";
+    };
+
+    propagatedBuildInputs = [ ply ];
+
+    meta = {
+      homepage = "https://github.com/boto/jmespath";
+      description = "JMESPath allows you to declaratively specify how to extract elements from a JSON document";
+      license = "BSD";
+    };
+  };
+
+
   pylast = buildPythonPackage rec {
     name = "pylast-${version}";
     version = "0.5.11";
@@ -2578,11 +2617,11 @@ pythonPackages = python.modules // rec {
   }) else null;
 
   ply = buildPythonPackage (rec {
-    name = "ply-3.2";
+    name = "ply-3.4";
 
     src = fetchurl {
       url = "http://www.dabeaz.com/ply/${name}.tar.gz";
-      sha256 = "10z4xq8lc8c21v4g7z3zpnvpqbc0vidigrck1kqhwgkqi4gh0kfj";
+      sha256 = "0sslnbpws847r1j1f41fjpn76w0asywfqgxwzyjrvmmxnw8myhxg";
     };
 
     meta = {
@@ -3654,20 +3693,6 @@ pythonPackages = python.modules // rec {
     };
   };
 
-  requests014 = buildPythonPackage rec {
-    name = "requests-0.14.1";
-
-    src = fetchurl {
-      url = "http://pypi.python.org/packages/source/r/requests/${name}.tar.gz";
-      md5 = "3de30600072cbc7214ae342d1d08aa46";
-    };
-
-    meta = {
-      description = "Requests is an Apache2 Licensed HTTP library, written in Python, for human beings..";
-      homepage = http://docs.python-requests.org/en/latest/;
-    };
-  };
-
 
   reviewboard = buildPythonPackage rec {
     name = "ReviewBoard-1.6.13";

From a3a3c9c50218c7fc3ea912b10e8797bd4d10f10b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= <goibhniu@fsfe.org>
Date: Sun, 7 Apr 2013 16:23:45 +0200
Subject: [PATCH 076/123] Update DISTRHO: audio effects and plugins

---
 pkgs/applications/audio/distrho/default.nix | 25 +++++----------------
 1 file changed, 6 insertions(+), 19 deletions(-)

diff --git a/pkgs/applications/audio/distrho/default.nix b/pkgs/applications/audio/distrho/default.nix
index 7a1d24844b6a..a409ba1f28b9 100644
--- a/pkgs/applications/audio/distrho/default.nix
+++ b/pkgs/applications/audio/distrho/default.nix
@@ -2,23 +2,19 @@
 , libxslt, lv2, pkgconfig, premake, xlibs }:
 
 let
-  rev = "7815b3545978e";
+  rev = "99efbf0b";
 in
 stdenv.mkDerivation rec {
   name = "distrho-${rev}";
 
   src = fetchgit {
-    url = "git://distrho.git.sf.net/gitroot/distrho/distrho";
+    url = "https://github.com/falkTX/DISTRHO.git";
     inherit rev;
-    sha256 = "2e260f16ee67b1166c39e2d55c8dd5593902c8b3d8d86485545ef83139e1e844";
+    sha256 = "ed26a6edca19ebb8260b3dc042f69c32162e1d91179fb9d22da42ec7131936f9";
   };
 
   patchPhase = ''
-    sed -e "s#xsltproc#${libxslt}/bin/xsltproc#" -i Makefile
-    sed -e "s#PREFIX = /usr/local#PREFIX = $out#" -i Makefile
-    sed -e "s#/etc/HybridReverb2#$out/etc/Hybridreverb2#" \
-      -i ports/hybridreverb2/source/SystemConfig.cpp
-    sed -e "s#/usr#$out#" -i ports/hybridreverb2/data/HybridReverb2.conf
+    sed -e "s#@./scripts#sh scripts#" -i Makefile
   '';
 
   buildInputs = [
@@ -31,9 +27,6 @@ stdenv.mkDerivation rec {
     sh ./scripts/premake-update.sh linux
     make standalone
     make lv2
-
-    # generate lv2 ttl
-    sh scripts/generate-ttl.sh
   '';
 
   installPhase = ''
@@ -41,12 +34,6 @@ stdenv.mkDerivation rec {
     cp bin/standalone/* $out/bin/
     mkdir -p $out/lib/lv2
     cp -a bin/lv2/* $out/lib/lv2/
-
-    # HybridReverb2 data
-    mkdir -p $out/etc/HybridReverb2
-    cp ports/hybridreverb2/data/HybridReverb2.conf $out/etc/HybridReverb2/
-    mkdir -p $out/share
-    cp -a ports/hybridreverb2/data/HybridReverb2 $out/share/
   '';
 
   meta = with stdenv.lib; {
@@ -55,8 +42,8 @@ stdenv.mkDerivation rec {
     longDescription = ''
       Includes:
       3BandEQ bitmangler drowaudio-distortion drowaudio-flanger
-      drowaudio-tremolo eqinox HybridReverb2 juce_pitcher sDelay
-      TAL-Filter TAL-NoiseMaker TAL-Reverb-2 TAL-Vocoder-2 ThePilgrim
+      drowaudio-tremolo eqinox juce_pitcher sDelay TAL-Filter
+      TAL-NoiseMaker TAL-Reverb-2 TAL-Vocoder-2 ThePilgrim
       Wolpertinger argotlunar capsaicin drowaudio-distortionshaper
       drowaudio-reverb drumsynth highlife JuceDemoPlugin PingPongPan
       TAL-Dub-3 TAL-Filter-2 TAL-Reverb TAL-Reverb-3 TheFunction vex

From ce5b1fd053ac87285c522e4ca71324361f1d839a Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 12:40:06 +0200
Subject: [PATCH 077/123] squid: build without -Werror to fix build on GCC
 4.8.x

---
 pkgs/servers/squid/squids.nix | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pkgs/servers/squid/squids.nix b/pkgs/servers/squid/squids.nix
index b349ab617acd..22aba3e156ff 100644
--- a/pkgs/servers/squid/squids.nix
+++ b/pkgs/servers/squid/squids.nix
@@ -11,7 +11,7 @@ rec {
       sha256 = "3e54ae3ad09870203862f0856c7d0cca16a85f62d5012085009003ee3d5467b4";
     };
 
-    configureFlags = ["--enable-ipv6"];
+    configureFlags = ["--enable-ipv6" "--disable-strict-error-checking"];
 
     meta = {
       description = "http-proxy";
@@ -27,7 +27,6 @@ rec {
       url = http://www.squid-cache.org/Versions/v3/3.1/squid-3.1.15.tar.bz2;
       sha256 = "1300f44dd4783697bacc262a7a9b32dbc9f550367fe82b70262864fdff715a35";
     };
-    configureFlags = ["--enable-ipv6"];
   };
 
   squid32 = squid30.merge rec {
@@ -36,7 +35,6 @@ rec {
       url = "http://www.squid-cache.org/Versions/v3/3.2/${name}.tar.bz2";
       sha256 = "13jlx3d6rqq7ajxs8bgn8a0mh932jhq6aa8032q205nxnhqs0l4l";
     };
-    configureFlags = ["--enable-ipv6"];
     buildInputs = [openldap pam db4 cyrus_sasl libcap expat libxml2
       libtool openssl];
   };

From 98bf728dcee524bd4dd0fd018550cec3321e29bf Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 12:35:03 +0200
Subject: [PATCH 078/123] aterm-2.8: add comment about build failures with gcc
 4.8.x

---
 pkgs/development/libraries/aterm/2.8.nix | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/aterm/2.8.nix b/pkgs/development/libraries/aterm/2.8.nix
index 05fb6704d3bf..498b0244b877 100644
--- a/pkgs/development/libraries/aterm/2.8.nix
+++ b/pkgs/development/libraries/aterm/2.8.nix
@@ -1,6 +1,6 @@
 {stdenv, fetchurl}:
 
-let 
+let
   isMingw = stdenv ? cross && stdenv.cross.config == "i686-pc-mingw32" ;
 in
 stdenv.mkDerivation ( {
@@ -15,7 +15,12 @@ stdenv.mkDerivation ( {
     # Fix for http://bugzilla.sen.cwi.nl:8080/show_bug.cgi?id=841
     ./max-long.patch
   ] ++ ( if isMingw then [./aterm-mingw-asm.patch] else [] );
-  
+
+  # The test programs stress, randgen, fib, and testsafio all fail with
+  # segmentation faults when compiled with GCC 4.8.x, and the code itself many
+  # warnings, complaining "cast from pointer to integer of different size".
+  # This looks really bad. I leave the test suite enabled, because those issue
+  # feel too serious to just ignore.
   doCheck = true;
 
   meta = {
@@ -23,4 +28,4 @@ stdenv.mkDerivation ( {
     license = "LGPL";
     description = "Library for manipulation of term data structures in C";
   };
-} // ( if isMingw then { dontStrip = true; } else {}) ) 
+} // ( if isMingw then { dontStrip = true; } else {}) )

From 2879cf569ef4984dea8a5ea5c8e2e3a29e585e2e Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 11:00:37 +0200
Subject: [PATCH 079/123] bup: update to version 0.25-rc1-107-g96c6fa2 and drop
 -Werror to fix the build

  /nix/store/4jfqcb4mzh3vl08zgfh9ir46jii7rcb9-python-2.7.3/include/python2.7/modsupport.h:27:1: error: 'PyArg_ParseTuple' is an unrecognized format function type [-Werror=format=]
   PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
   ^
  cc1: all warnings being treated as errors
---
 pkgs/tools/backup/bup/default.nix | 34 ++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/pkgs/tools/backup/bup/default.nix b/pkgs/tools/backup/bup/default.nix
index 7062053703e8..bdc2f832ff3b 100644
--- a/pkgs/tools/backup/bup/default.nix
+++ b/pkgs/tools/backup/bup/default.nix
@@ -6,26 +6,21 @@ assert par2Support -> par2cmdline != null;
 with stdenv.lib;
 
 stdenv.mkDerivation {
-  name = "bup-0.25git20121224";
+  name = "bup-0.25-rc1-107-g96c6fa2";
 
   src = fetchgit {
     url = "https://github.com/bup/bup.git";
-    sha256 = "f0e0c835ab83f00b28920d493e4150d2247113aad3a74385865c2a8c6f1ba7b8";
-    rev = "458e92da32ddd3c18fc1c3e52a76e9f0b48b832f";
+    rev = "96c6fa2a70425fff1e73d2e0945f8e242411ab58";
+    sha256 = "0d9hgyh1g5qcpdvnqv3a5zy67x79yx9qx557rxrnxyzqckp9v75n";
   };
 
+  buildInputs = [ python git ];
   nativeBuildInputs = [ pandoc perl makeWrapper ];
 
-  buildInputs = [ python git ];
-
-  postInstall = optionalString (elem stdenv.system platforms.linux) ''
-    wrapProgram $out/bin/bup --prefix PYTHONPATH : \
-      ${stdenv.lib.concatStringsSep ":"
-          (map (path: "$(toPythonPath ${path})") [ pyxattr pylibacl setuptools fuse ])}
-  '';
-
   patchPhase = ''
-    for f in cmd/* lib/tornado/* lib/tornado/test/* t/* wvtest.py main.py; do
+    substituteInPlace Makefile --replace "-Werror" ""
+    for f in "cmd/"* "lib/tornado/"* "lib/tornado/test/"* "t/"* wvtest.py main.py; do
+      test -f $f || continue
       substituteInPlace $f --replace "/usr/bin/env python" "${python}/bin/python"
     done
     substituteInPlace Makefile --replace "./format-subst.pl" "perl ./format-subst.pl"
@@ -33,6 +28,8 @@ stdenv.mkDerivation {
     substituteInPlace cmd/fsck-cmd.py --replace "['par2'" "['${par2cmdline}/bin/par2'"
   '';
 
+  dontAddPrefix = true;
+
   makeFlags = [
     "MANDIR=$(out)/share/man"
     "DOCDIR=$(out)/share/doc/bup"
@@ -40,11 +37,20 @@ stdenv.mkDerivation {
     "LIBDIR=$(out)/lib/bup"
   ];
 
+  postInstall = optionalString (elem stdenv.system platforms.linux) ''
+    wrapProgram $out/bin/bup --prefix PYTHONPATH : \
+      ${stdenv.lib.concatStringsSep ":"
+          (map (path: "$(toPythonPath ${path})") [ pyxattr pylibacl setuptools fuse ])}
+  '';
+
   meta = {
-    description = ''
+    homepage = "https://github.com/bup/bup";
+    description = "efficient file backup system based on the git packfile format";
+    license = stdenv.lib.licenses.gpl2Plus;
+
+    longDescription = ''
       Highly efficient file backup system based on the git packfile format.
       Capable of doing *fast* incremental backups of virtual machine images.
     '';
-    homepage = "https://github.com/bup/bup";
   };
 }

From 084d5eed2d9bc52fd1d5604ccccfcd19ac388c95 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 10:38:54 +0200
Subject: [PATCH 080/123] libgdiplus: fix download URL for
 'libgdiplus-2.10.1-libpng15.patch'

---
 pkgs/development/libraries/libgdiplus/default.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/development/libraries/libgdiplus/default.nix b/pkgs/development/libraries/libgdiplus/default.nix
index 46a53a88d8a9..3b1e5ba0b770 100644
--- a/pkgs/development/libraries/libgdiplus/default.nix
+++ b/pkgs/development/libraries/libgdiplus/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
 
   patches =
     [ (fetchurl {
-        url = http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-dotnet/libgdiplus/files/libgdiplus-2.10.1-libpng15.patch?revision=1.1;
+        url = "https://raw.github.com/MagicGroup/MagicSpecLib/master/libgdiplus/libgdiplus-2.10.1-libpng15.patch";
         sha256 = "130r0jm065pjvbz5dkx96w37vj1wqc8fakmi2znribs14g0bl65f";
       })
     ];

From bd8ccc7c2d5b85239e5769cd15901b51b4977eda Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 01:38:19 +0200
Subject: [PATCH 081/123] flac: update download URL for build fix patch

---
 pkgs/applications/audio/flac/default.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix
index fa201d20c3fb..5dd993b0ef8c 100644
--- a/pkgs/applications/audio/flac/default.nix
+++ b/pkgs/applications/audio/flac/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   patches =
     [ # Fix for building on GCC 4.3.
       (fetchurl {
-        url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/media-libs/flac/files/flac-1.2.1-gcc-4.3-includes.patch?rev=1.1";
+        url = "http://sourceforge.net/p/flac/patches/_discuss/thread/9d4c7504/d8ea/attachment/flac-1.2.1-gcc-4.3-includes.patch";
         sha256 = "1m6ql5vyjb2jlp5qiqp6w0drq1m6x6y3i1dnl5ywywl3zd36k0mr";
       })
     ];

From b8753c7d28704cb75f9eabe35bd0e8ad75e129f0 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 01:28:50 +0200
Subject: [PATCH 082/123] release-small.nix: switch Emacs 23 to 24

---
 pkgs/top-level/release-small.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix
index af886c18dce7..1d7049bf6193 100644
--- a/pkgs/top-level/release-small.nix
+++ b/pkgs/top-level/release-small.nix
@@ -41,7 +41,7 @@ with (import ./release-lib.nix);
   dhcp = linux;
   diffutils = all;
   e2fsprogs = linux;
-  emacs23 = gtkSupported;
+  emacs24 = gtkSupported;
   enscript = all;
   file = all;
   findutils = all;

From d585ef317824016ad3426f0d87d1a5b5133ade26 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 01:28:35 +0200
Subject: [PATCH 083/123] release-small.nix: drop the Emacs 23.x packages from
 this file

Most of these packages are very old and don't compile in 'master' to
begin with, so it's probably not necessary to use them for testing the
stdenv-updates branch.
---
 pkgs/top-level/release-small.nix | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix
index 1d7049bf6193..9c85cb381b6e 100644
--- a/pkgs/top-level/release-small.nix
+++ b/pkgs/top-level/release-small.nix
@@ -203,11 +203,4 @@ with (import ./release-lib.nix);
     tools = linux;
   };
 
-  emacs23Packages = {
-    bbdb = linux;
-    cedet = linux;
-    ecb = linux;
-    emacsw3m = linux;
-    emms = linux;
-  };
 } ))

From 938486848e416293666f322f2577cda58a5efbad Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 01:00:50 +0200
Subject: [PATCH 084/123] grub: fix download URL for grub-0.97-once.patch

---
 pkgs/tools/misc/grub/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/tools/misc/grub/default.nix b/pkgs/tools/misc/grub/default.nix
index a187dd9d6b25..4f4931e004f2 100644
--- a/pkgs/tools/misc/grub/default.nix
+++ b/pkgs/tools/misc/grub/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation {
   name = "grub-0.97-patch-1.12";
-  
+
   src = fetchurl {
     url = ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz;
     md5 = "cd3f3eb54446be6003156158d51f4884";
@@ -27,10 +27,10 @@ stdenv.mkDerivation {
     # shell.  KDE uses this to allow rebooting into a non-default
     # entry.
     (fetchurl {
-      url = http://cvs.mandriva.com/cgi-bin/viewvc.cgi/SPECS/grub/grub-0.97-once.patch?revision=1.3;
+      url = "https://raw.github.com/andatche/centos-grub/master/SOURCES/grub-0.97-once.patch";
       sha256 = "1g5qfn8lvl32h4pggdf7dmjqjpi42jblknzakb5h909fi5i1qyw8";
     })
-    
+
   ] ++ (stdenv.lib.optional buggyBiosCDSupport ./buggybios.patch);
 
   # Autoconf/automake required for the splashimage patch.

From c976480a01f96652c4e33576de45a0ad31be7e0d Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 00:45:25 +0200
Subject: [PATCH 085/123] elfutils: disable -Werror to fix the build

  nm.c: In function 'show_symbols_sysv':
  nm.c:773:27: error: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
      snprintf (name, sizeof name, "[invalid sh_name %#" PRIx32 "]",
                             ^
  cc1: all warnings being treated as errors
---
 pkgs/development/tools/misc/elfutils/default.nix | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix
index 5a1a19068a7e..526a66e02804 100644
--- a/pkgs/development/tools/misc/elfutils/default.nix
+++ b/pkgs/development/tools/misc/elfutils/default.nix
@@ -24,9 +24,11 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [m4 bison flex gettext bzip2];
   buildInputs = [zlib bzip2];
 
+  configureFlags = "--disable-werror";
+
   crossAttrs = {
 
-    /* Having bzip2 will harm, because anything using elfutils 
+    /* Having bzip2 will harm, because anything using elfutils
        as buildInput cross-building, will not be able to run 'bzip2' */
     propagatedBuildInputs = [ zlib.crossDrv ];
 
@@ -64,7 +66,7 @@ stdenv.mkDerivation rec {
       cp version.h $out/include
     '';
   };
-  
+
   dontAddDisableDepTrack = true;
 
   meta = {

From 9608d80c73fe7781d224297f5d58a63e8850097f Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Sat, 6 Apr 2013 00:05:14 +0200
Subject: [PATCH 086/123] iproute: don't compile with -Werror

  lnstat.c:169:30: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
     memset(th.hdr[i], 0, sizeof(th.hdr[i]));
                                ^
  cc1: all warnings being treated as errors
  make[1]: *** [lnstat.o] Error 1
---
 pkgs/os-specific/linux/iproute/default.nix     |  2 +-
 pkgs/os-specific/linux/iproute/no-werror.patch | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 pkgs/os-specific/linux/iproute/no-werror.patch

diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix
index 5c0f48b2901f..4ea4152e30d4 100644
--- a/pkgs/os-specific/linux/iproute/default.nix
+++ b/pkgs/os-specific/linux/iproute/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "0kqy30wz2krbg4y7750hjq5218hgy2vj9pm5qzkn1bqskxs4b4ap";
   };
 
-  patches = [ ./vpnc.patch ];
+  patches = [ ./vpnc.patch ./no-werror.patch ];
 
   preConfigure =
     ''
diff --git a/pkgs/os-specific/linux/iproute/no-werror.patch b/pkgs/os-specific/linux/iproute/no-werror.patch
new file mode 100644
index 000000000000..593b56b8de09
--- /dev/null
+++ b/pkgs/os-specific/linux/iproute/no-werror.patch
@@ -0,0 +1,12 @@
+diff -ubr iproute2-3.8.0-orig/Makefile iproute2-3.8.0/Makefile
+--- iproute2-3.8.0-orig/Makefile	2013-04-06 00:03:21.072827860 +0200
++++ iproute2-3.8.0/Makefile	2013-04-06 00:03:25.353837862 +0200
+@@ -30,7 +30,7 @@
+ HOSTCC = gcc
+ DEFINES += -D_GNU_SOURCE
+ CCOPTS = -O2
+-WFLAGS := -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes
++WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes
+ WFLAGS += -Wmissing-declarations -Wold-style-definition
+ 
+ CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)

From 2fe970d6f2ccbfb88211c786135f25189879dec6 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Mon, 8 Apr 2013 01:17:44 +0200
Subject: [PATCH 087/123] httpie: the build input 'requests014' doesn't exist
 anymore, it's now called 'requests'

---
 pkgs/tools/networking/httpie/default.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/tools/networking/httpie/default.nix b/pkgs/tools/networking/httpie/default.nix
index d95360ccb458..ca59fd13bba1 100644
--- a/pkgs/tools/networking/httpie/default.nix
+++ b/pkgs/tools/networking/httpie/default.nix
@@ -9,7 +9,7 @@ pythonPackages.buildPythonPackage {
     sha256 = "0abjkwcirmp6qa190qgbgj5fmmkmk5aa3fdiyayl2indh6304x7a";
   };
 
-  propagatedBuildInputs = with pythonPackages; [ pygments requests014 ];
+  propagatedBuildInputs = with pythonPackages; [ pygments requests ];
 
   doCheck = false;
 

From 48a2fb0aaad0a82b484a46d7a3bab7030cbaf587 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Mon, 8 Apr 2013 01:19:20 +0200
Subject: [PATCH 088/123] httpie: update to version 0.4.1 to fix the build

---
 pkgs/tools/networking/httpie/default.nix | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pkgs/tools/networking/httpie/default.nix b/pkgs/tools/networking/httpie/default.nix
index ca59fd13bba1..cdbb52fe7396 100644
--- a/pkgs/tools/networking/httpie/default.nix
+++ b/pkgs/tools/networking/httpie/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, pythonPackages }:
 
-pythonPackages.buildPythonPackage {
-  name = "httpie-0.3.1";
+pythonPackages.buildPythonPackage rec {
+  name = "httpie-0.4.1";
   namePrefix = "";
 
   src = fetchurl {
-    url = "http://pypi.python.org/packages/source/h/httpie/httpie-0.3.1.tar.gz";
-    sha256 = "0abjkwcirmp6qa190qgbgj5fmmkmk5aa3fdiyayl2indh6304x7a";
+    url = "http://pypi.python.org/packages/source/h/httpie/${name}.tar.gz";
+    sha256 = "1qd03vd4657vdvkfhbd2wnlz4xh6hyw75m7wmfhgac5m2028y3cv";
   };
 
   propagatedBuildInputs = with pythonPackages; [ pygments requests ];

From fd76305a9b81325bf044e9689574215d95e86f8c Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Sun, 7 Apr 2013 20:03:30 +0200
Subject: [PATCH 089/123] vlc: enable support for the opus codec

---
 pkgs/applications/video/vlc/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix
index 5529fbeff836..a7cce109fdfe 100644
--- a/pkgs/applications/video/vlc/default.nix
+++ b/pkgs/applications/video/vlc/default.nix
@@ -5,7 +5,7 @@
 , libcaca, pulseaudio, flac, schroedinger, libxml2, librsvg
 , mpeg2dec, udev, gnutls, avahi, libcddb, jackaudio, SDL, SDL_image
 , libmtp, unzip, taglib, libkate, libtiger, libv4l, samba, liboggz
-, libass, libva, libdvbpsi, libdc1394, libraw1394
+, libass, libva, libdvbpsi, libdc1394, libraw1394, libopus
 }:
 
 stdenv.mkDerivation rec {
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
       udev gnutls avahi libcddb jackaudio SDL SDL_image libmtp unzip taglib
       libkate libtiger libv4l samba liboggz libass libdvbpsi libva
       xlibs.xlibs xlibs.libXv xlibs.libXvMC xlibs.libXpm xlibs.xcbutilkeysyms
-      libdc1394 libraw1394
+      libdc1394 libraw1394 libopus
     ];
 
   nativeBuildInputs = [ pkgconfig ];

From dcff78f580fb487dbbd0b4fdd537babd6a3ac39f Mon Sep 17 00:00:00 2001
From: aszlig <aszlig@redmoonstudios.org>
Date: Mon, 8 Apr 2013 05:58:23 +0200
Subject: [PATCH 090/123] taskwarrior: Update to version 2.2.0.

This update roughly includes the following changes:

 * Spanish es-ES translation
 * New configuration option: print.empty.columns
 * Much improved Asian character support
 * More virtual tags
 * Improved bash completion
 * Task modification time
 * Stats show blocked and blocking tasks
 * New 'blocking' report
 * Additional color rules
 * New helper commands for third-party tools
 * 'columns' command searchable
 * New date shortcuts 'socm' and 'eocm'
 * Improved push/pull messages

For a full list of changes, please head over to:

http://taskwarrior.org/projects/taskwarrior/wiki/Changelog

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
---
 pkgs/applications/misc/taskwarrior/default.nix | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/pkgs/applications/misc/taskwarrior/default.nix b/pkgs/applications/misc/taskwarrior/default.nix
index dae574804b4d..dc1fce1d64ca 100644
--- a/pkgs/applications/misc/taskwarrior/default.nix
+++ b/pkgs/applications/misc/taskwarrior/default.nix
@@ -1,13 +1,14 @@
 {stdenv, fetchurl, cmake}:
 
-stdenv.mkDerivation {
-  name = "taskwarrior-2.1.2";
+stdenv.mkDerivation rec {
+  name = "taskwarrior-${version}";
+  version = "2.2.0";
 
   enableParallelBuilding = true;
 
   src = fetchurl {
-    url = http://www.taskwarrior.org/download/task-2.1.2.tar.gz;
-    sha256 = "0diy72sgiyvfl6bdy7k3qwv3ijx2z1y477smkk6jsbbd9fsp2lfg";
+    url = "http://www.taskwarrior.org/download/task-${version}.tar.gz";
+    sha256 = "057fh50qp9bd5s08rw51iybpamn55v5nhn3s6ds89g76hp95vqir";
   };
 
   nativeBuildInputs = [ cmake ];

From 75e5cbde79132b01fb28d936c166d92bd105152a Mon Sep 17 00:00:00 2001
From: aszlig <aszlig@redmoonstudios.org>
Date: Mon, 8 Apr 2013 08:46:44 +0200
Subject: [PATCH 091/123] chromium: Update beta and dev channels.

beta: 26.0.1410.43 -> 27.0.1453.15 (builds fine and tested)
dev:  27.0.1448.0  -> 27.0.1453.12 (builds fine and tested)

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
---
 .../networking/browsers/chromium/sources.nix         | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/pkgs/applications/networking/browsers/chromium/sources.nix b/pkgs/applications/networking/browsers/chromium/sources.nix
index 9e4c0cff5634..bbdbd4cfeb8a 100644
--- a/pkgs/applications/networking/browsers/chromium/sources.nix
+++ b/pkgs/applications/networking/browsers/chromium/sources.nix
@@ -1,14 +1,14 @@
 # This file is autogenerated from update.sh in the same directory.
 {
   dev = {
-    version = "27.0.1448.0";
-    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-27.0.1448.0.tar.xz";
-    sha256 = "03sarp8drf9a6likk4m73lgk2i4nhqqri8ja9h8qiglqc4sf2hn0";
+    version = "27.0.1453.12";
+    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-27.0.1453.12.tar.xz";
+    sha256 = "1b2vkcynljl799m41aabdsj9k2plchiga6bi4ah3hc0mwyj0lyl7";
   };
   beta = {
-    version = "26.0.1410.43";
-    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-26.0.1410.43.tar.xz";
-    sha256 = "110x9cs88gqvqya71bqspx2s7ph6ca0als7sp5fbf911cj0iy0ii";
+    version = "27.0.1453.15";
+    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-27.0.1453.15.tar.xz";
+    sha256 = "19y9pbipi4y61avrsgb7y4b1xl8d29v34l403xdghk0d3z2rg65m";
   };
   stable = {
     version = "26.0.1410.43";

From 0ccd57bcd65bf0ee8312a1c5f6dd1f446ca25fd5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Mon, 8 Apr 2013 11:52:27 +0200
Subject: [PATCH 092/123] mono: update to 2.11.4

Just to have a newer version.
---
 pkgs/development/compilers/mono/default.nix | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pkgs/development/compilers/mono/default.nix b/pkgs/development/compilers/mono/default.nix
index f59bb2cac403..47b13700b8ac 100644
--- a/pkgs/development/compilers/mono/default.nix
+++ b/pkgs/development/compilers/mono/default.nix
@@ -1,10 +1,10 @@
 {stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus}:
 
-stdenv.mkDerivation {
-  name = "mono-2.10.8.1";
+stdenv.mkDerivation rec {
+  name = "mono-2.11.4";
   src = fetchurl {
-    url = http://download.mono-project.com/sources/mono/mono-2.10.8.1.tar.gz;
-    sha256 = "0h4hdj99qg0nsg5260izwaybs59wysf7y399kffhg43fidpndz0x";
+    url = "http://download.mono-project.com/sources/mono/${name}.tar.bz2";
+    sha256 = "0wv8pnj02mq012sihx2scx0avyw51b5wb976wn7x86zda0vfcsnr";
   };
 
   buildInputs = [bison pkgconfig glib gettext perl libgdiplus];

From 79d155f874e5445d3f1e08393cfb6a08fb766516 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Mon, 8 Apr 2013 11:52:42 +0200
Subject: [PATCH 093/123] pinta: updating it. It works now.

---
 pkgs/applications/graphics/pinta/default.nix | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pkgs/applications/graphics/pinta/default.nix b/pkgs/applications/graphics/pinta/default.nix
index 349982bc24cb..b845abacf7ec 100644
--- a/pkgs/applications/graphics/pinta/default.nix
+++ b/pkgs/applications/graphics/pinta/default.nix
@@ -1,11 +1,12 @@
 {stdenv, fetchurl, mono, gtksharp, pkgconfig}:
 
 stdenv.mkDerivation {
-  name = "pinta-0.5";
+  name = "pinta-1.4";
 
   src = fetchurl {
-    url =  http://github.com/downloads/jpobst/Pinta/pinta-0.5.tar.gz; 
-    sha256 = "0qv95zswi488bkbck9b9yhmczj1sgqc96nzn4f5rwfqz516kilrl";
+    url = "https://github.com/PintaProject/pinta/tarball/3f7ccfa93d";
+    name = "pinta-1.4.tar.gz";
+    sha256 = "1kgb4gy5l6bd0akniwhiqqkvqayr5jgdsvn2pgg1038q9raafnpn";
   };
 
   buildInputs = [mono gtksharp pkgconfig];

From e0249ffcd0687a40dd3fa2d89a98b11ba0192b59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Mon, 8 Apr 2013 12:14:26 +0200
Subject: [PATCH 094/123] meld: update to 1.6.1

---
 pkgs/applications/version-management/meld/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/applications/version-management/meld/default.nix b/pkgs/applications/version-management/meld/default.nix
index 42650b3afb30..6e099cd56083 100644
--- a/pkgs/applications/version-management/meld/default.nix
+++ b/pkgs/applications/version-management/meld/default.nix
@@ -1,8 +1,8 @@
 {stdenv, fetchurl, pygtk, python, intltool, scrollkeeper, makeWrapper }:
 
 let
-  minor = "1.5";
-  version = "${minor}.2";
+  minor = "1.6";
+  version = "${minor}.1";
 in
 
 stdenv.mkDerivation {
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://ftp.gnome.org/pub/gnome/sources/meld/${minor}/meld-${version}.tar.xz";
-    sha256 = "05rbkqflbqnh2c4682d2fmidhwz2bvlggrhp1p7xbi3z8ci87pdx";
+    sha256 = "00rsff0yl5qwzh0igkdns6ry2xsbxad70avpqpkbd2bldi94v76y";
   };
 
   buildInputs = [ pygtk python intltool scrollkeeper makeWrapper ];

From c1233178d38e291fb6d406519cb77e7c56a5d5e6 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Mon, 8 Apr 2013 12:14:02 +0200
Subject: [PATCH 095/123] haskell-http-conduit: update to version 1.9.3

---
 pkgs/development/libraries/haskell/http-conduit/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/http-conduit/default.nix b/pkgs/development/libraries/haskell/http-conduit/default.nix
index 3c0e1b3a2025..c4e610d254f1 100644
--- a/pkgs/development/libraries/haskell/http-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/http-conduit/default.nix
@@ -9,8 +9,8 @@
 
 cabal.mkDerivation (self: {
   pname = "http-conduit";
-  version = "1.9.2.2";
-  sha256 = "16njcgdnzs2la5xvs1pqs3zcjyzqlk3yfis89h9x7qg2w8hq8pxf";
+  version = "1.9.3";
+  sha256 = "03c08jj6941kxl5iw60n8s8qnxp2rsfgfmf7m761iy7i7hsj1rkk";
   buildDepends = [
     asn1Data base64Bytestring blazeBuilder blazeBuilderConduit
     caseInsensitive certificate conduit cookie cprngAes dataDefault

From 203fd72f8fccabf1ca9aa5fe8a35c6658bdc3152 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Mon, 8 Apr 2013 12:14:02 +0200
Subject: [PATCH 096/123] haskell-repa: update to version 3.2.3.2

---
 pkgs/development/libraries/haskell/repa/default.nix | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/haskell/repa/default.nix b/pkgs/development/libraries/haskell/repa/default.nix
index 63f3eaa982e7..f6cb286ff794 100644
--- a/pkgs/development/libraries/haskell/repa/default.nix
+++ b/pkgs/development/libraries/haskell/repa/default.nix
@@ -2,10 +2,9 @@
 
 cabal.mkDerivation (self: {
   pname = "repa";
-  version = "3.2.3.1";
-  sha256 = "0r5z781h9v6ri2m3ih7jbymvc3i2m26qaf29pxwmaks0sdlp4qmr";
+  version = "3.2.3.2";
+  sha256 = "0xwaqkir4gjlhnvd1r69ycswg4p65ig38d2np69hv195zr47pmvh";
   buildDepends = [ QuickCheck vector ];
-  jailbreak = true;
   meta = {
     homepage = "http://repa.ouroborus.net";
     description = "High performance, regular, shape polymorphic parallel arrays";

From 1f82083c20b01b0039f67f03a351eae9a284019d Mon Sep 17 00:00:00 2001
From: Rickard Nilsson <rickynils@gmail.com>
Date: Mon, 8 Apr 2013 18:21:55 +0200
Subject: [PATCH 097/123] darktable: Update to 1.2

---
 .../graphics/darktable/1.2rc1.nix             | 53 -------------------
 .../graphics/darktable/default.nix            |  6 +--
 pkgs/top-level/all-packages.nix               |  4 --
 3 files changed, 3 insertions(+), 60 deletions(-)
 delete mode 100644 pkgs/applications/graphics/darktable/1.2rc1.nix

diff --git a/pkgs/applications/graphics/darktable/1.2rc1.nix b/pkgs/applications/graphics/darktable/1.2rc1.nix
deleted file mode 100644
index 906240d864f6..000000000000
--- a/pkgs/applications/graphics/darktable/1.2rc1.nix
+++ /dev/null
@@ -1,53 +0,0 @@
-{ stdenv, fetchurl
-, GConf, atk, cairo, cmake, curl, dbus_glib, exiv2, glib
-, libgnome_keyring, gphoto2, gtk, ilmbase, intltool, lcms, lcms2
-, lensfun, libXau, libXdmcp, libexif, libglade, libgphoto2, libjpeg
-, libpng, libpthreadstubs, libraw1394, librsvg, libtiff, libxcb
-, openexr, pixman, pkgconfig, sqlite, bash, libxslt }:
-
-assert stdenv ? glibc;
-
-stdenv.mkDerivation rec {
-  version = "1.2rc1";
-  name = "darktable-${version}";
-
-  src = fetchurl {
-    url = "http://tinyurl.com/bmwdztq";
-    name = "${name}-${version}.tar.xz";
-    sha256 = "0l3gl49bmaljrrl4zfaivvj7apxa2jm934ylq24gcms3b2whv70m";
-  };
-
-  buildInputs =
-    [ GConf atk cairo cmake curl dbus_glib exiv2 glib libgnome_keyring gtk
-      ilmbase intltool lcms lcms2 lensfun libXau libXdmcp libexif
-      libglade libgphoto2 libjpeg libpng libpthreadstubs libraw1394
-      librsvg libtiff libxcb openexr pixman pkgconfig sqlite libxslt
-    ];
-
-  preConfigure = ''
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk}/include/gtk-2.0"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk}/lib/gtk-2.0/include"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${cairo}/include/cairo"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${atk}/include/atk-1.0"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${ilmbase}/include/OpenEXR"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${openexr}/include/OpenEXR"
-
-    substituteInPlace tools/create_preferences.sh.in --replace '#!/usr/bin/env bash' '#!${bash}/bin/bash'
-  '';
-
-  cmakeFlags = [
-    "-DPTHREAD_INCLUDE_DIR=${stdenv.glibc}/include"
-    "-DPTHREAD_LIBRARY=${stdenv.glibc}/lib/libpthread.so"
-    "-DCMAKE_BUILD_TYPE=Release"
-    "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include"
-    "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk}/lib/gtk-2.0/include"
-  ];
-
-  meta = with stdenv.lib; {
-    description = "Virtual lighttable and darkroom for photographers";
-    homepage = http://darktable.sourceforge.net;
-    license = licenses.gpl3Plus;
-    platforms = platforms.linux;
-    maintainers = [ maintainers.goibhniu ];
-  };
-}
diff --git a/pkgs/applications/graphics/darktable/default.nix b/pkgs/applications/graphics/darktable/default.nix
index aa67406d0e79..91c91dc39250 100644
--- a/pkgs/applications/graphics/darktable/default.nix
+++ b/pkgs/applications/graphics/darktable/default.nix
@@ -8,12 +8,12 @@
 assert stdenv ? glibc;
 
 stdenv.mkDerivation rec {
-  version = "1.1.4";
+  version = "1.2";
   name = "darktable-${version}";
 
   src = fetchurl {
-    url = "mirror://sourceforge/darktable/darktable/1.1/darktable-${version}.tar.xz";
-    sha256 = "1bzcxh8zm0xxrpifkkksv9k4xagjrzlam00yja9v9cbjlvawfszv";
+    url = "mirror://sourceforge/darktable/darktable/1.2/darktable-${version}.tar.xz";
+    sha256 = "0l2lrly46nda7b2y4gskqqxaajia34g487bgjcpd5ysxbhmmhlnw";
   };
 
   buildInputs =
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 5feb863ecb1f..0e6acb7905bf 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6735,10 +6735,6 @@ let
     inherit (gnome) GConf libglade;
   };
 
-  darktable12 = callPackage ../applications/graphics/darktable/1.2rc1.nix {
-    inherit (gnome) GConf libglade;
-  };
-
   "dd-agent" = callPackage ../tools/networking/dd-agent { };
 
   dia = callPackage ../applications/graphics/dia {

From 08f1b426bc15e07c7b0fc52fd73232d9966dac12 Mon Sep 17 00:00:00 2001
From: Rickard Nilsson <rickynils@gmail.com>
Date: Tue, 9 Apr 2013 16:34:59 +0200
Subject: [PATCH 098/123] stunnel: Update to 4.56

Note, I had to add "fips = no" to my stunnel configuration after
the update.
---
 pkgs/tools/networking/stunnel/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/tools/networking/stunnel/default.nix b/pkgs/tools/networking/stunnel/default.nix
index d16d9bfb0896..cfc4b2497b7a 100644
--- a/pkgs/tools/networking/stunnel/default.nix
+++ b/pkgs/tools/networking/stunnel/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, openssl }:
 
 stdenv.mkDerivation {
-  name = "stunnel-4.53";
+  name = "stunnel-4.56";
   
   src = fetchurl {
-    url = http://www.stunnel.org/downloads/stunnel-4.53.tar.gz;
-    sha256 = "3e640aa4c96861d10addba758b66e99e7c5aec8697764f2a59ca2268901b8e57";
+    url = http://www.stunnel.org/downloads/stunnel-4.56.tar.gz;
+    sha256 = "14qjhwfa0y17ipnd5mc970vfmralvgaxfl6fk0rl91vdwbxjrblw";
   };
 
   buildInputs = [openssl];

From 7870db8b10caf0d78d9472531a31e87aa865ab6b Mon Sep 17 00:00:00 2001
From: Rickard Nilsson <rickynils@gmail.com>
Date: Tue, 9 Apr 2013 16:36:38 +0200
Subject: [PATCH 099/123] unionfs: Add mount helper (mount.unionfs-fuse)

This makes it possible to mount unionfs directly with mount or fstab.

Example fstab entry:

  none /mnt/union unionf-fuse allow-other,dirs=/source1=RW,/source2=RW

Note, the dirs= option need to be the last option, due to limitations
in the mount helper provided by unionfs-fuse. Maybe we should write a
better helper ourselves.

Also, you need to specify your branches as dirs= option, NOT as
the device, since the latest version of libmount always interprets
"=" characters in the device name as a tag (like LABEL, UUID etc)
and will try to resolve the tag before calling the mount helper.
This will of course not succeed and the mount will fail.
---
 pkgs/tools/filesystems/unionfs-fuse/default.nix | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/pkgs/tools/filesystems/unionfs-fuse/default.nix b/pkgs/tools/filesystems/unionfs-fuse/default.nix
index 43d7a5a8d180..5b681ab170c5 100644
--- a/pkgs/tools/filesystems/unionfs-fuse/default.nix
+++ b/pkgs/tools/filesystems/unionfs-fuse/default.nix
@@ -5,12 +5,24 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://podgorny.cz/unionfs-fuse/releases/${name}.tar.xz";
-
     sha256 = "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d";
   };
 
   buildInputs = [ cmake fuse ];
 
+  # Put the unionfs mount helper in place as mount.unionfs-fuse. This makes it
+  # possible to do:
+  #   mount -t unionfs-fuse none /dest -o dirs=/source1=RW,/source2=RO
+  #
+  # This must be done in preConfigure because the build process removes
+  # helper from the source directory during the build.
+  preConfigure = ''
+    ensureDir $out/sbin
+    cp -a mount.unionfs $out/sbin/mount.unionfs-fuse
+    substituteInPlace $out/sbin/mount.unionfs-fuse --replace mount.fuse ${fuse}/sbin/mount.fuse
+    substituteInPlace $out/sbin/mount.unionfs-fuse --replace unionfs $out/bin/unionfs
+  '';
+
   meta = {
     description = "FUSE UnionFS implementation";
     homepage = http://podgorny.cz/moin/UnionFsFuse;

From e7124e9e5fe2fb8ce31d14c4ac6584c43ec64f57 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 9 Apr 2013 17:02:15 +0200
Subject: [PATCH 100/123] sqlite: Update to 3.7.16.1

---
 pkgs/development/libraries/sqlite/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix
index be3a24c1e4ce..08d0396a53d9 100644
--- a/pkgs/development/libraries/sqlite/default.nix
+++ b/pkgs/development/libraries/sqlite/default.nix
@@ -3,11 +3,11 @@
 assert readline != null -> ncurses != null;
 
 stdenv.mkDerivation {
-  name = "sqlite-3.7.14.1";
+  name = "sqlite-3.7.16.1";
 
   src = fetchurl {
-    url = http://www.sqlite.org/sqlite-autoconf-3071401.tar.gz;
-    sha1 = "c464e0e3efe98227c6546b9b1e786b51b8b642fc";
+    url = http://www.sqlite.org/2013/sqlite-autoconf-3071601.tar.gz;
+    sha1 = "b0d9b3e2ca3c50f72e5921e9532130787871b7ae";
   };
 
   buildInputs = [ readline ncurses ];

From 2bc9c41b8ccd024c1ebd32f2037a322ec218b59f Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 9 Apr 2013 17:06:27 +0200
Subject: [PATCH 101/123] nspr: Update to 4.9.6

---
 pkgs/development/libraries/nspr/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/nspr/default.nix b/pkgs/development/libraries/nspr/default.nix
index 42740ea2e1b8..38acab14f77b 100644
--- a/pkgs/development/libraries/nspr/default.nix
+++ b/pkgs/development/libraries/nspr/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl }:
 
-let version = "4.9.5"; in
+let version = "4.9.6"; in
 
 stdenv.mkDerivation {
   name = "nspr-${version}";
 
   src = fetchurl {
     url = "http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${version}/src/nspr-${version}.tar.gz";
-    sha1 = "03885e992607e2be975f6525c6764c2167fe2eff";
+    sha256 = "1yf6sr21fisr0mlh4cq0ymcfp8nsvjskmx8dlm9mvhaw7kfzv4vn";
   };
 
   preConfigure = "cd mozilla/nsprpub";

From bfa358c76eba3a23ec6a289e72d7eab9ec3c0712 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 9 Apr 2013 18:00:26 +0200
Subject: [PATCH 102/123] firefox: Update to 20.0

---
 .../networking/browsers/firefox/20.0.nix      | 176 ++++++++++++++++++
 pkgs/top-level/all-packages.nix               |   9 +-
 pkgs/top-level/release.nix                    |   2 +-
 3 files changed, 185 insertions(+), 2 deletions(-)
 create mode 100644 pkgs/applications/networking/browsers/firefox/20.0.nix

diff --git a/pkgs/applications/networking/browsers/firefox/20.0.nix b/pkgs/applications/networking/browsers/firefox/20.0.nix
new file mode 100644
index 000000000000..1480a300820c
--- /dev/null
+++ b/pkgs/applications/networking/browsers/firefox/20.0.nix
@@ -0,0 +1,176 @@
+{ stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL
+, libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs
+, freetype, fontconfig, file, alsaLib, nspr, nss, libnotify
+, yasm, mesa, sqlite, unzip, makeWrapper, pysqlite
+
+, # If you want the resulting program to call itself "Firefox" instead
+  # of "Shiretoko" or whatever, enable this option.  However, those
+  # binaries may not be distributed without permission from the
+  # Mozilla Foundation, see
+  # http://www.mozilla.org/foundation/trademarks/.
+  enableOfficialBranding ? false
+}:
+
+assert stdenv.gcc ? libc && stdenv.gcc.libc != null;
+
+rec {
+
+  firefoxVersion = "20.0";
+
+  xulVersion = "20.0"; # this attribute is used by other packages
+
+
+  src = fetchurl {
+    urls = [
+        # It is better to use this url for official releases, to take load off Mozilla's ftp server.
+        "http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${firefoxVersion}/source/firefox-${firefoxVersion}.source.tar.bz2"
+        # Fall back to this url for versions not available at releases.mozilla.org.
+        "ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${firefoxVersion}/source/firefox-${firefoxVersion}.source.tar.bz2"
+    ];
+    sha1 = "6d776c29da0be0d2a50abeb504d63b06b7861218";
+  };
+
+  commonConfigureFlags =
+    [ "--enable-optimize"
+      #"--enable-profiling"
+      "--disable-debug"
+      "--enable-strip"
+      # "--with-system-jpeg" # Too old in nixpkgs
+      "--with-system-zlib"
+      "--with-system-bz2"
+      "--with-system-nspr"
+      "--with-system-nss"
+      # "--with-system-png" # <-- "--with-system-png won't work because the system's libpng doesn't have APNG support"
+      # "--enable-system-cairo" # <-- doesn't build
+      "--enable-system-sqlite"
+      "--disable-crashreporter"
+      "--disable-tests"
+      "--disable-necko-wifi" # maybe we want to enable this at some point
+      "--disable-installer"
+      "--disable-updater"
+    ];
+
+
+  xulrunner = stdenv.mkDerivation rec {
+    name = "xulrunner-${xulVersion}";
+
+    inherit src;
+
+    buildInputs =
+      [ pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2
+        python dbus dbus_glib pango freetype fontconfig xlibs.libXi
+        xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt file
+        alsaLib nspr nss libnotify xlibs.pixman yasm mesa
+        xlibs.libXScrnSaver xlibs.scrnsaverproto pysqlite
+        xlibs.libXext xlibs.xextproto sqlite unzip makeWrapper
+      ];
+
+    configureFlags =
+      [ "--enable-application=xulrunner"
+        "--disable-javaxpcom"
+      ] ++ commonConfigureFlags;
+
+    enableParallelBuilding = true;
+
+    preConfigure =
+      ''
+        export NIX_LDFLAGS="$NIX_LDFLAGS -L$out/lib/xulrunner-${xulVersion}"
+
+        mkdir ../objdir
+        cd ../objdir
+        configureScript=../mozilla-release/configure
+      ''; # */
+
+    #installFlags = "SKIP_GRE_REGISTRATION=1";
+
+    postInstall = ''
+      # Fix run-mozilla.sh search
+      libDir=$(cd $out/lib && ls -d xulrunner-[0-9]*)
+      echo libDir: $libDir
+      test -n "$libDir"
+      cd $out/bin
+      rm xulrunner
+
+      for i in $out/lib/$libDir/*; do
+          file $i;
+          if file $i | grep executable &>/dev/null; then
+              echo -e '#! /bin/sh\nexec "'"$i"'" "$@"' > "$out/bin/$(basename "$i")";
+              chmod a+x "$out/bin/$(basename "$i")";
+          fi;
+      done
+      for i in $out/lib/$libDir/*.so; do
+          patchelf --set-rpath "$(patchelf --print-rpath "$i"):$out/lib/$libDir" $i || true
+      done
+      for i in $out/lib/$libDir/{plugin-container,xulrunner,xulrunner-stub}; do
+          wrapProgram $i --prefix LD_LIBRARY_PATH ':' "$out/lib/$libDir"
+      done
+      rm -f $out/bin/run-mozilla.sh
+    ''; # */
+
+    meta = {
+      description = "Mozilla Firefox XUL runner";
+      homepage = http://www.mozilla.com/en-US/firefox/;
+    };
+
+    passthru = { inherit gtk; version = xulVersion; };
+  };
+
+
+  firefox = stdenv.mkDerivation rec {
+    name = "firefox-${firefoxVersion}";
+
+    inherit src;
+
+    enableParallelBuilding = true;
+
+    buildInputs =
+      [ pkgconfig gtk perl zip libIDL libjpeg zlib cairo bzip2 python
+        dbus dbus_glib pango freetype fontconfig alsaLib nspr nss libnotify
+        xlibs.pixman yasm mesa sqlite file unzip pysqlite
+      ];
+
+    propagatedBuildInputs = [xulrunner];
+
+    configureFlags =
+      [ "--enable-application=browser"
+        "--with-libxul-sdk=${xulrunner}/lib/xulrunner-devel-${xulrunner.version}"
+        "--enable-chrome-format=jar"
+        "--disable-elf-hack"
+      ]
+      ++ commonConfigureFlags
+      ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding";
+
+    makeFlags = [
+      "SYSTEM_LIBXUL=1"
+    ];
+
+    # Hack to work around make's idea of -lbz2 dependency
+    preConfigure =
+      ''
+        find . -name Makefile.in -execdir sed -i '{}' -e '1ivpath %.so ${
+          stdenv.lib.concatStringsSep ":"
+            (map (s : s + "/lib") (buildInputs ++ [stdenv.gcc.libc]))
+        }' ';'
+      '';
+
+    postInstall =
+      ''
+        ln -s ${xulrunner}/lib/xulrunner-${xulrunner.version} $(echo $out/lib/firefox-*)/xulrunner
+        cd "$out/lib/"firefox-*
+        rm firefox
+        echo -e '#!${stdenv.shell}\nexec ${xulrunner}/bin/xulrunner "'"$PWD"'/application.ini" "$@"' > firefox
+        chmod a+x firefox
+      ''; # */
+
+    meta = {
+      description = "Mozilla Firefox - the browser, reloaded";
+      homepage = http://www.mozilla.com/en-US/firefox/;
+      maintainers = [ stdenv.lib.maintainers.eelco ];
+    };
+
+    passthru = {
+      inherit gtk xulrunner nspr;
+      isFirefox3Like = true;
+    };
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 0e6acb7905bf..379c55982fad 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7002,7 +7002,7 @@ let
 
   firefoxWrapper = wrapFirefox { browser = pkgs.firefox; };
 
-  firefoxPkgs = pkgs.firefox19Pkgs;
+  firefoxPkgs = pkgs.firefox20Pkgs;
 
   firefox36Pkgs = callPackage ../applications/networking/browsers/firefox/3.6.nix {
     inherit (gnome) libIDL;
@@ -7023,6 +7023,13 @@ let
 
   firefox19Wrapper = lowPrio (wrapFirefox { browser = firefox19Pkgs.firefox; });
 
+  firefox20Pkgs = callPackage ../applications/networking/browsers/firefox/20.0.nix {
+    inherit (gnome) libIDL;
+    inherit (pythonPackages) pysqlite;
+  };
+
+  firefox20Wrapper = lowPrio (wrapFirefox { browser = firefox20Pkgs.firefox; });
+
   flac = callPackage ../applications/audio/flac { };
 
   flashplayer = callPackage ../applications/networking/browsers/mozilla-plugins/flashplayer-11 {
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index cca7dd5defdc..697c9b5f58d6 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -362,7 +362,7 @@ let
       };
 
       firefox36Pkgs.firefox = linux;
-      firefox19Pkgs.firefox = linux;
+      firefox20Pkgs.firefox = linux;
 
       gnome = {
         gnome_panel = linux;

From 277816eb00a815ffce9471aacaf34f7dcb19b367 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= <cillian.deroiste@gmail.com>
Date: Wed, 10 Apr 2013 14:13:27 +0200
Subject: [PATCH 103/123] lftp: update to 4.4.5

---
 pkgs/tools/networking/lftp/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/tools/networking/lftp/default.nix b/pkgs/tools/networking/lftp/default.nix
index e2d1d8ed62a3..af299674fa99 100644
--- a/pkgs/tools/networking/lftp/default.nix
+++ b/pkgs/tools/networking/lftp/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, gnutls, pkgconfig, readline, zlib, xz }:
 
 stdenv.mkDerivation rec {
-  name = "lftp-4.4.0";
+  name = "lftp-4.4.5";
 
   src = fetchurl {
     url = "ftp://ftp.cs.tu-berlin.de/pub/net/ftp/lftp/${name}.tar.xz";
-    sha256 = "0cg4gabya2sygbwh2b0cdr8v719q9gv929hdb5g1mxgj8npjd4y7";
+    sha256 = "1p3nxsd2an9pdwc3vgwxy8p5nnjrc7mhilikjaddy62cyvxdbpxq";
   };
 
   patches = [ ./no-gets.patch ];

From a679422a7df74f70710b4e89e9a34790bed9932d Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Tue, 9 Apr 2013 12:20:07 +0200
Subject: [PATCH 104/123] haskell-fsnotify: update to version 0.0.7

---
 pkgs/development/libraries/haskell/fsnotify/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/fsnotify/default.nix b/pkgs/development/libraries/haskell/fsnotify/default.nix
index e740f7f819aa..99adb1795c1e 100644
--- a/pkgs/development/libraries/haskell/fsnotify/default.nix
+++ b/pkgs/development/libraries/haskell/fsnotify/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "fsnotify";
-  version = "0.0.6";
-  sha256 = "0ib6ansj3vaq9hxxbsq5jw14w2b61wp4jfahzb3c3x46mdb1bqw5";
+  version = "0.0.7";
+  sha256 = "0yx69kdy67pjkwfrd5r00lhprbf98j9za31f7vaxxf2lbgqlmk9q";
   buildDepends = [ hinotify systemFileio systemFilepath text time ];
   testDepends = [
     Cabal Glob hinotify hspec QuickCheck random systemFileio

From bc4c6f7d6ef33f74bc081c2d4216112661f6e3e2 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Tue, 9 Apr 2013 12:20:08 +0200
Subject: [PATCH 105/123] haskell-multiarg: update to version 0.14.0.0

---
 pkgs/development/libraries/haskell/multiarg/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/multiarg/default.nix b/pkgs/development/libraries/haskell/multiarg/default.nix
index 72936e1873c3..10404e64f218 100644
--- a/pkgs/development/libraries/haskell/multiarg/default.nix
+++ b/pkgs/development/libraries/haskell/multiarg/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "multiarg";
-  version = "0.12.0.2";
-  sha256 = "0f90dsa5ya55lrc0x0ziz01fjvaq85q4f8zsfci1w1rgxa9m7naa";
+  version = "0.14.0.0";
+  sha256 = "05zibar3yqwz2k2ihpby8jdfr4qniz2cz2989sxjf72hqih0g9pb";
   buildDepends = [ explicitException utf8String ];
   meta = {
     homepage = "https://github.com/massysett/multiarg";

From 3b7fe2a126fb6cf4effb9787bf3ca3857de28b5c Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Tue, 9 Apr 2013 12:20:08 +0200
Subject: [PATCH 106/123] haskell-stm-conduit: update to version 1.1.0

---
 pkgs/development/libraries/haskell/stm-conduit/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/stm-conduit/default.nix b/pkgs/development/libraries/haskell/stm-conduit/default.nix
index 5cfc61d064ee..fc9c7c5027a3 100644
--- a/pkgs/development/libraries/haskell/stm-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/stm-conduit/default.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "stm-conduit";
-  version = "1.0.0";
-  sha256 = "1kkx3x3qdqw5jp9vn9kxbxmmb8x0wdbp8jch08azw45pwjh3ga7v";
+  version = "1.1.0";
+  sha256 = "1b5v3vf9izzpw3vaslskhdxqnc1zmag1f3x50dh8r1nl318ndkf7";
   buildDepends = [ conduit resourcet stm stmChans transformers ];
   testDepends = [
     conduit HUnit QuickCheck stm stmChans testFramework

From 05700c23ef01557b963f84bea685e84971371b52 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Tue, 9 Apr 2013 12:20:08 +0200
Subject: [PATCH 107/123] haskell-utility-ht: update to version 0.0.9

---
 pkgs/development/libraries/haskell/utility-ht/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/utility-ht/default.nix b/pkgs/development/libraries/haskell/utility-ht/default.nix
index 49d1af13977e..41c6ca0cffec 100644
--- a/pkgs/development/libraries/haskell/utility-ht/default.nix
+++ b/pkgs/development/libraries/haskell/utility-ht/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "utility-ht";
-  version = "0.0.8";
-  sha256 = "02sm1xj5xa65hpkvl2yk89d9dlg3c2ap8qcviq9zj10asmsbzyd8";
+  version = "0.0.9";
+  sha256 = "1m5mjxwf51jd00swp1f4cimaqaral6827y1sidbq61qkw7l6ss8r";
   testDepends = [ QuickCheck ];
   meta = {
     description = "Various small helper functions for Lists, Maybes, Tuples, Functions";

From e701623a38db0de70c30895ad47682d685888856 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Tue, 9 Apr 2013 12:20:08 +0200
Subject: [PATCH 108/123] haskell-yesod-auth: update to version 1.1.7

---
 pkgs/development/libraries/haskell/yesod-auth/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/yesod-auth/default.nix b/pkgs/development/libraries/haskell/yesod-auth/default.nix
index 61fa603530f6..ba0af8456856 100644
--- a/pkgs/development/libraries/haskell/yesod-auth/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-auth/default.nix
@@ -8,8 +8,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yesod-auth";
-  version = "1.1.6";
-  sha256 = "0g6ik3qvjnpyfbr2fciz53l62q44zi7ipil8v7hy56808n5y6i4i";
+  version = "1.1.7";
+  sha256 = "0vsgpvmsmdzbwj5l862bzm21ld3adkmbwgkffbpjr4yylbvvyvrn";
   buildDepends = [
     aeson authenticate blazeHtml blazeMarkup fileEmbed hamlet
     httpConduit httpTypes liftedBase mimeMail network persistent

From e4526d1b7af74e242f6960ed7dd9a1f781f82aac Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Tue, 9 Apr 2013 12:39:27 +0200
Subject: [PATCH 109/123] haskell-asn1-types: add version 0.1.0

---
 .../libraries/haskell/asn1-types/default.nix       | 14 ++++++++++++++
 pkgs/top-level/haskell-packages.nix                |  2 ++
 2 files changed, 16 insertions(+)
 create mode 100644 pkgs/development/libraries/haskell/asn1-types/default.nix

diff --git a/pkgs/development/libraries/haskell/asn1-types/default.nix b/pkgs/development/libraries/haskell/asn1-types/default.nix
new file mode 100644
index 000000000000..1475de892742
--- /dev/null
+++ b/pkgs/development/libraries/haskell/asn1-types/default.nix
@@ -0,0 +1,14 @@
+{ cabal, time }:
+
+cabal.mkDerivation (self: {
+  pname = "asn1-types";
+  version = "0.1.0";
+  sha256 = "1520jq65fzlpi4jfrqwry3dg4lajdk6pssb7cqbrmplda0zi2d12";
+  buildDepends = [ time ];
+  meta = {
+    homepage = "http://github.com/vincenthz/hs-asn1-types";
+    description = "ASN.1 types";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 8933176ac969..378a60fba48e 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -476,6 +476,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   asn1Data = callPackage ../development/libraries/haskell/asn1-data {};
 
+  asn1Types = callPackage ../development/libraries/haskell/asn1-types {};
+
   AspectAG = callPackage ../development/libraries/haskell/AspectAG {};
 
   async_2_0_1_3 = callPackage ../development/libraries/haskell/async/2.0.1.3.nix {};

From a40e4970c1fee54bad76a4183159632e96e78e68 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Wed, 10 Apr 2013 08:34:44 +0200
Subject: [PATCH 110/123] haskell-fsnotify: update to version 0.0.7.1

---
 pkgs/development/libraries/haskell/fsnotify/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/fsnotify/default.nix b/pkgs/development/libraries/haskell/fsnotify/default.nix
index 99adb1795c1e..4fb3d9fded45 100644
--- a/pkgs/development/libraries/haskell/fsnotify/default.nix
+++ b/pkgs/development/libraries/haskell/fsnotify/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "fsnotify";
-  version = "0.0.7";
-  sha256 = "0yx69kdy67pjkwfrd5r00lhprbf98j9za31f7vaxxf2lbgqlmk9q";
+  version = "0.0.7.1";
+  sha256 = "1hrnhp22s8pcj525m2vi9b7k3pp5qrv44qhqh6c8n0bgilqwg4yd";
   buildDepends = [ hinotify systemFileio systemFilepath text time ];
   testDepends = [
     Cabal Glob hinotify hspec QuickCheck random systemFileio

From 11095b618366c68d3fbde6ce208b823e1a07fe58 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Wed, 10 Apr 2013 08:34:44 +0200
Subject: [PATCH 111/123] haskell-hspec-meta: update to version 1.5.3

---
 pkgs/development/libraries/haskell/hspec-meta/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/haskell/hspec-meta/default.nix b/pkgs/development/libraries/haskell/hspec-meta/default.nix
index 706bba15def7..b17c5ecc0701 100644
--- a/pkgs/development/libraries/haskell/hspec-meta/default.nix
+++ b/pkgs/development/libraries/haskell/hspec-meta/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "hspec-meta";
-  version = "1.5.2";
-  sha256 = "1kzlppbp8ralkpi89qrfdm5yrr72b9iq4nrvmblyjrb67h9412q0";
+  version = "1.5.3";
+  sha256 = "13yzk3qgqbb5jlrvy1mdq5782jzjllhnfi6ylrv8zix192y8v1mh";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [

From d8f98d1a8542bade5c342f0029ad6c58e65d4de2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Wed, 10 Apr 2013 15:12:02 +0200
Subject: [PATCH 112/123] Adding avxsynth.

To add it, I also add ffms and log4cpp.
---
 pkgs/applications/video/avxsynth/default.nix  | 26 +++++++++++++++++++
 pkgs/development/libraries/ffms/default.nix   | 20 ++++++++++++++
 .../development/libraries/log4cpp/default.nix | 16 ++++++++++++
 pkgs/top-level/all-packages.nix               |  6 +++++
 4 files changed, 68 insertions(+)
 create mode 100644 pkgs/applications/video/avxsynth/default.nix
 create mode 100644 pkgs/development/libraries/ffms/default.nix
 create mode 100644 pkgs/development/libraries/log4cpp/default.nix

diff --git a/pkgs/applications/video/avxsynth/default.nix b/pkgs/applications/video/avxsynth/default.nix
new file mode 100644
index 000000000000..70dcad49c978
--- /dev/null
+++ b/pkgs/applications/video/avxsynth/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, ffmpeg, autoconf, automake, libtool, pkgconfig, log4cpp
+, pango, cairo, python, libjpeg, ffms
+, enableQt ? true, qt4}:
+
+stdenv.mkDerivation rec {
+  name = "avxsynth-4.0-e153e672bf";
+
+  src = fetchurl {
+    url = https://github.com/avxsynth/avxsynth/tarball/e153e672bf;
+    name = "${name}.tar.gz";
+    sha256 = "16l2ld8k1nfsms6jd9d9r4l247xxbncsak66w87icr20yzyhs14s";
+  };
+
+  buildInputs = [ ffmpeg autoconf automake libtool pkgconfig log4cpp pango cairo python
+    libjpeg ffms ]
+    ++ stdenv.lib.optional enableQt qt4;
+
+  preConfigure = "autoreconf -vfi";
+
+  meta = {
+    homepage = https://github.com/avxsynth/avxsynth/wiki;
+    license = "GPLv2+";
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}
diff --git a/pkgs/development/libraries/ffms/default.nix b/pkgs/development/libraries/ffms/default.nix
new file mode 100644
index 000000000000..38371ec276d1
--- /dev/null
+++ b/pkgs/development/libraries/ffms/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, zlib, ffmpeg, pkgconfig }:
+
+stdenv.mkDerivation {
+  name = "ffms-2.17";
+  
+  src = fetchurl {
+    url = http://ffmpegsource.googlecode.com/files/ffms-2.17-src.tar.bz2;
+    sha256 = "0gb42hrwnldz3zjlk4llx85dvxysxlfrdf5yy3fay8r8k1vpl7wr";
+  };
+
+  NIX_CFLAGS_COMPILE = "-fPIC";
+
+  buildInputs = [ zlib ffmpeg pkgconfig ];
+
+  meta = {
+    homepage = http://code.google.com/p/ffmpegsource/;
+    description = "Libav/ffmpeg based source library for easy frame accurate access";
+    license = "MIT";
+  };
+}
diff --git a/pkgs/development/libraries/log4cpp/default.nix b/pkgs/development/libraries/log4cpp/default.nix
new file mode 100644
index 000000000000..2b2553075580
--- /dev/null
+++ b/pkgs/development/libraries/log4cpp/default.nix
@@ -0,0 +1,16 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "log4cpp-1.1";
+  
+  src = fetchurl {
+    url = "mirror://sourceforge/log4cpp/${name}.tar.gz";
+    sha256 = "1d386ws9v6f9bxma4dh5m6nzr4k2rv5q96xl5bp5synlmghd2ny2";
+  };
+
+  meta = {
+    homepage = http://log4cpp.sourceforge.net/;
+    description = "A logging framework for C++ patterned after Apache log4j";
+    license = "LGPLv2.1+";
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 379c55982fad..3b385ffac2d0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3657,6 +3657,8 @@ let
     vpxSupport = !stdenv.isMips;
   };
 
+  ffms = callPackage ../development/libraries/ffms { };
+
   fftw = callPackage ../development/libraries/fftw {
     singlePrecision = false;
   };
@@ -4576,6 +4578,8 @@ let
    guile = guile_1_8;
   };
 
+  log4cpp = callPackage ../development/libraries/log4cpp { };
+
   log4cxx = callPackage ../development/libraries/log4cxx { };
 
   log4cplus = callPackage ../development/libraries/log4cplus { };
@@ -6593,6 +6597,8 @@ let
     eigen = eigen2;
   };
 
+  avxsynth = callPackage ../applications/video/avxsynth { };
+
   awesome = callPackage ../applications/window-managers/awesome {
     lua = lua5;
     cairo = cairo.override { xcbSupport = true; };

From 91a94932d91a4452c31445c7351960a4b61b7f1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Wed, 10 Apr 2013 15:54:12 +0200
Subject: [PATCH 113/123] coreutils: fixing cross-build

coreutils can't generate the man pages cross-building. I do a trick
to get them from a non-cross-built coreutils.
---
 pkgs/tools/misc/coreutils/default.nix | 115 +++++++++++++++-----------
 1 file changed, 66 insertions(+), 49 deletions(-)

diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index 065d237a0731..f55fbc31925a 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -6,57 +6,74 @@
 assert aclSupport -> acl != null;
 assert selinuxSupport -> libselinux != null && libsepol != null;
 
-stdenv.mkDerivation rec {
-  name = "coreutils-8.21";
+let
+  self = stdenv.mkDerivation rec {
+    name = "coreutils-8.21";
 
-  src = fetchurl {
-    url = "mirror://gnu/coreutils/${name}.tar.xz";
-    sha256 = "064f512185iysqqcvhnhaf3bfmzrvcgs7n405qsyp99zmfyl9amd";
-  };
+    src = fetchurl {
+      url = "mirror://gnu/coreutils/${name}.tar.xz";
+      sha256 = "064f512185iysqqcvhnhaf3bfmzrvcgs7n405qsyp99zmfyl9amd";
+    };
 
-  nativeBuildInputs = [ perl ];
-  buildInputs = [ gmp ]
-    ++ stdenv.lib.optional aclSupport acl
-    ++ stdenv.lib.optional selinuxSupport libselinux
-    ++ stdenv.lib.optional selinuxSupport libsepol;
-
-  crossAttrs = {
+    nativeBuildInputs = [ perl ];
     buildInputs = [ gmp ]
-      ++ stdenv.lib.optional aclSupport acl.crossDrv
-      ++ stdenv.lib.optional selinuxSupport libselinux.crossDrv
-      ++ stdenv.lib.optional selinuxSupport libsepol.crossDrv
-      ++ stdenv.lib.optional (stdenv.gccCross.libc ? libiconv)
-        stdenv.gccCross.libc.libiconv.crossDrv;
+      ++ stdenv.lib.optional aclSupport acl
+      ++ stdenv.lib.optional selinuxSupport libselinux
+      ++ stdenv.lib.optional selinuxSupport libsepol;
 
-    # Needed for fstatfs()
-    # I don't know why it is not properly detected cross building with glibc.
-    configureFlags = [ "fu_cv_sys_stat_statfs2_bsize=yes" ];
-    doCheck = false;
+    crossAttrs = {
+      buildInputs = [ gmp ]
+        ++ stdenv.lib.optional aclSupport acl.crossDrv
+        ++ stdenv.lib.optional selinuxSupport libselinux.crossDrv
+        ++ stdenv.lib.optional selinuxSupport libsepol.crossDrv
+        ++ stdenv.lib.optional (stdenv.gccCross.libc ? libiconv)
+          stdenv.gccCross.libc.libiconv.crossDrv;
+
+      buildPhase = ''
+        make || (
+          pushd man
+          for a in *.x; do
+            touch `basename $a .x`.1
+          done
+          popd; make ) 
+      '';
+
+      postInstall = ''
+        rm $out/share/man/man1/*
+        cp ${self}/share/man/man1/* $out/share/man/man1
+      '';
+
+      # Needed for fstatfs()
+      # I don't know why it is not properly detected cross building with glibc.
+      configureFlags = [ "fu_cv_sys_stat_statfs2_bsize=yes" ];
+      doCheck = false;
+    };
+
+    # The tests are known broken on Cygwin
+    # (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025),
+    # Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351),
+    # and {Open,Free}BSD.
+    doCheck = stdenv ? glibc;
+
+    enableParallelBuilding = true;
+
+    NIX_LDFLAGS = stdenv.lib.optionalString selinuxSupport "-lsepol";
+
+    meta = {
+      homepage = http://www.gnu.org/software/coreutils/;
+      description = "The basic file, shell and text manipulation utilities of the GNU operating system";
+
+      longDescription = ''
+        The GNU Core Utilities are the basic file, shell and text
+        manipulation utilities of the GNU operating system.  These are
+        the core utilities which are expected to exist on every
+        operating system.
+      '';
+
+      license = "GPLv3+";
+
+      maintainers = [ stdenv.lib.maintainers.ludo ];
+    };
   };
-
-  # The tests are known broken on Cygwin
-  # (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025),
-  # Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351),
-  # and {Open,Free}BSD.
-  doCheck = stdenv ? glibc;
-
-  enableParallelBuilding = true;
-
-  NIX_LDFLAGS = stdenv.lib.optionalString selinuxSupport "-lsepol";
-
-  meta = {
-    homepage = http://www.gnu.org/software/coreutils/;
-    description = "The basic file, shell and text manipulation utilities of the GNU operating system";
-
-    longDescription = ''
-      The GNU Core Utilities are the basic file, shell and text
-      manipulation utilities of the GNU operating system.  These are
-      the core utilities which are expected to exist on every
-      operating system.
-    '';
-
-    license = "GPLv3+";
-
-    maintainers = [ stdenv.lib.maintainers.ludo ];
-  };
-}
+in
+  self

From 735aae5b7a070973dd329748975d424f0ccb6cb6 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Wed, 10 Apr 2013 17:39:03 +0200
Subject: [PATCH 114/123] bash-completion: update to version 2.1

---
 pkgs/shells/bash-completion/default.nix | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/pkgs/shells/bash-completion/default.nix b/pkgs/shells/bash-completion/default.nix
index 217489f4dc01..a189ed29d8cb 100644
--- a/pkgs/shells/bash-completion/default.nix
+++ b/pkgs/shells/bash-completion/default.nix
@@ -1,18 +1,13 @@
-{ stdenv, fetchgit, autoconf, automake }:
+{ stdenv, fetchurl }:
 
-stdenv.mkDerivation {
-  name = "bash-completion-2.0-95-gd08b9f2";
+stdenv.mkDerivation rec {
+  name = "bash-completion-2.1";
 
-  src = fetchgit {
-    url = "http://anonscm.debian.org/git/bash-completion/bash-completion.git";
-    rev = "d08b9f233559b3dced20050ba312b08fe0de53b4";
-    sha256 = "0jybaib2bmpk5qd80y1l6wmfcd0b95cmf1l3hcb0ckpj0pjff0bn";
+  src = fetchurl {
+    url = "http://bash-completion.alioth.debian.org/files/${name}.tar.bz2";
+    sha256 = "0kxf8s5bw7y50x0ksb77d3kv0dwadixhybl818w27y6mlw26hq1b";
   };
 
-  buildInputs = [ autoconf automake ];
-
-  preConfigure = "autoreconf -i";
-
   doCheck = true;
 
   meta = {

From da52372d49806fa53a1b29a1498fa5ad98a2ea56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Wed, 10 Apr 2013 16:49:18 +0200
Subject: [PATCH 115/123] podofo: fixing cross-building

---
 pkgs/development/libraries/podofo/default.nix | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pkgs/development/libraries/podofo/default.nix b/pkgs/development/libraries/podofo/default.nix
index 243a792f6b9c..d6b604367fb4 100644
--- a/pkgs/development/libraries/podofo/default.nix
+++ b/pkgs/development/libraries/podofo/default.nix
@@ -10,6 +10,13 @@ stdenv.mkDerivation rec {
   propagatedBuildInputs = [ zlib freetype libjpeg libtiff fontconfig openssl libpng ];
   nativeBuildInputs = [ cmake ];
   buildInputs = [ lua5 stdenv.gcc.libc ];
+
+  crossAttrs = {
+    propagatedBuildInputs = [ zlib.crossDrv freetype.crossDrv libjpeg.crossDrv
+      libtiff.crossDrv fontconfig.crossDrv openssl.crossDrv libpng.crossDrv
+      lua5.crossDrv stdenv.gccCross.libc ];
+  };
+
   cmakeFlags = "-DPODOFO_BUILD_SHARED=ON -DPODOFO_BUILD_STATIC=OFF";
 
   meta = {

From 57637d02da71166fe9f606343f87ea29ad157525 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Wed, 10 Apr 2013 16:49:31 +0200
Subject: [PATCH 116/123] offrss: fixing crossbuilding, disabling podofo in
 that case

---
 pkgs/applications/networking/offrss/default.nix | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pkgs/applications/networking/offrss/default.nix b/pkgs/applications/networking/offrss/default.nix
index 5166e8795d57..fd1406127ad8 100644
--- a/pkgs/applications/networking/offrss/default.nix
+++ b/pkgs/applications/networking/offrss/default.nix
@@ -9,6 +9,10 @@ stdenv.mkDerivation {
   '';
 
   crossAttrs = {
+    propagatedBuildInputs = [ curl.crossDrv libmrss.crossDrv ];
+    preConfigure = ''
+      sed 's/^PDF/#PDF/' -i Makefile
+    '';
     makeFlags = "CC=${stdenv.cross.config}-gcc";
   };
 

From 9ce7b293935fdd24d6b7161f07dbad550efaebcd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Wed, 10 Apr 2013 17:48:00 +0200
Subject: [PATCH 117/123] gcc-wrapper: avoiding one glibc rebuild, for
 gcc.crossDrv

In fact 'glibc.crossDrv' didn't work. I'm not sure it should work; I think it
isn't required for much.
---
 pkgs/build-support/gcc-wrapper/default.nix     | 2 +-
 pkgs/development/compilers/gcc/4.6/default.nix | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix
index 87617621e64c..992c0f9af371 100644
--- a/pkgs/build-support/gcc-wrapper/default.nix
+++ b/pkgs/build-support/gcc-wrapper/default.nix
@@ -57,7 +57,7 @@ stdenv.mkDerivation {
 
   crossAttrs = {
     shell = shell.crossDrv + shell.crossDrv.shellPath;
-    libc = libc.crossDrv;
+    libc = stdenv.gccCross.libc;
     coreutils = coreutils.crossDrv;
     binutils = binutils.crossDrv;
     gcc = gcc.crossDrv;
diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix
index d95e161ba238..6713dd12b3cd 100644
--- a/pkgs/development/compilers/gcc/4.6/default.nix
+++ b/pkgs/development/compilers/gcc/4.6/default.nix
@@ -333,6 +333,7 @@ stdenv.mkDerivation ({
 
   crossAttrs = {
     patches = patches ++ [ ./hurd-sigrtmin.patch ];
+    postPatch = "";
     AR = "${stdenv.cross.config}-ar";
     LD = "${stdenv.cross.config}-ld";
     CC = "${stdenv.cross.config}-gcc";

From 744a215a45169c5a023fe4e32c7f41a02439dd46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
Date: Wed, 10 Apr 2013 18:26:28 +0200
Subject: [PATCH 118/123] qemu: update to 1.4.0

---
 pkgs/applications/virtualization/qemu/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix
index fabe3fed47df..b1165b3535b9 100644
--- a/pkgs/applications/virtualization/qemu/default.nix
+++ b/pkgs/applications/virtualization/qemu/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, python, zlib, pkgconfig, glib, SDL, ncurses, perl, pixman }:
 
 stdenv.mkDerivation rec {
-  name = "qemu-1.3.1";
+  name = "qemu-1.4.0";
 
   src = fetchurl {
     url = "http://wiki.qemu.org/download/${name}.tar.bz2";
-    sha256 = "1bqfrb5dlsxm8gxhkksz8qzi5fhj3xqhxyfwbqcphhcv1kpyfwip";
+    sha256 = "1a7d11vjs1p6i1ck2ff9annmkhpkbjl73hl9i1cbg3s0fznrfqh6";
   };
 
   buildInputs = [ python zlib pkgconfig glib SDL ncurses perl pixman ];

From 7f8ecc65ac5d1950bf23147c5096b104c7c13992 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= <cillian.deroiste@gmail.com>
Date: Thu, 11 Apr 2013 10:53:48 +0200
Subject: [PATCH 119/123] hdf5: download URL no longer available for 1.8.5,
 upgrade to 1.8.10

---
 pkgs/tools/misc/hdf5/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix
index 0df4e0d7d4da..49320746cab5 100644
--- a/pkgs/tools/misc/hdf5/default.nix
+++ b/pkgs/tools/misc/hdf5/default.nix
@@ -5,8 +5,8 @@
 stdenv.mkDerivation {
   name = "hdf5";
   src = fetchurl {
-    url = http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.5-patch1.tar.gz ;
-    sha256 = "919bb52a08fc5560c49fdc5ebd693b10b1e03eebbf44ad2e142c2e6cfd81f2b0";  			
+    url = http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.10-patch1.tar.gz;
+    sha256 = "08ad32fhnci6rdfn6mn3w9v1wcaxdcd326n3ljwkcq4dzhkh28qz";  			
   };
   buildInputs = [] ;
   

From 70b36815fcf9ddd986ea79441b0fe622e68546c1 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Thu, 11 Apr 2013 16:47:08 +0200
Subject: [PATCH 120/123] php: Update to 5.3.24

CVE-2013-1635, CVE-2013-1643, CVE-2013-1824.
---
 pkgs/development/interpreters/php/5.3.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/interpreters/php/5.3.nix b/pkgs/development/interpreters/php/5.3.nix
index 683ba73f8b0d..138a0ec02921 100644
--- a/pkgs/development/interpreters/php/5.3.nix
+++ b/pkgs/development/interpreters/php/5.3.nix
@@ -9,7 +9,7 @@ in
 
 composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in {
 
-  version = "5.3.18";
+  version = "5.3.24";
 
   name = "php-${version}";
 
@@ -196,7 +196,7 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
 
   src = fetchurl {
     url = "http://nl.php.net/get/php-${version}.tar.bz2/from/this/mirror";
-    sha256 = "0bqsdwil13m1r449c4rhrc8cmx2a09k8h2g107qqxfwanzndwrgh";
+    sha256 = "00sphz1y6bjb2qshbcbadh5f2xvhfy82rfdc62qjfn6337gwlfzw";
     name = "php-${version}.tar.bz2";
   };
 

From 106584d5232585c40eb268125faf87f5a62625a8 Mon Sep 17 00:00:00 2001
From: Shea Levy <shea@shealevy.com>
Date: Thu, 11 Apr 2013 13:16:59 -0400
Subject: [PATCH 121/123] DBD-SQLite: Update to 1.37

Signed-off-by: Shea Levy <shea@shealevy.com>
---
 pkgs/development/perl-modules/DBD-SQLite/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/perl-modules/DBD-SQLite/default.nix b/pkgs/development/perl-modules/DBD-SQLite/default.nix
index 5afa889f5433..332a3bd0e8f6 100644
--- a/pkgs/development/perl-modules/DBD-SQLite/default.nix
+++ b/pkgs/development/perl-modules/DBD-SQLite/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, buildPerlPackage, DBI, sqlite }:
 
 buildPerlPackage rec {
-  name = "DBD-SQLite-1.35";
+  name = "DBD-SQLite-1.37";
 
   src = fetchurl {
     url = "mirror://cpan/authors/id/A/AD/ADAMK/${name}.tar.gz";
-    sha256 = "0zdwnj0jmkaqb2grkh451g1jc8nsdy4sf6lhn8xd0my0a3pd227z";
+    sha256 = "0197kvlziaj2wfdbzlhdlqmzvb29fmfyy6y2isbbwlg0b0f7ccd1";
   };
 
   propagatedBuildInputs = [ DBI ];

From 1c2565a8ef75b6513e361a4b974f2b64070f5b02 Mon Sep 17 00:00:00 2001
From: Shea Levy <shea@shealevy.com>
Date: Thu, 11 Apr 2013 14:42:32 -0400
Subject: [PATCH 122/123] Add hipchat messaging client

Signed-off-by: Shea Levy <shea@shealevy.com>
---
 .../instant-messengers/hipchat/default.nix    | 63 +++++++++++++++++++
 pkgs/top-level/all-packages.nix               |  2 +
 2 files changed, 65 insertions(+)
 create mode 100644 pkgs/applications/networking/instant-messengers/hipchat/default.nix

diff --git a/pkgs/applications/networking/instant-messengers/hipchat/default.nix b/pkgs/applications/networking/instant-messengers/hipchat/default.nix
new file mode 100644
index 000000000000..b202a0f09db8
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/hipchat/default.nix
@@ -0,0 +1,63 @@
+{ stdenv
+, fetchurl
+, libtool
+, libXext
+, libSM
+, libICE
+, libX11
+, libXft
+, libXau
+, libXdmcp
+, libXrender
+, freetype
+, fontconfig
+, openssl
+}:
+
+let
+  version = "1.94.407";
+
+  rpath = stdenv.lib.makeSearchPath "lib" [
+    stdenv.glibc
+    stdenv.gcc.gcc
+    libtool
+    libXext
+    libSM
+    libICE
+    libX11
+    libXft
+    libXau
+    libXdmcp
+    libXrender
+    freetype
+    fontconfig
+    openssl
+  ];
+
+  src = fetchurl {
+    url = "http://downloads.hipchat.com/linux/arch/hipchat-${version}-i686.pkg.tar.xz";
+    sha256 = "0kyjpa2ir066zqkvs1zmnx6kvl8v4jfl8h7bw110cgigwmiplk7k";
+  };
+in stdenv.mkDerivation {
+  name = "hipchat-${version}";
+
+  buildCommand = ''
+    tar xf ${src}
+    mkdir -p $out
+    mv opt/HipChat/lib $out
+    mv opt/HipChat/bin $out
+    mv usr/share $out
+    patchShebangs $out/bin
+    for file in $(find $out/lib -type f); do
+        patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $file || true
+        patchelf --set-rpath ${rpath}:$out/lib $file || true
+    done
+  '';
+
+  meta = {
+    description = "HipChat Desktop Client";
+    homepage = http://www.hipchat.com;
+    license = stdenv.lib.licenses.proprietary;
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 3b385ffac2d0..eee598dfeec9 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7218,6 +7218,8 @@ let
 
   hexedit = callPackage ../applications/editors/hexedit { };
 
+  hipchat = callPackage_i686 ../applications/networking/instant-messengers/hipchat { };
+
   homebank = callPackage ../applications/office/homebank { };
 
   htmldoc = callPackage ../applications/misc/htmldoc {

From 6640000cb7148ba39bbdcca8e0cd7f5c224bce57 Mon Sep 17 00:00:00 2001
From: Shea Levy <shea@shealevy.com>
Date: Thu, 11 Apr 2013 17:02:19 -0400
Subject: [PATCH 123/123] overrideDerivation: Simplify

Since we're just calling derivation again, drvAttrs is exactly what we
want to pass, and we can get rid of the complicated "drop" logic. As a
bonus, this actually makes it correct, since before "drop" removed the
attribute named passthru but not actually the attributes added to the
top-level attrset via passthru.

Signed-off-by: Shea Levy <shea@shealevy.com>
---
 pkgs/lib/customisation.nix | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/pkgs/lib/customisation.nix b/pkgs/lib/customisation.nix
index a35b44e9f6ee..50816f99ec60 100644
--- a/pkgs/lib/customisation.nix
+++ b/pkgs/lib/customisation.nix
@@ -33,17 +33,14 @@ rec {
      
   overrideDerivation = drv: f:
     let
-      # Filter out special attributes.
-      drop = [ "meta" "passthru" "outPath" "drvPath" "crossDrv" "nativeDrv" "type" "override" "deepOverride" "origArgs" "drvAttrs" "outputName" "all" "out" ]
-              # also drop functions such as .merge .override etc
-             ++ lib.filter (n: isFunction (getAttr n drv)) (attrNames drv);
-      attrs = removeAttrs drv drop;
-      newDrv = derivation (attrs // (f drv));
+      newDrv = derivation (drv.drvAttrs // (f drv));
     in newDrv //
-      { meta = if drv ? meta then drv.meta else {};
+      { meta = drv.meta or {};
         passthru = if drv ? passthru then drv.passthru else {};
       }
       //
+      (drv.passthru or {})
+      //
       (if (drv ? crossDrv && drv ? nativeDrv)
        then {
          crossDrv = overrideDerivation drv.crossDrv f;