summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorDanny Wilson <danny@onlinetouch.nl>2013-03-17 13:22:24 +0100
committerDanny Wilson <danny@onlinetouch.nl>2013-03-17 13:22:24 +0100
commitd007a78ccbcbe2148a9bf57aa64f9daac6ca0248 (patch)
tree7a250e474e31f2d266df3b6b1fc8499541e8ea64 /pkgs/development/libraries
parent242b4d23a71b9d2193d590da31448c26b15ba534 (diff)
parent3c472d53aaa1bc11e3f927364cd0cdde0df0f50f (diff)
downloadnixpkgs-d007a78ccbcbe2148a9bf57aa64f9daac6ca0248.tar
nixpkgs-d007a78ccbcbe2148a9bf57aa64f9daac6ca0248.tar.gz
nixpkgs-d007a78ccbcbe2148a9bf57aa64f9daac6ca0248.tar.bz2
nixpkgs-d007a78ccbcbe2148a9bf57aa64f9daac6ca0248.tar.lz
nixpkgs-d007a78ccbcbe2148a9bf57aa64f9daac6ca0248.tar.xz
nixpkgs-d007a78ccbcbe2148a9bf57aa64f9daac6ca0248.tar.zst
nixpkgs-d007a78ccbcbe2148a9bf57aa64f9daac6ca0248.zip
Merge remote-tracking branch 'origin/stdenv-updates' into illumos
Conflicts:
	pkgs/development/libraries/gmp/5.1.1.nix
	pkgs/development/libraries/mpc/default.nix
	pkgs/development/libraries/mpfr/default.nix
	pkgs/development/libraries/ppl/default.nix
	pkgs/tools/misc/coreutils/default.nix
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/apache-activemq/default.nix31
-rw-r--r--pkgs/development/libraries/boost/1.53.nix2
-rw-r--r--pkgs/development/libraries/bullet/default.nix19
-rw-r--r--pkgs/development/libraries/cairo/1.12.2.nix85
-rw-r--r--pkgs/development/libraries/cairo/default.nix3
-rw-r--r--pkgs/development/libraries/cyrus-sasl/default.nix15
-rw-r--r--pkgs/development/libraries/cyrus-sasl/missing-size_t.patch13
-rw-r--r--pkgs/development/libraries/ffmpeg/1.0.nix85
-rw-r--r--pkgs/development/libraries/ffmpeg/1.1.nix2
-rw-r--r--pkgs/development/libraries/gamin/deadlock.patch68
-rw-r--r--pkgs/development/libraries/gamin/default.nix2
-rw-r--r--pkgs/development/libraries/glibc/2.17/common.nix9
-rw-r--r--pkgs/development/libraries/glibc/2.17/glibc-rh739743.patch55
-rw-r--r--pkgs/development/libraries/glibc/2.17/info.nix2
-rw-r--r--pkgs/development/libraries/gmp/5.0.5.nix7
-rw-r--r--pkgs/development/libraries/gsl/default.nix4
-rw-r--r--pkgs/development/libraries/gsl/disable-fma.patch32
-rw-r--r--pkgs/development/libraries/haskell/DAV/default.nix5
-rw-r--r--pkgs/development/libraries/haskell/NumInstances/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/OpenAL/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/QuickCheck/2.6.nix15
-rw-r--r--pkgs/development/libraries/haskell/Safe/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/basic-prelude/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/bifunctors/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/binary/default.nix9
-rw-r--r--pkgs/development/libraries/haskell/blaze-html/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/blaze-markup/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/citeproc-hs/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/classy-prelude/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/cmdargs/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/conduit/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/constraints/default.nix15
-rw-r--r--pkgs/development/libraries/haskell/cuda/default.nix8
-rw-r--r--pkgs/development/libraries/haskell/data-default/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/diagrams/core.nix5
-rw-r--r--pkgs/development/libraries/haskell/digestive-functors-heist/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/distributive/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/doctest/default.nix1
-rw-r--r--pkgs/development/libraries/haskell/flexible-defaults/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/ghc-mod/default.nix14
-rw-r--r--pkgs/development/libraries/haskell/ghc-vis/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/github/default.nix25
-rw-r--r--pkgs/development/libraries/haskell/gitit/default.nix5
-rw-r--r--pkgs/development/libraries/haskell/hakyll/default.nix9
-rw-r--r--pkgs/development/libraries/haskell/happstack/happstack-server.nix4
-rw-r--r--pkgs/development/libraries/haskell/haskell-src-meta/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/heist/default.nix5
-rw-r--r--pkgs/development/libraries/haskell/highlighting-kate/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/hint/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/hp2any-core/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/hp2any-graph/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/http-conduit/default.nix34
-rw-r--r--pkgs/development/libraries/haskell/iproute/default.nix8
-rw-r--r--pkgs/development/libraries/haskell/liblastfm/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/monad-control/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/monad-logger/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/multiarg/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/numbers/default.nix7
-rw-r--r--pkgs/development/libraries/haskell/pandoc/default.nix23
-rw-r--r--pkgs/development/libraries/haskell/persistent-sqlite/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/persistent-template/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/publicsuffixlist/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/punycode/default.nix1
-rw-r--r--pkgs/development/libraries/haskell/resourcet/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/shake/default.nix21
-rw-r--r--pkgs/development/libraries/haskell/shakespeare-js/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/shelly/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/smallcheck/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/stylish-haskell/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/syb/0.4.0.nix15
-rw-r--r--pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix1
-rw-r--r--pkgs/development/libraries/haskell/testpack/default.nix5
-rw-r--r--pkgs/development/libraries/haskell/th-extras/default.nix6
-rw-r--r--pkgs/development/libraries/haskell/threads/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/time-compat/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/uu-parsinglib/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/uulib/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/void/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/wai-extra/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/wl-pprint-extras/default.nix14
-rw-r--r--pkgs/development/libraries/haskell/wl-pprint-terminfo/default.nix18
-rw-r--r--pkgs/development/libraries/haskell/wl-pprint/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/xdot/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/xml-conduit/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/yaml/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/yesod-json/default.nix11
-rw-r--r--pkgs/development/libraries/haskell/yesod-test/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/yesod/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/yst/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/zip-archive/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/zlib/0.5.4.1.nix14
-rw-r--r--pkgs/development/libraries/jbig2dec/default.nix12
-rw-r--r--pkgs/development/libraries/libchop/default.nix3
-rw-r--r--pkgs/development/libraries/libchop/gets-undeclared.patch71
-rw-r--r--pkgs/development/libraries/libee/default.nix16
-rw-r--r--pkgs/development/libraries/libestr/default.nix8
-rw-r--r--pkgs/development/libraries/libmcrypt/default.nix9
-rw-r--r--pkgs/development/libraries/libnotify/default.nix31
-rw-r--r--pkgs/development/libraries/librdf/default.nix28
-rw-r--r--pkgs/development/libraries/librdf/raptor2.nix6
-rw-r--r--pkgs/development/libraries/librdf/rasqal.nix8
-rw-r--r--pkgs/development/libraries/librdf/redland.nix4
-rw-r--r--pkgs/development/libraries/libsoup/default.nix16
-rw-r--r--pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch143
-rw-r--r--pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch50
-rw-r--r--pkgs/development/libraries/libunique/1.1.6-fix-test.patch26
-rw-r--r--pkgs/development/libraries/libunique/1.1.6-include-terminator.patch37
-rw-r--r--pkgs/development/libraries/libunique/default.nix31
-rw-r--r--pkgs/development/libraries/mpc/default.nix2
-rw-r--r--pkgs/development/libraries/nss/default.nix24
-rw-r--r--pkgs/development/libraries/nss/nss-3.14.1-gentoo-fixups-r1.patch (renamed from pkgs/development/libraries/nss/nss-3.12.5-gentoo-fixups.diff)62
-rw-r--r--pkgs/development/libraries/nss/sync-up-with-upstream-softokn-changes.patch406
-rw-r--r--pkgs/development/libraries/opencascade/oce.nix26
-rw-r--r--pkgs/development/libraries/openmpi/default.nix11
-rw-r--r--pkgs/development/libraries/pango/1.30.x.nix4
-rw-r--r--pkgs/development/libraries/ppl/default.nix2
-rw-r--r--pkgs/development/libraries/sodium/default.nix28
-rw-r--r--pkgs/development/libraries/sodium/default.upstream1
-rw-r--r--pkgs/development/libraries/sword/default.nix2
-rw-r--r--pkgs/development/libraries/sword/gcc47.patch35
-rw-r--r--pkgs/development/libraries/tinyxml/2.6.2.nix4
-rw-r--r--pkgs/development/libraries/ustr/default.nix5
-rw-r--r--pkgs/development/libraries/ustr/va_args.patch23
-rw-r--r--pkgs/development/libraries/webkit/default.nix45
-rw-r--r--pkgs/development/libraries/webkit/gtk2.nix53
-rw-r--r--pkgs/development/libraries/webkit/src-for-gtk2.nix11
127 files changed, 1769 insertions, 423 deletions
diff --git a/pkgs/development/libraries/apache-activemq/default.nix b/pkgs/development/libraries/apache-activemq/default.nix
new file mode 100644
index 00000000000..90d0dafdd95
--- /dev/null
+++ b/pkgs/development/libraries/apache-activemq/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "apache-activemq-${version}";
+  version = "5.8.0";
+
+  src = fetchurl {
+    url = "mirror://apache/activemq/apache-activemq/${version}/${name}-bin.tar.gz";
+    sha256 = "12a1lmmqapviqdgw307jm07vw1z5q53r56pkbp85w9wnqwspjrbk";
+  };
+
+  phases = [ "unpackPhase" "installPhase" ];
+
+  installPhase = ''
+    ensureDir $out
+    mv * $out/
+    for j in `find $out/lib -name "*.jar"`; do
+      cp="''${cp:+"$cp:"}$j";
+    done
+    echo "CLASSPATH=$cp" > $out/lib/classpath.env
+  '';
+
+  meta = {
+    homepage = http://activemq.apache.org/;
+    description = ''
+      Messaging and Integration Patterns server written in Java.
+    '';
+    license = stdenv.lib.licenses.asl20;
+  };
+
+}
diff --git a/pkgs/development/libraries/boost/1.53.nix b/pkgs/development/libraries/boost/1.53.nix
index c3272e98a14..ff09dfd5954 100644
--- a/pkgs/development/libraries/boost/1.53.nix
+++ b/pkgs/development/libraries/boost/1.53.nix
@@ -28,7 +28,7 @@ let
   layout = if taggedLayout then "tagged" else "system";
 
   cflags = if enablePIC && enableExceptions then
-             "cflags=-fPIC -fexceptions cxxflags=-fPIC linkflags=-fPIC"
+             "cflags=\"-fPIC -fexceptions\" cxxflags=-fPIC linkflags=-fPIC"
            else if enablePIC then
              "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC"
            else if enableExceptions then
diff --git a/pkgs/development/libraries/bullet/default.nix b/pkgs/development/libraries/bullet/default.nix
index b725f6bbf9f..6320dd58e4c 100644
--- a/pkgs/development/libraries/bullet/default.nix
+++ b/pkgs/development/libraries/bullet/default.nix
@@ -1,14 +1,17 @@
-{stdenv, fetchurl, unzip, cmake}:
+{ stdenv, fetchurl, cmake, mesa, freeglut }:
 
-stdenv.mkDerivation {
-  name = "bullet-2.78";
+stdenv.mkDerivation rec {
+  name = "bullet-2.80"; # vdrift 2012-07-22 doesn't build with 2.81
+  rev = "2531";
   src = fetchurl {
-    url = "http://bullet.googlecode.com/files/bullet-2.78.zip";
-    sha256 = "10l2dclvv0di9mi9qp6xfy9vybx182xp2dyygabacrpr3p75s77k";
+    url = "http://bullet.googlecode.com/files/${name}-rev${rev}.tgz";
+    sha256 = "0dig6k88jz5y0cz6dn186vc4l96l4v56zvwpsp5bv9f5wdwjskj6";
   };
-  buildInputs = [ unzip cmake ];
+
+  buildInputs = [ cmake mesa freeglut ];
   configurePhase = ''
-    cmake -DBUILD_SHARED_LIBS=ON -DBUILD_EXTRAS=OFF -DBUILD_DEMOS=OFF .
+    cmake -DBUILD_SHARED_LIBS=ON -DBUILD_EXTRAS=OFF -DBUILD_DEMOS=OFF \
+      -DCMAKE_INSTALL_PREFIX=$out .
   '';
 
   meta = {
@@ -19,6 +22,6 @@ stdenv.mkDerivation {
     '';
     homepage = http://code.google.com/p/bullet/;
     license = stdenv.lib.licenses.zlib;
-    maintainers = [ "Alexander Foremny <alexanderforemny@googlemail.com>" ];
+    maintainers = with stdenv.lib.maintainers; [ aforemny ];
   };
 }
diff --git a/pkgs/development/libraries/cairo/1.12.2.nix b/pkgs/development/libraries/cairo/1.12.2.nix
new file mode 100644
index 00000000000..254998b6e7a
--- /dev/null
+++ b/pkgs/development/libraries/cairo/1.12.2.nix
@@ -0,0 +1,85 @@
+{ postscriptSupport ? true
+, pdfSupport ? true
+, pngSupport ? true
+, xcbSupport ? false
+, gobjectSupport ? true, glib
+, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype, xlibs
+, zlib, libpng, pixman, libxcb ? null, xcbutil ? null
+, gettext, libiconvOrEmpty
+}:
+
+assert postscriptSupport -> zlib != null;
+assert pngSupport -> libpng != null;
+assert xcbSupport -> libxcb != null && xcbutil != null;
+
+stdenv.mkDerivation rec {
+  name = "cairo-1.12.2";
+
+  src = fetchurl {
+    url = "http://cairographics.org/releases/${name}.tar.xz";
+    sha1 = "bc2ee50690575f16dab33af42a2e6cdc6451e3f9";
+  };
+
+  buildInputs =
+    [ pkgconfig x11 fontconfig xlibs.libXrender ]
+    ++ stdenv.lib.optionals xcbSupport [ libxcb xcbutil ]
+
+    # On non-GNU systems we need GNU Gettext for libintl.
+    ++ stdenv.lib.optional (!stdenv.isLinux) gettext
+
+    ++ libiconvOrEmpty;
+
+  propagatedBuildInputs =
+    [ freetype pixman ] ++
+    stdenv.lib.optional gobjectSupport glib ++
+    stdenv.lib.optional postscriptSupport zlib ++
+    stdenv.lib.optional pngSupport libpng;
+
+  configureFlags =
+    [ "--enable-tee" ]
+    ++ stdenv.lib.optional xcbSupport "--enable-xcb"
+    ++ stdenv.lib.optional pdfSupport "--enable-pdf";
+
+  preConfigure = ''
+    # Work around broken `Requires.private' that prevents Freetype
+    # `-I' flags to be propagated.
+    sed -i "src/cairo.pc.in" \
+        -es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype}/include/freetype2 -I${freetype}/include|g'
+  ''
+
+  # On FreeBSD, `-ldl' doesn't exist.
+  + (stdenv.lib.optionalString stdenv.isFreeBSD
+       '' for i in "util/"*"/Makefile.in" boilerplate/Makefile.in
+          do
+            cat "$i" | sed -es/-ldl//g > t
+            mv t "$i"
+          done
+       '');
+
+  enableParallelBuilding = true;
+
+  # The default `--disable-gtk-doc' is ignored.
+  postInstall = "rm -rf $out/share/gtk-doc";
+
+  meta = {
+    description = "A 2D graphics library with support for multiple output devices";
+
+    longDescription = ''
+      Cairo is a 2D graphics library with support for multiple output
+      devices.  Currently supported output targets include the X
+      Window System, Quartz, Win32, image buffers, PostScript, PDF,
+      and SVG file output.  Experimental backends include OpenGL
+      (through glitz), XCB, BeOS, OS/2, and DirectFB.
+
+      Cairo is designed to produce consistent output on all output
+      media while taking advantage of display hardware acceleration
+      when available (e.g., through the X Render Extension).
+    '';
+
+    homepage = http://cairographics.org/;
+
+    licenses = [ "LGPLv2+" "MPLv1" ];
+
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix
index d21f303e741..72ea24c9f8a 100644
--- a/pkgs/development/libraries/cairo/default.nix
+++ b/pkgs/development/libraries/cairo/default.nix
@@ -21,7 +21,8 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs =
-    [ pkgconfig x11 fontconfig xlibs.libXrender ]
+    [ pkgconfig x11 fontconfig ] 
+    ++ stdenv.lib.optional (!stdenv.isDarwin) xlibs.libXrender
     ++ stdenv.lib.optionals xcbSupport [ libxcb xcbutil ]
 
     # On non-GNU systems we need GNU Gettext for libintl.
diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix
index c5aefbe3214..87165fa8e7f 100644
--- a/pkgs/development/libraries/cyrus-sasl/default.nix
+++ b/pkgs/development/libraries/cyrus-sasl/default.nix
@@ -1,22 +1,25 @@
 { stdenv, fetchurl, openssl, db4, gettext, pam }:
 
 stdenv.mkDerivation rec {
-  name = "cyrus-sasl-2.1.25";
+  name = "cyrus-sasl-2.1.26";
 
   src = fetchurl {
-    url = "ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${name}.tar.gz";
-    sha256 = "418c16e6240a4f9b637cbe3d62937b9675627bad27c622191d47de8686fe24fe";
+    url = "ftp://ftp.cyrusimap.org/cyrus-sasl/${name}.tar.gz";
+    sha256 = "1hvvbcsg21nlncbgs0cgn3iwlnb3vannzwsp6rwvnn9ba4v53g4g";
   };
 
   buildInputs = [ openssl db4 gettext ] ++ stdenv.lib.optional stdenv.isLinux pam;
 
+  patches = [ ./missing-size_t.patch ]; # https://bugzilla.redhat.com/show_bug.cgi?id=906519
+  patchFlags = "-p0";
+
   # Set this variable at build-time to make sure $out can be evaluated.
   preConfigure = ''
     configureFlagsArray=( --with-plugindir=$out/lib/sasl2
                           --with-configdir=$out/lib/sasl2
-			  --with-saslauthd=/run/saslauthd
-			  --enable-login
-			)
+                          --with-saslauthd=/run/saslauthd
+                          --enable-login
+                        )
   '';
 
   meta = {
diff --git a/pkgs/development/libraries/cyrus-sasl/missing-size_t.patch b/pkgs/development/libraries/cyrus-sasl/missing-size_t.patch
new file mode 100644
index 00000000000..42f20fb8096
--- /dev/null
+++ b/pkgs/development/libraries/cyrus-sasl/missing-size_t.patch
@@ -0,0 +1,13 @@
+Gentoo bug #458790
+--- include/sasl.h	2012-10-12 17:05:48.000000000 +0300
++++ include/sasl.h	2013-02-23 16:56:44.648786268 +0200
+@@ -121,6 +121,9 @@
+ #ifndef SASL_H
+ #define SASL_H 1
+ 
++/* stddef.h to get size_t defined */
++#include <stddef.h>
++
+ /* Keep in sync with win32/common.mak */
+ #define SASL_VERSION_MAJOR 2
+ #define SASL_VERSION_MINOR 1
diff --git a/pkgs/development/libraries/ffmpeg/1.0.nix b/pkgs/development/libraries/ffmpeg/1.0.nix
deleted file mode 100644
index d703fd8e369..00000000000
--- a/pkgs/development/libraries/ffmpeg/1.0.nix
+++ /dev/null
@@ -1,85 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, yasm, zlib, bzip2, alsaLib
-, mp3Support ? true, lame ? null
-, speexSupport ? true, speex ? null
-, theoraSupport ? true, libtheora ? null
-, vorbisSupport ? true, libvorbis ? null
-, vpxSupport ? false, libvpx ? null
-, x264Support ? true, x264 ? null
-, xvidSupport ? true, xvidcore ? null
-, vdpauSupport ? true, libvdpau ? null
-, faacSupport ? false, faac ? null
-, dc1394Support ? false, libdc1394 ? null
-, x11grabSupport ? false, libXext ? null, libXfixes ? null
-}:
-
-assert speexSupport -> speex != null;
-assert theoraSupport -> libtheora != null;
-assert vorbisSupport -> libvorbis != null;
-assert vpxSupport -> libvpx != null;
-assert x264Support -> x264 != null;
-assert xvidSupport -> xvidcore != null;
-assert vdpauSupport -> libvdpau != null;
-assert faacSupport -> faac != null;
-assert x11grabSupport -> libXext != null && libXfixes != null;
-
-stdenv.mkDerivation rec {
-  name = "ffmpeg-1.0";
-  
-  src = fetchurl {
-    url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
-    sha256 = "1jbi85z2zkk3fh09l9f1s70kpvsz8706ay4lsw75395q8vic70hd";
-  };
-  
-  # `--enable-gpl' (as well as the `postproc' and `swscale') mean that
-  # the resulting library is GPL'ed, so it can only be used in GPL'ed
-  # applications.
-  configureFlags = [
-    "--enable-gpl"
-    "--enable-postproc"
-    "--enable-swscale"
-    "--disable-ffplay"
-    "--enable-shared"
-    "--enable-runtime-cpudetect"
-  ]
-    ++ stdenv.lib.optional mp3Support "--enable-libmp3lame"
-    ++ stdenv.lib.optional speexSupport "--enable-libspeex"
-    ++ stdenv.lib.optional theoraSupport "--enable-libtheora"
-    ++ stdenv.lib.optional vorbisSupport "--enable-libvorbis"
-    ++ stdenv.lib.optional vpxSupport "--enable-libvpx"
-    ++ stdenv.lib.optional x264Support "--enable-libx264"
-    ++ stdenv.lib.optional xvidSupport "--enable-libxvid"
-    ++ stdenv.lib.optional vdpauSupport "--enable-vdpau"
-    ++ stdenv.lib.optional faacSupport "--enable-libfaac --enable-nonfree"
-    ++ stdenv.lib.optional dc1394Support "--enable-libdc1394"
-    ++ stdenv.lib.optional x11grabSupport "--enable-x11grab";
-
-  buildInputs = [ pkgconfig lame yasm zlib bzip2 alsaLib ]
-    ++ stdenv.lib.optional mp3Support lame
-    ++ stdenv.lib.optional speexSupport speex
-    ++ stdenv.lib.optional theoraSupport libtheora
-    ++ stdenv.lib.optional vorbisSupport libvorbis
-    ++ stdenv.lib.optional vpxSupport libvpx
-    ++ stdenv.lib.optional x264Support x264
-    ++ stdenv.lib.optional xvidSupport xvidcore
-    ++ stdenv.lib.optional vdpauSupport libvdpau
-    ++ stdenv.lib.optional faacSupport faac
-    ++ stdenv.lib.optional dc1394Support libdc1394
-    ++ stdenv.lib.optionals x11grabSupport [ libXext libXfixes ];
-
-  enableParallelBuilding = true;
-    
-  crossAttrs = {
-    dontSetConfigureCross = true;
-    configureFlags = configureFlags ++ [
-      "--cross-prefix=${stdenv.cross.config}-"
-      "--enable-cross-compile"
-      "--target_os=linux"
-      "--arch=${stdenv.cross.arch}"
-      ];
-  };
-
-  meta = {
-    homepage = http://www.ffmpeg.org/;
-    description = "A complete, cross-platform solution to record, convert and stream audio and video";
-  };
-}
diff --git a/pkgs/development/libraries/ffmpeg/1.1.nix b/pkgs/development/libraries/ffmpeg/1.1.nix
index 7cb83db5e8d..100e3456ca4 100644
--- a/pkgs/development/libraries/ffmpeg/1.1.nix
+++ b/pkgs/development/libraries/ffmpeg/1.1.nix
@@ -25,7 +25,7 @@ assert faacSupport -> faac != null;
 assert x11grabSupport -> libXext != null && libXfixes != null;
 
 stdenv.mkDerivation rec {
-  name = "ffmpeg-1.1";
+  name = "ffmpeg-1.1.3";
   
   src = fetchurl {
     url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
diff --git a/pkgs/development/libraries/gamin/deadlock.patch b/pkgs/development/libraries/gamin/deadlock.patch
new file mode 100644
index 00000000000..e2abc8ce2d9
--- /dev/null
+++ b/pkgs/development/libraries/gamin/deadlock.patch
@@ -0,0 +1,68 @@
+Fix for a deadlock:
+https://bugzilla.gnome.org/show_bug.cgi?id=667230
+
+From cc14440eface093548cb3bc7814da11d9a99d283 Mon Sep 17 00:00:00 2001
+From: Anssi Hannula <anssi@mageia.org>
+Date: Wed, 4 Jan 2012 00:23:55 +0200
+Subject: [PATCH] fix possible server deadlock in ih_sub_cancel
+
+ih_sub_foreach() calls ih_sub_cancel() while inotify_lock is locked.
+However, ih_sub_cancel() locks it again, and locking GMutex recursively
+causes undefined behaviour.
+
+Fix that by removing locking from ih_sub_cancel() as ih_sub_foreach()
+is its only user. Also make the function static so that it won't
+accidentally get used by other files without locking (inotify-helper.h
+is an internal server header).
+
+This should fix the intermittent deadlocks I've been experiencing
+causing KDE applications to no longer start, and probably also
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542361
+---
+ server/inotify-helper.c |    7 ++-----
+ server/inotify-helper.h |    1 -
+ 2 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/server/inotify-helper.c b/server/inotify-helper.c
+index d77203e..0789fa4 100644
+--- a/server/inotify-helper.c
++++ b/server/inotify-helper.c
+@@ -123,13 +123,11 @@ ih_sub_add (ih_sub_t * sub)
+ 
+ /**
+  * Cancels a subscription which was being monitored.
++ * inotify_lock must be held when calling.
+  */
+-gboolean
++static gboolean
+ ih_sub_cancel (ih_sub_t * sub)
+ {
+-	G_LOCK(inotify_lock);
+-
+-
+ 	if (!sub->cancelled)
+ 	{
+ 		IH_W("cancelling %s\n", sub->pathname);
+@@ -140,7 +138,6 @@ ih_sub_cancel (ih_sub_t * sub)
+ 		sub_list = g_list_remove (sub_list, sub);
+ 	}
+ 
+-	G_UNLOCK(inotify_lock);
+ 	return TRUE;
+ }
+ 
+diff --git a/server/inotify-helper.h b/server/inotify-helper.h
+index 5d3b6d0..d36b5fd 100644
+--- a/server/inotify-helper.h
++++ b/server/inotify-helper.h
+@@ -34,7 +34,6 @@ gboolean	 ih_startup		(event_callback_t ecb,
+ 					 found_callback_t fcb);
+ gboolean	 ih_running		(void);
+ gboolean	 ih_sub_add		(ih_sub_t *sub);
+-gboolean	 ih_sub_cancel		(ih_sub_t *sub);
+ 
+ /* Return FALSE from 'f' if the subscription should be cancelled */
+ void		 ih_sub_foreach		(void *callerdata, gboolean (*f)(ih_sub_t *sub, void *callerdata));
+-- 
+1.7.7.2
+
diff --git a/pkgs/development/libraries/gamin/default.nix b/pkgs/development/libraries/gamin/default.nix
index 6d94eee865f..b61101654ba 100644
--- a/pkgs/development/libraries/gamin/default.nix
+++ b/pkgs/development/libraries/gamin/default.nix
@@ -16,5 +16,5 @@ stdenv.mkDerivation rec {
   # <sys/socket.h> with Glibc 2.9.
   configureFlags = "--disable-debug --with-python=${python} CPPFLAGS=-D_GNU_SOURCE";
 
-  patches = map fetchurl (import ./debian-patches.nix);
+  patches = [ ./deadlock.patch ] ++ map fetchurl (import ./debian-patches.nix);
 }
diff --git a/pkgs/development/libraries/glibc/2.17/common.nix b/pkgs/development/libraries/glibc/2.17/common.nix
index eed51288707..3006ff49013 100644
--- a/pkgs/development/libraries/glibc/2.17/common.nix
+++ b/pkgs/development/libraries/glibc/2.17/common.nix
@@ -49,6 +49,11 @@ stdenv.mkDerivation ({
          compatibility with old NixOS installations (since NixOS used
          to default to blowfish). */
       ./glibc-crypt-blowfish.patch
+
+      /* Fix for random "./sysdeps/posix/getaddrinfo.c:1467:
+         rfc3484_sort: Assertion `src->results[i].native == -1 ||
+         src->results[i].native == a2_native' failed." crashes. */
+      ./glibc-rh739743.patch
     ];
 
   postPatch = ''
@@ -138,7 +143,9 @@ stdenv.mkDerivation ({
 
     configureScript="`pwd`/../$sourceRoot/configure"
 
-    makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.gcc.libc}/lib"
+    ${stdenv.lib.optionalString (stdenv.gcc.libc != null)
+      ''makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.gcc.libc}/lib"''
+    }
 
     ${preConfigure}
   '';
diff --git a/pkgs/development/libraries/glibc/2.17/glibc-rh739743.patch b/pkgs/development/libraries/glibc/2.17/glibc-rh739743.patch
new file mode 100644
index 00000000000..c390b772b16
--- /dev/null
+++ b/pkgs/development/libraries/glibc/2.17/glibc-rh739743.patch
@@ -0,0 +1,55 @@
+2009-04-26  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/posix/getaddrinfo.c (rfc3484_sort): don't assign native
+	result if the result has no associated interface.
+
+---
+ sysdeps/posix/getaddrinfo.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -1456,13 +1456,13 @@
+ 
+ 	      /* Fill in the results in all the records.  */
+ 	      for (int i = 0; i < src->nresults; ++i)
+-		if (src->results[i].index == a1_index)
++		if (a1_index != -1 && src->results[i].index == a1_index)
+ 		  {
+ 		    assert (src->results[i].native == -1
+ 			    || src->results[i].native == a1_native);
+ 		    src->results[i].native = a1_native;
+ 		  }
+-		else if (src->results[i].index == a2_index)
++		else if (a2_index != -1 && src->results[i].index == a2_index)
+ 		  {
+ 		    assert (src->results[i].native == -1
+ 			    || src->results[i].native == a2_native);
+
+2009-03-15  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/posix/getaddrinfo.c (getaddrinfo): correctly detect 
+	interface for all 127.X.Y.Z addresses.
+
+---
+ sysdeps/posix/getaddrinfo.c |    9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -2265,7 +2265,14 @@
+ 			  tmp.addr[0] = 0;
+ 			  tmp.addr[1] = 0;
+ 			  tmp.addr[2] = htonl (0xffff);
+-			  tmp.addr[3] = sinp->sin_addr.s_addr;
++			  /* Special case for lo interface, the source address
++			     being possibly different than the interface 
++			     address. */
++			  if ((ntohl(sinp->sin_addr.s_addr) & 0xff000000)
++			      == 0x7f000000)
++			    tmp.addr[3] = htonl(0x7f000001);
++			  else
++			    tmp.addr[3] = sinp->sin_addr.s_addr;
+ 			}
+ 		      else
+ 			{
diff --git a/pkgs/development/libraries/glibc/2.17/info.nix b/pkgs/development/libraries/glibc/2.17/info.nix
index 322f07f0236..e4cdb42dd68 100644
--- a/pkgs/development/libraries/glibc/2.17/info.nix
+++ b/pkgs/development/libraries/glibc/2.17/info.nix
@@ -19,7 +19,7 @@ build null {
   # libc.info hasn't a Top node.
   installPhase = ''
     mkdir -p "$out/share/info"
-    cp -v "../$sourceRoot/manual/"*.info* "$out/share/info"
+    cp -v "manual/"*.info* "$out/share/info"
   '';
 
   meta.description = "GNU Info manual of the GNU C Library";
diff --git a/pkgs/development/libraries/gmp/5.0.5.nix b/pkgs/development/libraries/gmp/5.0.5.nix
index dba5cafdf57..461187a509c 100644
--- a/pkgs/development/libraries/gmp/5.0.5.nix
+++ b/pkgs/development/libraries/gmp/5.0.5.nix
@@ -23,6 +23,13 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  crossAttrs = {
+    # Disable stripping to avoid "libgmp.a: Archive has no index"
+    # (see <http://hydra.nixos.org/build/4268666>.)
+    dontStrip = true;
+    dontCrossStrip = true;
+  };
+
   meta = {
     description = "GMP, the GNU multiple precision arithmetic library";
 
diff --git a/pkgs/development/libraries/gsl/default.nix b/pkgs/development/libraries/gsl/default.nix
index 474d2f97dd0..0eefda50c20 100644
--- a/pkgs/development/libraries/gsl/default.nix
+++ b/pkgs/development/libraries/gsl/default.nix
@@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
     sha256 = "18qf6jzz1r3mzb5qynywv4xx3z9g61hgkbpkdrhbgqh2g7jhgfc5";
   };
 
+  # ToDo: there might be more impurities than FMA support check
+  patches = [ ./disable-fma.patch ]; # http://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html
+  patchFlags = "-p0";
+
   doCheck = true;
 
   meta = {
diff --git a/pkgs/development/libraries/gsl/disable-fma.patch b/pkgs/development/libraries/gsl/disable-fma.patch
new file mode 100644
index 00000000000..d5c0d620863
--- /dev/null
+++ b/pkgs/development/libraries/gsl/disable-fma.patch
@@ -0,0 +1,32 @@
+--- configure.ac        2011-09-22 16:13:22 +0000
++++ configure.ac        2011-11-26 23:55:24 +0000
+@@ -381,6 +381,28 @@
+ AC_SUBST(HAVE_DARWIN_IEEE_INTERFACE)
+ AC_SUBST(HAVE_DARWIN86_IEEE_INTERFACE)
+ 
++dnl check for compiler flags to disable use of FMA
++save_cflags="$CFLAGS"
++AC_CACHE_CHECK([for compiler flags to disable use of FMA], ac_cv_c_fma_flags,
++[
++if test X"$GCC" = Xyes; then
++    fma_flags='-ffp-contract=off'
++else
++    fma_flags=
++fi
++if test X"$fma_flags" != X; then
++  CFLAGS="$fma_flags $CFLAGS"
++  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int foo;]])],[ac_cv_c_fma_flags="$fma_flags"],[ac_cv_c_fma_flags="none"])
++else
++  ac_cv_c_fma_flags="none"
++fi])
++
++if test "$ac_cv_c_fma_flags" != "none" ; then
++   CFLAGS="$ac_cv_c_fma_flags $save_cflags"
++else
++   CFLAGS="$save_cflags"
++fi
++
+ dnl Check for IEEE control flags
+ 
+ save_cflags="$CFLAGS"
+
diff --git a/pkgs/development/libraries/haskell/DAV/default.nix b/pkgs/development/libraries/haskell/DAV/default.nix
index b1932966675..e3c6b11e55b 100644
--- a/pkgs/development/libraries/haskell/DAV/default.nix
+++ b/pkgs/development/libraries/haskell/DAV/default.nix
@@ -5,15 +5,14 @@
 
 cabal.mkDerivation (self: {
   pname = "DAV";
-  version = "0.3";
-  sha256 = "16qbq59g79a0a1n6vblndj1fknj9fvd0anhrsz9czwl3k3lk5cx8";
+  version = "0.3.1";
+  sha256 = "0ql6sf61gq55iyn189papnid91n4ab5s2i24zvkqrgixjz7998rd";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
     caseInsensitive cmdargs httpConduit httpTypes lens liftedBase mtl
     network resourcet transformers xmlConduit xmlHamlet
   ];
-  jailbreak = true;
   meta = {
     homepage = "http://floss.scru.org/hDAV";
     description = "RFC 4918 WebDAV support";
diff --git a/pkgs/development/libraries/haskell/NumInstances/default.nix b/pkgs/development/libraries/haskell/NumInstances/default.nix
index 4d258f5634d..4f06a97002d 100644
--- a/pkgs/development/libraries/haskell/NumInstances/default.nix
+++ b/pkgs/development/libraries/haskell/NumInstances/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "NumInstances";
-  version = "1.0";
-  sha256 = "1fmg3slwma5f88a2qxj54ny40s67qbdyvsyh506bkp11v54958fy";
+  version = "1.2";
+  sha256 = "0s26j3h0xg16lcz95qs21iyfnzx8q8w2k2lnq55gakkr1wl4ap59";
   meta = {
     description = "Instances of numeric classes for functions and tuples";
     license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/haskell/OpenAL/default.nix b/pkgs/development/libraries/haskell/OpenAL/default.nix
index 206e78eb728..a04aea993fa 100644
--- a/pkgs/development/libraries/haskell/OpenAL/default.nix
+++ b/pkgs/development/libraries/haskell/OpenAL/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "OpenAL";
-  version = "1.4.0.1";
-  sha256 = "180f84sjakhd1b8h5n3l92by2wmic20n6ax0z5fi3fvk9w73khyv";
+  version = "1.4.0.2";
+  sha256 = "19q4pd5i2w330qh895z0cgim4m4f4gxqf4ya1192fchqmgcz1svz";
   buildDepends = [ ObjectName StateVar Tensor ];
   extraLibraries = [ openal ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/QuickCheck/2.6.nix b/pkgs/development/libraries/haskell/QuickCheck/2.6.nix
new file mode 100644
index 00000000000..39c97859e65
--- /dev/null
+++ b/pkgs/development/libraries/haskell/QuickCheck/2.6.nix
@@ -0,0 +1,15 @@
+{ cabal, random }:
+
+cabal.mkDerivation (self: {
+  pname = "QuickCheck";
+  version = "2.6";
+  sha256 = "03cp7mshjy2yrg31i13b9kmc2a6lrmrbl1sh9s8lswcj305c00c0";
+  buildDepends = [ random ];
+  meta = {
+    homepage = "http://code.haskell.org/QuickCheck";
+    description = "Automatic testing of Haskell programs";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.andres ];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/Safe/default.nix b/pkgs/development/libraries/haskell/Safe/default.nix
deleted file mode 100644
index f35877cd656..00000000000
--- a/pkgs/development/libraries/haskell/Safe/default.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ cabal }:
-
-cabal.mkDerivation (self: {
-  pname = "Safe";
-  version = "0.1";
-  sha256 = "0ybi5r4635yjx41ig54bm426fbdzrivc5kn8fwqxmzm62ai0v623";
-  meta = {
-    homepage = "http://www-users.cs.york.ac.uk/~ndm/projects/libraries.php";
-    description = "Library for safe (pattern match free) functions";
-    license = self.stdenv.lib.licenses.bsd3;
-    platforms = self.ghc.meta.platforms;
-  };
-})
diff --git a/pkgs/development/libraries/haskell/basic-prelude/default.nix b/pkgs/development/libraries/haskell/basic-prelude/default.nix
index df00aff549f..04f3842be41 100644
--- a/pkgs/development/libraries/haskell/basic-prelude/default.nix
+++ b/pkgs/development/libraries/haskell/basic-prelude/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "basic-prelude";
-  version = "0.3.2.0";
-  sha256 = "1sdwkh9xrsx8v96d06jll7cqc0p6ykv2y9gnjzpbfx0k3ns69kcj";
+  version = "0.3.4.0";
+  sha256 = "0layc06df7df4mf4zafj87c4klsvkxbhi69dkv4ag9fkzvs62sz6";
   buildDepends = [
     hashable liftedBase ReadArgs systemFilepath text transformers
     unorderedContainers vector
diff --git a/pkgs/development/libraries/haskell/bifunctors/default.nix b/pkgs/development/libraries/haskell/bifunctors/default.nix
index 09287600323..c659c3bc3be 100644
--- a/pkgs/development/libraries/haskell/bifunctors/default.nix
+++ b/pkgs/development/libraries/haskell/bifunctors/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "bifunctors";
-  version = "3.2";
-  sha256 = "03bszf1127iw5kimjbag5gmgzz7h2qzcd9f7jb53jpiadfhjfx0a";
+  version = "3.2.0.1";
+  sha256 = "1biicx0zi48wzzi7vkhzvrdyk59hmmm1bqbsga6x5nbrbf3qrkm6";
   buildDepends = [ semigroupoids semigroups tagged ];
   meta = {
     homepage = "http://github.com/ekmett/bifunctors/";
diff --git a/pkgs/development/libraries/haskell/binary/default.nix b/pkgs/development/libraries/haskell/binary/default.nix
index b4f205e41b2..6273a099f73 100644
--- a/pkgs/development/libraries/haskell/binary/default.nix
+++ b/pkgs/development/libraries/haskell/binary/default.nix
@@ -1,13 +1,14 @@
-{ cabal, QuickCheck, random, testFramework
+{ cabal, Cabal, filepath, HUnit, QuickCheck, random, testFramework
 , testFrameworkQuickcheck2
 }:
 
 cabal.mkDerivation (self: {
   pname = "binary";
-  version = "0.6.4.0";
-  sha256 = "0vq80fzhwil5bx4a2vbd3jvfh1awhg1pwxgvq3lvbi37yzl0ydgh";
+  version = "0.7.0.1";
+  sha256 = "16srrp0qx9hsr7820b2q3sp9wp8y8sxxi8rvsh63n48w4l3canxq";
   testDepends = [
-    QuickCheck random testFramework testFrameworkQuickcheck2
+    Cabal filepath HUnit QuickCheck random testFramework
+    testFrameworkQuickcheck2
   ];
   meta = {
     homepage = "https://github.com/kolmodin/binary";
diff --git a/pkgs/development/libraries/haskell/blaze-html/default.nix b/pkgs/development/libraries/haskell/blaze-html/default.nix
index 59e0f718751..ec21e3fcd84 100644
--- a/pkgs/development/libraries/haskell/blaze-html/default.nix
+++ b/pkgs/development/libraries/haskell/blaze-html/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "blaze-html";
-  version = "0.6.0.0";
-  sha256 = "0n8jpmslcs29pfyb8jhp43dg4058ahd9y3kf2p2wr3r6b9yr5dll";
+  version = "0.6.1.1";
+  sha256 = "08zfmkvahmm613r0nrabwl5zv9ragcrhdqsa8jfdrfdkrf6ckbrc";
   buildDepends = [ blazeBuilder blazeMarkup text ];
   testDepends = [
     blazeBuilder blazeMarkup HUnit QuickCheck testFramework
diff --git a/pkgs/development/libraries/haskell/blaze-markup/default.nix b/pkgs/development/libraries/haskell/blaze-markup/default.nix
index afd607fe5e8..0c544119d5f 100644
--- a/pkgs/development/libraries/haskell/blaze-markup/default.nix
+++ b/pkgs/development/libraries/haskell/blaze-markup/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "blaze-markup";
-  version = "0.5.1.4";
-  sha256 = "0g316qhk7yv6y680w93613apfhm458a01g3jmq42yv4ndydkv4rr";
+  version = "0.5.1.5";
+  sha256 = "0g3smm1ym7h45bkzx94b77ssyg0z0gqfwbnap3ywa2381rb39l74";
   buildDepends = [ blazeBuilder text ];
   testDepends = [
     blazeBuilder HUnit QuickCheck testFramework testFrameworkHunit
diff --git a/pkgs/development/libraries/haskell/citeproc-hs/default.nix b/pkgs/development/libraries/haskell/citeproc-hs/default.nix
index b62714749e3..2c68fd24d1f 100644
--- a/pkgs/development/libraries/haskell/citeproc-hs/default.nix
+++ b/pkgs/development/libraries/haskell/citeproc-hs/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "citeproc-hs";
-  version = "0.3.7";
-  sha256 = "0ix9y7z8m8x4l10h96fgv820grywvwcp3019wxjja4y4w6irid3b";
+  version = "0.3.8";
+  sha256 = "0wlfwjxg852qcgx54m99xm7hxsmcw8c8r7fyrsxyxl3054xnfwz8";
   buildDepends = [
     filepath hexpat hsBibutils HTTP json mtl network pandocTypes parsec
     syb time utf8String
diff --git a/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix b/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix
index 6af68223834..c04b4dfc25e 100644
--- a/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "classy-prelude-conduit";
-  version = "0.5.1";
-  sha256 = "1vwcxwrbnczchq2b773kjjr3ysc47widak8qj0kwi26nf3jics4k";
+  version = "0.5.3";
+  sha256 = "1rmx439kdjipyz2s3v2s1xv1mb55kb4njl9k6f8mfhykgac39rhz";
   buildDepends = [
     classyPrelude conduit monadControl resourcet transformers void
     xmlConduit
diff --git a/pkgs/development/libraries/haskell/classy-prelude/default.nix b/pkgs/development/libraries/haskell/classy-prelude/default.nix
index 4c2f076039e..4d0f5441e41 100644
--- a/pkgs/development/libraries/haskell/classy-prelude/default.nix
+++ b/pkgs/development/libraries/haskell/classy-prelude/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "classy-prelude";
-  version = "0.5.1";
-  sha256 = "0kgnffqvh13adadp85iw4ybbs5jpa5hwrr2dsi2aj9p8lvzac1jy";
+  version = "0.5.3";
+  sha256 = "0xlhdxkxvrzj9y8wdl2f1pz94zz2gfa9vfbia9prhr7skirxvsad";
   buildDepends = [
     basicPrelude hashable liftedBase systemFilepath text transformers
     unorderedContainers vector
diff --git a/pkgs/development/libraries/haskell/cmdargs/default.nix b/pkgs/development/libraries/haskell/cmdargs/default.nix
index e6b208b0297..6780d02e674 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.1";
-  sha256 = "0p7fzh65asn1bpzp137vfww97in2mkqfwwsk8hxzsdx32zi1nfz8";
+  version = "0.10.2";
+  sha256 = "0vn7c569akyabij2bh9myyvnx08w67dwdvx5g5q36b3ixzp0lrg4";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ filepath transformers ];
diff --git a/pkgs/development/libraries/haskell/conduit/default.nix b/pkgs/development/libraries/haskell/conduit/default.nix
index 4dada245791..8614b24bacc 100644
--- a/pkgs/development/libraries/haskell/conduit/default.nix
+++ b/pkgs/development/libraries/haskell/conduit/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "conduit";
-  version = "1.0.0";
-  sha256 = "1sx7s3awzb7y51prmmvrx9gxhd5068rbzwl719lfx3r50k94r00d";
+  version = "1.0.3";
+  sha256 = "1jvbm5v25h1m5a9gd0f417mhpabp3kcfzsjm8887gcyimp2d0z07";
   buildDepends = [
     liftedBase monadControl resourcet text transformers
     transformersBase void
diff --git a/pkgs/development/libraries/haskell/constraints/default.nix b/pkgs/development/libraries/haskell/constraints/default.nix
new file mode 100644
index 00000000000..0fe2cb8864a
--- /dev/null
+++ b/pkgs/development/libraries/haskell/constraints/default.nix
@@ -0,0 +1,15 @@
+{ cabal, newtype }:
+
+cabal.mkDerivation (self: {
+  pname = "constraints";
+  version = "0.3.2";
+  sha256 = "1fmjl6dh2iswvmq8r3izplp6zg9m8yq1c4rj0zpqjbv2iqsi4kl1";
+  buildDepends = [ newtype ];
+  meta = {
+    homepage = "http://github.com/ekmett/constraints/";
+    description = "Constraint manipulation";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.andres ];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/cuda/default.nix b/pkgs/development/libraries/haskell/cuda/default.nix
index a90efcdf4ca..f03e1907ec0 100644
--- a/pkgs/development/libraries/haskell/cuda/default.nix
+++ b/pkgs/development/libraries/haskell/cuda/default.nix
@@ -7,20 +7,18 @@ cabal.mkDerivation (self: {
   buildDepends = [ extensibleExceptions ];
   buildTools = [ c2hs ];
   extraLibraries = [ cudatoolkit nvidia_x11 self.stdenv.gcc ];
+  doCheck = false;
   # Perhaps this should be the default in cabal.nix ...
   #
   # The cudatoolkit provides both 64 and 32-bit versions of the
   # library. GHC's linker fails if the wrong version is found first.
   # We solve this by eliminating lib64 from the path on 32-bit
   # platforms and putting lib64 first on 64-bit platforms.
-
   libPaths = if self.stdenv.is64bit then "lib64 lib" else "lib";
-
   configurePhase = ''
     for i in Setup.hs Setup.lhs; do
       test -f $i && ghc --make $i
     done
-
     for p in $extraBuildInputs $propagatedNativeBuildInputs; do
       if [ -d "$p/include" ]; then
         extraLibDirs="$extraLibDirs --extra-include-dir=$p/include"
@@ -31,12 +29,8 @@ cabal.mkDerivation (self: {
         fi
       done
     done
-
     ./Setup configure --verbose --prefix="$out" $libraryProfiling $extraLibDirs $configureFlags
   '';
-
-  doCheck = false;
-
   meta = {
     description = "FFI binding to the CUDA interface for programming NVIDIA GPUs";
     license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/haskell/data-default/default.nix b/pkgs/development/libraries/haskell/data-default/default.nix
index 893f2121f0a..4fb21ed5f55 100644
--- a/pkgs/development/libraries/haskell/data-default/default.nix
+++ b/pkgs/development/libraries/haskell/data-default/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "data-default";
-  version = "0.5.0";
-  sha256 = "1wv8wjd9j40s7h19aph5pqph7rby5ma1nlagqywn9q0634iq9n2a";
+  version = "0.5.1";
+  sha256 = "05zp9bcxm4lcdqniwckq0zi014iqcnqbrk5wh54dyy83h97z6mpv";
   buildDepends = [ dlist ];
   meta = {
     description = "A class for types with a default value";
diff --git a/pkgs/development/libraries/haskell/diagrams/core.nix b/pkgs/development/libraries/haskell/diagrams/core.nix
index c087e27d025..ebea3fd6090 100644
--- a/pkgs/development/libraries/haskell/diagrams/core.nix
+++ b/pkgs/development/libraries/haskell/diagrams/core.nix
@@ -4,13 +4,12 @@
 
 cabal.mkDerivation (self: {
   pname = "diagrams-core";
-  version = "0.6.0.1";
-  sha256 = "0kw0rxk9a2zkpnbx4bfd0japm75y29ldvdn7i3c93kvz0p6jc2wa";
+  version = "0.6.0.2";
+  sha256 = "1g4b1zabgfdpaf7y3804r3w04ll4sqqrf71rm9389dg17ghc1q85";
   buildDepends = [
     dualTree MemoTrie monoidExtras newtype semigroups vectorSpace
     vectorSpacePoints
   ];
-  jailbreak = true;
   meta = {
     homepage = "http://projects.haskell.org/diagrams";
     description = "Core libraries for diagrams EDSL";
diff --git a/pkgs/development/libraries/haskell/digestive-functors-heist/default.nix b/pkgs/development/libraries/haskell/digestive-functors-heist/default.nix
index 0b7eb1e88de..48853c13655 100644
--- a/pkgs/development/libraries/haskell/digestive-functors-heist/default.nix
+++ b/pkgs/development/libraries/haskell/digestive-functors-heist/default.nix
@@ -1,11 +1,13 @@
-{ cabal, digestiveFunctors, heist, mtl, text, xmlhtml }:
+{ cabal, blazeBuilder, digestiveFunctors, heist, mtl, text, xmlhtml
+}:
 
 cabal.mkDerivation (self: {
   pname = "digestive-functors-heist";
-  version = "0.6.0.0";
-  sha256 = "17qndqsk09fvnvyhhw3xbbjjhfyyp4sivc898vqllyyky0wqmrdk";
-  buildDepends = [ digestiveFunctors heist mtl text xmlhtml ];
-  jailbreak = true;
+  version = "0.6.1.0";
+  sha256 = "08h883731cb5kqsv33f6dpf2lgh1r6qn9maqjkn5766vqf7m28nx";
+  buildDepends = [
+    blazeBuilder digestiveFunctors heist mtl text xmlhtml
+  ];
   meta = {
     homepage = "http://github.com/jaspervdj/digestive-functors";
     description = "Heist frontend for the digestive-functors library";
diff --git a/pkgs/development/libraries/haskell/distributive/default.nix b/pkgs/development/libraries/haskell/distributive/default.nix
index bd8b64aa509..d40952024ef 100644
--- a/pkgs/development/libraries/haskell/distributive/default.nix
+++ b/pkgs/development/libraries/haskell/distributive/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "distributive";
-  version = "0.3";
-  sha256 = "0z6vwak2n91vpx9ps9j1pbiw0zlh9jmds84yx1yqssbqx8npi32f";
+  version = "0.3.1";
+  sha256 = "0zf3wq1xz9sbb0g6fg852jckrwkffsfkghq3zx03d2q9ginc6jbc";
   buildDepends = [ transformers transformersCompat ];
   testDepends = [ doctest filepath ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/doctest/default.nix b/pkgs/development/libraries/haskell/doctest/default.nix
index 3c8988400bc..ce418a8d053 100644
--- a/pkgs/development/libraries/haskell/doctest/default.nix
+++ b/pkgs/development/libraries/haskell/doctest/default.nix
@@ -13,6 +13,7 @@ cabal.mkDerivation (self: {
     baseCompat deepseq filepath ghcPaths hspec HUnit QuickCheck setenv
     silently stringbuilder syb transformers
   ];
+  jailbreak = true;
   doCheck = false;
   meta = {
     homepage = "https://github.com/sol/doctest-haskell#readme";
diff --git a/pkgs/development/libraries/haskell/flexible-defaults/default.nix b/pkgs/development/libraries/haskell/flexible-defaults/default.nix
index 9cba8f2c13f..7be21dbbf34 100644
--- a/pkgs/development/libraries/haskell/flexible-defaults/default.nix
+++ b/pkgs/development/libraries/haskell/flexible-defaults/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "flexible-defaults";
-  version = "0.0.1.0";
-  sha256 = "0vq8ci3zbzmw8abjd12dhjiqzz4ckr99c1fqk32qsp5bvm81bdma";
+  version = "0.0.1.1";
+  sha256 = "0cbp8hb7y29xz3hl780173cs6ca4df0r98fz7v3drqr46aq55ipl";
   buildDepends = [ thExtras transformers ];
   meta = {
     homepage = "https://github.com/mokus0/flexible-defaults";
diff --git a/pkgs/development/libraries/haskell/ghc-mod/default.nix b/pkgs/development/libraries/haskell/ghc-mod/default.nix
index f85b7f8e208..3e86d440d5d 100644
--- a/pkgs/development/libraries/haskell/ghc-mod/default.nix
+++ b/pkgs/development/libraries/haskell/ghc-mod/default.nix
@@ -1,16 +1,20 @@
 { cabal, Cabal, convertible, emacs, filepath, ghcPaths, ghcSybUtils
-, hlint, ioChoice, regexPosix, syb, time, transformers
+, hlint, hspec, ioChoice, syb, time, transformers
 }:
 
 cabal.mkDerivation (self: {
   pname = "ghc-mod";
-  version = "1.11.4";
-  sha256 = "1bxmpvad415ayzwyijjm0zsck0z8aa1nfjixwb6l80i6lbxi4rfg";
+  version = "1.12.2";
+  sha256 = "0kwf1szw26iz4sw2slv10birpngf1cfy9jzmllzr0nvybh1pv7a9";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
-    Cabal convertible filepath ghcPaths ghcSybUtils hlint ioChoice
-    regexPosix syb time transformers
+    Cabal convertible filepath ghcPaths ghcSybUtils hlint ioChoice syb
+    time transformers
+  ];
+  testDepends = [
+    Cabal convertible filepath ghcPaths ghcSybUtils hlint hspec
+    ioChoice syb time transformers
   ];
   buildTools = [ emacs ];
   postInstall = ''
diff --git a/pkgs/development/libraries/haskell/ghc-vis/default.nix b/pkgs/development/libraries/haskell/ghc-vis/default.nix
index 4b606e8b73b..3fd1230073e 100644
--- a/pkgs/development/libraries/haskell/ghc-vis/default.nix
+++ b/pkgs/development/libraries/haskell/ghc-vis/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "ghc-vis";
-  version = "0.6";
-  sha256 = "0gvfs0f6fjg4bzq9q6rrhin6gk1pbyw9qbigi90cz1fg10nq7nzi";
+  version = "0.6.1";
+  sha256 = "0q0v1l44vagcg0nl4iv8m872g4qblj9syjlcgbf6fpgx1fqnyp24";
   buildDepends = [
     cairo deepseq fgl ghcHeapView graphviz gtk mtl svgcairo text
     transformers xdot
diff --git a/pkgs/development/libraries/haskell/github/default.nix b/pkgs/development/libraries/haskell/github/default.nix
new file mode 100644
index 00000000000..3eafcd70940
--- /dev/null
+++ b/pkgs/development/libraries/haskell/github/default.nix
@@ -0,0 +1,25 @@
+{ cabal, fetchurl, aeson, attoparsec, caseInsensitive, conduit, dataDefault
+, failure, HTTP, httpConduit, httpTypes, network, text, time
+, unorderedContainers, vector
+}:
+
+cabal.mkDerivation (self: {
+  pname = "github";
+  version = "0.5.0-patched";
+  src = fetchurl {
+    url = "https://github.com/mike-burns/github/archive/df415af64ebd4a28f1f8e5cc726e933545efdd7e.tar.gz";
+    sha256 = "1d1ya5j1qz1nf5kfkxp48gb0xbcr4fmf9y0kfpd3gxivfrdkfrig";
+    name = "github-${self.version}.tar.gz";
+  };
+  patches = [ (fetchurl { url = "https://github.com/mike-burns/github/pull/33.patch"; sha256 = "1d0m73ygzpk5rd6ahbrf58mxca56s5sd70yrf7fn2r1bh0rlacap"; }) ];
+  buildDepends = [
+    aeson attoparsec caseInsensitive conduit dataDefault failure HTTP
+    httpConduit httpTypes network text time unorderedContainers vector
+  ];
+  meta = {
+    homepage = "https://github.com/mike-burns/github";
+    description = "Access to the Github API, v3";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/gitit/default.nix b/pkgs/development/libraries/haskell/gitit/default.nix
index b38774cd02b..1c7dfdd10e1 100644
--- a/pkgs/development/libraries/haskell/gitit/default.nix
+++ b/pkgs/development/libraries/haskell/gitit/default.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "gitit";
-  version = "0.10.2";
-  sha256 = "07zdc1qx429rmisb39gdamwn9b1jblvjg7py4fcxx3qj01b6mvxx";
+  version = "0.10.3";
+  sha256 = "1hz4ddym2vn01nd22gb995dya48fzc7nsmsqywdc8hjczmn93qyg";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
@@ -18,7 +18,6 @@ cabal.mkDerivation (self: {
     safe SHA syb tagsoup text time url utf8String xhtml xml xssSanitize
     zlib
   ];
-  jailbreak = true;
   meta = {
     homepage = "http://gitit.net";
     description = "Wiki using happstack, git or darcs, and pandoc";
diff --git a/pkgs/development/libraries/haskell/hakyll/default.nix b/pkgs/development/libraries/haskell/hakyll/default.nix
index 2ca90094bb8..35204f853a3 100644
--- a/pkgs/development/libraries/haskell/hakyll/default.nix
+++ b/pkgs/development/libraries/haskell/hakyll/default.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "hakyll";
-  version = "4.1.4.0";
-  sha256 = "0nhr7ai03hx2qjxlqml0js43iwxhcbpdqkwdvw8pqs396yrjwxdj";
+  version = "4.2.1.2";
+  sha256 = "0b2jmi9hi5l72lkyjn2w3gwn52zvnvv7c10x5329hp000gzmwbvi";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
@@ -19,10 +19,9 @@ cabal.mkDerivation (self: {
   testDepends = [
     binary blazeHtml blazeMarkup citeprocHs cmdargs cryptohash deepseq
     filepath httpConduit httpTypes HUnit lrucache mtl pandoc parsec
-    QuickCheck random regexBase regexTdfa tagsoup testFramework
-    testFrameworkHunit testFrameworkQuickcheck2 text time
+    QuickCheck random regexBase regexTdfa snapCore snapServer tagsoup
+    testFramework testFrameworkHunit testFrameworkQuickcheck2 text time
   ];
-  jailbreak = true;
   doCheck = false;
   meta = {
     homepage = "http://jaspervdj.be/hakyll";
diff --git a/pkgs/development/libraries/haskell/happstack/happstack-server.nix b/pkgs/development/libraries/haskell/happstack/happstack-server.nix
index 8d8261df97e..0185e4e6ce9 100644
--- a/pkgs/development/libraries/haskell/happstack/happstack-server.nix
+++ b/pkgs/development/libraries/haskell/happstack/happstack-server.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "happstack-server";
-  version = "7.1.6";
-  sha256 = "0gifq625kclam6sgblwa8a1vhxmx8saanzlrikch0l9q0l95nfwd";
+  version = "7.1.7";
+  sha256 = "1gd7qa224z04aya44fdrbhpiy5iw88wjcvqihz6l95ks9ilbzmg7";
   buildDepends = [
     base64Bytestring blazeHtml extensibleExceptions filepath hslogger
     html monadControl mtl network parsec sendfile syb systemFilepath
diff --git a/pkgs/development/libraries/haskell/haskell-src-meta/default.nix b/pkgs/development/libraries/haskell/haskell-src-meta/default.nix
index 1d9bba47b4b..7b6ccb69633 100644
--- a/pkgs/development/libraries/haskell/haskell-src-meta/default.nix
+++ b/pkgs/development/libraries/haskell/haskell-src-meta/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "haskell-src-meta";
-  version = "0.6.0.1";
-  sha256 = "181xjajvppipzgknmbhbb1i2r8rimbr5vzn6gf1ksddgw12sargd";
+  version = "0.6.0.2";
+  sha256 = "1msqnsavghsc5bil3mm9swpi9a54pki4162jdfwwvlzvdmfvk9hp";
   buildDepends = [ haskellSrcExts syb thOrphans uniplate ];
   meta = {
     description = "Parse source to template-haskell abstract syntax";
diff --git a/pkgs/development/libraries/haskell/heist/default.nix b/pkgs/development/libraries/haskell/heist/default.nix
index 526a9b6ed87..45ff3fea7f0 100644
--- a/pkgs/development/libraries/haskell/heist/default.nix
+++ b/pkgs/development/libraries/haskell/heist/default.nix
@@ -5,14 +5,13 @@
 
 cabal.mkDerivation (self: {
   pname = "heist";
-  version = "0.11.0.1";
-  sha256 = "0d5nn0kfs7hbgs4b77i8c8pq2q5hldqk08dacva7xlxvjrlxsyn6";
+  version = "0.11.1";
+  sha256 = "17d6jycgxx5fz8sd3wnln53im29vz8l9847qsqbpyx8adrcg7rjh";
   buildDepends = [
     aeson attoparsec blazeBuilder blazeHtml directoryTree dlist errors
     filepath hashable MonadCatchIOTransformers mtl random text time
     unorderedContainers vector xmlhtml
   ];
-  jailbreak = true;
   meta = {
     homepage = "http://snapframework.com/";
     description = "An Haskell template system supporting both HTML5 and XML";
diff --git a/pkgs/development/libraries/haskell/highlighting-kate/default.nix b/pkgs/development/libraries/haskell/highlighting-kate/default.nix
index 805519d3d30..9d6185dc526 100644
--- a/pkgs/development/libraries/haskell/highlighting-kate/default.nix
+++ b/pkgs/development/libraries/haskell/highlighting-kate/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "highlighting-kate";
-  version = "0.5.3.7";
-  sha256 = "04wa1al83v5ak6gvrwqy2b63mda0qfi2ircxfs9ddk1gkdscrlrl";
+  version = "0.5.3.8";
+  sha256 = "1fdgmwhiw05mgbgsrgyzvdqzklw9r10nswxfpnxkh5ivfxrhz82w";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ blazeHtml filepath mtl parsec regexPcre ];
diff --git a/pkgs/development/libraries/haskell/hint/default.nix b/pkgs/development/libraries/haskell/hint/default.nix
index 106b8591778..8cf1accca9c 100644
--- a/pkgs/development/libraries/haskell/hint/default.nix
+++ b/pkgs/development/libraries/haskell/hint/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "hint";
-  version = "0.3.3.5";
-  sha256 = "09pd4b105c2ikf4ap96fz8091qra7hypq3k3ik0kay3bb532hmlq";
+  version = "0.3.3.6";
+  sha256 = "080wnds99lg9p4n2h9d4bpgvk73yzc3im2ysn1r8f3nqai4b2can";
   buildDepends = [
     extensibleExceptions filepath ghcMtl ghcPaths haskellSrc
     MonadCatchIOMtl mtl random utf8String
diff --git a/pkgs/development/libraries/haskell/hp2any-core/default.nix b/pkgs/development/libraries/haskell/hp2any-core/default.nix
index 37e6000a3c0..96ac397da79 100644
--- a/pkgs/development/libraries/haskell/hp2any-core/default.nix
+++ b/pkgs/development/libraries/haskell/hp2any-core/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "hp2any-core";
-  version = "0.11.1";
-  sha256 = "146bigmch7dawyyakj0w55p0jdpnxkj8q5izjsswqqk0pdxia546";
+  version = "0.11.2";
+  sha256 = "1gmw9bggw8hsp6pi0xgrryf0sqjb1aaxbwh85q5h72h4ixskwn1y";
   buildDepends = [ attoparsec filepath network time ];
   meta = {
     homepage = "http://www.haskell.org/haskellwiki/Hp2any";
diff --git a/pkgs/development/libraries/haskell/hp2any-graph/default.nix b/pkgs/development/libraries/haskell/hp2any-graph/default.nix
index 98b9518c7de..83369ac008b 100644
--- a/pkgs/development/libraries/haskell/hp2any-graph/default.nix
+++ b/pkgs/development/libraries/haskell/hp2any-graph/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "hp2any-graph";
-  version = "0.5.3";
-  sha256 = "1al20pxfgkgwynrx7vr0i57342s91lcm3cnd9qjx8b6vkqmzykkq";
+  version = "0.5.4";
+  sha256 = "1lhp9saw51w09fhk94hz31rjawnnxavd7x3lxjc8xn1778wp3v9h";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/http-conduit/default.nix b/pkgs/development/libraries/haskell/http-conduit/default.nix
index 5ff4b4cd95e..715d5ce7dba 100644
--- a/pkgs/development/libraries/haskell/http-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/http-conduit/default.nix
@@ -1,29 +1,29 @@
-{ cabal, asn1Data, attoparsec, attoparsecConduit, base64Bytestring
-, blazeBuilder, blazeBuilderConduit, caseInsensitive, certificate
-, conduit, cookie, cprngAes, dataDefault, deepseq, failure
-, filepath, hspec, httpTypes, HUnit, liftedBase, mimeTypes
-, monadControl, mtl, network, networkConduit, random, regexCompat
+{ cabal, asn1Data, base64Bytestring, blazeBuilder
+, blazeBuilderConduit, caseInsensitive, certificate, conduit
+, cookie, cprngAes, dataDefault, deepseq, failure, filepath, hspec
+, httpTypes, HUnit, liftedBase, mimeTypes, monadControl, mtl
+, network, networkConduit, publicsuffixlist, random, regexCompat
 , resourcet, socks, text, time, tls, tlsExtra, transformers
 , transformersBase, utf8String, void, wai, warp, zlibConduit
 }:
 
 cabal.mkDerivation (self: {
   pname = "http-conduit";
-  version = "1.8.9";
-  sha256 = "0v99nc29h4qm1dbs7bwk4nwhxwk22vzl4ghrq9r3vishi6gwr7hb";
+  version = "1.9.2.1";
+  sha256 = "1zzw9gdljn7pmp0d6k051gp1wiw9412c3gdbpwbpng6m5jhk079i";
   buildDepends = [
-    asn1Data attoparsec attoparsecConduit base64Bytestring blazeBuilder
-    blazeBuilderConduit caseInsensitive certificate conduit cookie
-    cprngAes dataDefault deepseq failure filepath httpTypes liftedBase
-    mimeTypes monadControl mtl network random regexCompat resourcet
-    socks text time tls tlsExtra transformers transformersBase
-    utf8String void zlibConduit
+    asn1Data base64Bytestring blazeBuilder blazeBuilderConduit
+    caseInsensitive certificate conduit cookie cprngAes dataDefault
+    deepseq failure filepath httpTypes liftedBase mimeTypes
+    monadControl mtl network publicsuffixlist random regexCompat
+    resourcet socks text time tls tlsExtra transformers
+    transformersBase utf8String void zlibConduit
   ];
   testDepends = [
-    asn1Data attoparsec attoparsecConduit base64Bytestring blazeBuilder
-    blazeBuilderConduit caseInsensitive certificate conduit cookie
-    cprngAes dataDefault deepseq failure filepath hspec httpTypes HUnit
-    liftedBase mimeTypes monadControl mtl network networkConduit random
+    asn1Data base64Bytestring blazeBuilder blazeBuilderConduit
+    caseInsensitive certificate conduit cookie cprngAes dataDefault
+    deepseq failure filepath hspec httpTypes HUnit liftedBase mimeTypes
+    monadControl mtl network networkConduit publicsuffixlist random
     regexCompat resourcet socks text time tls tlsExtra transformers
     transformersBase utf8String void wai warp zlibConduit
   ];
diff --git a/pkgs/development/libraries/haskell/iproute/default.nix b/pkgs/development/libraries/haskell/iproute/default.nix
index 1ec2b659f0c..045bb64035c 100644
--- a/pkgs/development/libraries/haskell/iproute/default.nix
+++ b/pkgs/development/libraries/haskell/iproute/default.nix
@@ -1,14 +1,14 @@
 { cabal, appar, byteorder, doctest, hspec, network, QuickCheck
-, Safe
+, safe
 }:
 
 cabal.mkDerivation (self: {
   pname = "iproute";
-  version = "1.2.10";
-  sha256 = "1ni91llvq1mfdsjmw1laqhk964y4vlpyk5s25j8klsfn27mq6c68";
+  version = "1.2.11";
+  sha256 = "14f96sb41f5m14186900rz84vwv7idjiylp8m5nsm6gganvh4sh4";
   buildDepends = [ appar byteorder network ];
   testDepends = [
-    appar byteorder doctest hspec network QuickCheck Safe
+    appar byteorder doctest hspec network QuickCheck safe
   ];
   meta = {
     homepage = "http://www.mew.org/~kazu/proj/iproute/";
diff --git a/pkgs/development/libraries/haskell/liblastfm/default.nix b/pkgs/development/libraries/haskell/liblastfm/default.nix
index d9a04355e2e..3222f4607e7 100644
--- a/pkgs/development/libraries/haskell/liblastfm/default.nix
+++ b/pkgs/development/libraries/haskell/liblastfm/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "liblastfm";
-  version = "0.1.0.0";
-  sha256 = "1777p2zysha9z389dkzvc22wph5k2xa6f23xk1ckr8j1q5v9dg6x";
+  version = "0.1.1.0";
+  sha256 = "1yrgyb0m1gdhsrkv3b8a5a0qii67v9gx1kbv79ixlac60bsm4q95";
   buildDepends = [
     aeson cereal cryptoApi httpConduit httpTypes network pureMD5 text
   ];
diff --git a/pkgs/development/libraries/haskell/monad-control/default.nix b/pkgs/development/libraries/haskell/monad-control/default.nix
index bf27ac461c3..1cdf917cf8f 100644
--- a/pkgs/development/libraries/haskell/monad-control/default.nix
+++ b/pkgs/development/libraries/haskell/monad-control/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "monad-control";
-  version = "0.3.1.4";
-  sha256 = "0mvcj6rljh2drkpf29zavwsqpzd9lw7s0n4inxm82i2017xdazy1";
+  version = "0.3.2";
+  sha256 = "1gw1g89cjr993kcxjd1lvj94klrb8hsxn0yzyl1gmfk4273z39pa";
   buildDepends = [
     baseUnicodeSymbols transformers transformersBase
   ];
diff --git a/pkgs/development/libraries/haskell/monad-logger/default.nix b/pkgs/development/libraries/haskell/monad-logger/default.nix
index 173529b443d..c06809c261d 100644
--- a/pkgs/development/libraries/haskell/monad-logger/default.nix
+++ b/pkgs/development/libraries/haskell/monad-logger/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "monad-logger";
-  version = "0.3.0.1";
-  sha256 = "05pwccs2f5qn22cwvzaiw6bflyxl3avrl89y737rjcsw6755r5sr";
+  version = "0.3.1.1";
+  sha256 = "11qqmflcydjfm5py7rkbi9qd0mkhw4kxzxff95wf0jmaia9knvx6";
   buildDepends = [
     conduit fastLogger monadControl mtl resourcet text transformers
     transformersBase
diff --git a/pkgs/development/libraries/haskell/multiarg/default.nix b/pkgs/development/libraries/haskell/multiarg/default.nix
index 74254a4c591..0a2495a07e9 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.8.0.0";
-  sha256 = "17zfrm9zjf7c8g7q9vqj1srk0g766ifhwqp7gm4ql890541q5lv5";
+  version = "0.10.0.0";
+  sha256 = "09clgin66i2m0b3ws7di9p15cy9bd144as832xpx4li6cfbg16ip";
   buildDepends = [ explicitException utf8String ];
   meta = {
     homepage = "https://github.com/massysett/multiarg";
diff --git a/pkgs/development/libraries/haskell/numbers/default.nix b/pkgs/development/libraries/haskell/numbers/default.nix
index e0136ad5d45..81a3e866dc0 100644
--- a/pkgs/development/libraries/haskell/numbers/default.nix
+++ b/pkgs/development/libraries/haskell/numbers/default.nix
@@ -2,14 +2,13 @@
 
 cabal.mkDerivation (self: {
   pname = "numbers";
-  version = "3000.1.0.1";
-  sha256 = "0r2s47nfdxasnp8j7giwpxls9v48f6ld0gc2hg2p7y2ar5xfrcc4";
+  version = "3000.1.0.3";
+  sha256 = "0w2m2m3vp3lpvnc7wkw6pqfz741a68dma4s0asl7cryykwf94xgz";
   testDepends = [
     QuickCheck testFramework testFrameworkQuickcheck2
   ];
-  doCheck = false;
   meta = {
-    homepage = "https://github.com/DanBurton/numbers";
+    homepage = "https://github.com/DanBurton/numbers#readme";
     description = "Various number types";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
diff --git a/pkgs/development/libraries/haskell/pandoc/default.nix b/pkgs/development/libraries/haskell/pandoc/default.nix
index 93f7e8add42..184e3fd9536 100644
--- a/pkgs/development/libraries/haskell/pandoc/default.nix
+++ b/pkgs/development/libraries/haskell/pandoc/default.nix
@@ -1,13 +1,15 @@
-{ cabal, base64Bytestring, blazeHtml, blazeMarkup, citeprocHs
-, dataDefault, extensibleExceptions, filepath, highlightingKate
-, HTTP, json, mtl, network, pandocTypes, parsec, random, syb
-, tagsoup, temporary, texmath, text, time, xml, zipArchive, zlib
+{ cabal, ansiTerminal, base64Bytestring, blazeHtml, blazeMarkup
+, citeprocHs, dataDefault, Diff, extensibleExceptions, filepath
+, highlightingKate, HTTP, HUnit, json, mtl, network, pandocTypes
+, parsec, QuickCheck, random, syb, tagsoup, temporary
+, testFramework, testFrameworkHunit, testFrameworkQuickcheck2
+, texmath, text, time, xml, zipArchive, zlib
 }:
 
 cabal.mkDerivation (self: {
   pname = "pandoc";
-  version = "1.10.1";
-  sha256 = "127pxs1w99nr6hdancaajm20w3vgmch4xlj0v7221y7i9qcr1y1y";
+  version = "1.11";
+  sha256 = "1v32z6fmfkllwf5y64sjbk3ckss2kfcs71b64a7fjdhp82m4i4yh";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
@@ -16,10 +18,13 @@ cabal.mkDerivation (self: {
     network pandocTypes parsec random syb tagsoup temporary texmath
     text time xml zipArchive zlib
   ];
+  testDepends = [
+    ansiTerminal Diff filepath highlightingKate HUnit pandocTypes
+    QuickCheck syb testFramework testFrameworkHunit
+    testFrameworkQuickcheck2 text
+  ];
   configureFlags = "-fblaze_html_0_5";
-  patchPhase = ''
-    sed -r -i -e 's|blaze-html >= 0.5 && < 0.6,|blaze-html >= 0.5,|' pandoc.cabal
-  '';
+  patchPhase = "sed -i -e 's|QuickCheck >= 2.4 && < 2.6,|QuickCheck,|' pandoc.cabal";
   doCheck = false;
   meta = {
     homepage = "http://johnmacfarlane.net/pandoc";
diff --git a/pkgs/development/libraries/haskell/persistent-sqlite/default.nix b/pkgs/development/libraries/haskell/persistent-sqlite/default.nix
index 418c8c4ca74..947f75342d4 100644
--- a/pkgs/development/libraries/haskell/persistent-sqlite/default.nix
+++ b/pkgs/development/libraries/haskell/persistent-sqlite/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "persistent-sqlite";
-  version = "1.1.4";
-  sha256 = "1xllj5bq7rw9v32ddm515705nviarw0hp4yxj0z8jf5q5jdz2vz0";
+  version = "1.1.5";
+  sha256 = "1kqxp0qsvxfz352yg9k1wgb2nfm7kcz8xdj9q537ilh99wxkp6cl";
   buildDepends = [
     aeson conduit monadControl monadLogger persistent text transformers
   ];
diff --git a/pkgs/development/libraries/haskell/persistent-template/default.nix b/pkgs/development/libraries/haskell/persistent-template/default.nix
index 117a63618d4..8cdc7caafc9 100644
--- a/pkgs/development/libraries/haskell/persistent-template/default.nix
+++ b/pkgs/development/libraries/haskell/persistent-template/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "persistent-template";
-  version = "1.1.2.4";
-  sha256 = "0fsqyv5r6h356shmah6bs75fzds0fsmyizbnvj5ywzhc003jv5h9";
+  version = "1.1.2.5";
+  sha256 = "142b02ini1b5c566rzhykv45n4byzvhp9r6yyavy4zyvgdj7ligj";
   buildDepends = [ aeson monadControl persistent text transformers ];
   testDepends = [ aeson hspec persistent QuickCheck text ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/publicsuffixlist/default.nix b/pkgs/development/libraries/haskell/publicsuffixlist/default.nix
index 1f38962ddd3..a091b62b3b1 100644
--- a/pkgs/development/libraries/haskell/publicsuffixlist/default.nix
+++ b/pkgs/development/libraries/haskell/publicsuffixlist/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "publicsuffixlist";
-  version = "0.0.3";
-  sha256 = "1drsm1zp30629rzy0693ggzcx46b7ydzzafmf07mjanmn1kyyqci";
+  version = "0.0.4";
+  sha256 = "0qwx2739pmmjfy6w3iri1fgyin3295vzn6rvazh34qd89i5vi3pb";
   buildDepends = [ cereal dataDefault text utf8String ];
   testDepends = [ cereal dataDefault HUnit idna text utf8String ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/punycode/default.nix b/pkgs/development/libraries/haskell/punycode/default.nix
index ade7685be6e..a4ad760d8ff 100644
--- a/pkgs/development/libraries/haskell/punycode/default.nix
+++ b/pkgs/development/libraries/haskell/punycode/default.nix
@@ -6,6 +6,7 @@ cabal.mkDerivation (self: {
   sha256 = "192jgfixnpxdj6jiiz92kx5bi6ij3c389b76q9f4vyfmvcajj1sr";
   buildDepends = [ cereal mtl text ];
   testDepends = [ cereal encoding HUnit mtl QuickCheck text ];
+  doCheck = false;
   meta = {
     homepage = "https://github.com/litherum/punycode";
     description = "Encode unicode strings to ascii forms according to RFC 3492";
diff --git a/pkgs/development/libraries/haskell/resourcet/default.nix b/pkgs/development/libraries/haskell/resourcet/default.nix
index 35b7fec3276..f0dde62ef97 100644
--- a/pkgs/development/libraries/haskell/resourcet/default.nix
+++ b/pkgs/development/libraries/haskell/resourcet/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "resourcet";
-  version = "0.4.4";
-  sha256 = "0ad1hl7bl9qid4brchb95gvnylfchmxncgdvgljb5lci7gy9r31z";
+  version = "0.4.5";
+  sha256 = "1i2n0y4ridlzi2fn319f8jg1whb10gajgyvbz0rx2mwxj15bbgni";
   buildDepends = [
     liftedBase monadControl mtl transformers transformersBase
   ];
diff --git a/pkgs/development/libraries/haskell/shake/default.nix b/pkgs/development/libraries/haskell/shake/default.nix
new file mode 100644
index 00000000000..dd4f985e618
--- /dev/null
+++ b/pkgs/development/libraries/haskell/shake/default.nix
@@ -0,0 +1,21 @@
+{ cabal, binary, deepseq, filepath, hashable, random, time
+, transformers, unorderedContainers
+}:
+
+cabal.mkDerivation (self: {
+  pname = "shake";
+  version = "0.9.1";
+  sha256 = "19jpnf7794ii1v0rfafmcrs71flwz6hmz72ng529ll12iy64xwkv";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [
+    binary deepseq filepath hashable random time transformers
+    unorderedContainers
+  ];
+  meta = {
+    homepage = "http://community.haskell.org/~ndm/shake/";
+    description = "Build system library, like Make, but more accurate dependencies";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/shakespeare-js/default.nix b/pkgs/development/libraries/haskell/shakespeare-js/default.nix
index 55bf276d1f8..7f00530a7f9 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";
-  sha256 = "0iwajn0d0yngzp10j9qbb2gpq1g7r390yqd7pj5dri35rjc6mr8n";
+  version = "1.1.2.1";
+  sha256 = "049nn0p236wbm2majkih87n2c7h65xrnf6gydsi7najxccjl7y8z";
   buildDepends = [ aeson shakespeare text ];
   testDepends = [ aeson hspec HUnit shakespeare text ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/shelly/default.nix b/pkgs/development/libraries/haskell/shelly/default.nix
index 325021c1cca..1e9e1f8c6cc 100644
--- a/pkgs/development/libraries/haskell/shelly/default.nix
+++ b/pkgs/development/libraries/haskell/shelly/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "shelly";
-  version = "0.15.4";
-  sha256 = "1b8fn5fa350hhlswn97g6zn9454nzn9sz60x55j959phwys0fcdk";
+  version = "0.15.4.1";
+  sha256 = "12m11s22izz0ny1syb1ykp2hi9n240myf0nhapvn8jx1fgf5iyck";
   buildDepends = [
     mtl systemFileio systemFilepath text time unixCompat
   ];
diff --git a/pkgs/development/libraries/haskell/smallcheck/default.nix b/pkgs/development/libraries/haskell/smallcheck/default.nix
index b7b0dc8e974..6d82e7e5132 100644
--- a/pkgs/development/libraries/haskell/smallcheck/default.nix
+++ b/pkgs/development/libraries/haskell/smallcheck/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "smallcheck";
-  version = "1.0.1";
-  sha256 = "1b8g7vgvwyz2smx16gbn73k749mazj2zmr2hjhqj4rk0433i6lpk";
+  version = "1.0.2";
+  sha256 = "09zlsvgbwgpjwkjhizbzzww2nvkyxvkf214yqxzfaa1cj9xzbbdi";
   buildDepends = [ logict mtl ];
   meta = {
     homepage = "https://github.com/feuerbach/smallcheck";
diff --git a/pkgs/development/libraries/haskell/stylish-haskell/default.nix b/pkgs/development/libraries/haskell/stylish-haskell/default.nix
index 18105124962..1d2cea756ff 100644
--- a/pkgs/development/libraries/haskell/stylish-haskell/default.nix
+++ b/pkgs/development/libraries/haskell/stylish-haskell/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "stylish-haskell";
-  version = "0.5.6.0";
-  sha256 = "1cy40b7csna3fwq0bm5mx9d09x52vj517mf38yn8ymd0afff67sb";
+  version = "0.5.6.1";
+  sha256 = "0fxncnl9bvb7qjha3r06qli9qlzfljism6k688hrr9y6l06jdc2c";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/syb/0.4.0.nix b/pkgs/development/libraries/haskell/syb/0.4.0.nix
new file mode 100644
index 00000000000..7408d0ac537
--- /dev/null
+++ b/pkgs/development/libraries/haskell/syb/0.4.0.nix
@@ -0,0 +1,15 @@
+{ cabal, HUnit, mtl }:
+
+cabal.mkDerivation (self: {
+  pname = "syb";
+  version = "0.4.0";
+  sha256 = "1wxz8y2dcjl407l596qswcl9cakbb5cs4wzwlyy6qjz7lyd0h0gj";
+  testDepends = [ HUnit mtl ];
+  meta = {
+    homepage = "http://www.cs.uu.nl/wiki/GenericProgramming/SYB";
+    description = "Scrap Your Boilerplate";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.andres ];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix b/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix
index 77e201ca63d..b944c1e104c 100644
--- a/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix
+++ b/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix
@@ -7,6 +7,7 @@ cabal.mkDerivation (self: {
   buildDepends = [
     extensibleExceptions QuickCheck random testFramework
   ];
+  jailbreak = true;
   meta = {
     homepage = "http://batterseapower.github.com/test-framework/";
     description = "QuickCheck2 support for the test-framework package";
diff --git a/pkgs/development/libraries/haskell/testpack/default.nix b/pkgs/development/libraries/haskell/testpack/default.nix
index 53aa0ee8613..9dc14f2f5ac 100644
--- a/pkgs/development/libraries/haskell/testpack/default.nix
+++ b/pkgs/development/libraries/haskell/testpack/default.nix
@@ -2,10 +2,11 @@
 
 cabal.mkDerivation (self: {
   pname = "testpack";
-  version = "2.1.2";
-  sha256 = "12dhl8svy0wmdwlvkp0p0j6wr6vgv4hrjcpdv48kc5rcwjvh8xif";
+  version = "2.1.2.1";
+  sha256 = "1fm4dy9vs2whc48cr00ncqqzz6r5yp7bvgil86idbbgi8igld5j0";
   buildDepends = [ HUnit mtl QuickCheck random ];
   patches = [ ./support-recent-quickcheck.patch ];
+  jailbreak = true;
   meta = {
     homepage = "http://hackage.haskell.org/cgi-bin/hackage-scripts/package/testpack";
     description = "Test Utililty Pack for HUnit and QuickCheck";
diff --git a/pkgs/development/libraries/haskell/th-extras/default.nix b/pkgs/development/libraries/haskell/th-extras/default.nix
index be78bbaef31..3475ccb804a 100644
--- a/pkgs/development/libraries/haskell/th-extras/default.nix
+++ b/pkgs/development/libraries/haskell/th-extras/default.nix
@@ -2,12 +2,12 @@
 
 cabal.mkDerivation (self: {
   pname = "th-extras";
-  version = "0.0.0.1";
-  sha256 = "13d9fs48z87inma3kg9b7lfjp3h8j85fav6awd1zj3i2nl214hff";
+  version = "0.0.0.2";
+  sha256 = "15sqf2jjnqcssq8hp80fk0ysgwqykjjc31gvvmzg4sypskpjs8cl";
   buildDepends = [ syb ];
   meta = {
     homepage = "https://github.com/mokus0/th-extras";
-    description = "A grab bag of useful functions for use with Template Haskell";
+    description = "A grab bag of functions for use with Template Haskell";
     license = self.stdenv.lib.licenses.publicDomain;
     platforms = self.ghc.meta.platforms;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
diff --git a/pkgs/development/libraries/haskell/threads/default.nix b/pkgs/development/libraries/haskell/threads/default.nix
index 533a67c99c8..d802790da9d 100644
--- a/pkgs/development/libraries/haskell/threads/default.nix
+++ b/pkgs/development/libraries/haskell/threads/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "threads";
-  version = "0.5.0.1";
-  sha256 = "0amyaxa70q6v021nab6v3cfqc40mwj5dr2fwla9d4bm6ppmq6lyy";
+  version = "0.5.0.2";
+  sha256 = "14ccmjg56429a3mzx11ccv18bvkqg56ph9kbpmhdx2ajar80g6jm";
   buildDepends = [ baseUnicodeSymbols stm ];
   testDepends = [
     baseUnicodeSymbols concurrentExtra HUnit stm testFramework
diff --git a/pkgs/development/libraries/haskell/time-compat/default.nix b/pkgs/development/libraries/haskell/time-compat/default.nix
index e42224ace0d..fa7c3ff4185 100644
--- a/pkgs/development/libraries/haskell/time-compat/default.nix
+++ b/pkgs/development/libraries/haskell/time-compat/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "time-compat";
-  version = "0.1.0.2";
-  sha256 = "0687bxkvqs22p7skqb8n289k9nv7cafg8jyx32sswn2h11m7dihb";
+  version = "0.1.0.3";
+  sha256 = "0zqgzr8yjn36rn6gflwh5s0c92vl44xzxiw0jz8d5h0h8lhi21sr";
   buildDepends = [ time ];
   meta = {
     homepage = "http://hub.darcs.net/dag/time-compat";
diff --git a/pkgs/development/libraries/haskell/uu-parsinglib/default.nix b/pkgs/development/libraries/haskell/uu-parsinglib/default.nix
index d28eb827dab..d9477f4233d 100644
--- a/pkgs/development/libraries/haskell/uu-parsinglib/default.nix
+++ b/pkgs/development/libraries/haskell/uu-parsinglib/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "uu-parsinglib";
-  version = "2.7.4.1";
-  sha256 = "1aya95j7dd0yal0ygy6d4w4wmlhgn5ddy3c5f6ncl4k3kg7hjxd1";
+  version = "2.7.4.2";
+  sha256 = "10ddm6x9km3lzs9ahqpsl9krvslsn9glimwzq4hspgsp6izd1dmq";
   buildDepends = [ ListLike time ];
   meta = {
     homepage = "http://www.cs.uu.nl/wiki/bin/view/HUT/ParserCombinators";
diff --git a/pkgs/development/libraries/haskell/uulib/default.nix b/pkgs/development/libraries/haskell/uulib/default.nix
index 991f3808098..2521c44bec6 100644
--- a/pkgs/development/libraries/haskell/uulib/default.nix
+++ b/pkgs/development/libraries/haskell/uulib/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "uulib";
-  version = "0.9.14";
-  sha256 = "0bi62l9fp1ghqq4dagdy4nsxmm08gpsrnfgy6d6k8f4239s3yr0z";
+  version = "0.9.15";
+  sha256 = "0433shh493c04qmi0sd9mfzpy198zi11gxdmcs6nz2gcnxm812zm";
   meta = {
     homepage = "http://www.cs.uu.nl/wiki/HUT/WebHome";
     description = "Haskell Utrecht Tools Library";
diff --git a/pkgs/development/libraries/haskell/void/default.nix b/pkgs/development/libraries/haskell/void/default.nix
index cdf21c78233..91b641c5f9a 100644
--- a/pkgs/development/libraries/haskell/void/default.nix
+++ b/pkgs/development/libraries/haskell/void/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "void";
-  version = "0.5.11";
-  sha256 = "0fi8ccnhg0ckz5v3cgxhdd67p0v3g9yawin917ik4vxfbwz5j3v6";
+  version = "0.5.12";
+  sha256 = "03fqcap94saj7mx3y4pvvfj4z8dy6rsk2kvhgbnk2wvz5xm7xvci";
   buildDepends = [ semigroups ];
   meta = {
     homepage = "http://github.com/ekmett/void";
diff --git a/pkgs/development/libraries/haskell/wai-extra/default.nix b/pkgs/development/libraries/haskell/wai-extra/default.nix
index 53a1ccaf55a..7e331d69da0 100644
--- a/pkgs/development/libraries/haskell/wai-extra/default.nix
+++ b/pkgs/development/libraries/haskell/wai-extra/default.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "wai-extra";
-  version = "1.3.2.4";
-  sha256 = "12hdg5h4bk04nhcmjm5mc62dng9np0dlik4b1w1syd2lxqv6pdb9";
+  version = "1.3.3.1";
+  sha256 = "0ss58s5m8yp326q0651znifbfl6kpimyhm479wx8r3zx3ndl47q9";
   buildDepends = [
     ansiTerminal blazeBuilder blazeBuilderConduit caseInsensitive
     conduit dataDefault dateCache fastLogger httpTypes network
diff --git a/pkgs/development/libraries/haskell/wl-pprint-extras/default.nix b/pkgs/development/libraries/haskell/wl-pprint-extras/default.nix
new file mode 100644
index 00000000000..77670b4f117
--- /dev/null
+++ b/pkgs/development/libraries/haskell/wl-pprint-extras/default.nix
@@ -0,0 +1,14 @@
+{ cabal, nats, semigroupoids, semigroups, text, utf8String }:
+
+cabal.mkDerivation (self: {
+  pname = "wl-pprint-extras";
+  version = "3.4";
+  sha256 = "17vxyckx2pj4sc2d1yw1rcsxn1rp4nzdjp0hgpy78xsp9plccgsy";
+  buildDepends = [ nats semigroupoids semigroups text utf8String ];
+  meta = {
+    homepage = "http://github.com/ekmett/wl-pprint-extras/";
+    description = "A free monad based on the Wadler/Leijen pretty printer";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/wl-pprint-terminfo/default.nix b/pkgs/development/libraries/haskell/wl-pprint-terminfo/default.nix
new file mode 100644
index 00000000000..d2bd35eebd4
--- /dev/null
+++ b/pkgs/development/libraries/haskell/wl-pprint-terminfo/default.nix
@@ -0,0 +1,18 @@
+{ cabal, nats, semigroups, terminfo, text, transformers
+, wlPprintExtras
+}:
+
+cabal.mkDerivation (self: {
+  pname = "wl-pprint-terminfo";
+  version = "3.6";
+  sha256 = "14dq0inv6i8pwjzrpys420iwi6002mard1n73z96k89zq5xhwlbg";
+  buildDepends = [
+    nats semigroups terminfo text transformers wlPprintExtras
+  ];
+  meta = {
+    homepage = "http://github.com/ekmett/wl-pprint-terminfo/";
+    description = "A color pretty printer with terminfo support";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/wl-pprint/default.nix b/pkgs/development/libraries/haskell/wl-pprint/default.nix
new file mode 100644
index 00000000000..9849d4fab0e
--- /dev/null
+++ b/pkgs/development/libraries/haskell/wl-pprint/default.nix
@@ -0,0 +1,12 @@
+{ cabal }:
+
+cabal.mkDerivation (self: {
+  pname = "wl-pprint";
+  version = "1.1";
+  sha256 = "16kp3fkh0x9kgzk6fdqrm8m0v7b5cgbv0m3x63ybbp5vxbhand06";
+  meta = {
+    description = "The Wadler/Leijen Pretty Printer";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/xdot/default.nix b/pkgs/development/libraries/haskell/xdot/default.nix
index 73cc5c6e764..d1702862f42 100644
--- a/pkgs/development/libraries/haskell/xdot/default.nix
+++ b/pkgs/development/libraries/haskell/xdot/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "xdot";
-  version = "0.2.2";
-  sha256 = "1n7lwshfn5rzbk4fxlkn02fxki2xh5m0304hnb1d5mchxyzhfdan";
+  version = "0.2.3";
+  sha256 = "0xb8igsqydiw1w00frn4mxkflhxkayif2vivxmq5fk53am2f43wy";
   buildDepends = [ cairo graphviz gtk mtl polyparse text ];
   meta = {
     description = "Parse Graphviz xdot files and interactively view them using GTK and Cairo";
diff --git a/pkgs/development/libraries/haskell/xml-conduit/default.nix b/pkgs/development/libraries/haskell/xml-conduit/default.nix
index 7ebc0b003e5..b586a6336bc 100644
--- a/pkgs/development/libraries/haskell/xml-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/xml-conduit/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "xml-conduit";
-  version = "1.1.0.2";
-  sha256 = "17wv4rngmn8jvg6c3ia48w5q9s9dww9aisrmans9llqs7ks3ndqc";
+  version = "1.1.0.3";
+  sha256 = "04mnn6j9bbkhvav04gl9cbd4rldl7bwgcapvykwvf2p3nb3d7bi4";
   buildDepends = [
     attoparsec attoparsecConduit blazeBuilder blazeBuilderConduit
     blazeHtml blazeMarkup conduit dataDefault failure monadControl
diff --git a/pkgs/development/libraries/haskell/yaml/default.nix b/pkgs/development/libraries/haskell/yaml/default.nix
index f1cbb7ee7b8..2c2f39451e6 100644
--- a/pkgs/development/libraries/haskell/yaml/default.nix
+++ b/pkgs/development/libraries/haskell/yaml/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yaml";
-  version = "0.8.2.1";
-  sha256 = "1p0hi9psm42bsmm14gfdkj4wrbcgzkishcih6rwc2bcvn2i0hyyw";
+  version = "0.8.2.3";
+  sha256 = "1ds6969gbkxgkm2fha0ifmssjl7by9glgix165v0h8i7fx9wx3wa";
   buildDepends = [
     aeson attoparsec conduit resourcet text transformers
     unorderedContainers vector
diff --git a/pkgs/development/libraries/haskell/yesod-json/default.nix b/pkgs/development/libraries/haskell/yesod-json/default.nix
index 4b1777676a8..b395645557b 100644
--- a/pkgs/development/libraries/haskell/yesod-json/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-json/default.nix
@@ -1,16 +1,17 @@
-{ cabal, aeson, attoparsecConduit, blazeBuilder, conduit, safe
-, shakespeareJs, text, transformers, vector, wai, waiExtra
-, yesodCore, yesodRoutes
+{ cabal, aeson, attoparsecConduit, blazeBuilder, conduit, hspec
+, safe, shakespeareJs, text, transformers, vector, wai, waiExtra
+, waiTest, yesodCore, yesodRoutes
 }:
 
 cabal.mkDerivation (self: {
   pname = "yesod-json";
-  version = "1.1.2.1";
-  sha256 = "0vrhn3v26q7cqwds99hqyibq09vyxnviqzgyn7w5ldnl3ycg7dqd";
+  version = "1.1.2.2";
+  sha256 = "1bl4rs3biv2man0n8ijldil32lyswjqk5ykz0nv06qsaaafjpc3g";
   buildDepends = [
     aeson attoparsecConduit blazeBuilder conduit safe shakespeareJs
     text transformers vector wai waiExtra yesodCore yesodRoutes
   ];
+  testDepends = [ hspec text waiTest yesodCore ];
   meta = {
     homepage = "http://www.yesodweb.com/";
     description = "Generate content for Yesod using the aeson package";
diff --git a/pkgs/development/libraries/haskell/yesod-test/default.nix b/pkgs/development/libraries/haskell/yesod-test/default.nix
index 3753067d958..8b32b48af87 100644
--- a/pkgs/development/libraries/haskell/yesod-test/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-test/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yesod-test";
-  version = "0.3.3.2";
-  sha256 = "0skr710fqqnna17gywaj30kpj352px2d17fwwqb832j7mj92bmv5";
+  version = "0.3.5";
+  sha256 = "095hwl1dm4mk467la68x3lilj0c056603kl0nn8ra4glcr86273j";
   buildDepends = [
     attoparsec blazeBuilder blazeHtml blazeMarkup caseInsensitive
     cookie hspec htmlConduit httpTypes HUnit monadControl network
diff --git a/pkgs/development/libraries/haskell/yesod/default.nix b/pkgs/development/libraries/haskell/yesod/default.nix
index ebb46f68bc8..9998790ea73 100644
--- a/pkgs/development/libraries/haskell/yesod/default.nix
+++ b/pkgs/development/libraries/haskell/yesod/default.nix
@@ -12,8 +12,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yesod";
-  version = "1.1.9";
-  sha256 = "0fcvf0bg7dsrka639q20dncinqq0fdv21zyvwpx63qfcmilhmjlm";
+  version = "1.1.9.2";
+  sha256 = "1rv9mk842b9qwdzal9y5cn2z5z2rl6490600jg1xbsg0x0nl7hdj";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/yst/default.nix b/pkgs/development/libraries/haskell/yst/default.nix
index 5087bfce12c..d194b1970c8 100644
--- a/pkgs/development/libraries/haskell/yst/default.nix
+++ b/pkgs/development/libraries/haskell/yst/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yst";
-  version = "0.3.1";
-  sha256 = "1ax3j21b4ac9x4vvvfgnhz0sczd7l7ia6mcxnqhbc3166sn91vig";
+  version = "0.3.1.1";
+  sha256 = "1wc2s5aan4rqdrpqgqvka5pqm3d691si5hdf0m0wpi2hzkwl3qv3";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/zip-archive/default.nix b/pkgs/development/libraries/haskell/zip-archive/default.nix
index 45f2ac96319..38290c8cd54 100644
--- a/pkgs/development/libraries/haskell/zip-archive/default.nix
+++ b/pkgs/development/libraries/haskell/zip-archive/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "zip-archive";
-  version = "0.1.3.3";
-  sha256 = "0zzps6s6lsv35qv1xx1fwipk2nwv255wpa956mvzbwdr47pgqjwi";
+  version = "0.1.3.4";
+  sha256 = "0hvndr3gb7fiv4qjwjvic5mg7wq7h7nw3c3v5xq8fnlr1l943vyb";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ binary digest filepath mtl time utf8String zlib ];
diff --git a/pkgs/development/libraries/haskell/zlib/0.5.4.1.nix b/pkgs/development/libraries/haskell/zlib/0.5.4.1.nix
new file mode 100644
index 00000000000..c1fa7d78d0a
--- /dev/null
+++ b/pkgs/development/libraries/haskell/zlib/0.5.4.1.nix
@@ -0,0 +1,14 @@
+{ cabal, zlib }:
+
+cabal.mkDerivation (self: {
+  pname = "zlib";
+  version = "0.5.4.1";
+  sha256 = "0l550l2qw4gx530h1yjjpdh6rkm59l9l6jbmlm0vx41cqpj6b8yc";
+  extraLibraries = [ zlib ];
+  meta = {
+    description = "Compression and decompression in the gzip and zlib formats";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.andres ];
+  };
+})
diff --git a/pkgs/development/libraries/jbig2dec/default.nix b/pkgs/development/libraries/jbig2dec/default.nix
index 60c6e9922a4..e15c5c8d179 100644
--- a/pkgs/development/libraries/jbig2dec/default.nix
+++ b/pkgs/development/libraries/jbig2dec/default.nix
@@ -1,13 +1,13 @@
-{ stdenv, fetchurl }: 
+{ stdenv, fetchurl }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   name = "jbig2dec-0.11";
-  
+
   src = fetchurl {
-    url = http://ghostscript.com/~giles/jbig2/jbig2dec/jbig2dec-0.11.tar.gz;
-    sha256 = "1ffhgmf2fqzk0h4k736pp06z7q5y4x41fg844bd6a9vgncq86bby";
+    url = "mirror://sourceforge/jbig2dec/${name}.tar.xz";
+    sha256 = "1xddc30garsg5j8p348cz5l8vn8j7723c0sykv0kc1w5ihaghsq1";
   };
-  
+
   meta = {
     homepage = http://jbig2dec.sourceforge.net/;
     description = "Decoder implementation of the JBIG2 image compression format";
diff --git a/pkgs/development/libraries/libchop/default.nix b/pkgs/development/libraries/libchop/default.nix
index 7f3c0257339..9a1b4122365 100644
--- a/pkgs/development/libraries/libchop/default.nix
+++ b/pkgs/development/libraries/libchop/default.nix
@@ -9,7 +9,10 @@ stdenv.mkDerivation rec {
     sha256 = "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g";
   };
 
+  patches = [ ./gets-undeclared.patch ];
+
   nativeBuildInputs = [ pkgconfig gperf ];
+  
   buildInputs =
     [ zlib bzip2 lzo
       libgcrypt
diff --git a/pkgs/development/libraries/libchop/gets-undeclared.patch b/pkgs/development/libraries/libchop/gets-undeclared.patch
new file mode 100644
index 00000000000..b6cdc77caa8
--- /dev/null
+++ b/pkgs/development/libraries/libchop/gets-undeclared.patch
@@ -0,0 +1,71 @@
+This patch is needed to allow builds with newer versions of
+the GNU libc (2.16+).
+
+
+commit 66712c23388e93e5c518ebc8515140fa0c807348
+Author: Eric Blake <eblake@redhat.com>
+Date:   Thu Mar 29 13:30:41 2012 -0600
+
+    stdio: don't assume gets any more
+    
+    Gnulib intentionally does not have a gets module, and now that C11
+    and glibc have dropped it, we should be more proactive about warning
+    any user on a platform that still has a declaration of this dangerous
+    interface.
+    
+    * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets
+    support.
+    * modules/stdio (Makefile.am): Likewise.
+    * lib/stdio-read.c (gets): Likewise.
+    * tests/test-stdio-c++.cc: Likewise.
+    * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment.
+    * lib/stdio.in.h (gets): Make warning occur in more places.
+    * doc/posix-functions/gets.texi (gets): Update documentation.
+    Reported by Christer Solskogen.
+    
+    Signed-off-by: Eric Blake <eblake@redhat.com>
+
+diff --git a/lib/stdio.in.h b/lib/stdio.in.h
+index aa7b599..c377b6e 100644
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -698,22 +698,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
+ # endif
+ #endif
+ 
+-#if @GNULIB_GETS@
+-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-#   undef gets
+-#   define gets rpl_gets
+-#  endif
+-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
+-_GL_CXXALIAS_RPL (gets, char *, (char *s));
+-# else
+-_GL_CXXALIAS_SYS (gets, char *, (char *s));
+-#  undef gets
+-# endif
+-_GL_CXXALIASWARN (gets);
+ /* It is very rare that the developer ever has full control of stdin,
+-   so any use of gets warrants an unconditional warning.  Assume it is
+-   always declared, since it is required by C89.  */
++   so any use of gets warrants an unconditional warning; besides, C11
++   removed it.  */
++#undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+ 
+@@ -1053,9 +1042,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
+ # endif
+ #endif
+ 
+-/* Some people would argue that sprintf should be handled like gets
+-   (for example, OpenBSD issues a link warning for both functions),
+-   since both can cause security holes due to buffer overruns.
++/* Some people would argue that all sprintf uses should be warned about
++   (for example, OpenBSD issues a link warning for it),
++   since it can cause security holes due to buffer overruns.
+    However, we believe that sprintf can be used safely, and is more
+    efficient than snprintf in those safe cases; and as proof of our
+    belief, we use sprintf in several gnulib modules.  So this header
diff --git a/pkgs/development/libraries/libee/default.nix b/pkgs/development/libraries/libee/default.nix
new file mode 100644
index 00000000000..c3c73381acd
--- /dev/null
+++ b/pkgs/development/libraries/libee/default.nix
@@ -0,0 +1,16 @@
+{ stdenv, fetchurl, pkgconfig, libestr }:
+stdenv.mkDerivation {
+  name = "libee-0.4.1";
+
+  src = fetchurl {
+    url = http://www.libee.org/download/files/download/libee-0.4.1.tar.gz;
+    md5 = "7bbf4160876c12db6193c06e2badedb2";
+  };
+
+  buildInputs = [pkgconfig libestr];
+
+  meta = {
+    homepage = "http://www.libee.org/";
+    description = "An Event Expression Library inspired by CEE";
+  };
+}
diff --git a/pkgs/development/libraries/libestr/default.nix b/pkgs/development/libraries/libestr/default.nix
new file mode 100644
index 00000000000..74d86667b5b
--- /dev/null
+++ b/pkgs/development/libraries/libestr/default.nix
@@ -0,0 +1,8 @@
+{ stdenv, fetchurl }:
+stdenv.mkDerivation {
+  name = "libestr-0.1.4";
+  src = fetchurl {
+    url = http://libestr.adiscon.com/files/download/libestr-0.1.4.tar.gz;
+    sha256 = "1qw5vqryawdm434l9ql3r160ap2f5mmp7b6pciac7qli62y0a2z3";
+  };
+}
diff --git a/pkgs/development/libraries/libmcrypt/default.nix b/pkgs/development/libraries/libmcrypt/default.nix
index eac577869e2..79019cbc489 100644
--- a/pkgs/development/libraries/libmcrypt/default.nix
+++ b/pkgs/development/libraries/libmcrypt/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, disablePosixThreads ? false }:
+
+with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "libmcrypt-2.5.8";
@@ -10,7 +12,12 @@ stdenv.mkDerivation rec {
 
   buildInputs = [];
 
+  configureFlags = optional disablePosixThreads
+    [ "--disable-posix-threads" ];
+
   meta = {
+    description = "MCrypt is a replacement for the old crypt() package and crypt(1) command, with extensions.";
     homepage = http://mcrypt.sourceforge.net;
+    license = "GPL";
   };
 }
diff --git a/pkgs/development/libraries/libnotify/default.nix b/pkgs/development/libraries/libnotify/default.nix
index 7bfd8c05104..ab8034c781e 100644
--- a/pkgs/development/libraries/libnotify/default.nix
+++ b/pkgs/development/libraries/libnotify/default.nix
@@ -1,17 +1,34 @@
-{ stdenv, fetchurl, pkgconfig, dbus, dbus_glib, gtk, glib }:
- 
+{ stdenv, fetchurl, pkgconfig, automake, autoconf, libtool, glib, gdk_pixbuf }:
+
 stdenv.mkDerivation rec {
-  name = "libnotify-0.4.5";
+  ver_maj = "0.7";
+  ver_min = "5";
+  name = "libnotify-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = "http://www.galago-project.org/files/releases/source/libnotify/${name}.tar.gz";
-    sha256 = "1ndh7wpm9qh12vm5avjrq2xv1j681j9qq6j2fyj6a2shl67dp687";
+    url = "mirror://gnome/sources/libnotify/${ver_maj}/${name}.tar.xz";
+    sha256 = "0lmnzy16vdjs9vlgdm0b7wfyi1nh526hv2dpb7vxb92bhx3wny23";
+  };
+  src_m4 = fetchurl {
+    url = "mirror://gentoo/distfiles/introspection-20110205.m4.tar.bz2";
+    sha256 = "1cnqh7aaji648nfd5537v7xaak8hgww3bpifhwam7bl0sc3ad523";
   };
 
-  buildInputs = [ pkgconfig dbus.libs dbus_glib gtk glib ];
+  # see Gentoo ebuild - we don't need to depend on gtk+(2/3)
+  preConfigure = ''
+    cd m4
+    tar xvf ${src_m4}
+    cd ..
+
+    sed -i -e 's:noinst_PROG:check_PROG:' tests/Makefile.am || die
+    sed -i -e '/PKG_CHECK_MODULES(TESTS/d' configure.ac || die
+    AT_M4DIR=. autoreconf
+  '';
+
+  buildInputs = [ pkgconfig automake autoconf glib gdk_pixbuf ];
 
   meta = {
-    homepage = http://galago-project.org/;
+    homepage = http://galago-project.org/; # very obsolete but found no better
     description = "A library that sends desktop notifications to a notification daemon";
   };
 }
diff --git a/pkgs/development/libraries/librdf/default.nix b/pkgs/development/libraries/librdf/default.nix
index 1f3e5b40937..21c952b7fb8 100644
--- a/pkgs/development/libraries/librdf/default.nix
+++ b/pkgs/development/libraries/librdf/default.nix
@@ -1,18 +1,30 @@
-{ stdenv, fetchurl, pkgconfig, librdf_raptor, ladspaH, openssl, zlib }:
+{ stdenv, fetchurl, pkgconfig, libtool, automake, autoconf
+, librdf_raptor, librdf_raptor2, ladspaH, openssl, zlib #, swh_lv2
+}:
 
-stdenv.mkDerivation {
-  name = "liblrdf-0.4.0";
+stdenv.mkDerivation rec {
+  version = "0.5.0";
+  name = "liblrdf-${version}";
 
   src = fetchurl {
-    url = mirror://sourceforge/lrdf/liblrdf/0.4.0/liblrdf-0.4.0.tar.gz;
-    sha256 = "015jv7pp0a0qxgljgdvf7d01nj4fx0zgzg0wayjp7v86pa38xscm";
+    url = "http://github.com/swh/LRDF/archive/${version}.tar.gz";
+    sha256 = "18p2flb2sv2hq6w2qkd29z9c7knnwqr3f12i2srshlzx6vwkm05s";
   };
 
-  buildInputs = [ pkgconfig ladspaH openssl zlib ];
+  postPatch = "sed -i -e 's:usr/local:usr:' examples/{instances,remove}_test.c";
 
-  propagatedBuildInputs = [ librdf_raptor ];
+  preConfigure = "rm m4/* && autoreconf -if";
 
-  meta = { 
+  buildInputs = [
+    pkgconfig libtool automake autoconf ladspaH openssl zlib /*swh_lv2*/
+    #librdf_raptor 
+  ];
+
+  propagatedBuildInputs = [ librdf_raptor2 ];
+
+  #doCheck = true; # would need swh_lv2 and some path patching
+
+  meta = {
     description = "A lightweight RDF library with special support for LADSPA plugins.";
     homepage = http://sourceforge.net/projects/lrdf/;
     license = "GPLv2";
diff --git a/pkgs/development/libraries/librdf/raptor2.nix b/pkgs/development/libraries/librdf/raptor2.nix
index 2f956630fa1..4658cf28335 100644
--- a/pkgs/development/libraries/librdf/raptor2.nix
+++ b/pkgs/development/libraries/librdf/raptor2.nix
@@ -1,18 +1,18 @@
 { stdenv, fetchurl, libxml2, libxslt, curl }:
 
 stdenv.mkDerivation rec {
-  name = "raptor2-2.0.4";
+  name = "raptor2-2.0.8"; # 2.0.9 misses a header and so fails liblrdf
 
   src = fetchurl {
     url = "http://download.librdf.org/source/${name}.tar.gz";
-    sha256 = "0viaam60adhsxim2vaq5xs1pfmm6wiidxpkrhwyl7x9mz8x9vx1l";
+    sha256 = "1mz7cxnfw73saf74c9if06n2mlsvn2rnn67vy7j2mq3wkhy0hcb0";
   };
 
   buildInputs = [ libxml2 libxslt ];
 
   postInstall = "rm -rvf $out/share/gtk-doc";
 
-  meta = { 
+  meta = {
     description = "The RDF Parser Toolkit";
     homepage = "http://librdf.org/raptor";
     license = "LGPL-2.1 Apache-2.0";
diff --git a/pkgs/development/libraries/librdf/rasqal.nix b/pkgs/development/libraries/librdf/rasqal.nix
index 9b65487ccfb..6d6f9d05808 100644
--- a/pkgs/development/libraries/librdf/rasqal.nix
+++ b/pkgs/development/libraries/librdf/rasqal.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, librdf_raptor2, gmp, pkgconfig, pcre, libxml2 }:
 
 stdenv.mkDerivation rec {
-  name = "rasqal-0.9.26";
+  name = "rasqal-0.9.30";
 
   src = fetchurl {
     url = "http://download.librdf.org/source/${name}.tar.gz";
-    sha256 = "1drjcy1k9g72iis0ghllzn7n0w03bahhrd2p5hs39anbm6mr0yk9";
+    sha256 = "1z8wifq79kivcwpwzmjnjdrbr65zam190gpxhgrvsyfch0yykw5b";
   };
 
   nativeBuildInputs = [ pkgconfig ];
@@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
   propagatedBuildInputs = [ librdf_raptor2 ];
 
   postInstall = "rm -rvf $out/share/gtk-doc";
-  
-  meta = { 
+
+  meta = {
     description = "Library that handles Resource Description Framework (RDF)";
     homepage = "http://librdf.org/rasqal";
     license = "LGPL-2.1 Apache-2.0";
diff --git a/pkgs/development/libraries/librdf/redland.nix b/pkgs/development/libraries/librdf/redland.nix
index 47e25877be9..26b3de70dcd 100644
--- a/pkgs/development/libraries/librdf/redland.nix
+++ b/pkgs/development/libraries/librdf/redland.nix
@@ -7,11 +7,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "redland-1.0.14";
+  name = "redland-1.0.16";
 
   src = fetchurl {
     url = "http://download.librdf.org/source/${name}.tar.gz";
-    sha256 = "1i460q9gslb7l75hjwc6w2kp2wk7fgp8lr7phamg33c6j013y30k";
+    sha256 = "1gcx0h5dxa3c4xhhjk3gr0708zjj0n6zpslvbjfi2qbf13y798nr";
   };
 
   nativeBuildInputs = [ perl pkgconfig ];
diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix
index 3e829dc421a..08784a0f257 100644
--- a/pkgs/development/libraries/libsoup/default.nix
+++ b/pkgs/development/libraries/libsoup/default.nix
@@ -1,29 +1,23 @@
-{ stdenv, fetchurl, glib, libxml2, pkgconfig, intltool, python
+{ stdenv, fetchurl, glib, libxml2, pkgconfig
 , gnomeSupport ? true, libgnome_keyring, sqlite, glib_networking }:
 
 stdenv.mkDerivation {
-  name = "libsoup-2.40.3";
+  name = "libsoup-2.38.1";
 
   src = fetchurl {
-    url = mirror://gnome/sources/libsoup/2.40/libsoup-2.40.3.tar.xz;
-    sha256 = "82c92f1f6f4cbfd501df783ed87e7de9410b4a12a3bb0b19c64722e185d2bbc9";
+    url = mirror://gnome/sources/libsoup/2.38/libsoup-2.38.1.tar.xz;
+    sha256 = "16iza4y8pmc4sn90iid88fgminvgcqypy3s2qnmzkzm5qwzr5f3i";
   };
 
-  nativeBuildInputs = [ pkgconfig intltool python ];
 
+  nativeBuildInputs = [ pkgconfig ];
   propagatedBuildInputs = [ glib libxml2 ]
     ++ stdenv.lib.optionals gnomeSupport [ libgnome_keyring sqlite ];
-
   passthru.propagatedUserEnvPackages = [ glib_networking ];
 
   # glib_networking is a runtime dependency, not a compile-time dependency
   configureFlags = "--disable-tls-check";
 
-  preConfigure = ''
-    substituteInPlace libsoup/tld-parser.py \
-      --replace "/usr/bin/env python" ${python}/bin/python
-  '';
-
   meta = {
     inherit (glib.meta) maintainers platforms;
   };
diff --git a/pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch b/pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch
new file mode 100644
index 00000000000..1cc5b6e01be
--- /dev/null
+++ b/pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch
@@ -0,0 +1,143 @@
+From 557b0e5045c9eadb556ce11e16965cf0d0787438 Mon Sep 17 00:00:00 2001
+From: Stef Walter <stefw@collabora.co.uk>
+Date: Tue, 14 Jun 2011 12:33:45 +0100
+Subject: [PATCH] Remove G_CONST_RETURN usage, now that its gone in glib.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=652545
+
+[Alexandre Rostovtsev <tetromino@gmail.com>: backported to unique-1.1]
+---
+ unique/uniqueapp.c       |    4 ++--
+ unique/uniquebackend.c   |    4 ++--
+ unique/uniquebackend.h   |    4 ++--
+ unique/uniqueinternals.h |    4 ++--
+ unique/uniquemessage.c   |    4 ++--
+ unique/uniquemessage.h   |    4 ++--
+ 6 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/unique/uniqueapp.c b/unique/uniqueapp.c
+index b40a86c..e8edc94 100644
+--- a/unique/uniqueapp.c
++++ b/unique/uniqueapp.c
+@@ -781,7 +781,7 @@ unique_app_watch_window (UniqueApp *app,
+ }
+ 
+ 
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_command_to_string (UniqueApp *app,
+                           gint       command)
+ {
+@@ -863,7 +863,7 @@ unique_command_from_string (UniqueApp   *app,
+   return retval;
+ }
+ 
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_response_to_string (UniqueResponse response)
+ {
+   GEnumClass *enum_class;
+diff --git a/unique/uniquebackend.c b/unique/uniquebackend.c
+index a76e42e..68e2735 100644
+--- a/unique/uniquebackend.c
++++ b/unique/uniquebackend.c
+@@ -111,7 +111,7 @@ unique_backend_set_name (UniqueBackend *backend,
+  *
+  * Return value: FIXME
+  */
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_backend_get_name (UniqueBackend *backend)
+ {
+   g_return_val_if_fail (UNIQUE_IS_BACKEND (backend), NULL);
+@@ -154,7 +154,7 @@ unique_backend_set_startup_id (UniqueBackend *backend,
+  *
+  * Return value: FIXME
+  */
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_backend_get_startup_id (UniqueBackend *backend)
+ {
+   g_return_val_if_fail (UNIQUE_IS_BACKEND (backend), NULL);
+diff --git a/unique/uniquebackend.h b/unique/uniquebackend.h
+index a50ce4e..b19ad3e 100644
+--- a/unique/uniquebackend.h
++++ b/unique/uniquebackend.h
+@@ -94,10 +94,10 @@ GType                 unique_backend_get_type       (void) G_GNUC_CONST;
+ 
+ UniqueBackend *       unique_backend_create         (void);
+ 
+-G_CONST_RETURN gchar *unique_backend_get_name       (UniqueBackend     *backend);
++const gchar *         unique_backend_get_name       (UniqueBackend     *backend);
+ void                  unique_backend_set_name       (UniqueBackend     *backend,
+                                                      const gchar       *name);
+-G_CONST_RETURN gchar *unique_backend_get_startup_id (UniqueBackend     *backend);
++const gchar *         unique_backend_get_startup_id (UniqueBackend     *backend);
+ void                  unique_backend_set_startup_id (UniqueBackend     *backend,
+                                                      const gchar       *startup_id);
+ GdkScreen *           unique_backend_get_screen     (UniqueBackend     *backend);
+diff --git a/unique/uniqueinternals.h b/unique/uniqueinternals.h
+index 3cec152..ccae0cd 100644
+--- a/unique/uniqueinternals.h
++++ b/unique/uniqueinternals.h
+@@ -44,11 +44,11 @@ UniqueResponse unique_app_emit_message_received (UniqueApp         *app,
+  * and then back into an id
+  */
+ UniqueResponse        unique_response_from_string  (const gchar    *response);
+-G_CONST_RETURN gchar *unique_response_to_string    (UniqueResponse  response);
++const gchar *         unique_response_to_string    (UniqueResponse  response);
+ 
+ gint                  unique_command_from_string   (UniqueApp      *app,
+                                                     const gchar    *command);
+-G_CONST_RETURN gchar *unique_command_to_string     (UniqueApp      *app,
++const gchar *         unique_command_to_string     (UniqueApp      *app,
+                                                     gint            command);
+ 
+ G_END_DECLS
+diff --git a/unique/uniquemessage.c b/unique/uniquemessage.c
+index c74392d..2b2a9fc 100644
+--- a/unique/uniquemessage.c
++++ b/unique/uniquemessage.c
+@@ -185,7 +185,7 @@ unique_message_data_set (UniqueMessageData *message_data,
+  *
+  * Since: 1.0.2
+  */
+-G_CONST_RETURN guchar *
++const guchar *
+ unique_message_data_get (UniqueMessageData *message_data,
+                          gsize             *length)
+ {
+@@ -525,7 +525,7 @@ unique_message_data_get_screen (UniqueMessageData *message_data)
+  *   owned by the #UniqueMessageData structure and should not be
+  *   modified or freed
+  */
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_message_data_get_startup_id (UniqueMessageData *message_data)
+ {
+   g_return_val_if_fail (message_data != NULL, NULL);
+diff --git a/unique/uniquemessage.h b/unique/uniquemessage.h
+index d3e9c3c..93eee21 100644
+--- a/unique/uniquemessage.h
++++ b/unique/uniquemessage.h
+@@ -48,7 +48,7 @@ void                   unique_message_data_free           (UniqueMessageData *me
+ void                   unique_message_data_set            (UniqueMessageData *message_data,
+                                                            const guchar      *data,
+                                                            gsize              length);
+-G_CONST_RETURN guchar *unique_message_data_get            (UniqueMessageData *message_data,
++const guchar *         unique_message_data_get            (UniqueMessageData *message_data,
+                                                            gsize             *length);
+ 
+ gboolean               unique_message_data_set_text       (UniqueMessageData *message_data,
+@@ -63,7 +63,7 @@ void                   unique_message_data_set_filename   (UniqueMessageData *me
+ gchar *                unique_message_data_get_filename   (UniqueMessageData *message_data);
+ 
+ GdkScreen *            unique_message_data_get_screen     (UniqueMessageData *message_data);
+-G_CONST_RETURN gchar * unique_message_data_get_startup_id (UniqueMessageData *message_data);
++const gchar *          unique_message_data_get_startup_id (UniqueMessageData *message_data);
+ guint                  unique_message_data_get_workspace  (UniqueMessageData *message_data);
+ 
+ G_END_DECLS
+-- 
+1.7.6
+
diff --git a/pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch b/pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch
new file mode 100644
index 00000000000..f47e66267d5
--- /dev/null
+++ b/pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch
@@ -0,0 +1,50 @@
+From 9df132a70d54b768a8e1d0335d24b85ac9b3fb76 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@linux.intel.com>
+Date: Sun, 27 Mar 2011 08:42:22 +0000
+Subject: Remove compiler warnings
+
+(cherry picked from commit f791ed16b19dddc7fbaf90d8f797520e67883021)
+
+Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
+---
+diff --git a/unique/dbus/uniquebackend-dbus.c b/unique/dbus/uniquebackend-dbus.c
+index 3ae1bed..69faa00 100644
+--- a/unique/dbus/uniquebackend-dbus.c
++++ b/unique/dbus/uniquebackend-dbus.c
+@@ -84,7 +84,6 @@ unique_backend_dbus_register_proxy (UniqueBackendDBus *backend_dbus)
+ static gboolean
+ unique_backend_dbus_request_name (UniqueBackend *backend)
+ {
+-  UniqueBackendDBus *backend_dbus;
+   const gchar *name;
+   DBusGConnection *connection;
+   DBusGProxy *proxy;
+@@ -97,8 +96,6 @@ unique_backend_dbus_request_name (UniqueBackend *backend)
+   if (!connection)
+     return FALSE;
+ 
+-  backend_dbus = UNIQUE_BACKEND_DBUS (backend);
+-
+   retval = TRUE;
+   name = unique_backend_get_name (backend);
+   g_assert (name != NULL);
+@@ -207,10 +204,14 @@ unique_backend_dbus_send_message (UniqueBackend     *backend,
+                                         cmd, data, time_,
+                                         &resp,
+                                         &error);
+-  if (error)
++  if (!res)
+     {
+-      g_warning ("Error while sending message: %s", error->message);
+-      g_error_free (error);
++      if (error)
++        {
++          g_warning ("Error while sending message: %s", error->message);
++          g_error_free (error);
++        }
++
+       g_free (cmd);
+       
+       return UNIQUE_RESPONSE_INVALID;
+--
+cgit v0.9
diff --git a/pkgs/development/libraries/libunique/1.1.6-fix-test.patch b/pkgs/development/libraries/libunique/1.1.6-fix-test.patch
new file mode 100644
index 00000000000..b2e85e4d71a
--- /dev/null
+++ b/pkgs/development/libraries/libunique/1.1.6-fix-test.patch
@@ -0,0 +1,26 @@
+From caf736f4b84808393b0d7030ae6128a3322a71e2 Mon Sep 17 00:00:00 2001
+From: Tobias Mueller <tobiasmue@gnome.org>
+Date: Mon, 12 Apr 2010 13:01:42 +0000
+Subject: test-unique: Resolve format string issues
+
+Provide a proper literal format string to not expose potential vulnerabilites.
+Fixes bug 615522.
+---
+diff --git a/tests/test-unique.c b/tests/test-unique.c
+index b7cde45..c9958c9 100644
+--- a/tests/test-unique.c
++++ b/tests/test-unique.c
+@@ -82,9 +82,11 @@ app_message_cb (UniqueApp         *app,
+                                    GTK_DIALOG_DESTROY_WITH_PARENT,
+                                    GTK_MESSAGE_INFO,
+                                    GTK_BUTTONS_CLOSE,
++                                   "%s",
+                                    title);
+   if (message)
+     gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
++                                              "%s",
+                                               message);
+ 
+   gtk_window_set_urgency_hint (GTK_WINDOW (dialog), TRUE);
+--
+cgit v0.9
diff --git a/pkgs/development/libraries/libunique/1.1.6-include-terminator.patch b/pkgs/development/libraries/libunique/1.1.6-include-terminator.patch
new file mode 100644
index 00000000000..927771e7311
--- /dev/null
+++ b/pkgs/development/libraries/libunique/1.1.6-include-terminator.patch
@@ -0,0 +1,37 @@
+From 30ca2903a8ed4eed974ea744e4b9bd96198c425d Mon Sep 17 00:00:00 2001
+From: Rodney Lorrimar <r.lorrimar@fugro-fsi.com.au>
+Date: Mon, 21 Dec 2009 02:07:46 +0000
+Subject: Include NUL terminator in unique_message_data_get_filename()
+
+https://bugzilla.gnome.org/show_bug.cgi?id=605104
+
+Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
+---
+diff --git a/unique/uniqueinternals.h b/unique/uniqueinternals.h
+index ace40ed..3cec152 100644
+--- a/unique/uniqueinternals.h
++++ b/unique/uniqueinternals.h
+@@ -13,7 +13,7 @@ G_BEGIN_DECLS
+ struct _UniqueMessageData
+ {
+   guchar *data;
+-  gint length;
++  gint length;  /* length of data not including NUL terminator */
+ 
+   GdkScreen *screen;
+   gchar *startup_id;
+diff --git a/unique/uniquemessage.c b/unique/uniquemessage.c
+index 10f6df5..c74392d 100644
+--- a/unique/uniquemessage.c
++++ b/unique/uniquemessage.c
+@@ -493,7 +493,7 @@ unique_message_data_get_filename (UniqueMessageData *message_data)
+ {
+   g_return_val_if_fail (message_data != NULL, NULL);
+ 
+-  return g_memdup (message_data->data, message_data->length);
++  return g_memdup (message_data->data, message_data->length + 1);
+ }
+ 
+ /**
+--
+cgit v0.9
diff --git a/pkgs/development/libraries/libunique/default.nix b/pkgs/development/libraries/libunique/default.nix
new file mode 100644
index 00000000000..603759d47c0
--- /dev/null
+++ b/pkgs/development/libraries/libunique/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, pkgconfig, glib, gtk, dbus_glib }:
+
+stdenv.mkDerivation rec {
+  name = "libunique-1.1.6";
+  src = fetchurl {
+    url = "mirror://gnome/sources/libunique/1.1/${name}.tar.bz2";
+    sha256 = "1fsgvmncd9caw552lyfg8swmsd6bh4ijjsph69bwacwfxwf09j75";
+  };
+
+  # patches from Gentoo portage
+  patches = [
+    ./1.1.6-compiler-warnings.patch
+    ./1.1.6-fix-test.patch
+    ./1.1.6-G_CONST_RETURN.patch
+    ./1.1.6-include-terminator.patch
+  ];
+
+  buildInputs = [ pkgconfig glib gtk dbus_glib ];
+
+  # don't make deprecated usages hard errors
+  preBuildPhases = "preBuild";
+  preBuild = ''substituteInPlace unique/dbus/Makefile --replace -Werror ""'';
+
+  doCheck = true;
+
+  meta = {
+    homepage = http://live.gnome.org/LibUnique;
+    description = "A library for writing single instance applications";
+    license = "LGPLv2.1";
+  };
+}
diff --git a/pkgs/development/libraries/mpc/default.nix b/pkgs/development/libraries/mpc/default.nix
index 586658556db..e5d212dc269 100644
--- a/pkgs/development/libraries/mpc/default.nix
+++ b/pkgs/development/libraries/mpc/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://www.multiprecision.org/mpc/download/${name}.tar.gz";
-    sha256 = "ed5a815cfea525dc778df0cb37468b9c1b554aaf30d9328b1431ca705b7400ff";
+    sha1 = "vxg0rkyn4cs40wr2cp6bbcyr1nnijzlc";
   };
 
   buildInputs = [ gmp mpfr ];
diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix
index 8e4edcad885..d38fc19f40e 100644
--- a/pkgs/development/libraries/nss/default.nix
+++ b/pkgs/development/libraries/nss/default.nix
@@ -22,11 +22,11 @@ let
 
 in stdenv.mkDerivation rec {
   name = "nss-${version}";
-  version = "3.14";
+  version = "3.14.3";
 
   src = fetchurl {
-    url = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_RTM/src/${name}.tar.gz";
-    sha1 = "ace3642fb2ca67854ea7075d053ca01a6d81e616";
+    url = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_3_RTM/src/${name}.tar.gz";
+    sha1 = "94d8781d1fa29cfbd37453dda3e9488709b82c4c";
   };
 
   buildInputs = [ nspr perl zlib sqlite ];
@@ -38,14 +38,28 @@ in stdenv.mkDerivation rec {
   '';
 
   patches = [
-    ./nss-3.12.5-gentoo-fixups.diff
+    ./nss-3.14.1-gentoo-fixups-r1.patch
     secLoadPatch
     ./nix_secload_fixup.patch
+    ./sync-up-with-upstream-softokn-changes.patch
   ];
 
   postPatch = ''
     sed -i -e 's/^DIRS.*$/& pem/' mozilla/security/nss/lib/ckfw/manifest.mn
-    sed -i -e "/^PREFIX =/s:= /usr:= $out:" mozilla/security/nss/config/Makefile
+
+    # Fix up the patch from Gentoo
+    sed -i \
+      -e "/^PREFIX =/s|= /usr|= $out|" \
+      -e '/@libdir@/s|gentoo/nss|lib|' \
+      -e '/ln -sf/d' \
+      mozilla/security/nss/config/Makefile
+
+    # Note for spacing/tab nazis: The TAB characters are intentional!
+    cat >> mozilla/security/nss/config/Makefile <<INSTALL_TARGET
+    install:
+    	mkdir -p \$(DIST)/lib/pkgconfig
+    	cp nss.pc \$(DIST)/lib/pkgconfig
+    INSTALL_TARGET
   '';
 
   preConfigure = "cd mozilla/security/nss";
diff --git a/pkgs/development/libraries/nss/nss-3.12.5-gentoo-fixups.diff b/pkgs/development/libraries/nss/nss-3.14.1-gentoo-fixups-r1.patch
index 57fbb71ff78..bc3a98ec143 100644
--- a/pkgs/development/libraries/nss/nss-3.12.5-gentoo-fixups.diff
+++ b/pkgs/development/libraries/nss/nss-3.14.1-gentoo-fixups-r1.patch
@@ -1,7 +1,7 @@
-diff -urN nss-3.12.5-orig/mozilla/security/nss/config/Makefile nss-3.12.5/mozilla/security/nss/config/Makefile
---- nss-3.12.5-orig/mozilla/security/nss/config/Makefile	1969-12-31 18:00:00.000000000 -0600
-+++ nss-3.12.5/mozilla/security/nss/config/Makefile	2009-09-14 21:45:45.619639265 -0500
-@@ -0,0 +1,42 @@
+diff -urN a/mozilla/security/nss/config/Makefile b/mozilla/security/nss/config/Makefile
+--- a/mozilla/security/nss/config/Makefile	1969-12-31 18:00:00.000000000 -0600
++++ b/mozilla/security/nss/config/Makefile	2012-12-15 07:27:20.650148987 -0600
+@@ -0,0 +1,40 @@
 +CORE_DEPTH = ../..
 +DEPTH      = ../..
 +
@@ -16,15 +16,17 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/config/Makefile nss-3.12.5/mozill
 +
 +export:
 +	# Create the nss.pc file
++	mkdir -p $(DIST)/lib/pkgconfig
 +	sed -e "s,@prefix@,$(PREFIX)," \
 +	    -e "s,@exec_prefix@,\$${prefix}," \
-+	    -e "s,@libdir@,\$${prefix}/lib," \
++	    -e "s,@libdir@,\$${prefix}/gentoo/nss," \
 +	    -e "s,@includedir@,\$${prefix}/include/nss," \
 +	    -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
 +	    -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
 +	    -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
 +	    nss.pc.in > nss.pc
 +	chmod 0644 nss.pc
++	ln -sf ../../../../../security/nss/config/nss.pc $(DIST)/lib/pkgconfig
 +
 +	# Create the nss-config script
 +	mkdir -p $(DIST)/bin
@@ -34,19 +36,15 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/config/Makefile nss-3.12.5/mozill
 +	    -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
 +	    nss-config.in > nss-config
 +	chmod 0755 nss-config
-+	# ln -sf ../../../../security/nss/config/nss-config $(DIST)/bin
++	ln -sf ../../../../security/nss/config/nss-config $(DIST)/bin
 +
 +libs:
 +
 +dummy: all export libs
 +
-+install:
-+	mkdir -p $(DIST)/lib/pkgconfig
-+	cp nss.pc $(DIST)/lib/pkgconfig
-+
-diff -urN nss-3.12.5-orig/mozilla/security/nss/config/nss-config.in nss-3.12.5/mozilla/security/nss/config/nss-config.in
---- nss-3.12.5-orig/mozilla/security/nss/config/nss-config.in	1969-12-31 18:00:00.000000000 -0600
-+++ nss-3.12.5/mozilla/security/nss/config/nss-config.in	2009-09-14 21:47:45.190638078 -0500
+diff -urN a/mozilla/security/nss/config/nss-config.in b/mozilla/security/nss/config/nss-config.in
+--- a/mozilla/security/nss/config/nss-config.in	1969-12-31 18:00:00.000000000 -0600
++++ b/mozilla/security/nss/config/nss-config.in	2012-12-15 07:27:20.651148959 -0600
 @@ -0,0 +1,145 @@
 +#!/bin/sh
 +
@@ -177,7 +175,7 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/config/nss-config.in nss-3.12.5/m
 +fi
 +
 +if test "$echo_libs" = "yes"; then
-+      libdirs="-Wl,-R$libdir -L$libdir"
++      libdirs=""
 +      if test -n "$lib_ssl"; then
 +	libdirs="$libdirs -lssl${major_version}"
 +      fi
@@ -193,9 +191,9 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/config/nss-config.in nss-3.12.5/m
 +      echo $libdirs
 +fi      
 +
-diff -urN nss-3.12.5-orig/mozilla/security/nss/config/nss.pc.in nss-3.12.5/mozilla/security/nss/config/nss.pc.in
---- nss-3.12.5-orig/mozilla/security/nss/config/nss.pc.in	1969-12-31 18:00:00.000000000 -0600
-+++ nss-3.12.5/mozilla/security/nss/config/nss.pc.in	2009-09-14 21:45:45.653637310 -0500
+diff -urN a/mozilla/security/nss/config/nss.pc.in b/mozilla/security/nss/config/nss.pc.in
+--- a/mozilla/security/nss/config/nss.pc.in	1969-12-31 18:00:00.000000000 -0600
++++ b/mozilla/security/nss/config/nss.pc.in	2012-12-15 07:27:20.651148959 -0600
 @@ -0,0 +1,12 @@
 +prefix=@prefix@
 +exec_prefix=@exec_prefix@
@@ -206,13 +204,13 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/config/nss.pc.in nss-3.12.5/mozil
 +Description: Network Security Services
 +Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
 +Requires: nspr >= 4.8
-+Libs: -L${libdir} -lssl3 -lsmime3 -lnssutil3 -lnss3 -Wl,-R${libdir}
++Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
 +Cflags: -I${includedir}
 +
-diff -urN nss-3.12.5-orig/mozilla/security/nss/Makefile nss-3.12.5/mozilla/security/nss/Makefile
---- nss-3.12.5-orig/mozilla/security/nss/Makefile	2008-12-02 17:24:39.000000000 -0600
-+++ nss-3.12.5/mozilla/security/nss/Makefile	2009-09-14 21:45:45.678657145 -0500
-@@ -78,7 +78,7 @@
+diff -urN a/mozilla/security/nss/Makefile b/mozilla/security/nss/Makefile
+--- a/mozilla/security/nss/Makefile	2012-11-13 19:14:07.000000000 -0600
++++ b/mozilla/security/nss/Makefile	2012-12-15 07:27:57.235162137 -0600
+@@ -44,7 +44,7 @@
  # (7) Execute "local" rules. (OPTIONAL).                              #
  #######################################################################
  
@@ -221,27 +219,25 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/Makefile nss-3.12.5/mozilla/secur
  
  nss_clean_all: clobber_coreconf clobber_nspr clobber_dbm clobber
  
-@@ -140,12 +140,6 @@
+@@ -106,12 +106,6 @@
  	--with-dist-prefix='$(NSPR_PREFIX)' \
  	--with-dist-includedir='$(NSPR_PREFIX)/include'
  
 -build_nspr: $(NSPR_CONFIG_STATUS)
--	cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE)
+-	$(MAKE) -C $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME)
 -
 -clobber_nspr: $(NSPR_CONFIG_STATUS)
--	cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE) clobber
+-	$(MAKE) -C $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) clobber
 -
  build_dbm:
- ifndef NSS_DISABLE_DBM
- 	cd $(CORE_DEPTH)/dbm ; $(MAKE) export libs
-diff -urN nss-3.12.5-orig/mozilla/security/nss/manifest.mn nss-3.12.5/mozilla/security/nss/manifest.mn
---- nss-3.12.5-orig/mozilla/security/nss/manifest.mn	2008-04-04 15:36:59.000000000 -0500
-+++ nss-3.12.5/mozilla/security/nss/manifest.mn	2009-09-14 21:45:45.703656167 -0500
-@@ -42,6 +42,6 @@
+ ifdef NSS_DISABLE_DBM
+ 	@echo "skipping the build of DBM"
+diff -urN a/mozilla/security/nss/manifest.mn b/mozilla/security/nss/manifest.mn
+--- a/mozilla/security/nss/manifest.mn	2012-03-20 09:46:49.000000000 -0500
++++ b/mozilla/security/nss/manifest.mn	2012-12-15 07:27:20.652148933 -0600
+@@ -10,6 +10,6 @@
  
  RELEASE = nss
  
 -DIRS = lib cmd
 +DIRS = lib cmd config
- 
- 
diff --git a/pkgs/development/libraries/nss/sync-up-with-upstream-softokn-changes.patch b/pkgs/development/libraries/nss/sync-up-with-upstream-softokn-changes.patch
new file mode 100644
index 00000000000..4942debcd30
--- /dev/null
+++ b/pkgs/development/libraries/nss/sync-up-with-upstream-softokn-changes.patch
@@ -0,0 +1,406 @@
+From d6dbecfea317a468be12423595e584f43d84d8ec Mon Sep 17 00:00:00 2001
+From: Elio Maldonado <emaldona@redhat.com>
+Date: Sat, 9 Feb 2013 17:11:00 -0500
+Subject: [PATCH] Sync up with upstream softokn changes
+
+- Disable RSA OEP case in FormatBlock, RSA_OAEP support is experimental and in a state of flux
+- Numerous change upstream due to the work for TLS/DTLS 'Lucky 13' vulnerability CVE-2013-0169
+- It now compiles with the NSS_3_14_3_BETA1 source
+---
+ mozilla/security/nss/lib/ckfw/pem/rsawrapr.c |  338 +++++++-------------------
+ 1 files changed, 82 insertions(+), 256 deletions(-)
+
+diff --git a/mozilla/security/nss/lib/ckfw/pem/rsawrapr.c b/mozilla/security/nss/lib/ckfw/pem/rsawrapr.c
+index 5ac4f39..3780d30 100644
+--- a/mozilla/security/nss/lib/ckfw/pem/rsawrapr.c
++++ b/mozilla/security/nss/lib/ckfw/pem/rsawrapr.c
+@@ -46,6 +46,7 @@
+ #include "sechash.h"
+ #include "base.h"
+ 
++#include "lowkeyi.h"
+ #include "secerr.h"
+ 
+ #define RSA_BLOCK_MIN_PAD_LEN		8
+@@ -54,9 +55,8 @@
+ #define RSA_BLOCK_PRIVATE_PAD_OCTET	0xff
+ #define RSA_BLOCK_AFTER_PAD_OCTET	0x00
+ 
+-#define OAEP_SALT_LEN		8
+-#define OAEP_PAD_LEN		8
+-#define OAEP_PAD_OCTET		0x00
++/* Needed for RSA-PSS functions */
++static const unsigned char eightZeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ 
+ #define FLAT_BUFSIZE 512        /* bytes to hold flattened SHA1Context. */
+ 
+@@ -78,127 +78,39 @@ pem_PublicModulusLen(NSSLOWKEYPublicKey *pubk)
+     return 0;
+ }
+ 
+-static SHA1Context *SHA1_CloneContext(SHA1Context * original)
+-{
+-    SHA1Context *clone = NULL;
+-    unsigned char *pBuf;
+-    int sha1ContextSize = SHA1_FlattenSize(original);
+-    SECStatus frv;
+-    unsigned char buf[FLAT_BUFSIZE];
+-
+-    PORT_Assert(sizeof buf >= sha1ContextSize);
+-    if (sizeof buf >= sha1ContextSize) {
+-        pBuf = buf;
+-    } else {
+-        pBuf = nss_ZAlloc(NULL, sha1ContextSize);
+-        if (!pBuf)
+-            goto done;
+-    }
+-
+-    frv = SHA1_Flatten(original, pBuf);
+-    if (frv == SECSuccess) {
+-        clone = SHA1_Resurrect(pBuf, NULL);
+-        memset(pBuf, 0, sha1ContextSize);
+-    }
+-  done:
+-    if (pBuf != buf)
+-        nss_ZFreeIf(pBuf);
+-    return clone;
++/* Constant time comparison of a single byte.
++ * Returns 1 iff a == b, otherwise returns 0.
++ * Note: For ranges of bytes, use constantTimeCompare.
++ */
++static unsigned char constantTimeEQ8(unsigned char a, unsigned char b) {
++    unsigned char c = ~(a - b | b - a);
++    c >>= 7;
++    return c;
+ }
+ 
+-/*
+- * Modify data by XORing it with a special hash of salt.
++/* Constant time comparison of a range of bytes.
++ * Returns 1 iff len bytes of a are identical to len bytes of b, otherwise
++ * returns 0.
+  */
+-static SECStatus
+-oaep_xor_with_h1(unsigned char *data, unsigned int datalen,
+-                 unsigned char *salt, unsigned int saltlen)
+-{
+-    SHA1Context *sha1cx;
+-    unsigned char *dp, *dataend;
+-    unsigned char end_octet;
+-
+-    sha1cx = SHA1_NewContext();
+-    if (sha1cx == NULL) {
+-        return SECFailure;
+-    }
+-
+-    /*
+-     * Get a hash of salt started; we will use it several times,
+-     * adding in a different end octet (x00, x01, x02, ...).
+-     */
+-    SHA1_Begin(sha1cx);
+-    SHA1_Update(sha1cx, salt, saltlen);
+-    end_octet = 0;
+-
+-    dp = data;
+-    dataend = data + datalen;
+-
+-    while (dp < dataend) {
+-        SHA1Context *sha1cx_h1;
+-        unsigned int sha1len, sha1off;
+-        unsigned char sha1[SHA1_LENGTH];
+-
+-        /*
+-         * Create hash of (salt || end_octet)
+-         */
+-        sha1cx_h1 = SHA1_CloneContext(sha1cx);
+-        SHA1_Update(sha1cx_h1, &end_octet, 1);
+-        SHA1_End(sha1cx_h1, sha1, &sha1len, sizeof(sha1));
+-        SHA1_DestroyContext(sha1cx_h1, PR_TRUE);
+-        PORT_Assert(sha1len == SHA1_LENGTH);
+-
+-        /*
+-         * XOR that hash with the data.
+-         * When we have fewer than SHA1_LENGTH octets of data
+-         * left to xor, use just the low-order ones of the hash.
+-         */
+-        sha1off = 0;
+-        if ((dataend - dp) < SHA1_LENGTH)
+-            sha1off = SHA1_LENGTH - (dataend - dp);
+-        while (sha1off < SHA1_LENGTH)
+-            *dp++ ^= sha1[sha1off++];
+-
+-        /*
+-         * Bump for next hash chunk.
+-         */
+-        end_octet++;
+-    }
+-
+-    SHA1_DestroyContext(sha1cx, PR_TRUE);
+-    return SECSuccess;
++static unsigned char constantTimeCompare(const unsigned char *a,
++                                         const unsigned char *b,
++                                         unsigned int len) {
++    unsigned char tmp = 0;
++    unsigned int i;
++    for (i = 0; i < len; ++i, ++a, ++b)
++        tmp |= *a ^ *b;
++    return constantTimeEQ8(0x00, tmp);
+ }
+ 
+-/*
+- * Modify salt by XORing it with a special hash of data.
++/* Constant time conditional.
++ * Returns a if c is 1, or b if c is 0. The result is undefined if c is
++ * not 0 or 1.
+  */
+-static SECStatus
+-oaep_xor_with_h2(unsigned char *salt, unsigned int saltlen,
+-                 unsigned char *data, unsigned int datalen)
++static unsigned int constantTimeCondition(unsigned int c,
++                                          unsigned int a,
++                                          unsigned int b)
+ {
+-    unsigned char sha1[SHA1_LENGTH];
+-    unsigned char *psalt, *psha1, *saltend;
+-    SECStatus rv;
+-
+-    /*
+-     * Create a hash of data.
+-     */
+-    rv = SHA1_HashBuf(sha1, data, datalen);
+-    if (rv != SECSuccess) {
+-        return rv;
+-    }
+-
+-    /*
+-     * XOR the low-order octets of that hash with salt.
+-     */
+-    PORT_Assert(saltlen <= SHA1_LENGTH);
+-    saltend = salt + saltlen;
+-    psalt = salt;
+-    psha1 = sha1 + SHA1_LENGTH - saltlen;
+-    while (psalt < saltend) {
+-        *psalt++ ^= *psha1++;
+-    }
+-
+-    return SECSuccess;
++    return (~(c - 1) & a) | ((c - 1) & b);
+ }
+ 
+ /*
+@@ -212,7 +124,7 @@ static unsigned char *rsa_FormatOneBlock(unsigned modulusLen,
+     unsigned char *block;
+     unsigned char *bp;
+     int padLen;
+-    int i;
++    int i, j;
+     SECStatus rv;
+ 
+     block = (unsigned char *) nss_ZAlloc(NULL, modulusLen);
+@@ -260,124 +172,58 @@ static unsigned char *rsa_FormatOneBlock(unsigned modulusLen,
+          */
+     case RSA_BlockPublic:
+ 
+-        /*
+-         * 0x00 || BT || Pad || 0x00 || ActualData
+-         *   1      1   padLen    1      data->len
+-         * Pad is all non-zero random bytes.
+-         */
+-        padLen = modulusLen - data->len - 3;
+-        PORT_Assert(padLen >= RSA_BLOCK_MIN_PAD_LEN);
+-        if (padLen < RSA_BLOCK_MIN_PAD_LEN) {
+-            nss_ZFreeIf(block);
+-            return NULL;
+-        }
+-        for (i = 0; i < padLen; i++) {
+-            /* Pad with non-zero random data. */
+-            do {
+-                rv = RNG_GenerateGlobalRandomBytes(bp + i, 1);
+-            } while (rv == SECSuccess
+-                     && bp[i] == RSA_BLOCK_AFTER_PAD_OCTET);
+-            if (rv != SECSuccess) {
+-                nss_ZFreeIf(block);
+-                return NULL;
+-            }
+-        }
+-        bp += padLen;
+-        *bp++ = RSA_BLOCK_AFTER_PAD_OCTET;
+-        nsslibc_memcpy(bp, data->data, data->len);
+-
+-        break;
+-
+-        /*
+-         * Blocks intended for public-key operation, using
+-         * Optimal Asymmetric Encryption Padding (OAEP).
+-         */
+-    case RSA_BlockOAEP:
+-        /*
+-         * 0x00 || BT || Modified2(Salt) || Modified1(PaddedData)
+-         *   1      1     OAEP_SALT_LEN     OAEP_PAD_LEN + data->len [+ N]
+-         *
+-         * where:
+-         *   PaddedData is "Pad1 || ActualData [|| Pad2]"
+-         *   Salt is random data.
+-         *   Pad1 is all zeros.
+-         *   Pad2, if present, is random data.
+-         *   (The "modified" fields are all the same length as the original
+-         * unmodified values; they are just xor'd with other values.)
+-         *
+-         *   Modified1 is an XOR of PaddedData with a special octet
+-         * string constructed of iterated hashing of Salt (see below).
+-         *   Modified2 is an XOR of Salt with the low-order octets of
+-         * the hash of Modified1 (see farther below ;-).
+-         *
+-         * Whew!
+-         */
+-
+-
+-        /*
+-         * Salt
+-         */
+-        rv = RNG_GenerateGlobalRandomBytes(bp, OAEP_SALT_LEN);
+-        if (rv != SECSuccess) {
+-            nss_ZFreeIf(block);
+-            return NULL;
+-        }
+-        bp += OAEP_SALT_LEN;
+-
+-        /*
+-         * Pad1
+-         */
+-        nsslibc_memset(bp, OAEP_PAD_OCTET, OAEP_PAD_LEN);
+-        bp += OAEP_PAD_LEN;
+-
+-        /*
+-         * Data
+-         */
+-        nsslibc_memcpy(bp, data->data, data->len);
+-        bp += data->len;
+-
+-        /*
+-         * Pad2
+-         */
+-        if (bp < (block + modulusLen)) {
+-            rv = RNG_GenerateGlobalRandomBytes(bp,
+-                                               block - bp + modulusLen);
+-            if (rv != SECSuccess) {
+-                nss_ZFreeIf(block);
+-                return NULL;
+-            }
+-        }
+-
+-        /*
+-         * Now we have the following:
+-         * 0x00 || BT || Salt || PaddedData
+-         * (From this point on, "Pad1 || Data [|| Pad2]" is treated
+-         * as the one entity PaddedData.)
+-         *
+-         * We need to turn PaddedData into Modified1.
+-         */
+-        if (oaep_xor_with_h1(block + 2 + OAEP_SALT_LEN,
+-                             modulusLen - 2 - OAEP_SALT_LEN,
+-                             block + 2, OAEP_SALT_LEN) != SECSuccess) {
+-            nss_ZFreeIf(block);
+-            return NULL;
+-        }
+-
+-        /*
+-         * Now we have:
+-         * 0x00 || BT || Salt || Modified1(PaddedData)
+-         *
+-         * The remaining task is to turn Salt into Modified2.
+-         */
+-        if (oaep_xor_with_h2(block + 2, OAEP_SALT_LEN,
+-                             block + 2 + OAEP_SALT_LEN,
+-                             modulusLen - 2 - OAEP_SALT_LEN) !=
+-            SECSuccess) {
+-            nss_ZFreeIf(block);
+-            return NULL;
+-        }
+-
+-        break;
++	/*
++	 * 0x00 || BT || Pad || 0x00 || ActualData
++	 *   1      1   padLen    1      data->len
++	 * Pad is all non-zero random bytes.
++	 *
++	 * Build the block left to right.
++	 * Fill the entire block from Pad to the end with random bytes.
++	 * Use the bytes after Pad as a supply of extra random bytes from 
++	 * which to find replacements for the zero bytes in Pad.
++	 * If we need more than that, refill the bytes after Pad with 
++	 * new random bytes as necessary.
++	 */
++	padLen = modulusLen - (data->len + 3);
++	PORT_Assert (padLen >= RSA_BLOCK_MIN_PAD_LEN);
++	if (padLen < RSA_BLOCK_MIN_PAD_LEN) {
++	    nss_ZFreeIf (block);
++	    return NULL;
++	}
++	j = modulusLen - 2;
++	rv = RNG_GenerateGlobalRandomBytes(bp, j);
++	if (rv == SECSuccess) {
++	    for (i = 0; i < padLen; ) {
++		unsigned char repl;
++		/* Pad with non-zero random data. */
++		if (bp[i] != RSA_BLOCK_AFTER_PAD_OCTET) {
++		    ++i;
++		    continue;
++		}
++		if (j <= padLen) {
++		    rv = RNG_GenerateGlobalRandomBytes(bp + padLen,
++					  modulusLen - (2 + padLen));
++		    if (rv != SECSuccess)
++		    	break;
++		    j = modulusLen - 2;
++		}
++		do {
++		    repl = bp[--j];
++		} while (repl == RSA_BLOCK_AFTER_PAD_OCTET && j > padLen);
++		if (repl != RSA_BLOCK_AFTER_PAD_OCTET) {
++		    bp[i++] = repl;
++		}
++	    }
++	}
++	if (rv != SECSuccess) {
++	    /*sftk_fatalError = PR_TRUE;*/
++	    nss_ZFreeIf (block);
++	    return NULL;
++	}
++	bp += padLen;
++	*bp++ = RSA_BLOCK_AFTER_PAD_OCTET;
++	nsslibc_memcpy(bp, data->data, data->len);
++	break;
+ 
+     default:
+         PORT_Assert(0);
+@@ -427,26 +273,6 @@ rsa_FormatBlock(SECItem * result, unsigned modulusLen,
+ 
+         break;
+ 
+-    case RSA_BlockOAEP:
+-        /*
+-         * 0x00 || BT || M1(Salt) || M2(Pad1||ActualData[||Pad2])
+-         *
+-         * The "2" below is the first octet + the second octet.
+-         * (The other fields do not contain the clear values, but are
+-         * the same length as the clear values.)
+-         */
+-        PORT_Assert(data->len <= (modulusLen - (2 + OAEP_SALT_LEN
+-                                                + OAEP_PAD_LEN)));
+-
+-        result->data = rsa_FormatOneBlock(modulusLen, blockType, data);
+-        if (result->data == NULL) {
+-            result->len = 0;
+-            return SECFailure;
+-        }
+-        result->len = modulusLen;
+-
+-        break;
+-
+     case RSA_BlockRaw:
+         /*
+          * Pad || ActualData
+-- 
+1.7.1
+
diff --git a/pkgs/development/libraries/opencascade/oce.nix b/pkgs/development/libraries/opencascade/oce.nix
new file mode 100644
index 00000000000..500e6229050
--- /dev/null
+++ b/pkgs/development/libraries/opencascade/oce.nix
@@ -0,0 +1,26 @@
+{stdenv, fetchurl, mesa, tcl, tk, file, libXmu, cmake, libtool, qt4,
+ftgl, freetype}:
+
+stdenv.mkDerivation rec {
+  name = "opencascade-oce-0.13-dev";
+  src = fetchurl {
+    url = https://api.github.com/repos/tpaviot/oce/tarball/bd77743bfa0e765c3a57d116a62d75b50e1a455;
+    name = "${name}.tar.gz";
+    sha256 = "1w7z326la9427yb23hbalsksk6w4ma5xil4jscnvi8mk6g48wyxv";
+  };
+
+  buildInputs = [ mesa tcl tk file libXmu libtool qt4 ftgl freetype cmake ];
+
+  preConfigure = ''
+    cmakeFlags="$cmakeFlags -DOCE_INSTALL_PREFIX=$out"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation";
+    homepage = http://www.opencascade.org/;
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}
diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix
index 6de49846c2d..d32cbd51606 100644
--- a/pkgs/development/libraries/openmpi/default.nix
+++ b/pkgs/development/libraries/openmpi/default.nix
@@ -1,11 +1,16 @@
 {stdenv, fetchurl, gfortran}:
 
 stdenv.mkDerivation {
-  name = "openmpi-1.4.2";
+  name = "openmpi-1.6.4";
   src = fetchurl {
-    url = http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.2.tar.bz2 ;
-    sha1 = "3e85092433d0e399cc7a51c018f9d13562f78b80";
+    url = http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.4.tar.bz2 ;
+    sha1 = "38095d3453519177272f488d5058a98f7ebdbf10";
   };
   buildInputs = [ gfortran ];
+  meta = {
+    homePage = http://www.open-mpi.org/;
+    description = "Open source MPI-2 implementation";
+    longDescription = "The Open MPI Project is an open source MPI-2 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.";
+  };
 }
 
diff --git a/pkgs/development/libraries/pango/1.30.x.nix b/pkgs/development/libraries/pango/1.30.x.nix
index 2fd828a8737..c32891b95cf 100644
--- a/pkgs/development/libraries/pango/1.30.x.nix
+++ b/pkgs/development/libraries/pango/1.30.x.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, gettext, x11, glib, cairo, libpng }:
+{ stdenv, fetchurl, pkgconfig, gettext, x11, glib, cairo, libpng, fontconfig }:
 
 stdenv.mkDerivation rec {
   name = "pango-1.30.1";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "3a8c061e143c272ddcd5467b3567e970cfbb64d1d1600a8f8e62435556220cbe";
   };
 
-  buildInputs = stdenv.lib.optional stdenv.isDarwin gettext;
+  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ gettext fontconfig ];
 
   nativeBuildInputs = [ pkgconfig ];
 
diff --git a/pkgs/development/libraries/ppl/default.nix b/pkgs/development/libraries/ppl/default.nix
index 0e1948b2fd0..39a24764eef 100644
--- a/pkgs/development/libraries/ppl/default.nix
+++ b/pkgs/development/libraries/ppl/default.nix
@@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://bugseng.com/products/ppl/download/ftp/releases/${version}/ppl-${version}.tar.bz2";
-    sha256 = "c169e962b8a0f7b7bcde5c5e0e2235248f1d78b155dfad684591d1a57e330b54";
+    sha256 = "0m0b6dzablci8mlavpsmn5w1v3r46li0wpjwvsybgxx0p1ifjsf1";
   };
 
   nativeBuildInputs = [ perl gnum4 ];
diff --git a/pkgs/development/libraries/sodium/default.nix b/pkgs/development/libraries/sodium/default.nix
new file mode 100644
index 00000000000..0d40df40574
--- /dev/null
+++ b/pkgs/development/libraries/sodium/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchurl}:
+let
+  s = # Generated upstream information
+  rec {
+    baseName="sodium";
+    version="0.3";
+    name="${baseName}-${version}";
+    hash="0l1p0d7ag186hhs65kifp8jfgf4mm9rngv41bhq35d7d9gw2d2lh";
+    url="http://download.dnscrypt.org/libsodium/releases/libsodium-0.3.tar.gz";
+    sha256="0l1p0d7ag186hhs65kifp8jfgf4mm9rngv41bhq35d7d9gw2d2lh";
+  };
+  buildInputs = [
+  ];
+in
+stdenv.mkDerivation {
+  inherit (s) name version;
+  inherit buildInputs;
+  src = fetchurl {
+    inherit (s) url sha256;
+  };
+  meta = {
+    inherit (s) version;
+    description = ''A cryptography library with simple API'';
+    license = stdenv.lib.licenses.mit ;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/development/libraries/sodium/default.upstream b/pkgs/development/libraries/sodium/default.upstream
new file mode 100644
index 00000000000..ccc02cd8978
--- /dev/null
+++ b/pkgs/development/libraries/sodium/default.upstream
@@ -0,0 +1 @@
+url http://download.dnscrypt.org/libsodium/releases/
diff --git a/pkgs/development/libraries/sword/default.nix b/pkgs/development/libraries/sword/default.nix
index 3486981463f..f62bc2eb11d 100644
--- a/pkgs/development/libraries/sword/default.nix
+++ b/pkgs/development/libraries/sword/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ pkgconfig icu cluceneCore curl ];
 
   # because curl/types.h disappeared since at least curl 7.21.7
-  patches = [ ./dont_include_curl_types_h.patch ];
+  patches = [ ./dont_include_curl_types_h.patch ./gcc47.patch ];
 
   prePatch = ''
     patchShebangs .;
diff --git a/pkgs/development/libraries/sword/gcc47.patch b/pkgs/development/libraries/sword/gcc47.patch
new file mode 100644
index 00000000000..7b55de75b64
--- /dev/null
+++ b/pkgs/development/libraries/sword/gcc47.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/419505
+
+
+--- a/include/multimapwdef.h
++++ b/include/multimapwdef.h
+@@ -12,21 +12,21 @@ class multimapwithdefault : public std::multimap<Key, T, Compare> {
+ public:
+ 	typedef std::pair<const Key, T> value_type;
+ 	T& getWithDefault(const Key& k, const T& defaultValue) {
+-		if (find(k) == this->end()) {
+-			insert(value_type(k, defaultValue));
++		if (this->find(k) == this->end()) {
++			this->insert(value_type(k, defaultValue));
+ 		}
+-		return (*(find(k))).second;
++		return (*(this->find(k))).second;
+ 	}
+ 
+ 	T& operator[](const Key& k) {
+-		if (find(k) == this->end()) {
+-			insert(value_type(k, T()));
++		if (this->find(k) == this->end()) {
++			this->insert(value_type(k, T()));
+ 		}
+-		return (*(find(k))).second;
++		return (*(this->find(k))).second;
+ 	}
+ 	bool has(const Key& k, const T &val) const {
+-		typename std::multimap<Key, T, Compare>::const_iterator start = lower_bound(k);
+-		typename std::multimap<Key, T, Compare>::const_iterator end = upper_bound(k);
++		typename std::multimap<Key, T, Compare>::const_iterator start = this->lower_bound(k);
++		typename std::multimap<Key, T, Compare>::const_iterator end = this->upper_bound(k);
+ 		for (; start!=end; start++) {
+ 			if (start->second == val)
+ 				return true;
diff --git a/pkgs/development/libraries/tinyxml/2.6.2.nix b/pkgs/development/libraries/tinyxml/2.6.2.nix
index 8770859817c..fde30a98fe9 100644
--- a/pkgs/development/libraries/tinyxml/2.6.2.nix
+++ b/pkgs/development/libraries/tinyxml/2.6.2.nix
@@ -20,6 +20,10 @@ in stdenv.mkDerivation {
   
   buildInputs = [ unzip ];
   buildPhase = ''
+    # use STL (xbmc requires it)
+    sed '1i#define TIXML_USE_STL 1' -i tinyxml.h
+    sed '1i#define TIXML_USE_STL 1' -i xmltest.cpp
+
     # build xmltest
     make
     
diff --git a/pkgs/development/libraries/ustr/default.nix b/pkgs/development/libraries/ustr/default.nix
index ebf9628126e..b016a6f715c 100644
--- a/pkgs/development/libraries/ustr/default.nix
+++ b/pkgs/development/libraries/ustr/default.nix
@@ -8,8 +8,11 @@ stdenv.mkDerivation rec {
     url = "http://www.and.org/ustr/${version}/${name}.tar.bz2";
     sha256 = "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx";
   };
+
   prePatch = "substituteInPlace Makefile --replace /usr/include/ ${glibc}/include/";
 
+  patches = [ ./va_args.patch ]; # fixes bogus warnings that failed libsemanage
+
   makeFlags = "DESTDIR=$(out) prefix= LDCONFIG=echo";
 
   configurePhase = "make ustr-import";
@@ -21,4 +24,4 @@ stdenv.mkDerivation rec {
     license = licenses.bsd2;
     maintainers = [ maintainers.phreedom ];
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/development/libraries/ustr/va_args.patch b/pkgs/development/libraries/ustr/va_args.patch
new file mode 100644
index 00000000000..f75b537485d
--- /dev/null
+++ b/pkgs/development/libraries/ustr/va_args.patch
@@ -0,0 +1,23 @@
+diff --git a/ustr-compiler.h b/ustr-compiler.h
+index 9e71276..c5f847a 100644
+--- a/ustr-compiler.h
++++ b/ustr-compiler.h
+@@ -11,17 +11,11 @@
+ #define USTR_CONF_HAVE_ATTR_FMT 1
+ #endif
+ 
++#include <stdarg.h>
+ /* We assume this is enough,
+  * C99 specifies that va_copy() exists and is a macro */
+-#ifdef va_copy
+ # define USTR_CONF_HAVE_VA_COPY 1
+ # define USTR__VA_COPY(x, y)   va_copy(x, y)
+-#elif __va_copy
+-# define USTR_CONF_HAVE_VA_COPY 1
+-# define USTR__VA_COPY(x, y) __va_copy(x, y)
+-#else
+-# define USTR_CONF_HAVE_VA_COPY 0
+-#endif
+ 
+ #ifndef USTR_CONF_HAVE_ATTR_NONNULL
+ #if defined(__GNUC__) && (__GNUC__ > 3) /* not sure */
diff --git a/pkgs/development/libraries/webkit/default.nix b/pkgs/development/libraries/webkit/default.nix
index 47bdcabd514..ef4d259cb02 100644
--- a/pkgs/development/libraries/webkit/default.nix
+++ b/pkgs/development/libraries/webkit/default.nix
@@ -1,6 +1,6 @@
 args : with args; 
 let 
-  s = import ./src-for-default.nix; # 1.10 needs newer gtk3, wait for x-updates
+  s = import ./src-for-default.nix; # 1.8.3 needs newer gtk3, wait for x-updates
   version = lib.attrByPath ["version"] s.version args;
 in
 rec {
@@ -9,12 +9,13 @@ rec {
     sha256 = s.hash;
   };
 
-  buildInputs = [gtk gtk2 glib atk cairo curl fontconfig freetype
-    gettext libjpeg libpng libtiff libxml2 libxslt pango
-    sqlite icu gperf bison flex autoconf automake libtool 
-    perl intltool pkgconfig libsoup gtkdoc libXt libproxy
-    enchant python ruby which renderproto libXrender geoclue
-    kbproto mesa
+  buildInputs = with xlibs; [
+    pkgconfig libtool intltool autoconf automake gperf bison flex
+    gtk3 gtk2 glib atk cairo pango fontconfig freetype libsoup gtkdoc
+    libjpeg libpng libtiff libxml2 libxslt sqlite icu curl
+    which libproxy geoclue enchant python ruby perl
+    mesa libXt libXrender renderproto libXcomposite compositeproto
+    libXdamage damageproto kbproto
     ];
 
   propagatedBuildInputs = [
@@ -22,19 +23,22 @@ rec {
     ];
 
   configureFlags = [
-    "--enable-3D-transforms"
+    # "--enable-3D-transforms" # no longer recognized
     "--enable-web-sockets"
     "--enable-web-timing"
-    
+
+    # https://bugs.webkit.org/show_bug.cgi?id=55294
+    "--enable-image-resizer"
+
     "--enable-geolocation"
 
     # Not implemented?
-    #"--enable-web-audio"
+    # "--enable-web-audio"
 
     "--enable-mathml"
 
     #"--enable-wml"
-    
+
     # https://bugs.webkit.org/show_bug.cgi?id=45110
     #"--enable-indexed-database"
 
@@ -43,27 +47,30 @@ rec {
 
     # "--enable-input-speech"
 
-    "--enable-file-writer"
+    #"--enable-file-writer" # no longer recognized
     "--enable-blob"
 
     # https://bugs.webkit.org/show_bug.cgi?id=59430
-    #"--enable-directory-upload"
+    # "--enable-directory-upload"
 
     # https://bugs.webkit.org/show_bug.cgi?id=58443
-    #"--enable-file-system"
+    # "--enable-file-system"
+
+    "--enable-dependency-tracking" # to fix parallel building
     ];
 
+  # instead of enableParallelBuilding = true;
+  makeFlags = "-j$NIX_BUILD_CORES";
+
   /* doConfigure should be specified separately */
-  phaseNames = ["setVars" "doPatch" "fixConfigure" /* "paranoidFixComments" */ "doConfigure" (doPatchShebangs ".") 
+  phaseNames = ["doPatch" "fixConfigure" /* "paranoidFixComments" */ "doConfigure" (doPatchShebangs ".") 
     "doReplaceUsrBin" "doMakeInstall" "doAddPrograms"];
 
-  setVars = fullDepEntry (''
-    export NIX_LDFLAGS="$NIX_LDFLAGS -lXt"
-  '') ["minInit"];
-
   patches = [ ./bison26.patch ]; # http://trac.webkit.org/changeset/124099
   patchFlags = "-p2";
 
+  #doCheck = true; # tests still have problems
+
   doReplaceUsrBin = fullDepEntry (''
     for i in $(find . -name '*.pl') $(find . -name '*.pm'); do 
         sed -e 's@/usr/bin/gcc@gcc@' -i $i
diff --git a/pkgs/development/libraries/webkit/gtk2.nix b/pkgs/development/libraries/webkit/gtk2.nix
index 0b836cd08f0..c2e3b9b06dd 100644
--- a/pkgs/development/libraries/webkit/gtk2.nix
+++ b/pkgs/development/libraries/webkit/gtk2.nix
@@ -10,11 +10,13 @@ rec {
     sha256 = s.hash;
   };
 
-  buildInputs = [gtk glib atk cairo curl fontconfig freetype
-    gettext libjpeg libpng libtiff libxml2 libxslt pango
-    sqlite icu gperf bison flex autoconf automake libtool 
-    intltool pkgconfig libsoup gtkdoc libXt libproxy
-    enchant python ruby which renderproto libXrender geoclue perl
+  buildInputs = with xlibs; [
+    pkgconfig libtool intltool autoconf automake gperf bison flex
+    gtk2 glib atk cairo pango fontconfig freetype libsoup gtkdoc
+    libjpeg libpng libtiff libxml2 libxslt sqlite icu curl
+    which libproxy geoclue enchant python ruby perl
+    mesa libXt libXrender renderproto libXcomposite compositeproto
+    libXdamage damageproto kbproto
     ];
 
   propagatedBuildInputs = [
@@ -22,12 +24,14 @@ rec {
     ];
 
   configureFlags = [
-    "--enable-3D-transforms"
+    "--with-gtk=2.0"
+
+    # "--enable-3D-transforms" # no longer recognized
     "--enable-web-sockets"
     "--enable-web-timing"
-    
+
     # https://bugs.webkit.org/show_bug.cgi?id=55294
-    # "--enable-image-resizer"
+    "--enable-image-resizer"
 
     "--enable-geolocation"
 
@@ -37,15 +41,16 @@ rec {
     "--enable-mathml"
 
     #"--enable-wml"
-    
+
     # https://bugs.webkit.org/show_bug.cgi?id=45110
-    # "--enable-indexed-database"
+    #"--enable-indexed-database"
 
-    "--enable-xhtmlmp"
+    # Doesn't work in release...
+    #"--enable-xhtmlmp"
 
     # "--enable-input-speech"
 
-    "--enable-file-writer"
+    #"--enable-file-writer" # no longer recognized
     "--enable-blob"
 
     # https://bugs.webkit.org/show_bug.cgi?id=59430
@@ -53,16 +58,21 @@ rec {
 
     # https://bugs.webkit.org/show_bug.cgi?id=58443
     # "--enable-file-system"
+
+    "--enable-dependency-tracking" # to fix parallel building
     ];
 
+  # instead of enableParallelBuilding = true;
+  makeFlags = "-j$NIX_BUILD_CORES";
+
   /* doConfigure should be specified separately */
-  phaseNames = ["setVars" /* "paranoidFixComments" */ "doConfigure" (doPatchShebangs ".") 
+  phaseNames = ["doPatch" "fixConfigure" /* "paranoidFixComments" */ "doConfigure" (doPatchShebangs ".") 
     "doReplaceUsrBin" "doMakeInstall" "doAddPrograms"];
 
-  setVars = fullDepEntry (''
-    export NIX_LDFLAGS="$NIX_LDFLAGS -lXt"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fpermissive"
-  '') ["minInit"];
+  patches = [ ./bison26.patch ]; # http://trac.webkit.org/changeset/124099
+  patchFlags = "-p2";
+
+  #doCheck = true; # tests still have problems
 
   doReplaceUsrBin = fullDepEntry (''
     for i in $(find . -name '*.pl') $(find . -name '*.pm'); do 
@@ -81,12 +91,19 @@ rec {
     sed -re 's@( |^)//.*@/* & */@' -i $(find . -name '*.c' -o -name '*.h')
   '') ["minInit" "doUnpack"];
 
+  # See http://archive.linuxfromscratch.org/mail-archives/blfs-dev/2012-April/022893.html
+  fixConfigure = fullDepEntry (''
+    sed   -i -e 's/=GSTREAMER_0_10_REQUIRED_VERSION/=\$GSTREAMER_0_10_REQUIRED_VERSION/' \
+      -e 's/=GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION/=\$GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION/' \
+      configure{,.ac}
+  '') ["minInit" "doUnpack"];
+
   name = s.name;
   meta = {
     description = "WebKit - a fast and correct HTML renderer";
     maintainers = [stdenv.lib.maintainers.raskin];
   };
   passthru = {
-    inherit gstreamer gst_plugins_base gst_plugins_good gst_ffmpeg;
+    inherit gstreamer gst_plugins_base gst_plugins_good gst_ffmpeg libsoup;
   };
 }
diff --git a/pkgs/development/libraries/webkit/src-for-gtk2.nix b/pkgs/development/libraries/webkit/src-for-gtk2.nix
index 5f5149fedfe..65bcd435096 100644
--- a/pkgs/development/libraries/webkit/src-for-gtk2.nix
+++ b/pkgs/development/libraries/webkit/src-for-gtk2.nix
@@ -1,9 +1,10 @@
 rec {
-   version="1.4.0";
-   name="webkit-1.4.0";
-   hash="123zllzlnkjgw4d2ag73dvrjmkikbapxlz5730ps6y4qm43gxc1y";
-   url="http://webkitgtk.org/webkit-1.4.0.tar.gz";
-   advertisedUrl="http://webkitgtk.org/webkit-1.4.0.tar.gz";
+   version="1.8.1";
+   name="webkit-1.8.1";
+   hash="0a1v3v8dp2cl332qr51j4fpl0rwpgxbf29hn3zdim9hcniv6l4ls";
+   url="http://webkitgtk.org/releases/webkit-1.8.1.tar.xz";
+   advertisedUrl="http://webkitgtk.org/releases/webkit-1.8.1.tar.xz";
   
   
 }
+