summary refs log tree commit diff
path: root/pkgs/development
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
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')
-rwxr-xr-xpkgs/development/compilers/ghc/ghc-get-packages.sh2
-rw-r--r--pkgs/development/compilers/ghc/head.nix4
-rw-r--r--pkgs/development/compilers/ghc/with-packages.nix125
-rw-r--r--pkgs/development/compilers/idris/default.nix4
-rw-r--r--pkgs/development/compilers/jhc/default.nix11
-rw-r--r--pkgs/development/compilers/sbcl/default.nix11
-rw-r--r--pkgs/development/compilers/scala/default.nix1
-rw-r--r--pkgs/development/compilers/sdcc/default.nix32
-rw-r--r--pkgs/development/interpreters/php/5.3.nix43
-rw-r--r--pkgs/development/interpreters/python/docs/2.6-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.6-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.6-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.6-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.7-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.7-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.7-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.7-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.0-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.0-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.0-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.0-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.1-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.1-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.1-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.1-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.2-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.2-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.2-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.2-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.3-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.3-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.3-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.3-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/default.nix89
-rwxr-xr-xpkgs/development/interpreters/python/docs/generate.sh59
-rw-r--r--pkgs/development/interpreters/python/docs/template.nix18
-rw-r--r--pkgs/development/interpreters/ruby/fix-gem-nix-versions.patch35
-rw-r--r--pkgs/development/interpreters/ruby/generated.nix390
-rw-r--r--pkgs/development/interpreters/ruby/patches.nix11
-rw-r--r--pkgs/development/interpreters/ruby/ruby-2.0.nix57
-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
-rw-r--r--pkgs/development/mobile/androidenv/build-app.nix3
-rw-r--r--pkgs/development/mobile/titaniumenv/build-app.nix5
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/default.nix24
-rw-r--r--pkgs/development/mobile/xcodeenv/build-app.nix7
-rw-r--r--pkgs/development/mobile/xcodeenv/xcodewrapper.nix5
-rw-r--r--pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch37
-rw-r--r--pkgs/development/python-modules/dbus/default.nix14
-rw-r--r--pkgs/development/python-modules/pycrypto/2.5.nix29
-rw-r--r--pkgs/development/python-modules/pygobject/default.nix6
-rwxr-xr-xpkgs/development/tools/build-managers/cmake/setup-hook.sh2
-rw-r--r--pkgs/development/tools/haskell/cabal2nix/default.nix4
-rw-r--r--pkgs/development/tools/haskell/packunused/default.nix16
-rw-r--r--pkgs/development/tools/misc/ctags/default.nix27
-rw-r--r--pkgs/development/tools/misc/elfutils/default.nix12
-rw-r--r--pkgs/development/tools/misc/gob2/default.nix9
-rw-r--r--pkgs/development/tools/misc/lsof/default.nix6
-rw-r--r--pkgs/development/tools/misc/texinfo/5.1.nix (renamed from pkgs/development/tools/misc/texinfo/5.0.nix)4
-rw-r--r--pkgs/development/tools/ocaml/opam/default.nix60
-rw-r--r--pkgs/development/tools/parsing/alex/3.0.5.nix (renamed from pkgs/development/tools/parsing/alex/3.0.4.nix)8
-rw-r--r--pkgs/development/tools/selenium/chromedriver/default.nix37
-rw-r--r--pkgs/development/web/nodejs/default.nix24
188 files changed, 3159 insertions, 696 deletions
diff --git a/pkgs/development/compilers/ghc/ghc-get-packages.sh b/pkgs/development/compilers/ghc/ghc-get-packages.sh
index 9ed1455d232..71e58e66a5e 100755
--- a/pkgs/development/compilers/ghc/ghc-get-packages.sh
+++ b/pkgs/development/compilers/ghc/ghc-get-packages.sh
@@ -12,7 +12,7 @@ fi
 PATH="$2:$PATH"
 IFS=":"
 for p in $PATH; do
-  PkgDir="$p/../lib/ghc-pkgs/ghc-$version"
+  PkgDir="$p/../lib/ghc-$version/package.conf.d"
   for i in $PkgDir/*.installedconf; do
     # output takes place here
     test -f $i && echo -n " $prefix$i"
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index 376033fe239..157b25779b3 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, ghc, perl, gmp, ncurses }:
 
 stdenv.mkDerivation rec {
-  version = "7.7.20121213";
+  version = "7.7.20130223";
   name = "ghc-${version}";
 
   src = fetchurl {
     url = "http://haskell.org/ghc/dist/current/dist/${name}-src.tar.bz2";
-    sha256 = "0z9ld6271jzv3mx02vqaakirj79pm2vzxnv5a178r6v874qbzx3p";
+    sha256 = "1naw6x1mjij10h9k4biard2pkzi6zml26vv4h34asprv0h6ymdbg";
   };
 
   buildInputs = [ ghc perl gmp ncurses ];
diff --git a/pkgs/development/compilers/ghc/with-packages.nix b/pkgs/development/compilers/ghc/with-packages.nix
index 3494f63c11c..74a8253b838 100644
--- a/pkgs/development/compilers/ghc/with-packages.nix
+++ b/pkgs/development/compilers/ghc/with-packages.nix
@@ -1,117 +1,38 @@
-{stdenv, ghc, packages ? [], makeWrapper}:
+{ stdenv, ghc, packages, buildEnv, makeWrapper }:
 
-stdenv.mkDerivation rec {
-  name = "haskell-env-${ghc.name}";
-
-  allPackages = stdenv.lib.closePropagation packages;
-  buildInputs = allPackages ++ [makeWrapper];
-  propagatedBuildInputs = packages;
-
-  unpackPhase = "true";
-
-  installPhase = ''
-    numversion=$(${ghc}/bin/ghc --numeric-version)
-    majorversion=''${numversion%%.*}
-    minorversion=''${numversion#*.}
-    minorversion=''${minorversion%%.*}
-
-    if [[ $majorversion -gt 6 ]] && [[ $minorversion -gt 4 ]]; then
-      globalConf="--global-package-db"
-    else
-      globalConf="--global-conf"
-    fi
-
-    originalTopDir="${ghc}/lib/ghc-${ghc.version}"
-    originalPkgDir="$originalTopDir/package.conf.d"
-    linkedTopDir="$out/lib"
-    linkedPkgDir="$linkedTopDir/package.conf.d"
-
-    mkdir -p $out/bin
-    mkdir -p $linkedTopDir
-    mkdir -p $linkedPkgDir
-
-    echo "Linking GHC core libraries:"
-
-    echo -n "Linking $originalTopDir "
-    for f in "$originalTopDir/"*; do
-      if test -f $f; then
-        ln -s $f $linkedTopDir
-        echo -n .
-      fi
-    done
-    echo
+assert packages != [];
 
-    echo -n "Linking $originalPkgDir "
-    for f in "$originalPkgDir/"*.conf; do
-      ln -s $f $linkedPkgDir
-      echo -n .
-    done
-    echo
-
-    echo "Linking selected packages and dependencies:"
-
-    for currentPath in ${stdenv.lib.concatStringsSep " " allPackages}; do
-      currentPkgDir="$currentPath/lib/ghc-pkgs/ghc-${ghc.version}"
-      # Check if current path is a Cabal package for the current GHC
-      if test -d $currentPkgDir; then
-        echo -n "Linking $currentPath "
-        for f in "$currentPath/bin/"*; do
-          ln -s $f $out/bin
-          echo -n .
-        done
-        for f in "$currentPath/etc/bash_completion.d/"*; do
-	  mkdir -p $out/etc/bash_completion.d
-          ln -s $f $out/etc/bash_completion.d/
-          echo -n .
-        done
-	for s in 1 2 3 4 5 6 7 8 9; do
-	  for f in "$currentPath/share/man/man$s/"*; do
-	    mkdir -p $out/share/man/man$s
-            ln -sv $f $out/share/man/man$s/
-            echo -n .
-	  done
-       done
-        for f in "$currentPkgDir/"*.conf; do
-          ln -s $f $linkedPkgDir
-          echo -n .
-        done
-        echo
-      fi
-    done
-
-    echo -n "Generating package cache "
-    ${ghc}/bin/ghc-pkg $globalConf $linkedPkgDir recache
-    echo .
-
-    echo -n "Generating wrappers "
+let
+  ghc761OrLater = stdenv.lib.versionOlder "7.6.1" ghc.version;
+  packageDBFlag = if ghc761OrLater then "--package-db" else "--package-conf";
+  libDir        = "$out/lib/ghc-${ghc.version}";
+  packageCfgDir = "${libDir}/package.conf.d";
+in
+buildEnv {
+  name = "haskell-env-${ghc.name}";
+  paths = stdenv.lib.closePropagation (packages ++ [ghc]);
+  postBuild = ''
+    . ${makeWrapper}/nix-support/setup-hook
 
     for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do
-      # The NIX env-vars are picked up by our patched version of ghc-paths.
-      makeWrapper ${ghc}/bin/$prg $out/bin/$prg \
-        --add-flags "-B$linkedTopDir" \
-        --set "NIX_GHC"        "$out/bin/ghc"     \
-        --set "NIX_GHCPKG"     "$out/bin/ghc-pkg" \
-        --set "NIX_GHC_LIBDIR" "$linkedTopDir"
-      echo -n .
+      rm -f $out/bin/$prg
+      makeWrapper ${ghc}/bin/$prg $out/bin/$prg         \
+        --add-flags '"-B$NIX_GHC_LIBDIR"'               \
+        --set "NIX_GHC"        "$out/bin/ghc"           \
+        --set "NIX_GHCPKG"     "$out/bin/ghc-pkg"       \
+        --set "NIX_GHC_LIBDIR" "${libDir}"
     done
 
     for prg in runghc runhaskell; do
+      rm -f $out/bin/$prg
       makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "-f $out/bin/ghc"
-      echo -n .
     done
 
     for prg in ghc-pkg ghc-pkg-${ghc.version}; do
-      makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "$globalConf $linkedPkgDir"
-      echo -n .
+      rm -f $out/bin/$prg
+      makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag} ${packageCfgDir}"
     done
 
-    for prg in hp2ps hpc hasktags hsc2hs haddock haddock-${ghc.version}; do
-      if test -x ${ghc}/bin/$prg -a ! -x $out/bin/$prg; then
-        ln -s ${ghc}/bin/$prg $out/bin/$prg && echo -n .
-      fi
-    done
-    echo
+    $out/bin/ghc-pkg recache
   '';
-
-  meta = ghc.meta;
 }
diff --git a/pkgs/development/compilers/idris/default.nix b/pkgs/development/compilers/idris/default.nix
index babaa2e2482..b5f9446b8a4 100644
--- a/pkgs/development/compilers/idris/default.nix
+++ b/pkgs/development/compilers/idris/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "idris";
-  version = "0.9.6.1";
-  sha256 = "1wy79rrm5pvg77i9nvwkcg6swsdbmg2izch48n4lj4idj0ga5g62";
+  version = "0.9.7";
+  sha256 = "0y3rnxbs2s7kxlzlc347vwpylw2p0pdz50zgkyii21gd6klqvd45";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/compilers/jhc/default.nix b/pkgs/development/compilers/jhc/default.nix
index 4b4d85df890..d36c8c2755a 100644
--- a/pkgs/development/compilers/jhc/default.nix
+++ b/pkgs/development/compilers/jhc/default.nix
@@ -1,4 +1,4 @@
-{ 
+{
   stdenv, fetchurl, perl, ghc, binary, zlib, utf8String, readline, fgl,
   regexCompat, HsSyck, random
 }:
@@ -19,11 +19,12 @@ stdenv.mkDerivation rec {
   ];
 
   meta = {
-    description = ''
-      A Haskell compiler which aims to produce the most efficient programs
-    '';
+    homepage = "http://repetae.net/computer/jhc/";
+    description = "A Haskell compiler which aims to produce the most efficient programs";
     license = stdenv.lib.licenses.gpl2;
-    maintainers = [ stdenv.lib.maintainers.aforemny ];
+
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.aforemny stdenv.lib.maintainers.simons ];
   };
 
 }
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index 2535fb603ba..6c8c83fe056 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -4,11 +4,11 @@ let
   s= # Generated upstream information
   rec {
     baseName="sbcl";
-    version="1.1.4";
+    version="1.1.5";
     name="${baseName}-${version}";
-    hash="1k7p986hsd3yygzrsc0w68maflvhbg4gcmi3rbylyn0mi8pxb2s6";
-    url="mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-source.tar.bz2";
-    sha256="1k7p986hsd3yygzrsc0w68maflvhbg4gcmi3rbylyn0mi8pxb2s6";
+    hash="01wi9aah9rrs7rbjrjrkwjxq03kapyzm48iyhz38fvaqhl7phw78";
+    url="mirror://sourceforge/project/sbcl/sbcl/1.1.5/sbcl-1.1.5-source.tar.bz2";
+    sha256="01wi9aah9rrs7rbjrjrkwjxq03kapyzm48iyhz38fvaqhl7phw78";
   };
   buildInputs = with a; [
     clisp makeWrapper
@@ -23,9 +23,6 @@ rec {
   /* doConfigure should be removed if not needed */
   phaseNames = ["setVars" "doFixNewer" "doFixTests" "setVersion" "doPatch" "doBuild" "doInstall" "doWrap"];
 
-  patches = [ ./newglibc.patch ]; # https://bugs.launchpad.net/sbcl/+bug/1095036
-  patchFlags = "-p2";
-
   setVars = a.fullDepEntry (''
     export INSTALL_ROOT=$out
     mkdir test-home
diff --git a/pkgs/development/compilers/scala/default.nix b/pkgs/development/compilers/scala/default.nix
index a78ee06f652..e7c2c80ac55 100644
--- a/pkgs/development/compilers/scala/default.nix
+++ b/pkgs/development/compilers/scala/default.nix
@@ -28,5 +28,6 @@ stdenv.mkDerivation rec {
     '';
     homepage = http://www.scala-lang.org/;
     license = "BSD";
+    platforms = stdenv.lib.platforms.all;
   };
 }
diff --git a/pkgs/development/compilers/sdcc/default.nix b/pkgs/development/compilers/sdcc/default.nix
new file mode 100644
index 00000000000..ebc052764f2
--- /dev/null
+++ b/pkgs/development/compilers/sdcc/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, bison, flex, boost, gputils ? null }:
+
+stdenv.mkDerivation rec {
+  version = "3.2.0";
+  name = "sdcc-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/sdcc/sdcc-src-${version}.tar.bz2";
+    sha256 = "15gdl04kqpvmwvvplss5nmp3bz8rhz48dhb0wmb2v9v9sn7qj01d";
+  };
+
+  # TODO: remove this comment when gputils != null is tested
+  buildInputs = [ bison flex boost gputils ];
+
+  configureFlags = ''
+    ${if gputils == null then "--disable-pic14-port --disable-pic16-port" else ""}
+  '';
+
+  meta = {
+    description = "Small Device C Compiler";
+    longDescription = ''
+      SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
+      the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim
+      (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based
+      (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000,
+      Rabbit 3000A). Work is in progress on supporting the Microchip PIC16 and
+      PIC18 targets. It can be retargeted for other microprocessors.
+    '';
+    homepage = http://sdcc.sourceforge.net/;
+    license = stdenv.lib.licenses.gpl2;
+  };
+}
diff --git a/pkgs/development/interpreters/php/5.3.nix b/pkgs/development/interpreters/php/5.3.nix
index 014ce9d3b97..683ba73f8b0 100644
--- a/pkgs/development/interpreters/php/5.3.nix
+++ b/pkgs/development/interpreters/php/5.3.nix
@@ -1,6 +1,11 @@
 { stdenv, fetchurl, composableDerivation, autoconf, automake, flex, bison
 , apacheHttpd, mysql, libxml2, readline, zlib, curl, gd, postgresql, gettext
-, openssl, pkgconfig, sqlite, config, libiconv, libjpeg, libpng, freetype }:
+, openssl, pkgconfig, sqlite, config, libiconv, libjpeg, libpng, freetype
+, libxslt, libmcrypt, bzip2, icu }:
+
+let
+  libmcryptOverride = libmcrypt.override { disablePosixThreads = true; };
+in
 
 composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in {
 
@@ -110,6 +115,34 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
         buildInputs = [gettext];
       };
 
+      intl = {
+        configureFlags = ["--enable-intl"];
+        buildInputs = [icu];
+      };
+
+      exif = {
+        configureFlags = ["--enable-exif"];
+      };
+
+      xsl = {
+        configureFlags = ["--with-xsl=${libxslt}"];
+        buildInputs = [libxslt];
+      };
+
+      mcrypt = {
+        configureFlags = ["--with-mcrypt=${libmcrypt}"];
+        buildInputs = [libmcryptOverride];
+      };
+
+      bz2 = {
+        configureFlags = ["--with-bz2=${bzip2}"];
+        buildInputs = [bzip2];
+      };
+
+      zip = {
+        configureFlags = ["--enable-zip"];
+      };
+
       /*
          php is build within this derivation in order to add the xdebug lines to the php.ini.
          So both Apache and command line php both use xdebug without having to configure anything.
@@ -141,12 +174,18 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
     opensslSupport = config.php.openssl or true;
     mbstringSupport = config.php.mbstring or true;
     gdSupport = config.php.gd or true;
+    intlSupport = config.php.intl or true;
+    exifSupport = config.php.exif or true;
+    xslSupport = config.php.xsl or false;
+    mcryptSupport = config.php.mcrypt or false;
+    bz2Support = config.php.bz2 or false;
+    zipSupport = config.php.zip or true;
   };
 
   configurePhase = ''
     iniFile=$out/etc/php-recommended.ini
     [[ -z "$libxml2" ]] || export PATH=$PATH:$libxml2/bin
-    ./configure --with-config-file-scan-dir=/etc --with-config-file-path=$out/etc --prefix=$out  $configureFlags
+    ./configure --with-config-file-scan-dir=/etc --with-config-file-path=$out/etc --prefix=$out $configureFlags
     echo configurePhase end
   '';
 
diff --git a/pkgs/development/interpreters/python/docs/2.6-html.nix b/pkgs/development/interpreters/python/docs/2.6-html.nix
new file mode 100644
index 00000000000..2b41f122fa9
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.6-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python26-docs-html-2.6.8";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-html.tar.bz2;
+    sha256 = "09kznik9ahmnrqw9gkr7mjv3b3zr258f2fm27n12hrrwwsaszkni";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python26
+    cp -R ./ $out/share/doc/python26/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.6-pdf-a4.nix b/pkgs/development/interpreters/python/docs/2.6-pdf-a4.nix
new file mode 100644
index 00000000000..ec031821a03
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.6-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python26-docs-pdf-a4-2.6.8";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-pdf-a4.tar.bz2;
+    sha256 = "07k8n9zhd59s1yn8ahsizkaqnv969p0f2c2acxgxrxhhyy842pp8";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python26
+    cp -R ./ $out/share/doc/python26/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.6-pdf-letter.nix b/pkgs/development/interpreters/python/docs/2.6-pdf-letter.nix
new file mode 100644
index 00000000000..7cacf777834
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.6-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python26-docs-pdf-letter-2.6.8";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-pdf-letter.tar.bz2;
+    sha256 = "01r87m8hb7f9ql4j9zcjcrr9150nsk23sj8cy02vygr83sc1ldmq";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python26
+    cp -R ./ $out/share/doc/python26/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.6-text.nix b/pkgs/development/interpreters/python/docs/2.6-text.nix
new file mode 100644
index 00000000000..eb394a3f3e2
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.6-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python26-docs-text-2.6.8";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-text.tar.bz2;
+    sha256 = "05wsdh6ilgkclgak09fq7fsx5kflkmqq8dyxi2rpydx289cw3a8c";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python26
+    cp -R ./ $out/share/doc/python26/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.7-html.nix b/pkgs/development/interpreters/python/docs/2.7-html.nix
new file mode 100644
index 00000000000..3885b43960f
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.7-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python27-docs-html-2.7.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-html.tar.bz2;
+    sha256 = "1hg92n0mzl9w6j33b2h0bf2vy6fsxnpxfdc3qw760vcm0y00155j";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python27
+    cp -R ./ $out/share/doc/python27/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.7-pdf-a4.nix b/pkgs/development/interpreters/python/docs/2.7-pdf-a4.nix
new file mode 100644
index 00000000000..d8dde17ac66
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.7-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python27-docs-pdf-a4-2.7.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-pdf-a4.tar.bz2;
+    sha256 = "13da88panq5b6qfhf8k4dgqgxkg4ydcac5cx69a3f35s1w90xdjr";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python27
+    cp -R ./ $out/share/doc/python27/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.7-pdf-letter.nix b/pkgs/development/interpreters/python/docs/2.7-pdf-letter.nix
new file mode 100644
index 00000000000..32581cd229a
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.7-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python27-docs-pdf-letter-2.7.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-pdf-letter.tar.bz2;
+    sha256 = "0x41phsdrpivhzkchswsliyx3a10n7gzc9irkrw6rz22j81bfydg";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python27
+    cp -R ./ $out/share/doc/python27/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.7-text.nix b/pkgs/development/interpreters/python/docs/2.7-text.nix
new file mode 100644
index 00000000000..59019238301
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.7-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python27-docs-text-2.7.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-text.tar.bz2;
+    sha256 = "1rxlb3jhh3892y65i45nk1y2lx981fr22a5hmfkp9gvjvdykjnzp";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python27
+    cp -R ./ $out/share/doc/python27/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.0-html.nix b/pkgs/development/interpreters/python/docs/3.0-html.nix
new file mode 100644
index 00000000000..fb793da3e5f
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.0-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python30-docs-html-3.0.1";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-html.tar.bz2;
+    sha256 = "0ybjnhg8qfr9kc4axm5xlghkz9dmsg6b1caj6m4gz28q89vggv3c";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python30
+    cp -R ./ $out/share/doc/python30/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.0-pdf-a4.nix b/pkgs/development/interpreters/python/docs/3.0-pdf-a4.nix
new file mode 100644
index 00000000000..e4b185a11c6
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.0-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python30-docs-pdf-a4-3.0.1";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-pdf-a4.tar.bz2;
+    sha256 = "1qgcydqxxhy317lkzzs2v5as4hcwcblir8y3mdr173qsg51iggra";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python30
+    cp -R ./ $out/share/doc/python30/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.0-pdf-letter.nix b/pkgs/development/interpreters/python/docs/3.0-pdf-letter.nix
new file mode 100644
index 00000000000..1373ae21284
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.0-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python30-docs-pdf-letter-3.0.1";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-pdf-letter.tar.bz2;
+    sha256 = "1x59q0k6fv55vvpsgr5xcq66k5zsd0f142cp6aa4rb6c81i31yml";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python30
+    cp -R ./ $out/share/doc/python30/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.0-text.nix b/pkgs/development/interpreters/python/docs/3.0-text.nix
new file mode 100644
index 00000000000..c37fa99f7c5
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.0-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python30-docs-text-3.0.1";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-text.tar.bz2;
+    sha256 = "12qlh9ywbnw50wk5siq7lmhr935dd16q3vjbii6gfv0g80b1byzx";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python30
+    cp -R ./ $out/share/doc/python30/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.1-html.nix b/pkgs/development/interpreters/python/docs/3.1-html.nix
new file mode 100644
index 00000000000..625aa181c63
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.1-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python31-docs-html-3.1.5";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-html.tar.bz2;
+    sha256 = "187shb92218k0i07hj9ak1kqbqjcxkivmwxlzj18v791l7x7qcpz";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python31
+    cp -R ./ $out/share/doc/python31/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.1-pdf-a4.nix b/pkgs/development/interpreters/python/docs/3.1-pdf-a4.nix
new file mode 100644
index 00000000000..564103dd101
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.1-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python31-docs-pdf-a4-3.1.5";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-pdf-a4.tar.bz2;
+    sha256 = "0kbj6b43gnwlb1czkzmirasmc31j10plq0rlb9s9rh8phqnbmhx1";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python31
+    cp -R ./ $out/share/doc/python31/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.1-pdf-letter.nix b/pkgs/development/interpreters/python/docs/3.1-pdf-letter.nix
new file mode 100644
index 00000000000..d6e3009f59c
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.1-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python31-docs-pdf-letter-3.1.5";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-pdf-letter.tar.bz2;
+    sha256 = "0s202vrjfa8dnp3vpfjb21bmqym9wyj8jn2glgwjzk63z6fwb60i";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python31
+    cp -R ./ $out/share/doc/python31/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.1-text.nix b/pkgs/development/interpreters/python/docs/3.1-text.nix
new file mode 100644
index 00000000000..3ce559e3ecc
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.1-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python31-docs-text-3.1.5";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-text.tar.bz2;
+    sha256 = "1jsfgfgdi1i2l3lhdk7ss5gwrcg3qhhh8syfrwz8xrv2klmmmn9b";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python31
+    cp -R ./ $out/share/doc/python31/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.2-html.nix b/pkgs/development/interpreters/python/docs/3.2-html.nix
new file mode 100644
index 00000000000..14690100548
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.2-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python32-docs-html-3.2.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-html.tar.bz2;
+    sha256 = "058pryg0gn0rlpswkj1z0xvpr39s3ymx3dwqfhhf83w0mlysdm0x";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python32
+    cp -R ./ $out/share/doc/python32/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.2-pdf-a4.nix b/pkgs/development/interpreters/python/docs/3.2-pdf-a4.nix
new file mode 100644
index 00000000000..729101b2d01
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.2-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python32-docs-pdf-a4-3.2.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-pdf-a4.tar.bz2;
+    sha256 = "1lw1sbk3nx70k2zxgjc36ryvyzlxndzsvhrxyzdy9sjfhasyd807";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python32
+    cp -R ./ $out/share/doc/python32/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.2-pdf-letter.nix b/pkgs/development/interpreters/python/docs/3.2-pdf-letter.nix
new file mode 100644
index 00000000000..da9b0ce4dcc
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.2-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python32-docs-pdf-letter-3.2.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-pdf-letter.tar.bz2;
+    sha256 = "199ibzslw3zrwjd49582vc5q6ghp5ig8zalvslawz0xkz1226wg2";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python32
+    cp -R ./ $out/share/doc/python32/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.2-text.nix b/pkgs/development/interpreters/python/docs/3.2-text.nix
new file mode 100644
index 00000000000..3ceef2431f7
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.2-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python32-docs-text-3.2.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-text.tar.bz2;
+    sha256 = "1jdc9rj2b4vsbvg5mq6vcdfa2b72avhhvjw7rn7k3kl521cvxs09";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python32
+    cp -R ./ $out/share/doc/python32/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.3-html.nix b/pkgs/development/interpreters/python/docs/3.3-html.nix
new file mode 100644
index 00000000000..055224dd740
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.3-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python33-docs-html-3.3.0";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-html.tar.bz2;
+    sha256 = "0vv24b9qi7gznv687ik0pa2w1rq9grqivy44znvj2ysjfg7mc2c1";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python33
+    cp -R ./ $out/share/doc/python33/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.3-pdf-a4.nix b/pkgs/development/interpreters/python/docs/3.3-pdf-a4.nix
new file mode 100644
index 00000000000..8c6b842d0b9
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.3-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python33-docs-pdf-a4-3.3.0";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-pdf-a4.tar.bz2;
+    sha256 = "1y6n13bxlw8a11khy3ynfbz8z0kpf2lvh32dvy8scyw3hrk6wdxp";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python33
+    cp -R ./ $out/share/doc/python33/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.3-pdf-letter.nix b/pkgs/development/interpreters/python/docs/3.3-pdf-letter.nix
new file mode 100644
index 00000000000..046abe8f83d
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.3-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python33-docs-pdf-letter-3.3.0";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-pdf-letter.tar.bz2;
+    sha256 = "0mcj1i47nx81fc9zk1cic4c4p139qjcqlzf4hnnkzvb3jcgy5z6k";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python33
+    cp -R ./ $out/share/doc/python33/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.3-text.nix b/pkgs/development/interpreters/python/docs/3.3-text.nix
new file mode 100644
index 00000000000..4d99c25bf59
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.3-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python33-docs-text-3.3.0";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-text.tar.bz2;
+    sha256 = "10vk2fixg1aglqmsf89kn98rlirrbhnrk1285vzfbynf2iavxw0n";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python33
+    cp -R ./ $out/share/doc/python33/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/default.nix b/pkgs/development/interpreters/python/docs/default.nix
new file mode 100644
index 00000000000..16ade3af3f9
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/default.nix
@@ -0,0 +1,89 @@
+{ stdenv, fetchurl, lib }:
+
+let
+pythonDocs = {
+  html = {
+    recurseForDerivations = true;
+    python33 = import ./3.3-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python32 = import ./3.2-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python31 = import ./3.1-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python30 = import ./3.0-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python27 = import ./2.7-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python26 = import ./2.6-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+  };
+  pdf_a4 = {
+    recurseForDerivations = true;
+    python33 = import ./3.3-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python32 = import ./3.2-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python31 = import ./3.1-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python30 = import ./3.0-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python27 = import ./2.7-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python26 = import ./2.6-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+  };
+  pdf_letter = {
+    recurseForDerivations = true;
+    python33 = import ./3.3-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python32 = import ./3.2-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python31 = import ./3.1-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python30 = import ./3.0-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python27 = import ./2.7-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python26 = import ./2.6-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+  };
+  text = {
+    recurseForDerivations = true;
+    python33 = import ./3.3-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python32 = import ./3.2-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python31 = import ./3.1-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python30 = import ./3.0-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python27 = import ./2.7-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python26 = import ./2.6-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+  };
+}; in pythonDocs
diff --git a/pkgs/development/interpreters/python/docs/generate.sh b/pkgs/development/interpreters/python/docs/generate.sh
new file mode 100755
index 00000000000..bebefc10ccd
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/generate.sh
@@ -0,0 +1,59 @@
+#!/usr/bin/env bash
+
+TYPES="html pdf-a4 pdf-letter text"
+URL=http://docs.python.org/ftp/python/doc/VERSION/python-VERSION-docs-TYPE.tar.bz2
+VERSIONS=$(curl http://www.python.org/download/releases/ 2>/dev/null | grep "releases/[123456789]"| cut -d/ -f4 |grep -v "^[12].[012345]" |grep -v "^1.6.1")
+echo "Generating expressions for:
+${VERSIONS}
+"
+
+
+cat >default.nix <<EOF
+{ stdenv, fetchurl, lib }:
+
+let
+pythonDocs = {
+EOF
+
+for type in $TYPES; do
+    cat >>default.nix <<EOF
+  ${type/-/_} = {
+    recurseForDerivations = true;
+EOF
+
+    for version in $VERSIONS; do
+        major=$(echo -n ${version}| cut -d. -f1)
+        minor=$(echo -n ${version}| cut -d. -f2)
+        outfile=${major}.${minor}-${type}.nix
+        hash=
+        if [ -e ${outfile} ]; then
+            currentversion=$(grep "url =" ${outfile} |cut -d/ -f7)
+            if [ ${version} = ${currentversion} ]; then
+                hash=$(grep sha256 ${outfile} | cut -d'"' -f2)
+            fi
+        fi
+        echo "Generating ${outfile}"
+        url=$(echo -n $URL |sed -e "s,VERSION,${version},g" -e "s,TYPE,${type},")
+        sha=$(nix-prefetch-url ${url} ${hash})
+
+        sed -e "s,VERSION,${version}," \
+            -e "s,MAJOR,${major}," \
+            -e "s,MINOR,${minor}," \
+            -e "s,TYPE,${type}," \
+            -e "s,URL,${url}," \
+            -e "s,SHA,${sha}," < template.nix > ${outfile}
+
+        attrname=python${major}${minor}
+        cat >>default.nix <<EOF
+    ${attrname} = import ./${major}.${minor}-${type}.nix {
+      inherit stdenv fetchurl lib;
+    };
+EOF
+
+        echo "done."
+        echo
+    done
+    echo "  };" >> default.nix
+done
+
+echo "}; in pythonDocs" >> default.nix
diff --git a/pkgs/development/interpreters/python/docs/template.nix b/pkgs/development/interpreters/python/docs/template.nix
new file mode 100644
index 00000000000..cc92f71bc1e
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/template.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "pythonMAJORMINOR-docs-TYPE-VERSION";
+  src = fetchurl {
+    url = URL;
+    sha256 = "SHA";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/pythonMAJORMINOR
+    cp -R ./ $out/share/doc/pythonMAJORMINOR/TYPE
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/ruby/fix-gem-nix-versions.patch b/pkgs/development/interpreters/ruby/fix-gem-nix-versions.patch
new file mode 100644
index 00000000000..c67eaff2ac5
--- /dev/null
+++ b/pkgs/development/interpreters/ruby/fix-gem-nix-versions.patch
@@ -0,0 +1,35 @@
+diff --git a/lib/nix/gem-nix-command.rb b/lib/nix/gem-nix-command.rb
+index 8d3733e..ba942ff 100644
+--- a/lib/nix/gem-nix-command.rb
++++ b/lib/nix/gem-nix-command.rb
+@@ -108,11 +108,12 @@ class Gem::Commands::NixCommand < Gem::Command
+ 
+       # args to dep informations
+       args.each { |arg|
+-        if arg =~ /(.+)-?(.*)?/ then
++        if arg =~ /(.+)-([0-9][^-]+)/ then
+           gem_name = $1
+-          version =  $2.empty? ?  Gem::Requirement.default : Gem::Version.new($2)
++          version =  Gem::Version.new($2)
+         else
+-          raise Gem::CommandLineError, "couldn't parse arg. expected: name or name-version"
++          gem_name = arg
++          version =  Gem::Requirement.default
+         end
+ 
+         adddep(Gem::Dependency.new gem_name, version)
+@@ -162,7 +163,13 @@ class Gem::Commands::NixCommand < Gem::Command
+     spec, source_uri = find_gem_with_source(dep)
+     full_name = spec.full_name
+ 
+-    return if @gems_with_deps.key?(full_name)
++    if @gems_with_deps.key?(full_name)
++      unless @gems_with_deps[full_name].nil?
++        return @gems_with_deps[full_name][0]
++      else
++        return nil
++      end
++    end
+     @gems_with_deps[full_name] = nil # there maybe circular dependencies. thus mark this gem seen as early as possible
+ 
+     # development deps can't be found. Some are old. Thus only add rutime dependencies
diff --git a/pkgs/development/interpreters/ruby/generated.nix b/pkgs/development/interpreters/ruby/generated.nix
index 68c83a8e78c..2f276fc163a 100644
--- a/pkgs/development/interpreters/ruby/generated.nix
+++ b/pkgs/development/interpreters/ruby/generated.nix
@@ -10,53 +10,66 @@ g: # Get dependencies from patched gems
     activerecord = g.activerecord_3_2_12;
     activeresource = g.activeresource_3_2_12;
     activesupport = g.activesupport_3_2_12;
+    addressable = g.addressable_2_3_3;
     arel = g.arel_3_0_2;
     atoulme_Antwrap = g.atoulme_Antwrap_0_7_4;
     autotest_rails = g.autotest_rails_4_1_2;
-    aws_sdk = g.aws_sdk_1_8_3;
-    builder = g.builder_3_1_4;
+    aws_sdk = g.aws_sdk_1_8_5;
+    bitbucket_backup = g.bitbucket_backup_0_2_2;
+    builder = g.builder_3_2_0;
     buildr = g.buildr_1_4_10;
-    bundler = g.bundler_1_2_4;
-    childprocess = g.childprocess_0_3_8;
+    bundler = g.bundler_1_3_4;
+    childprocess = g.childprocess_0_3_9;
+    chronic = g.chronic_0_9_1;
     daemons = g.daemons_1_1_9;
     diff_lcs = g.diff_lcs_1_1_3;
+    dimensions = g.dimensions_1_2_0;
+    em_resolv_replace = g.em_resolv_replace_1_1_3;
     erubis = g.erubis_2_7_0;
-    eventmachine = g.eventmachine_1_0_0;
+    eventmachine = g.eventmachine_1_0_3;
+    eventmachine_tail = g.eventmachine_tail_0_6_4;
     fakes3 = g.fakes3_0_1_5;
+    faraday = g.faraday_0_8_6;
+    faraday_middleware = g.faraday_middleware_0_8_8;
     ffi = g.ffi_1_4_0;
-    foreman = g.foreman_0_61_0;
-    highline = g.highline_1_6_2;
+    file_tail = g.file_tail_1_0_12;
+    foreman = g.foreman_0_62_0;
+    highline = g.highline_1_6_15;
     hike = g.hike_1_2_1;
     hoe = g.hoe_3_1_0;
-    i18n = g.i18n_0_6_1;
+    i18n = g.i18n_0_6_4;
     journey = g.journey_1_0_4;
     jruby_pageant = g.jruby_pageant_1_1_1;
-    jsduck = g.jsduck_4_6_1;
+    jsduck = g.jsduck_4_6_2;
     json = g.json_1_7_7;
     json_pure = g.json_pure_1_7_7;
-    libv8 = g.libv8_3_3_10_4_x86_64_linux;
+    libv8 = g.libv8_3_3_10_4;
     macaddr = g.macaddr_1_6_1;
     mail = g.mail_2_4_4;
     mime_types = g.mime_types_1_21;
     minitar = g.minitar_0_5_3;
     multi_json = g.multi_json_1_6_1;
+    multipart_post = g.multipart_post_1_2_0;
     net_sftp = g.net_sftp_2_0_5;
-    net_ssh = g.net_ssh_2_6_5;
+    net_ssh = g.net_ssh_2_6_6;
     nix = g.nix_0_1_1;
     nokogiri = g.nokogiri_1_5_6;
+    papertrail = g.papertrail_0_9_7;
+    papertrail_cli = g.papertrail_cli_0_9_3;
     parallel = g.parallel_0_6_2;
     polyglot = g.polyglot_0_3_3;
     rack = g.rack_1_5_2;
     rack_cache = g.rack_cache_1_2;
-    rack_protection = g.rack_protection_1_3_2;
+    rack_protection = g.rack_protection_1_5_0;
     rack_ssl = g.rack_ssl_1_3_3;
     rack_test = g.rack_test_0_6_2;
     rails = g.rails_3_2_12;
     railties = g.railties_3_2_12;
     rake = g.rake_10_0_3;
     rb_fsevent = g.rb_fsevent_0_9_3;
-    rdiscount = g.rdiscount_2_0_7;
-    rdoc = g.rdoc_3_12_1;
+    rdiscount = g.rdiscount_2_0_7_1;
+    rdoc = g.rdoc_3_12_2;
+    remote_syslog = g.remote_syslog_1_6_13;
     rjb = g.rjb_1_4_6;
     rspec = g.rspec_2_11_0;
     rspec_core = g.rspec_core_2_11_1;
@@ -64,23 +77,27 @@ g: # Get dependencies from patched gems
     rspec_mocks = g.rspec_mocks_2_11_3;
     rubyforge = g.rubyforge_2_0_4;
     rubyzip = g.rubyzip_0_9_9;
-    sass = g.sass_3_2_5;
-    selenium_webdriver = g.selenium_webdriver_2_30_0;
+    sass = g.sass_3_2_7;
+    selenium_webdriver = g.selenium_webdriver_2_31_0;
+    servolux = g.servolux_0_10_0;
     sinatra = g.sinatra_1_3_2;
     sprockets = g.sprockets_2_2_2;
+    syslog_protocol = g.syslog_protocol_0_9_2;
     systemu = g.systemu_2_5_2;
     therubyracer = g.therubyracer_0_10_2;
     thin = g.thin_1_5_0;
     thor = g.thor_0_17_0;
-    tilt = g.tilt_1_3_3;
+    tilt = g.tilt_1_3_5;
+    tins = g.tins_0_7_2;
     treetop = g.treetop_1_4_12;
-    tzinfo = g.tzinfo_0_3_35;
+    tzinfo = g.tzinfo_0_3_37;
     uuid = g.uuid_2_3_7;
     uuidtools = g.uuidtools_2_1_3;
     websocket = g.websocket_1_0_7;
     xml_simple = g.xml_simple_1_1_1;
+    yajl_ruby = g.yajl_ruby_1_1_0;
   };
-  gem_nix_args = [ ''autotest-rails'' ''aws-sdk'' ''buildr'' ''fakes3'' ''foreman'' ''jsduck'' ''nix'' ''rails'' ''rake'' ''rb-fsevent'' ''sass'' ''selenium-webdriver'' ''sinatra-1.3.2'' ''thin'' ''uuid'' ];
+  gem_nix_args = [ ''autotest-rails'' ''aws-sdk'' ''bitbucket-backup'' ''buildr'' ''fakes3'' ''foreman'' ''jsduck'' ''nix'' ''papertrail-cli'' ''rails'' ''rake'' ''rb-fsevent'' ''remote_syslog'' ''sass'' ''selenium-webdriver'' ''sinatra-1.3.2'' ''thin'' ''uuid'' ];
   gems = {
     ZenTest_4_9_0 = {
       basename = ''ZenTest'';
@@ -154,7 +171,7 @@ installed versions.'';
         longDescription = ''Databases on Rails. Build a persistent domain model by mapping database tables to Ruby classes. Strong conventions for associations, validations, aggregations, migrations, and testing come baked-in.'';
       };
       name = ''activerecord-3.2.12'';
-      requiredGems = [ g.activesupport_3_2_12 g.activemodel_3_2_12 g.arel_3_0_2 g.tzinfo_0_3_35 ];
+      requiredGems = [ g.activesupport_3_2_12 g.activemodel_3_2_12 g.arel_3_0_2 g.tzinfo_0_3_37 ];
       sha256 = ''0fl8iyv3gcy72y79iv4ccyck8ik02rrl3pdy7yxfhlnqgryp8syi'';
     };
     activeresource_3_2_12 = {
@@ -176,9 +193,23 @@ installed versions.'';
         longDescription = ''A toolkit of support libraries and Ruby core extensions extracted from the Rails framework. Rich support for multibyte strings, internationalization, time zones, and testing.'';
       };
       name = ''activesupport-3.2.12'';
-      requiredGems = [ g.i18n_0_6_1 g.multi_json_1_6_1 ];
+      requiredGems = [ g.i18n_0_6_4 g.multi_json_1_6_1 ];
       sha256 = ''1giqkprxjf5gyfyhn5nz9q8a5gi3v8irxhkpqr00zc5fw1azllsg'';
     };
+    addressable_2_3_3 = {
+      basename = ''addressable'';
+      meta = {
+        description = ''URI Implementation'';
+        homepage = ''http://addressable.rubyforge.org/'';
+        longDescription = ''Addressable is a replacement for the URI implementation that is part of
+Ruby's standard library. It more closely conforms to the relevant RFCs and
+adds support for IRIs and URI templates.
+'';
+      };
+      name = ''addressable-2.3.3'';
+      requiredGems = [  ];
+      sha256 = ''0nn583ba8kq4hhpr4lr2zzpm4r0mga0zfalxxpa6a4v27q71v5hh'';
+    };
     arel_3_0_2 = {
       basename = ''arel'';
       meta = {
@@ -231,16 +262,27 @@ rails support and extra plugins for migrations and fixtures.'';
       requiredGems = [ g.ZenTest_4_9_0 ];
       sha256 = ''1wkb5jayb39yx0i8ly7sibygf9f9c3w24jg2z1qgm135zlb070v4'';
     };
-    aws_sdk_1_8_3 = {
+    aws_sdk_1_8_5 = {
       basename = ''aws_sdk'';
       meta = {
         description = ''AWS SDK for Ruby'';
         homepage = ''http://aws.amazon.com/sdkforruby'';
         longDescription = ''AWS SDK for Ruby'';
       };
-      name = ''aws-sdk-1.8.3'';
+      name = ''aws-sdk-1.8.5'';
       requiredGems = [ g.uuidtools_2_1_3 g.nokogiri_1_5_6 g.json_1_7_7 ];
-      sha256 = ''0ggvwiya4swyjyswfgwhzw09hap2slz7djp0svq22y7j0xci1axy'';
+      sha256 = ''0rhkkkfsw0qzckn99mnvpbnl7b1kysma3x8bbqwah2x438kwygpb'';
+    };
+    bitbucket_backup_0_2_2 = {
+      basename = ''bitbucket_backup'';
+      meta = {
+        description = ''A tool to backup Bitbucket repos.'';
+        homepage = ''https://bitbucket.org/seth/bitbucket-backup'';
+        longDescription = ''A tool to backup Bitbucket repos.'';
+      };
+      name = ''bitbucket-backup-0.2.2'';
+      requiredGems = [ g.highline_1_6_15 g.json_1_7_7 ];
+      sha256 = ''1kzg6pkzw04n96i6mhb74gpg4c899wly5fc2m1y6m2xvn71qksys'';
     };
     builder_3_0_4 = {
       basename = ''builder'';
@@ -274,7 +316,7 @@ simple to do.  Currently the following builder objects are supported:
       requiredGems = [  ];
       sha256 = ''0w6xsq9vyvzdy0xb52sajgipr9ml2bbpivk6dxm69c6987dk7him'';
     };
-    builder_3_1_4 = {
+    builder_3_2_0 = {
       basename = ''builder'';
       meta = {
         description = ''Builders for MarkUp.'';
@@ -286,9 +328,9 @@ simple to do.  Currently the following builder objects are supported:
 * XML Events
 '';
       };
-      name = ''builder-3.1.4'';
+      name = ''builder-3.2.0'';
       requiredGems = [  ];
-      sha256 = ''1p0bjy1vb0zbswd6bsh5qda0f0br53p8vak8cm7hls62094r405p'';
+      sha256 = ''0f2cpfx6lpazb1wrz3lf06qp6f0qf0gdq5z8xnhkplc3fz3kslb0'';
     };
     buildr_1_4_10 = {
       basename = ''buildr'';
@@ -303,30 +345,41 @@ for those one-off tasks, with a language that's a joy to use.
 '';
       };
       name = ''buildr-1.4.10'';
-      requiredGems = [ g.rake_0_9_2_2 g.builder_3_1_3 g.net_ssh_2_6_0 g.net_sftp_2_0_5 g.rubyzip_0_9_9 g.highline_1_6_2 g.json_pure_1_7_5 g.rubyforge_2_0_4 g.hoe_3_1_0 g.rjb_1_4_2 g.atoulme_Antwrap_0_7_4 g.diff_lcs_1_1_3 g.rspec_expectations_2_11_3 g.rspec_mocks_2_11_3 g.rspec_core_2_11_1 g.rspec_2_11_0 g.xml_simple_1_1_1 g.minitar_0_5_3 g.bundler_1_2_4 ];
+      requiredGems = [ g.rake_0_9_2_2 g.builder_3_1_3 g.net_ssh_2_6_0 g.net_sftp_2_0_5 g.rubyzip_0_9_9 g.highline_1_6_2 g.json_pure_1_7_5 g.rubyforge_2_0_4 g.hoe_3_1_0 g.rjb_1_4_2 g.atoulme_Antwrap_0_7_4 g.diff_lcs_1_1_3 g.rspec_expectations_2_11_3 g.rspec_mocks_2_11_3 g.rspec_core_2_11_1 g.rspec_2_11_0 g.xml_simple_1_1_1 g.minitar_0_5_3 g.bundler_1_3_4 ];
       sha256 = ''1x192r8ab5zr9rlp1i9b3pi3y74f9pj2w491wkgshgwj22akh6vn'';
     };
-    bundler_1_2_4 = {
+    bundler_1_3_4 = {
       basename = ''bundler'';
       meta = {
         description = ''The best way to manage your application's dependencies'';
         homepage = ''http://gembundler.com'';
         longDescription = ''Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably'';
       };
-      name = ''bundler-1.2.4'';
+      name = ''bundler-1.3.4'';
       requiredGems = [  ];
-      sha256 = ''0p90abn29wvg6ic1230f4dj7zs55r9r772b0xq02fwqd0ry3pdgl'';
+      sha256 = ''1vgrc71nhnqlrg08zvs63afa1z9kzn2vvn95b14dvy14k2br3qhj'';
     };
-    childprocess_0_3_8 = {
+    childprocess_0_3_9 = {
       basename = ''childprocess'';
       meta = {
         description = ''This gem aims at being a simple and reliable solution for controlling external programs running in the background on any Ruby / OS combination.'';
         homepage = ''http://github.com/jarib/childprocess'';
         longDescription = ''This gem aims at being a simple and reliable solution for controlling external programs running in the background on any Ruby / OS combination.'';
       };
-      name = ''childprocess-0.3.8'';
+      name = ''childprocess-0.3.9'';
       requiredGems = [ g.ffi_1_4_0 ];
-      sha256 = ''08rp4krw0g60567ih4w51ndlq2pg92al0dycy0bs0m3msq68nlq4'';
+      sha256 = ''0jbz2ix7ff9ry8717lhcq9w8j8yd45akw48giwgdqccay5mlph7d'';
+    };
+    chronic_0_9_1 = {
+      basename = ''chronic'';
+      meta = {
+        description = ''Natural language date/time parsing.'';
+        homepage = ''http://github.com/mojombo/chronic'';
+        longDescription = ''Chronic is a natural language date/time parser written in pure Ruby.'';
+      };
+      name = ''chronic-0.9.1'';
+      requiredGems = [  ];
+      sha256 = ''0kspaxpfy7yvyk1lvpx31w852qfj8wb9z04mcj5bzi70ljb9awqk'';
     };
     daemons_1_1_9 = {
       basename = ''daemons'';
@@ -364,6 +417,27 @@ is the MIT license.'';
       requiredGems = [  ];
       sha256 = ''15wqs3md9slif6ag43vp6gw63r3a2zdqiyfapnnzkb7amgg930pv'';
     };
+    dimensions_1_2_0 = {
+      basename = ''dimensions'';
+      meta = {
+        description = ''Pure Ruby dimension measurement for GIF, PNG, JPEG and TIFF images'';
+        homepage = ''https://github.com/sstephenson/dimensions'';
+        longDescription = ''A pure Ruby library for measuring the dimensions and rotation angles of GIF, PNG, JPEG and TIFF images.'';
+      };
+      name = ''dimensions-1.2.0'';
+      requiredGems = [  ];
+      sha256 = ''1pqb7yzjcpbgbyi196ifqbd1wy570cn12bkzcvpcha4xilhajja0'';
+    };
+    em_resolv_replace_1_1_3 = {
+      basename = ''em_resolv_replace'';
+      meta = {
+        description = ''EventMachine-aware DNS lookup for Ruby'';
+        homepage = ''http://github.com/mperham/em-resolv-replace'';
+      };
+      name = ''em-resolv-replace-1.1.3'';
+      requiredGems = [  ];
+      sha256 = ''1w5y4rzmp51ni56v05qwgay5wrs2i6i3q92pvlcrghmhxhgsbqg7'';
+    };
     erubis_2_7_0 = {
       basename = ''erubis'';
       meta = {
@@ -387,7 +461,7 @@ is the MIT license.'';
       requiredGems = [  ];
       sha256 = ''1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3'';
     };
-    eventmachine_1_0_0 = {
+    eventmachine_1_0_3 = {
       basename = ''eventmachine'';
       meta = {
         description = ''Ruby/EventMachine library'';
@@ -403,9 +477,20 @@ are provided with the package, primarily to serve as examples. The real goal
 of EventMachine is to enable programs to easily interface with other programs
 using TCP/IP, especially if custom protocols are required.'';
       };
-      name = ''eventmachine-1.0.0'';
+      name = ''eventmachine-1.0.3'';
       requiredGems = [  ];
-      sha256 = ''1qshsikskkfbbhai9s0qhmnpa326m83k9yzivwvkl2dc1ffpk2pz'';
+      sha256 = ''09sqlsb6x9ddlgfw5gsw7z0yjg5m2qfjiqkz2fx70zsizj3lqhil'';
+    };
+    eventmachine_tail_0_6_4 = {
+      basename = ''eventmachine_tail'';
+      meta = {
+        description = ''eventmachine tail - a file tail implementation with glob support'';
+        homepage = ''http://code.google.com/p/semicomplete/wiki/EventMachineTail'';
+        longDescription = ''Add file 'tail' implemented with EventMachine. Also includes a 'glob watch' class for watching a directory pattern for new matches, like /var/log/*.log'';
+      };
+      name = ''eventmachine-tail-0.6.4'';
+      requiredGems = [ g.eventmachine_1_0_3 ];
+      sha256 = ''1pvlb34vdzd81kf9f3xyibb4f55xjqm7lqqy28dgyci5cyv50y61'';
     };
     fakes3_0_1_5 = {
       basename = ''fakes3'';
@@ -414,9 +499,30 @@ using TCP/IP, especially if custom protocols are required.'';
         longDescription = ''Use FakeS3 to test basic S3 functionality without actually connecting to S3'';
       };
       name = ''fakes3-0.1.5'';
-      requiredGems = [ g.thor_0_17_0 g.builder_3_1_4 ];
+      requiredGems = [ g.thor_0_17_0 g.builder_3_2_0 ];
       sha256 = ''1na5wrbarla6s414svqmr5spbpv6vmcgpswal444x4clcpmadhib'';
     };
+    faraday_0_8_6 = {
+      basename = ''faraday'';
+      meta = {
+        description = ''HTTP/REST API client library.'';
+        homepage = ''https://github.com/lostisland/faraday'';
+      };
+      name = ''faraday-0.8.6'';
+      requiredGems = [ g.multipart_post_1_2_0 ];
+      sha256 = ''16jd0gnqfrh5v4v88nlasyjjm8cmf2w2p6gphxq64mvdxlcdy5jy'';
+    };
+    faraday_middleware_0_8_8 = {
+      basename = ''faraday_middleware'';
+      meta = {
+        description = ''Various middleware for Faraday'';
+        homepage = ''https://github.com/pengwynn/faraday_middleware'';
+        longDescription = ''Various middleware for Faraday'';
+      };
+      name = ''faraday_middleware-0.8.8'';
+      requiredGems = [ g.faraday_0_8_6 ];
+      sha256 = ''1n0g8pm7ynx6ffyqhscc1cqw97zhvd8isr31yfyj15335j1jsncz'';
+    };
     ffi_1_4_0 = {
       basename = ''ffi'';
       meta = {
@@ -428,16 +534,42 @@ using TCP/IP, especially if custom protocols are required.'';
       requiredGems = [  ];
       sha256 = ''06a29qvg487yk9pyi7wzyj5700mf7s3mjdqc6dsrh0467mjj9768'';
     };
-    foreman_0_61_0 = {
+    file_tail_1_0_12 = {
+      basename = ''file_tail'';
+      meta = {
+        description = ''File::Tail for Ruby'';
+        homepage = ''http://github.com/flori/file-tail'';
+        longDescription = ''Library to tail files in Ruby'';
+      };
+      name = ''file-tail-1.0.12'';
+      requiredGems = [ g.tins_0_7_2 ];
+      sha256 = ''0mzxxnwj7k5pwxs0rdbmb3b41zgvzw7x40sf3qlkch4zdfx91i1j'';
+    };
+    foreman_0_62_0 = {
       basename = ''foreman'';
       meta = {
         description = ''Process manager for applications with multiple components'';
         homepage = ''http://github.com/ddollar/foreman'';
         longDescription = ''Process manager for applications with multiple components'';
       };
-      name = ''foreman-0.61.0'';
+      name = ''foreman-0.62.0'';
       requiredGems = [ g.thor_0_17_0 ];
-      sha256 = ''1h9dmzq1cwz87qyzx2ibpjghsxjnnqbh485l3sdxyfh5k3v79k7z'';
+      sha256 = ''08i34rgs3bydk52zwpps4p0y2fvcnibp9lvfdhr75ppin7wv7lmr'';
+    };
+    highline_1_6_15 = {
+      basename = ''highline'';
+      meta = {
+        description = ''HighLine is a high-level command-line IO library.'';
+        homepage = ''http://highline.rubyforge.org'';
+        longDescription = ''A high-level IO library that provides validation, type conversion, and more for
+command-line interfaces. HighLine also includes a complete menu system that can
+crank out anything from simple list selection to complete shells with just
+minutes of work.
+'';
+      };
+      name = ''highline-1.6.15'';
+      requiredGems = [  ];
+      sha256 = ''1ilwlgylv92md9dnw6hqhrw8hiwk3f4k8qz6airqjp1rq9r594m1'';
     };
     highline_1_6_2 = {
       basename = ''highline'';
@@ -485,16 +617,16 @@ For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf'';
       requiredGems = [ g.rake_0_9_6 ];
       sha256 = ''0i961x0hrd6fs1nsfham87dhn64gqpnai27l14jag7qbnp3a79yp'';
     };
-    i18n_0_6_1 = {
+    i18n_0_6_4 = {
       basename = ''i18n'';
       meta = {
         description = ''New wave Internationalization support for Ruby'';
         homepage = ''http://github.com/svenfuchs/i18n'';
         longDescription = ''New wave Internationalization support for Ruby.'';
       };
-      name = ''i18n-0.6.1'';
+      name = ''i18n-0.6.4'';
       requiredGems = [  ];
-      sha256 = ''0x3lhp1vl1k4dfqx6k93hhxcpjkz57y8cf007ws7p845ywk6ibfl'';
+      sha256 = ''0wz1rnrs4n21j1rw9a120j2pfdkbikp1yvxaqi3mk30iw6mx4p0f'';
     };
     journey_1_0_4 = {
       basename = ''journey'';
@@ -518,16 +650,16 @@ For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf'';
       requiredGems = [  ];
       sha256 = ''1kgqsn0bagr41gf5kbqaxbs38a7s5bm85m0pdx4qz7d70v9nc9cl'';
     };
-    jsduck_4_6_1 = {
+    jsduck_4_6_2 = {
       basename = ''jsduck'';
       meta = {
         description = ''Simple JavaScript Duckumentation generator'';
         homepage = ''https://github.com/senchalabs/jsduck'';
         longDescription = ''Documentation generator for Sencha JS frameworks'';
       };
-      name = ''jsduck-4.6.1'';
-      requiredGems = [ g.rdiscount_2_0_7 g.json_1_7_7 g.parallel_0_6_2 g.therubyracer_0_10_2 ];
-      sha256 = ''01bws3jfsym531znwsd6qjaymf1mrsss1bj8csvj3vhnv728qbyh'';
+      name = ''jsduck-4.6.2'';
+      requiredGems = [ g.rdiscount_2_0_7_1 g.json_1_7_7 g.parallel_0_6_2 g.therubyracer_0_10_2 g.dimensions_1_2_0 ];
+      sha256 = ''035w4igfa6yy6234ff4zbiqfjn0bhwqs6k8kji52l7gzgskwmzln'';
     };
     json_1_7_7 = {
       basename = ''json'';
@@ -562,16 +694,16 @@ For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf'';
       requiredGems = [  ];
       sha256 = ''0jxp0amx9xhka0ixnhvfgwc5ydr82hkxp81pvw32z31arx7jrwl6'';
     };
-    libv8_3_3_10_4_x86_64_linux = {
+    libv8_3_3_10_4 = {
       basename = ''libv8'';
       meta = {
         description = ''Distribution of the V8 JavaScript engine'';
         homepage = ''http://github.com/fractaloop/libv8'';
         longDescription = ''Distributes the V8 JavaScript engine in binary and source forms in order to support fast builds of The Ruby Racer'';
       };
-      name = ''libv8-3.3.10.4-x86_64-linux'';
+      name = ''libv8-3.3.10.4'';
       requiredGems = [  ];
-      sha256 = ''13lnmkm9z3xqyi8rlsycfd7wybv044pxcisrkyq0cx7ig91a0dmc'';
+      sha256 = ''0zy585rs1ihm8nsw525wgmbkcq7aqy1k9dbkk8s6953adl0bpz42'';
     };
     macaddr_1_6_1 = {
       basename = ''macaddr'';
@@ -592,7 +724,7 @@ For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf'';
         longDescription = ''A really Ruby Mail handler.'';
       };
       name = ''mail-2.4.4'';
-      requiredGems = [ g.mime_types_1_21 g.treetop_1_4_12 g.i18n_0_6_1 ];
+      requiredGems = [ g.mime_types_1_21 g.treetop_1_4_12 g.i18n_0_6_4 ];
       sha256 = ''0idylz5pnlz34mrxm7gs9jbll2c0k0y9dq2qarhxk30gwyvjaxi3'';
     };
     mime_types_1_21 = {
@@ -649,6 +781,17 @@ added from the the {LTSW collection}[http://www.ltsw.se/knbase/internet/mime.htp
       requiredGems = [  ];
       sha256 = ''0p33swcl9i97wvv0cq9jkdl8q7xbc3j07apy35vsgldnhw99krcg'';
     };
+    multipart_post_1_2_0 = {
+      basename = ''multipart_post'';
+      meta = {
+        description = ''A multipart form post accessory for Net::HTTP.'';
+        homepage = ''https://github.com/nicksieger/multipart-post'';
+        longDescription = ''Use with Net::HTTP to do multipart form posts.  IO values that have #content_type, #original_filename, and #local_path will be posted as a binary file.'';
+      };
+      name = ''multipart-post-1.2.0'';
+      requiredGems = [  ];
+      sha256 = ''12p7lnmc52di1r4h73h6xrpppplzyyhani9p7wm8l4kgf1hnmwnc'';
+    };
     net_sftp_2_0_5 = {
       basename = ''net_sftp'';
       meta = {
@@ -657,7 +800,7 @@ added from the the {LTSW collection}[http://www.ltsw.se/knbase/internet/mime.htp
         longDescription = ''A pure Ruby implementation of the SFTP client protocol'';
       };
       name = ''net-sftp-2.0.5'';
-      requiredGems = [ g.net_ssh_2_6_5 ];
+      requiredGems = [ g.net_ssh_2_6_6 ];
       sha256 = ''0lqk735wspm8rbiyxpbil8ikrqcyg00ss1df7fny0761c3as6m0v'';
     };
     net_ssh_2_6_0 = {
@@ -671,16 +814,16 @@ added from the the {LTSW collection}[http://www.ltsw.se/knbase/internet/mime.htp
       requiredGems = [ g.jruby_pageant_1_1_1 ];
       sha256 = ''18fsgps4a9dfrjszkl3py8j7vw0xwi70bcp59ccj2rlr6i1jv5gw'';
     };
-    net_ssh_2_6_5 = {
+    net_ssh_2_6_6 = {
       basename = ''net_ssh'';
       meta = {
         description = ''Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.'';
         homepage = ''https://github.com/net-ssh/net-ssh'';
         longDescription = ''Net::SSH: a pure-Ruby implementation of the SSH2 client protocol. It allows you to write programs that invoke and interact with processes on remote servers, via SSH2.'';
       };
-      name = ''net-ssh-2.6.5'';
+      name = ''net-ssh-2.6.6'';
       requiredGems = [  ];
-      sha256 = ''1f21r78b0rm9gyzdc96fzih27nrags3pk00zlhfviqlfbmb1c48x'';
+      sha256 = ''00fdnwv3jf311jjcc51lq8w26r62vzma91i79h5hj8i1ylrilx51'';
     };
     nix_0_1_1 = {
       basename = ''nix'';
@@ -708,6 +851,28 @@ enough of it.'';
       requiredGems = [  ];
       sha256 = ''1235h8k242f6yi5qgb8rfcx6gp7g99djwqgrz0vb6w12pbp9kar8'';
     };
+    papertrail_0_9_7 = {
+      basename = ''papertrail'';
+      meta = {
+        description = ''Command-line client for Papertrail hosted log management service.'';
+        homepage = ''http://github.com/papertrail/papertrail-cli'';
+        longDescription = ''Command-line client for Papertrail hosted log management service. Tails and searches app server logs and system syslog. Supports Boolean search and works with grep and pipe output (Unix).'';
+      };
+      name = ''papertrail-0.9.7'';
+      requiredGems = [ g.addressable_2_3_3 g.yajl_ruby_1_1_0 g.chronic_0_9_1 g.faraday_0_8_6 g.faraday_middleware_0_8_8 ];
+      sha256 = ''0v0m1v0qabbr9pmyl77znz39qy1m7p0xwvf3lf9hyq6n524f2dwr'';
+    };
+    papertrail_cli_0_9_3 = {
+      basename = ''papertrail_cli'';
+      meta = {
+        description = ''Placeholder gem to point to new papertrail gem'';
+        homepage = ''http://github.com/papertrail/papertrail-cli-gem'';
+        longDescription = ''Placeholder gem to point to new papertrail gem.'';
+      };
+      name = ''papertrail-cli-0.9.3'';
+      requiredGems = [ g.papertrail_0_9_7 ];
+      sha256 = ''1914dcfqsmw5rl4xd1zwjrfbgwglyncxm8km06bgxaqn4wnaq5iv'';
+    };
     parallel_0_6_2 = {
       basename = ''parallel'';
       meta = {
@@ -779,16 +944,16 @@ Also see http://rack.github.com/.
       requiredGems = [ g.rack_1_5_2 ];
       sha256 = ''073ffpsqmy4nqxz178qisb3a4v3305c49ypj0jw6s9mkz02yvgq2'';
     };
-    rack_protection_1_3_2 = {
+    rack_protection_1_5_0 = {
       basename = ''rack_protection'';
       meta = {
         description = ''You should use protection!'';
         homepage = ''http://github.com/rkh/rack-protection'';
         longDescription = ''You should use protection!'';
       };
-      name = ''rack-protection-1.3.2'';
+      name = ''rack-protection-1.5.0'';
       requiredGems = [ g.rack_1_5_2 ];
-      sha256 = ''0f69d491xciq1hb3mm26nxnsb3pvlf3gdkggj4ryiphimsy05n0k'';
+      sha256 = ''10wm67f2mp9pryg0s8qapbyxd2lcrpb8ywsbicg29cv2xprhbl4j'';
     };
     rack_ssl_1_3_3 = {
       basename = ''rack_ssl'';
@@ -824,7 +989,7 @@ request helpers feature.'';
         longDescription = ''Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity. It encourages beautiful code by favoring convention over configuration.'';
       };
       name = ''rails-3.2.12'';
-      requiredGems = [ g.activesupport_3_2_12 g.actionpack_3_2_12 g.activerecord_3_2_12 g.activeresource_3_2_12 g.actionmailer_3_2_12 g.railties_3_2_12 g.bundler_1_2_4 ];
+      requiredGems = [ g.activesupport_3_2_12 g.actionpack_3_2_12 g.activerecord_3_2_12 g.activeresource_3_2_12 g.actionmailer_3_2_12 g.railties_3_2_12 g.bundler_1_3_4 ];
       sha256 = ''1jjnm74nzl5v3461c0mrbpa471yd6s8hnkmnxb64c2rm95c61wxz'';
     };
     railties_3_2_12 = {
@@ -835,7 +1000,7 @@ request helpers feature.'';
         longDescription = ''Rails internals: application bootup, plugins, generators, and rake tasks.'';
       };
       name = ''railties-3.2.12'';
-      requiredGems = [ g.rake_10_0_3 g.rack_ssl_1_3_3 g.thor_0_17_0 g.rdoc_3_12_1 g.activesupport_3_2_12 g.actionpack_3_2_12 ];
+      requiredGems = [ g.rake_10_0_3 g.rack_ssl_1_3_3 g.thor_0_17_0 g.rdoc_3_12_2 g.activesupport_3_2_12 g.actionpack_3_2_12 ];
       sha256 = ''0d8wy1n591x12bigj3jh8c9djzi8k68vh14342mc22raxwp5rwdw'';
     };
     rake_0_9_2_2 = {
@@ -882,17 +1047,17 @@ request helpers feature.'';
       requiredGems = [  ];
       sha256 = ''0bdnxwdxj4r1kdxfi5nszbsb126njrr81p912g64xxs2bgxd1bp1'';
     };
-    rdiscount_2_0_7 = {
+    rdiscount_2_0_7_1 = {
       basename = ''rdiscount'';
       meta = {
         description = ''Fast Implementation of Gruber's Markdown in C'';
         homepage = ''http://github.com/rtomayko/rdiscount'';
       };
-      name = ''rdiscount-2.0.7'';
+      name = ''rdiscount-2.0.7.1'';
       requiredGems = [  ];
-      sha256 = ''1cj9dn59xqjaglvzvd1ninid62xmih74az0glqqb90n2p42s2zs1'';
+      sha256 = ''1xjwi99wfyjhn72h8k709kbq2npqmw2zvikszxfg6in83yb8vmxn'';
     };
-    rdoc_3_12_1 = {
+    rdoc_3_12_2 = {
       basename = ''rdoc'';
       meta = {
         description = ''RDoc produces HTML and command-line documentation for Ruby projects'';
@@ -903,9 +1068,20 @@ documentation.
 
 See RDoc for a description of RDoc's markup and basic use.'';
       };
-      name = ''rdoc-3.12.1'';
+      name = ''rdoc-3.12.2'';
       requiredGems = [ g.json_1_7_7 ];
-      sha256 = ''1hflgw2v0lyx38kdwj71jyibc14j6ghb6zmp2l3g47v7d2m47z4g'';
+      sha256 = ''1v9k4sp5yzj2bshngckdvivj6bszciskk1nd2r3wri2ygs7vgqm8'';
+    };
+    remote_syslog_1_6_13 = {
+      basename = ''remote_syslog'';
+      meta = {
+        description = ''Monitor plain text log file(s) for new entries and send to remote syslog collector'';
+        homepage = ''http://github.com/papertrail/remote_syslog'';
+        longDescription = ''Lightweight daemon to tail one or more log files and transmit UDP syslog messages to a remote syslog host (centralized log aggregation). Generates UDP packets itself instead of depending on a system syslog daemon, so it doesn't affect system-wide logging configuration.'';
+      };
+      name = ''remote_syslog-1.6.13'';
+      requiredGems = [ g.servolux_0_10_0 g.file_tail_1_0_12 g.eventmachine_1_0_3 g.eventmachine_tail_0_6_4 g.syslog_protocol_0_9_2 g.em_resolv_replace_1_1_3 ];
+      sha256 = ''0q35j02k2l3fw3fdzq0i3rd6chsqr982gj13f3m3lsxm7kms03nw'';
     };
     rjb_1_4_2 = {
       basename = ''rjb'';
@@ -1003,7 +1179,7 @@ See RDoc for a description of RDoc's markup and basic use.'';
       requiredGems = [  ];
       sha256 = ''1khf6d903agnwd8965f5f8b353rzmfvygxp53z1199rqzw8h46q2'';
     };
-    sass_3_2_5 = {
+    sass_3_2_7 = {
       basename = ''sass'';
       meta = {
         description = ''A powerful but elegant CSS compiler that makes CSS fun again.'';
@@ -1014,20 +1190,34 @@ See RDoc for a description of RDoc's markup and basic use.'';
       command line tool or a web-framework plugin.
 '';
       };
-      name = ''sass-3.2.5'';
+      name = ''sass-3.2.7'';
       requiredGems = [  ];
-      sha256 = ''1ys7pfadw61dm09yyk28zrssi8zsyj99fyq6bdf2xmi8yp1avs6k'';
+      sha256 = ''0c494gh1i4llk4lbi35vidsgclf3cgxind1a7nm499ac9sdz084s'';
     };
-    selenium_webdriver_2_30_0 = {
+    selenium_webdriver_2_31_0 = {
       basename = ''selenium_webdriver'';
       meta = {
         description = ''The next generation developer focused tool for automated testing of webapps'';
         homepage = ''http://selenium.googlecode.com'';
         longDescription = ''WebDriver is a tool for writing automated tests of websites. It aims to mimic the behaviour of a real user, and as such interacts with the HTML of the application.'';
       };
-      name = ''selenium-webdriver-2.30.0'';
-      requiredGems = [ g.multi_json_1_6_1 g.rubyzip_0_9_9 g.childprocess_0_3_8 g.websocket_1_0_7 ];
-      sha256 = ''1ybx8v9m5y8ykbdbldd1mglz0xhg30iv0708ig0vzjl2522sg6v1'';
+      name = ''selenium-webdriver-2.31.0'';
+      requiredGems = [ g.multi_json_1_6_1 g.rubyzip_0_9_9 g.childprocess_0_3_9 g.websocket_1_0_7 ];
+      sha256 = ''1nv3ff31g183kdb97jjz0y7ny3vdnccd09pgblpj87bzhrrdfv3r'';
+    };
+    servolux_0_10_0 = {
+      basename = ''servolux'';
+      meta = {
+        description = ''* {Homepage}[http://rubygems.'';
+        homepage = ''http://gemcutter.org/gems/servolux'';
+        longDescription = ''Serv-O-Lux is a collection of Ruby classes that are useful for daemon and
+process management, and for writing your own Ruby services. The code is well
+documented and tested. It works with Ruby and JRuby supporting both 1.8 and 1.9
+interpreters.'';
+      };
+      name = ''servolux-0.10.0'';
+      requiredGems = [  ];
+      sha256 = ''08jdrk35f61ab8b48ffm85p9lgfpbnzq3n4is00gqhpcrrq72dhs'';
     };
     sinatra_1_3_2 = {
       basename = ''sinatra'';
@@ -1037,7 +1227,7 @@ See RDoc for a description of RDoc's markup and basic use.'';
         longDescription = ''Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort.'';
       };
       name = ''sinatra-1.3.2'';
-      requiredGems = [ g.rack_1_5_2 g.rack_protection_1_3_2 g.tilt_1_3_3 ];
+      requiredGems = [ g.rack_1_5_2 g.rack_protection_1_5_0 g.tilt_1_3_5 ];
       sha256 = ''05blf915zpiwyz7agcn9rwdmddwxz0z4l3gd4qlqmrgd2vkw4sxc'';
     };
     sprockets_2_2_2 = {
@@ -1048,9 +1238,20 @@ See RDoc for a description of RDoc's markup and basic use.'';
         longDescription = ''Sprockets is a Rack-based asset packaging system that concatenates and serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.'';
       };
       name = ''sprockets-2.2.2'';
-      requiredGems = [ g.hike_1_2_1 g.multi_json_1_6_1 g.rack_1_5_2 g.tilt_1_3_3 ];
+      requiredGems = [ g.hike_1_2_1 g.multi_json_1_6_1 g.rack_1_5_2 g.tilt_1_3_5 ];
       sha256 = ''15ngw3bjbyr31ygzmmdxxa30ylah6pdn8akgdy9w30vfx2vr7s7s'';
     };
+    syslog_protocol_0_9_2 = {
+      basename = ''syslog_protocol'';
+      meta = {
+        description = ''Syslog protocol parser and generator'';
+        homepage = ''https://github.com/eric/syslog_protocol'';
+        longDescription = ''Syslog protocol parser and generator'';
+      };
+      name = ''syslog_protocol-0.9.2'';
+      requiredGems = [  ];
+      sha256 = ''1yb2cmbyj0zmb2yhkgnmghcngrkhcxs4g1svcmgfj90l2hs23nmc'';
+    };
     systemu_2_5_2 = {
       basename = ''systemu'';
       meta = {
@@ -1070,7 +1271,7 @@ See RDoc for a description of RDoc's markup and basic use.'';
         longDescription = ''Call javascript code and manipulate javascript objects from ruby. Call ruby code and manipulate ruby objects from javascript.'';
       };
       name = ''therubyracer-0.10.2'';
-      requiredGems = [ g.libv8_3_3_10_4_x86_64_linux ];
+      requiredGems = [ g.libv8_3_3_10_4 ];
       sha256 = ''111hm2l613v06sy7pzjzmnyi4x11rg3c2syhnpv8fn0wnn9rdiyb'';
     };
     thin_1_5_0 = {
@@ -1081,7 +1282,7 @@ See RDoc for a description of RDoc's markup and basic use.'';
         longDescription = ''A thin and fast web server'';
       };
       name = ''thin-1.5.0'';
-      requiredGems = [ g.rack_1_5_2 g.eventmachine_1_0_0 g.daemons_1_1_9 ];
+      requiredGems = [ g.rack_1_5_2 g.eventmachine_1_0_3 g.daemons_1_1_9 ];
       sha256 = ''14sd2qbbk6y108z6v723mh3f1mk8s4fwxmmn9f8dk4xkhk4rwvq1'';
     };
     thor_0_17_0 = {
@@ -1095,16 +1296,27 @@ See RDoc for a description of RDoc's markup and basic use.'';
       requiredGems = [  ];
       sha256 = ''0gf46qafcfgmi20a2mnb3wkd9y6spgy2hq22h70377daj4zjxla2'';
     };
-    tilt_1_3_3 = {
+    tilt_1_3_5 = {
       basename = ''tilt'';
       meta = {
         description = ''Generic interface to multiple Ruby template engines'';
         homepage = ''http://github.com/rtomayko/tilt/'';
         longDescription = ''Generic interface to multiple Ruby template engines'';
       };
-      name = ''tilt-1.3.3'';
+      name = ''tilt-1.3.5'';
+      requiredGems = [  ];
+      sha256 = ''081saxdxnal4ky38a904jw3n2837m80g211w0zm5rx6m712mb6qd'';
+    };
+    tins_0_7_2 = {
+      basename = ''tins'';
+      meta = {
+        description = ''Useful stuff.'';
+        homepage = ''http://flori.github.com/tins'';
+        longDescription = ''All the stuff that isn't good/big enough for a real library.'';
+      };
+      name = ''tins-0.7.2'';
       requiredGems = [  ];
-      sha256 = ''18qdl8nllbgwipa2ab9df3wlfgvsc8ml78hbypwc17b9qwv9bbs8'';
+      sha256 = ''142mvgn8218wikwdvd5gq4g6k3p24f273wlqvczzfhz02livrz90'';
     };
     treetop_1_4_12 = {
       basename = ''treetop'';
@@ -1116,16 +1328,16 @@ See RDoc for a description of RDoc's markup and basic use.'';
       requiredGems = [ g.polyglot_0_3_3 g.polyglot_0_3_3 ];
       sha256 = ''1jlfjq67n933sm0px0s2j965v1kl1rj8fbx6xk8y4yppkv6ygxc8'';
     };
-    tzinfo_0_3_35 = {
+    tzinfo_0_3_37 = {
       basename = ''tzinfo'';
       meta = {
         description = ''Daylight-savings aware timezone library'';
         homepage = ''http://tzinfo.rubyforge.org/'';
         longDescription = ''TZInfo is a Ruby library that uses the standard tz (Olson) database to provide daylight savings aware transformations between times in different time zones.'';
       };
-      name = ''tzinfo-0.3.35'';
+      name = ''tzinfo-0.3.37'';
       requiredGems = [  ];
-      sha256 = ''1c52ndjqcxpgxhlclbxf98clcpni216xk5zgrkcd4px84riyjbmp'';
+      sha256 = ''0pi2vabsg73h6z4wfwyd27k63issp2qp1nh0vd74rdk740gmb3kc'';
     };
     uuid_2_3_7 = {
       basename = ''uuid'';
@@ -1173,5 +1385,15 @@ See RDoc for a description of RDoc's markup and basic use.'';
       requiredGems = [  ];
       sha256 = ''0zlwz8kvpm45m227aazg369fapbqyhvd5v9aga8cvxyhqnq0b87i'';
     };
+    yajl_ruby_1_1_0 = {
+      basename = ''yajl_ruby'';
+      meta = {
+        description = ''Ruby C bindings to the excellent Yajl JSON stream-based parser library.'';
+        homepage = ''http://github.com/brianmario/yajl-ruby'';
+      };
+      name = ''yajl-ruby-1.1.0'';
+      requiredGems = [  ];
+      sha256 = ''0sj46j47icb12hdhcfh76rnvddyiic5ifqzkh3kla1vcr505kf4m'';
+    };
   };
 }
diff --git a/pkgs/development/interpreters/ruby/patches.nix b/pkgs/development/interpreters/ruby/patches.nix
index a2d2d753a4a..10b0b202387 100644
--- a/pkgs/development/interpreters/ruby/patches.nix
+++ b/pkgs/development/interpreters/ruby/patches.nix
@@ -1,5 +1,5 @@
 { fetchurl, writeScript, ruby, ncurses, sqlite, libxml2, libxslt, libffi
-, zlib, libuuid, gems, jdk }:
+, zlib, libuuid, gems, jdk, python }:
 
 let
 
@@ -14,12 +14,21 @@ in
 
 {
   sup = { buildInputs = [ gems.ncursesw ]; };
+
+  libv8 = { buildInputs = [ python ]; };
   
   sqlite3 = { propagatedBuildInputs = [ sqlite ]; };
   
   rails = { gemFlags = "--no-ri --no-rdoc"; };
   
   ncurses = { propagatedBuildInputs = [ ncurses ]; };
+
+  nix = {
+    postInstall = ''
+      cd $out/${ruby.gemPath}/gems/nix*
+      patch -Np1 -i ${./fix-gem-nix-versions.patch}
+    '';
+  };
   
   ncursesw = { propagatedBuildInputs = [ ncurses ]; };
   
diff --git a/pkgs/development/interpreters/ruby/ruby-2.0.nix b/pkgs/development/interpreters/ruby/ruby-2.0.nix
new file mode 100644
index 00000000000..7c47bac0bbb
--- /dev/null
+++ b/pkgs/development/interpreters/ruby/ruby-2.0.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl
+, zlib, zlibSupport ? true
+, openssl, opensslSupport ? true
+, gdbm, gdbmSupport ? true
+, ncurses, readline, cursesSupport ? false
+, groff, docSupport ? false
+, libyaml, yamlSupport ? true
+}:
+
+let
+  op = stdenv.lib.optional;
+  ops = stdenv.lib.optionals;
+in
+
+stdenv.mkDerivation rec {
+  version = with passthru; "${majorVersion}.${minorVersion}-p${patchLevel}";
+  
+  name = "ruby-${version}";
+  
+  src = fetchurl {
+    url = "ftp://ftp.ruby-lang.org/pub/ruby/2.0/${name}.tar.bz2";
+    sha256 = "0pr9jf01cfap93xcngyd5zpns67ffjsgaxkm0qr1r464rj9d7066";
+  };
+
+  # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
+  NROFF = "${groff}/bin/nroff";
+
+  buildInputs = (ops cursesSupport [ ncurses readline ] )
+    ++ (op docSupport groff )
+    ++ (op zlibSupport zlib)
+    ++ (op opensslSupport openssl)
+    ++ (op gdbmSupport gdbm)
+    ++ (op yamlSupport libyaml);
+
+  enableParallelBuilding = true;
+    
+  configureFlags = ["--enable-shared" ];
+
+  installFlags = stdenv.lib.optionalString docSupport "install-doc";
+  # Bundler tries to create this directory
+  postInstall = "mkdir -pv $out/${passthru.gemPath}";
+
+  meta = {
+    license = "Ruby";
+    homepage = "http://www.ruby-lang.org/en/";
+    description = "The Ruby language";
+    platforms = stdenv.lib.platforms.all;
+  };
+
+  passthru = rec {
+    majorVersion = "2.0";
+    minorVersion = "0";
+    patchLevel = "0";
+    libPath = "lib/ruby/${majorVersion}";
+    gemPath = "lib/ruby/gems/${majorVersion}";
+  };
+}
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";
   
   
 }
+
diff --git a/pkgs/development/mobile/androidenv/build-app.nix b/pkgs/development/mobile/androidenv/build-app.nix
index d4df64e79c0..3f8af65f3bd 100644
--- a/pkgs/development/mobile/androidenv/build-app.nix
+++ b/pkgs/development/mobile/androidenv/build-app.nix
@@ -37,5 +37,8 @@ stdenv.mkDerivation {
   installPhase = ''
     mkdir -p $out
     mv bin/*-${if release then "release" else "debug"}.apk $out
+    
+    mkdir -p $out/nix-support
+    echo "file binary-dist $(echo $out/*.apk)" > $out/nix-support/hydra-build-products
   '';
 }
diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix
index c05bf88ffbf..8fe9846c15a 100644
--- a/pkgs/development/mobile/titaniumenv/build-app.nix
+++ b/pkgs/development/mobile/titaniumenv/build-app.nix
@@ -113,6 +113,11 @@ stdenv.mkDerivation {
            "cp -av build/iphone/build/* $out"
         else if target == "iphone" then ""
         else throw "Target: ${target} is not supported!"}
+    
+    ${if target == "android" then ''
+        mkdir -p $out/nix-support
+        echo "file binary-dist $(ls $out/*.apk)" > $out/nix-support/hydra-build-products
+    '' else ""}
   '';
   
   failureHook = stdenv.lib.optionalString (release && target == "iphone") deleteKeychain;
diff --git a/pkgs/development/mobile/titaniumenv/examples/default.nix b/pkgs/development/mobile/titaniumenv/examples/default.nix
index 1526d4c4359..f5fbf79e86d 100644
--- a/pkgs/development/mobile/titaniumenv/examples/default.nix
+++ b/pkgs/development/mobile/titaniumenv/examples/default.nix
@@ -1,37 +1,35 @@
+{ nixpkgs ? <nixpkgs>
+, system ? builtins.currentSystem
+}:
+
 let
-  pkgs = import <nixpkgs> {};
-  pkgs_i686 = import <nixpkgs> { system = "i686-linux"; };
+  pkgs = import nixpkgs { inherit system; };
+  pkgs_darwin_x86_64 = import nixpkgs { system = "x86_64-darwin"; };
 in
 rec {
-  titaniumenv = import ./.. {
-    inherit pkgs pkgs_i686;
-  };
-  
   kitchensink_android = import ./kitchensink {
-    inherit titaniumenv;
-    inherit (pkgs) fetchgit;
+    inherit (pkgs) fetchgit titaniumenv;
     target = "android";
   };
   
   kitchensink_iphone = import ./kitchensink {
-    inherit titaniumenv;
-    inherit (pkgs) fetchgit;
+    inherit (pkgs_darwin_x86_64) fetchgit titaniumenv;
     target = "iphone";
   };
   
   emulate_kitchensink = import ./emulate-kitchensink {
-    inherit (titaniumenv) androidenv;
+    inherit (pkgs.titaniumenv) androidenv;
     kitchensink = kitchensink_android;
   };
   
   simulate_kitchensink_iphone = import ./simulate-kitchensink {
-    inherit (titaniumenv) xcodeenv;
+    inherit (pkgs_darwin_x86_64.titaniumenv) xcodeenv;
     kitchensink = kitchensink_iphone;
     device = "iPhone";
   };
   
   simulate_kitchensink_ipad = import ./simulate-kitchensink {
-    inherit (titaniumenv) xcodeenv;
+    inherit (pkgs_darwin_x86_64.titaniumenv) xcodeenv;
     kitchensink = kitchensink_iphone;
     device = "iPad";
   };
diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix
index 3ac9e4bb958..535ec0992c1 100644
--- a/pkgs/development/mobile/xcodeenv/build-app.nix
+++ b/pkgs/development/mobile/xcodeenv/build-app.nix
@@ -1,6 +1,7 @@
 {stdenv, xcodewrapper}:
 { name
 , src
+, sdkVersion ? "6.1"
 , target ? null
 , configuration ? null
 , scheme ? null
@@ -36,7 +37,7 @@ let
 
   _sdk = if sdk == null
     then
-      if release then "iphoneos6.0" else "iphonesimulator6.0"
+      if release then "iphoneos" + sdkVersion else "iphonesimulator" + sdkVersion
     else sdk;
 
   # The following is to prevent repetition
@@ -79,6 +80,10 @@ stdenv.mkDerivation {
       ${stdenv.lib.optionalString generateIPA ''
         # Produce an IPA file
         xcrun -sdk iphoneos PackageApplication -v $out/*.app -o $out/${name}.ipa
+        
+        # Add IPA to Hydra build products
+        mkdir -p $out/nix-support
+        echo "file binary-dist $(echo $out/*.ipa)" > $out/nix-support/hydra-build-products
       ''}
       
       # Delete our temp keychain
diff --git a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
index 39804b1a248..77d2c4c867e 100644
--- a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
+++ b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
@@ -1,8 +1,5 @@
-{stdenv}:
+{stdenv, version ? "4.6"}:
 
-let
-  version = "4.5.2";
-in
 stdenv.mkDerivation {
   name = "xcode-wrapper-"+version;
   buildCommand = ''
diff --git a/pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch b/pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch
new file mode 100644
index 00000000000..06207a8b733
--- /dev/null
+++ b/pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch
@@ -0,0 +1,37 @@
+Send an ETag header, and honour the If-None-Match request header
+
+diff -ru -x '*~' Catalyst-Plugin-Static-Simple-0.30-orig/lib/Catalyst/Plugin/Static/Simple.pm Catalyst-Plugin-Static-Simple-0.30/lib/Catalyst/Plugin/Static/Simple.pm
+--- Catalyst-Plugin-Static-Simple-0.30-orig/lib/Catalyst/Plugin/Static/Simple.pm	2012-05-04 18:49:30.000000000 +0200
++++ Catalyst-Plugin-Static-Simple-0.30/lib/Catalyst/Plugin/Static/Simple.pm	2013-02-25 22:57:18.667150181 +0100
+@@ -187,16 +187,27 @@
+     my $type      = $c->_ext_to_type( $full_path );
+     my $stat      = stat $full_path;
+ 
+-    $c->res->headers->content_type( $type );
+-    $c->res->headers->content_length( $stat->size );
+-    $c->res->headers->last_modified( $stat->mtime );
+     # Tell Firefox & friends its OK to cache, even over SSL:
+-    $c->res->headers->header('Cache-control' => 'public');
++    #$c->res->headers->header('Cache-control' => 'public');
++
++    $c->res->headers->last_modified( $stat->mtime );
+     # Optionally, set a fixed expiry time:
+     if ($config->{expires}) {
+         $c->res->headers->expires(time() + $config->{expires});
+     }
+ 
++    if ($config->{send_etag}) {
++        my $etag = '"' . $stat->mtime . '-' . $stat->ino . '-'. $stat->size . '"';
++        $c->res->headers->header('ETag' => $etag);
++        if (($c->req->header('If-None-Match') // "") eq $etag) {
++            $c->res->status(304);
++            return 1;
++        }
++    }
++
++    $c->res->headers->content_type( $type );
++    $c->res->headers->content_length( $stat->size );
++
+     my $fh = IO::File->new( $full_path, 'r' );
+     if ( defined $fh ) {
+         binmode $fh;
diff --git a/pkgs/development/python-modules/dbus/default.nix b/pkgs/development/python-modules/dbus/default.nix
index 0183944e201..bfce358a2aa 100644
--- a/pkgs/development/python-modules/dbus/default.nix
+++ b/pkgs/development/python-modules/dbus/default.nix
@@ -1,16 +1,22 @@
-{ stdenv, fetchurl, python, pkgconfig, dbus, dbus_glib }:
+{ stdenv, fetchurl, python, pkgconfig, dbus, dbus_glib, dbus_tools }:
 
 stdenv.mkDerivation rec {
-  name = "dbus-python-0.84.0";
+  name = "dbus-python-1.1.1";
 
   src = fetchurl {
     url = "http://dbus.freedesktop.org/releases/dbus-python/${name}.tar.gz";
-    sha256 = "01jrmj7ps79dkd6f8bzm17vxzpad1ixwmcb1liy64xm9y6mcfnxq";
+    sha256 = "122yj5y0mndk9axh735qvwwckck6s6x0q84dw6p97mplp17wl5w9";
   };
 
-  buildInputs = [ python pkgconfig dbus dbus_glib ];
+  postPatch = "patchShebangs .";
+
+  buildInputs = [ python pkgconfig dbus dbus_glib ]
+    ++ stdenv.lib.optional doCheck dbus_tools;
+
+  doCheck = false; # https://bugs.freedesktop.org/show_bug.cgi?id=57140
 
   meta = {
     description = "Python DBus bindings";
+    license = "MIT";
   };
 }
diff --git a/pkgs/development/python-modules/pycrypto/2.5.nix b/pkgs/development/python-modules/pycrypto/2.5.nix
new file mode 100644
index 00000000000..de192c64b72
--- /dev/null
+++ b/pkgs/development/python-modules/pycrypto/2.5.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, python, buildPythonPackage, gmp }:
+
+buildPythonPackage rec {
+  name = "pycrypto-2.5";
+  namePrefix = "";
+
+  src = fetchurl {
+    url = "http://pypi.python.org/packages/source/p/pycrypto/${name}.tar.gz";
+    md5 = "783e45d4a1a309e03ab378b00f97b291";
+  };
+
+  buildInputs = [ python gmp ];
+
+  buildPhase =
+    ''
+      python ./setup.py build_ext --library-dirs=${gmp}/lib
+    '';
+
+#  installPhase =
+#    ''
+#      python ./setup.py install --prefix=$out
+#    '';
+
+  meta = {
+    homepage = "http://www.pycrypto.org/";
+    description = "Python Cryptography Toolkit";
+    platforms = stdenv.lib.platforms.gnu;
+  };
+}
diff --git a/pkgs/development/python-modules/pygobject/default.nix b/pkgs/development/python-modules/pygobject/default.nix
index 5575243bd9f..8d6a1368d8b 100644
--- a/pkgs/development/python-modules/pygobject/default.nix
+++ b/pkgs/development/python-modules/pygobject/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, python, pkgconfig, glib }:
 
 stdenv.mkDerivation rec {
-  name = "pygobject-2.27.0";
+  name = "pygobject-2.28.6";
   
   src = fetchurl {
-    url = "http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.27/${name}.tar.bz2";
-    sha256 = "18mq4mj9s9sw12m6gbbc4iffrq993c7q09v9yahlnamrqn3bv53m";
+    url = "http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/${name}.tar.xz";
+    sha256 = "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv";
   };
 
   configureFlags = "--disable-introspection";
diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
index 0a47ee6aa99..175e538e519 100755
--- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
@@ -42,7 +42,7 @@ cmakeConfigurePhase() {
 
     echo "cmake flags: $cmakeFlags ${cmakeFlagsArray[@]}"
 
-    cmake ${cmakeDir:-.} $cmakeFlags ${cmakeFlagsArray[@]}
+    cmake ${cmakeDir:-.} $cmakeFlags "${cmakeFlagsArray[@]}"
 
     eval "$postConfigure"
 }
diff --git a/pkgs/development/tools/haskell/cabal2nix/default.nix b/pkgs/development/tools/haskell/cabal2nix/default.nix
index ed26e335870..22dde229a2b 100644
--- a/pkgs/development/tools/haskell/cabal2nix/default.nix
+++ b/pkgs/development/tools/haskell/cabal2nix/default.nix
@@ -3,8 +3,8 @@
 
 cabal.mkDerivation (self: {
   pname = "cabal2nix";
-  version = "1.44";
-  sha256 = "1j2w5g75nir0ax9pvn1fyj5l1c4s84mbj400any9v0bpv624mffm";
+  version = "1.47";
+  sha256 = "1ba0ny610ibynwvzqnk5h2461sdkmza5jqrizqxvhp9wknn50fc6";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [ Cabal filepath hackageDb HTTP mtl regexPosix ];
diff --git a/pkgs/development/tools/haskell/packunused/default.nix b/pkgs/development/tools/haskell/packunused/default.nix
new file mode 100644
index 00000000000..814c2774cb2
--- /dev/null
+++ b/pkgs/development/tools/haskell/packunused/default.nix
@@ -0,0 +1,16 @@
+{ cabal, Cabal, cmdargs, filepath, haskellSrcExts }:
+
+cabal.mkDerivation (self: {
+  pname = "packunused";
+  version = "0.1.0.0";
+  sha256 = "131x99id3jcxglj24p5sjb6mnhphj925pp4jdjy09y6ai7wss3rs";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [ Cabal cmdargs filepath haskellSrcExts ];
+  meta = {
+    homepage = "https://github.com/hvr/packunused";
+    description = "Tool for detecting redundant Cabal package dependencies";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/misc/ctags/default.nix b/pkgs/development/tools/misc/ctags/default.nix
index 57718088080..80def733cf8 100644
--- a/pkgs/development/tools/misc/ctags/default.nix
+++ b/pkgs/development/tools/misc/ctags/default.nix
@@ -1,24 +1,26 @@
-{stdenv, fetchurl, sourceFromHead, automake, autoconf}:
+{ stdenv, fetchsvn, automake, autoconf}:
 
 stdenv.mkDerivation rec {
-  name = "ctags-svn";
-  # REGION AUTO UPDATE:      { name="ctags"; type = "svn"; url = "https://ctags.svn.sourceforge.net/svnroot/ctags/trunk"; }
-  src= sourceFromHead "ctags-749.tar.gz"
-               (fetchurl { url = "http://mawercer.de/~nix/repos/ctags-749.tar.gz"; sha256 = "01dd4bf2e55dbedc38def81febef60eece912cb7624df1c0a2cf1ed6e4bc4ecf"; });
-  # END
+  name = "ctags-${revision}";
+  revision = "804";
 
-  preConfigure = ''
-    autoheader
-    autoconf
-  '';
+  src = fetchsvn {
+    url = "http://ctags.svn.sourceforge.net/svnroot/ctags/trunk";
+    rev = revision;
+    sha256 = "16gln1mah2jqp32ki1z0187dwkbjx1xcnmyiardcq6c9w3p4qwcr";
+  };
 
   buildInputs = [ automake autoconf ];
 
+  preConfigure = "autoreconf -i";
+
   # don't use $T(E)MP which is set to the build directory
   configureFlags="--enable-tmpdir=/tmp";
 
   meta = {
+    homepage = "http://ctags.sourceforge.net/";
     description = "Exuberant Ctags, a tool for fast source code browsing";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     longDescription = ''
       Ctags generates an index (or tag) file of language objects found
@@ -29,9 +31,8 @@ stdenv.mkDerivation rec {
       programming languages are supported.
     '';
 
-    homepage = http://ctags.sourceforge.net/;
-
-    license = "GPLv2+";
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.lib.maintainers.simons ];
   };
 
 }
diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix
index 5a1a19068a7..ef1e7e781fa 100644
--- a/pkgs/development/tools/misc/elfutils/default.nix
+++ b/pkgs/development/tools/misc/elfutils/default.nix
@@ -3,20 +3,20 @@
 # TODO: Look at the hardcoded paths to kernel, modules etc.
 stdenv.mkDerivation rec {
   name = "elfutils-${version}";
-  version = "0.152";
-  
+  version = "0.155";
+
   src = fetchurl {
     urls = [
-      "https://fedorahosted.org/releases/e/l/elfutils/${version}/${name}.tar.bz2"
+      "http://fedorahosted.org/releases/e/l/elfutils/${version}/${name}.tar.bz2"
       "mirror://gentoo/distfiles/${name}.tar.bz2"
       ];
-    sha256 = "19mlgxyzcwiv64ynj2cibgkiw4qkm3n37kizvy6555dsmlaqfybq";
+    sha256 = "1n0fsg2q961i0lj355w2ad3cmp7d1jjcdhrfhmlgsvs14r2lli38";
   };
 
   patches = [
     (fetchurl {
-      url = https://fedorahosted.org/releases/e/l/elfutils/0.152/elfutils-portability.patch;
-      sha256 = "0q318w4cvvqv9ps4xcwphapj1gl31isgjyya4y9sm72qj68n61p0";
+      url = "http://fedorahosted.org/releases/e/l/elfutils/${version}/elfutils-portability.patch";
+      sha256 = "0w8i94x9hqirgs2lwcd1g36s77r5svh4j1fgcrd6lx5w18vch0di";
     }) ];
 
   # We need bzip2 in NativeInputs because otherwise we can't unpack the src,
diff --git a/pkgs/development/tools/misc/gob2/default.nix b/pkgs/development/tools/misc/gob2/default.nix
index 4308a559268..c86a65f33b6 100644
--- a/pkgs/development/tools/misc/gob2/default.nix
+++ b/pkgs/development/tools/misc/gob2/default.nix
@@ -1,10 +1,11 @@
-{ stdenv, fetchurl, pkgconfig, glib, bison, flex }:
+{ stdenv, fetchurl_gnome, pkgconfig, glib, bison, flex }:
 
 stdenv.mkDerivation rec {
-  name = "gob2-2.0.18";
+  name = src.pkgname;
 
-  src = fetchurl {
-    url = "http://ftp.5z.com/pub/gob/${name}.tar.gz";
+  src = fetchurl_gnome {
+    project = "gob2";
+    major = "2"; minor = "0"; patchlevel = "18"; extension = "gz";
     sha256 = "1r242s3rsxyqiw2ic2gdpvvrx903jgjd1aa4mkl26in5k9zk76fa";
   };
 
diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix
index a7d5ad0e393..bdd35dc50f0 100644
--- a/pkgs/development/tools/misc/lsof/default.nix
+++ b/pkgs/development/tools/misc/lsof/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation {
-  name = "lsof-4.86";
+  name = "lsof-4.87";
 
   src = fetchurl {
-    url = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.86.tar.bz2;
-    sha256 = "13e52b8e87dddf1b2e219004e315d755c659217ce6ffc6a5f1102969f1c4dd0c";
+    url = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.87.tar.bz2;
+    sha256 = "0b6si72sml7gr9784ak491cxxbm9mx5bh174yg6rrirbv04kgpfz";
   };
 
   unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); ";
diff --git a/pkgs/development/tools/misc/texinfo/5.0.nix b/pkgs/development/tools/misc/texinfo/5.1.nix
index a4fb2e9b468..807a3388b4b 100644
--- a/pkgs/development/tools/misc/texinfo/5.0.nix
+++ b/pkgs/development/tools/misc/texinfo/5.1.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, ncurses, perl }:
 
 stdenv.mkDerivation rec {
-  name = "texinfo-5.0";
+  name = "texinfo-5.1";
 
   src = fetchurl {
     url = "mirror://gnu/texinfo/${name}.tar.xz";
-    sha256 = "1p34f68h9ggfj6ckgj0p62qlj7pmz3ha3vc91kh4hr44pnwm1pla";
+    sha256 = "0864v5i488x3mb3v5p6nhy2kw0mqkzpa3b0453iibj81zlpq078q";
   };
 
   buildInputs = [ ncurses perl ];
diff --git a/pkgs/development/tools/ocaml/opam/default.nix b/pkgs/development/tools/ocaml/opam/default.nix
new file mode 100644
index 00000000000..0a0dd4e6fe2
--- /dev/null
+++ b/pkgs/development/tools/ocaml/opam/default.nix
@@ -0,0 +1,60 @@
+{ stdenv, fetchgit, fetchurl, ocaml, unzip, ncurses, curl }:
+
+let
+  srcs = {
+    cudf = fetchurl {
+      url = "https://gforge.inria.fr/frs/download.php/31910/cudf-0.6.3.tar.gz";
+      sha256 = "6e9f1bafe859df85c854679e2904a8172945d2bf2d676c8ae3ecb72fe6de0665";
+    };
+    extlib = fetchurl {
+      url = "http://ocaml-extlib.googlecode.com/files/extlib-1.5.3.tar.gz";
+      sha256 = "c095eef4202a8614ff1474d4c08c50c32d6ca82d1015387785cf03d5913ec021";
+    };
+    ocaml_re = fetchurl {
+      url = "https://github.com/ocaml/ocaml-re/archive/ocaml-re-1.2.0.tar.gz";
+      sha256 = "a34dd9d6136731436a963bbab5c4bbb16e5d4e21b3b851d34887a3dec451999f";
+    };
+    ocamlgraph = fetchurl {
+      url = "http://ocamlgraph.lri.fr/download/ocamlgraph-1.8.1.tar.gz";
+      sha256 = "ba6388ffc2c15139b0f26330ef6dd922f0ff0f364eee99a3202bf1cd93512b43";
+    };
+    dose3 = fetchurl {
+      url = "https://gforge.inria.fr/frs/download.php/31595/dose3-3.1.2.tar.gz";
+      sha256 = "3a07a08345be157c98cb26021d7329c72c2b95c99cfdff79887690656ec9f1a3";
+    };
+    cmdliner = fetchurl {
+      url = "http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz";
+      sha256 = "5421559aa12b4debffef947f7e1039c22e9dffd87a4aa68445a687a20764ae81";
+    };
+    opam = fetchurl {
+      url = "https://github.com/OCamlPro/opam/archive/0.9.5.zip";
+      sha256 = "2ec706330a3283b4d057abc562c6078351988d0ae98ad507fe51cae598b43afd";
+    };
+  };
+in
+stdenv.mkDerivation rec {
+  name = "opam-0.9.5";
+
+  buildInputs = [unzip curl ncurses ocaml];
+
+  src = srcs.opam;
+
+  postUnpack = ''
+    ln -sv ${srcs.cudf} $sourceRoot/src_ext/${srcs.cudf.name}
+    ln -sv ${srcs.extlib} $sourceRoot/src_ext/${srcs.extlib.name}
+    ln -sv ${srcs.ocaml_re} $sourceRoot/src_ext/${srcs.ocaml_re.name}
+    ln -sv ${srcs.ocamlgraph} $sourceRoot/src_ext/${srcs.ocamlgraph.name}
+    ln -sv ${srcs.dose3} $sourceRoot/src_ext/${srcs.dose3.name}
+    ln -sv ${srcs.cmdliner} $sourceRoot/src_ext/${srcs.cmdliner.name}
+  '';
+
+  makeFlags = ["HOME=$(TMPDIR)"];
+
+  doCheck = false;
+
+  meta = {
+    maintainers = stdenv.lib.maintainers.orbitz;
+    description = "A package manager for ocaml";
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/tools/parsing/alex/3.0.4.nix b/pkgs/development/tools/parsing/alex/3.0.5.nix
index 3160570b240..f85aa42d165 100644
--- a/pkgs/development/tools/parsing/alex/3.0.4.nix
+++ b/pkgs/development/tools/parsing/alex/3.0.5.nix
@@ -1,14 +1,14 @@
-{ cabal, perl, QuickCheck }:
+{ cabal, fetchurl, perl, QuickCheck }:
 
 cabal.mkDerivation (self: {
   pname = "alex";
-  version = "3.0.4";
-  sha256 = "0fgh7ziwxyb140wghh7dpndh41sixcssnba0q942cvkg77m6ah6d";
+  version = "3.0.5";
+  sha256 = "0ncnp7cl7dlfcrwzzcp8j59i9j5r66wim1yib9g3b3jkl0bn8cn3";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [ QuickCheck ];
   buildTools = [ perl ];
-  doCheck = false;
+  patches = [ (fetchurl { url="https://github.com/simonmar/alex/pull/21.patch"; sha256="0apv3rk00gwkf5rqw3467bg6pnamr07zdksbp9khhzzi73k9aq4f"; }) ];
   meta = {
     homepage = "http://www.haskell.org/alex/";
     description = "Alex is a tool for generating lexical analysers in Haskell";
diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix
new file mode 100644
index 00000000000..063af69a7f3
--- /dev/null
+++ b/pkgs/development/tools/selenium/chromedriver/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, cairo, fontconfig, freetype, gdk_pixbuf, glib
+, glibc, gtk, libX11, makeWrapper, nspr, nss, pango, unzip
+}:
+
+# note: there is a i686 version available as well
+assert stdenv.system == "x86_64-linux";
+
+stdenv.mkDerivation rec {
+  name = "chromedriver_linux64_26.0.1383.0";
+
+  src = fetchurl {
+    url = "http://chromedriver.googlecode.com/files/${name}.zip";
+    sha256 = "0fh4r2rcpjc3nfrdyj256kjlyc0b6mhxqwxcah73q4vm1kjax8rs";
+  };
+
+  buildInputs = [
+    cairo fontconfig freetype gdk_pixbuf glib gtk libX11 makeWrapper
+    nspr nss pango unzip
+  ];
+
+  unpackPhase = "unzip $src";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv chromedriver $out/bin
+    patchelf --set-interpreter ${glibc}/lib/ld-linux-x86-64.so.2 $out/bin/chromedriver
+    wrapProgram "$out/bin/chromedriver" \
+      --prefix LD_LIBRARY_PATH : "$(cat ${stdenv.gcc}/nix-support/orig-gcc)/lib64:${cairo}/lib:${fontconfig}/lib:${freetype}/lib:${gdk_pixbuf}/lib:${glib}/lib:${gtk}/lib:${libX11}/lib:${nspr}/lib:${nss}/lib:${pango}/lib:\$LD_LIBRARY_PATH"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://code.google.com/p/chromedriver/;
+    description = "A WebDriver server for running Selenium tests on Chrome";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/web/nodejs/default.nix b/pkgs/development/web/nodejs/default.nix
index 7f1aafa64f7..138b4180b89 100644
--- a/pkgs/development/web/nodejs/default.nix
+++ b/pkgs/development/web/nodejs/default.nix
@@ -12,26 +12,36 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--openssl-includes=${openssl}/include"
     "--openssl-libpath=${openssl}/lib"
+  ]
+  ++ (if !stdenv.isDarwin then [ # Shared V8 is broken on Mac OS X. Who can fix V8 on Darwin makes me very happy, but I gave up studying python-gyp.
     "--shared-v8"
     "--shared-v8-includes=${v8}/includes"
     "--shared-v8-libpath=${v8}/lib"
-  ];
+  ] else []);
 
   #patches = stdenv.lib.optional stdenv.isDarwin ./no-arch-flag.patch;
 
+  # Expose the host compiler on darwin, which is the only compiler capable of building it
+  preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
+    export OLDPATH=$PATH
+    export PATH=/usr/bin:$PATH
+  '';
+
   prePatch = ''
     sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i tools/{*.py,waf-light,node-waf} configure
   '';
 
-  postInstall = ''
-
+  postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
+    export PATH=$OLDPATH
+  '' + ''
     sed -e 's|^#!/usr/bin/env node$|#!'$out'/bin/node|' -i $out/lib/node_modules/npm/bin/npm-cli.js
-  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+  '' /*+ stdenv.lib.optionalString stdenv.isDarwin ''
     install_name_tool -change libv8.dylib ${v8}/lib/libv8.dylib $out/bin/node
-  '';
+  ''*/;
 
-  buildInputs = [ python openssl v8 zlib ] ++ stdenv.lib.optional stdenv.isLinux utillinux;
-  
+  buildInputs = [ python openssl zlib ]
+    ++ stdenv.lib.optional stdenv.isLinux utillinux
+    ++ stdenv.lib.optional (!stdenv.isDarwin) v8;
   setupHook = ./setup-hook.sh;
 
   meta = with stdenv.lib; {