about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-11-05 15:00:44 +0100
committerVladimír Čunát <vcunat@gmail.com>2014-11-05 15:00:44 +0100
commit52404a868ddc6665da66f54dab5f102908843784 (patch)
treeda856ff0f583e67a7a209d8d75826f796df5a3bb /pkgs/development
parentc0e2aceef46033e43ab8b4f6aa0b36b25ba35f3d (diff)
parent8e02bde1a8ea913ecaa4801898057968412efa01 (diff)
downloadnixlib-52404a868ddc6665da66f54dab5f102908843784.tar
nixlib-52404a868ddc6665da66f54dab5f102908843784.tar.gz
nixlib-52404a868ddc6665da66f54dab5f102908843784.tar.bz2
nixlib-52404a868ddc6665da66f54dab5f102908843784.tar.lz
nixlib-52404a868ddc6665da66f54dab5f102908843784.tar.xz
nixlib-52404a868ddc6665da66f54dab5f102908843784.tar.zst
nixlib-52404a868ddc6665da66f54dab5f102908843784.zip
Merge recent master into staging
Nixpkgs Hydra: ?compare=1157272

TODO: port e22889064f82be3

Conflicts:
	nixos/tests/gnome3_10.nix (auto-solved)
	pkgs/applications/video/aegisub/default.nix
	pkgs/development/libraries/boost/1.55.nix
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/elm/elm-get.nix24
-rw-r--r--pkgs/development/compilers/elm/elm-reactor.nix29
-rw-r--r--pkgs/development/compilers/elm/elm-repl.nix28
-rw-r--r--pkgs/development/compilers/fpc/lazarus.nix6
-rw-r--r--pkgs/development/compilers/gcl/default.nix6
-rw-r--r--pkgs/development/compilers/go/1.1.nix1
-rw-r--r--pkgs/development/compilers/go/1.2.nix1
-rw-r--r--pkgs/development/compilers/go/default.nix1
-rw-r--r--pkgs/development/compilers/hhvm/default.nix2
-rw-r--r--pkgs/development/compilers/julia/0.3.2.nix159
-rw-r--r--pkgs/development/compilers/nasm/default.nix4
-rw-r--r--pkgs/development/compilers/sbcl/default.nix4
-rw-r--r--pkgs/development/compilers/uhc/default.nix48
-rw-r--r--pkgs/development/guile-modules/guile-sdl/default.nix35
-rw-r--r--pkgs/development/interpreters/angelscript/default.nix4
-rw-r--r--pkgs/development/interpreters/guile/default.nix4
-rw-r--r--pkgs/development/interpreters/php/5.4.nix4
-rw-r--r--pkgs/development/interpreters/picolisp/default.nix6
-rw-r--r--pkgs/development/interpreters/regina/default.nix4
-rw-r--r--pkgs/development/libraries/CGAL/default.nix8
-rw-r--r--pkgs/development/libraries/afflib/default.nix26
-rw-r--r--pkgs/development/libraries/aspell/dictionaries.nix10
-rw-r--r--pkgs/development/libraries/audio/lvtk/default.nix2
-rw-r--r--pkgs/development/libraries/babl/0_0_22.nix16
-rw-r--r--pkgs/development/libraries/boost/1.44.nix93
-rw-r--r--pkgs/development/libraries/boost/1.49.nix96
-rw-r--r--pkgs/development/libraries/boost/1.55.nix99
-rw-r--r--pkgs/development/libraries/boost/1.56.nix144
-rw-r--r--pkgs/development/libraries/boost/CVE-2013-0252.patch48
-rw-r--r--pkgs/development/libraries/boost/boost-149-cstdint.patch15
-rw-r--r--pkgs/development/libraries/boost/boost-149-darwin.patch40
-rw-r--r--pkgs/development/libraries/boost/boost_filesystem_post_1_49_0.patch12
-rw-r--r--pkgs/development/libraries/boost/generic.nix166
-rw-r--r--pkgs/development/libraries/boost/strip-header-path.sh12
-rw-r--r--pkgs/development/libraries/boost/time_utc.patch320
-rw-r--r--pkgs/development/libraries/boost/time_utc_144.patch520
-rw-r--r--pkgs/development/libraries/botan/default.nix64
-rw-r--r--pkgs/development/libraries/botan/generic.nix35
-rw-r--r--pkgs/development/libraries/botan/unstable.nix64
-rw-r--r--pkgs/development/libraries/cpp-netlib/default.nix2
-rw-r--r--pkgs/development/libraries/exempi/default.nix4
-rw-r--r--pkgs/development/libraries/ffmpeg/2.x.nix4
-rw-r--r--pkgs/development/libraries/fox/fox-1.6.nix1
-rw-r--r--pkgs/development/libraries/gegl/0_0_22.nix21
-rw-r--r--pkgs/development/libraries/geoclue/2.0.nix4
-rw-r--r--pkgs/development/libraries/gmp/4.3.2.nix1
-rw-r--r--pkgs/development/libraries/gvfs/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/cairo/0.12.5.3.nix22
-rw-r--r--pkgs/development/libraries/haskell/cairo/0.13.0.4.nix (renamed from pkgs/development/libraries/haskell/cairo/default.nix)0
-rw-r--r--pkgs/development/libraries/haskell/ghc-mod/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/glib/0.12.5.4.nix21
-rw-r--r--pkgs/development/libraries/haskell/glib/0.13.0.5.nix (renamed from pkgs/development/libraries/haskell/glib/default.nix)0
-rw-r--r--pkgs/development/libraries/haskell/glib/gtk2hs.patch15
-rw-r--r--pkgs/development/libraries/haskell/graphviz/default.nix1
-rw-r--r--pkgs/development/libraries/haskell/gtk/0.12.5.7.nix22
-rw-r--r--pkgs/development/libraries/haskell/gtk/0.13.0.3.nix (renamed from pkgs/development/libraries/haskell/gtk/default.nix)0
-rw-r--r--pkgs/development/libraries/haskell/gtk/gtk.patch10
-rw-r--r--pkgs/development/libraries/haskell/hsc3-server/default.nix30
-rw-r--r--pkgs/development/libraries/haskell/linear/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/pango/0.12.5.3.nix22
-rw-r--r--pkgs/development/libraries/haskell/pango/0.13.0.3.nix (renamed from pkgs/development/libraries/haskell/pango/default.nix)0
-rw-r--r--pkgs/development/libraries/haskell/pango/pango.patch10
-rw-r--r--pkgs/development/libraries/haskell/profunctors/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/sdl2/default.nix4
-rw-r--r--pkgs/development/libraries/imlib2/default.nix8
-rw-r--r--pkgs/development/libraries/imlib2/giflib51.patch64
-rw-r--r--pkgs/development/libraries/libcaca/default.nix4
-rw-r--r--pkgs/development/libraries/libcec/default.nix10
-rw-r--r--pkgs/development/libraries/libfakekey/default.nix21
-rw-r--r--pkgs/development/libraries/libmwaw/default.nix7
-rw-r--r--pkgs/development/libraries/libotr/default.nix4
-rw-r--r--pkgs/development/libraries/libre/default.nix4
-rw-r--r--pkgs/development/libraries/libtorrent-rasterbar/0.16.nix6
-rw-r--r--pkgs/development/libraries/libtorrent-rasterbar/default.nix32
-rw-r--r--pkgs/development/libraries/libtorrent-rasterbar/generic.nix30
-rw-r--r--pkgs/development/libraries/mdds/default.nix4
-rw-r--r--pkgs/development/libraries/ogre/default.nix11
-rw-r--r--pkgs/development/libraries/opencsg/default.nix4
-rw-r--r--pkgs/development/libraries/wxGTK-2.8/default.nix4
-rw-r--r--pkgs/development/libraries/wxGTK-2.9/default.nix4
-rw-r--r--pkgs/development/libraries/wxGTK-3.0/default.nix4
-rw-r--r--pkgs/development/libraries/x265/default.nix7
-rw-r--r--pkgs/development/libraries/x265/generic.nix58
-rw-r--r--pkgs/development/libraries/x265/hg.nix7
-rw-r--r--pkgs/development/lisp-modules/asdf/default.nix9
-rw-r--r--pkgs/development/lisp-modules/lisp-packages.nix7
-rw-r--r--pkgs/development/ocaml-modules/eliom/default.nix36
-rw-r--r--pkgs/development/ocaml-modules/gg/default.nix48
-rw-r--r--pkgs/development/ocaml-modules/lablgtk/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/lwt/default.nix17
-rw-r--r--pkgs/development/ocaml-modules/ocsigen-server/default.nix14
-rw-r--r--pkgs/development/ocaml-modules/otfm/default.nix49
-rw-r--r--pkgs/development/ocaml-modules/tyxml/default.nix10
-rw-r--r--pkgs/development/ocaml-modules/vg/default.nix62
-rw-r--r--pkgs/development/python-modules/wxPython/2.8.nix4
-rw-r--r--pkgs/development/python-modules/wxPython/3.0.nix6
-rw-r--r--pkgs/development/r-modules/cran-packages.nix2
-rw-r--r--pkgs/development/tools/build-managers/leiningen/builder.sh1
-rw-r--r--pkgs/development/tools/build-managers/leiningen/default.nix6
-rw-r--r--pkgs/development/tools/build-managers/sbt/default.nix4
-rw-r--r--pkgs/development/tools/haskell/hscope/default.nix6
-rw-r--r--pkgs/development/tools/haskell/threadscope/default.nix1
-rw-r--r--pkgs/development/tools/haskell/threadscope/threadscope.patch14
-rw-r--r--pkgs/development/tools/misc/automake/automake-1.11.x.nix1
-rw-r--r--pkgs/development/tools/misc/automake/automake-1.12.x.nix1
-rw-r--r--pkgs/development/tools/misc/automake/automake-1.13.x.nix1
-rw-r--r--pkgs/development/tools/misc/automake/automake-1.14.x.nix1
-rw-r--r--pkgs/development/tools/misc/cgdb/default.nix9
-rw-r--r--pkgs/development/tools/misc/swig/3.x.nix4
-rw-r--r--pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff2
-rw-r--r--pkgs/development/tools/ocaml/js_of_ocaml/default.nix12
-rw-r--r--pkgs/development/tools/ocaml/merlin/default.nix14
-rw-r--r--pkgs/development/tools/ocaml/oasis/default.nix6
-rw-r--r--pkgs/development/tools/ocaml/ocamlscript/Makefile.patch25
-rw-r--r--pkgs/development/tools/ocaml/ocamlscript/default.nix26
-rw-r--r--pkgs/development/tools/ocaml/opam/1.2.0-src_ext-Makefile.patch11
-rw-r--r--pkgs/development/tools/ocaml/opam/1.2.0.nix79
-rw-r--r--pkgs/development/tools/parsing/flex/2.5.35.nix1
-rw-r--r--pkgs/development/tools/slimerjs/default.nix4
119 files changed, 1409 insertions, 1753 deletions
diff --git a/pkgs/development/compilers/elm/elm-get.nix b/pkgs/development/compilers/elm/elm-get.nix
new file mode 100644
index 000000000000..db6feecea425
--- /dev/null
+++ b/pkgs/development/compilers/elm/elm-get.nix
@@ -0,0 +1,24 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, aeson, aesonPretty, ansiWlPprint, binary, Elm, filepath
+, HTTP, httpClient, httpClientTls, httpTypes, mtl, network
+, optparseApplicative, vector
+}:
+
+cabal.mkDerivation (self: {
+  pname = "elm-get";
+  version = "0.1.3";
+  sha256 = "1did7vjd1h2kh5alndd2b63zi8b1m9hf6k1k75yxwvw6f6mz5i4q";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [
+    aeson aesonPretty ansiWlPprint binary Elm filepath HTTP httpClient
+    httpClientTls httpTypes mtl network optparseApplicative vector
+  ];
+  meta = {
+    homepage = "http://github.com/elm-lang/elm-get";
+    description = "Tool for sharing and using Elm libraries";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/compilers/elm/elm-reactor.nix b/pkgs/development/compilers/elm/elm-reactor.nix
new file mode 100644
index 000000000000..7b53d9190d8f
--- /dev/null
+++ b/pkgs/development/compilers/elm/elm-reactor.nix
@@ -0,0 +1,29 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, blazeHtml, blazeMarkup, cmdargs, Elm, fetchgit, filepath
+, fsnotify, HTTP, mtl, snapCore, snapServer, systemFilepath, time
+, transformers, unorderedContainers, websockets, websocketsSnap
+}:
+
+cabal.mkDerivation (self: {
+  pname = "elm-reactor";
+  version = "0.1";
+  src = fetchgit {
+    url = "git://github.com/elm-lang/elm-reactor.git";
+    sha256 = "1e45ef26a9b1c1748737dce071a7f2587d0d22643085942a98006f9b11d11dfe";
+    rev = "8715046c5bc8b18f0540069c1a9a65f3aa8332e1";
+  };
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [
+    blazeHtml blazeMarkup cmdargs Elm filepath fsnotify HTTP mtl
+    snapCore snapServer systemFilepath time transformers
+    unorderedContainers websockets websocketsSnap
+  ];
+  meta = {
+    homepage = "http://elm-lang.org";
+    description = "Interactive development tool for Elm programs";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/compilers/elm/elm-repl.nix b/pkgs/development/compilers/elm/elm-repl.nix
new file mode 100644
index 000000000000..ffeea93f9fb4
--- /dev/null
+++ b/pkgs/development/compilers/elm/elm-repl.nix
@@ -0,0 +1,28 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, bytestringTrie, cmdargs, Elm, filepath, haskeline, HUnit
+, mtl, parsec, QuickCheck, testFramework, testFrameworkHunit
+, testFrameworkQuickcheck2
+}:
+
+cabal.mkDerivation (self: {
+  pname = "elm-repl";
+  version = "0.3";
+  sha256 = "10a4a2ybg5dlshpklnisb957lknb0w8s3ppaq5p5y6ylqik8ak0a";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [
+    bytestringTrie cmdargs Elm filepath haskeline mtl parsec
+  ];
+  testDepends = [
+    bytestringTrie cmdargs Elm filepath haskeline HUnit mtl parsec
+    QuickCheck testFramework testFrameworkHunit
+    testFrameworkQuickcheck2
+  ];
+  meta = {
+    homepage = "https://github.com/elm-lang/elm-repl";
+    description = "a REPL for Elm";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/compilers/fpc/lazarus.nix b/pkgs/development/compilers/fpc/lazarus.nix
index a2863663bea9..54371f4f420b 100644
--- a/pkgs/development/compilers/fpc/lazarus.nix
+++ b/pkgs/development/compilers/fpc/lazarus.nix
@@ -1,10 +1,10 @@
 args : with args; 
 rec {
-  version = "1.0.2";
+  version = "1.2.6";
   versionSuffix = "-0";
   src = fetchurl {
     url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}${versionSuffix}.tar.gz";
-    sha256 = "17a94wig8b4yrkq42wng4qbal7n77axkynwh78wday5whsp7div8";
+    sha256 = "1sjyc2l46hyd5ic5hr6vscy4qr9kazyhiyddy7bfs9vgf54fdiy0";
   };
 
   buildInputs = [fpc gtk glib libXi inputproto 
@@ -24,7 +24,7 @@ rec {
   preBuild = fullDepEntry (''
     export NIX_LDFLAGS='-lXi -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lc -lXext -lpango-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lcairo'
     export LCL_PLATFORM=gtk2
-    mkdir -p $out/share
+    mkdir -p $out/share "$out/lazarus"
     tar xf ${fpc.src} --strip-components=1 -C $out/share -m
     sed -e 's@/usr/fpcsrc@'"$out/share/fpcsrc@" -i ide/include/unix/lazbaseconf.inc
   '') 
diff --git a/pkgs/development/compilers/gcl/default.nix b/pkgs/development/compilers/gcl/default.nix
index e9c69261fbc1..f2252fe83813 100644
--- a/pkgs/development/compilers/gcl/default.nix
+++ b/pkgs/development/compilers/gcl/default.nix
@@ -17,11 +17,11 @@ assert a.stdenv.gcc.libc != null ;
 
 rec {
   src = a.fetchurl {
-    sha256 = "177vz8z74mky5nrq6qlfvnzvb1prw8jmlv4cwfx8w7k3k818y1a4";
-    url="http://gnu.spinellicreations.com/gcl/gcl-2.6.11.tar.gz";
+    sha256 = "1s4hs2qbjqmn9h88l4xvsifq5c3dlc5s74lyb61rdi5grhdlkf4f";
+    url="http://gnu.spinellicreations.com/gcl/${name}.tar.gz";
   };
 
-  name = "gcl-2.6.11";
+  name = "gcl-2.6.12";
   inherit buildInputs;
   configureFlags = [
     "--enable-ansi"
diff --git a/pkgs/development/compilers/go/1.1.nix b/pkgs/development/compilers/go/1.1.nix
index e54d12ef9c50..14ea73c23840 100644
--- a/pkgs/development/compilers/go/1.1.nix
+++ b/pkgs/development/compilers/go/1.1.nix
@@ -89,6 +89,7 @@ stdenv.mkDerivation {
   '';
 
   meta = {
+    branch = "1.1";
     homepage = http://golang.org/;
     description = "The Go Programming language";
     license = "BSD";
diff --git a/pkgs/development/compilers/go/1.2.nix b/pkgs/development/compilers/go/1.2.nix
index 8567337be0b5..d5ca3bf812e9 100644
--- a/pkgs/development/compilers/go/1.2.nix
+++ b/pkgs/development/compilers/go/1.2.nix
@@ -79,6 +79,7 @@ stdenv.mkDerivation {
   '';
 
   meta = {
+    branch = "1.2";
     homepage = http://golang.org/;
     description = "The Go Programming language";
     license = "BSD";
diff --git a/pkgs/development/compilers/go/default.nix b/pkgs/development/compilers/go/default.nix
index b9a76a6f82b3..e289ce14ee11 100644
--- a/pkgs/development/compilers/go/default.nix
+++ b/pkgs/development/compilers/go/default.nix
@@ -83,6 +83,7 @@ stdenv.mkDerivation {
   '';
 
   meta = {
+    branch = "1.0";
     homepage = http://golang.org/;
     description = "The Go Programming language";
     license = "BSD";
diff --git a/pkgs/development/compilers/hhvm/default.nix b/pkgs/development/compilers/hhvm/default.nix
index 1873b58e802e..c48e6d5a81e1 100644
--- a/pkgs/development/compilers/hhvm/default.nix
+++ b/pkgs/development/compilers/hhvm/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs =
-    [ cmake pkgconfig boost boost.lib libunwind mariadb libmemcached pcre
+    [ cmake pkgconfig boost libunwind mariadb libmemcached pcre
       libevent gd curl libxml2 icu flex bison openssl zlib php expat libcap
       oniguruma libdwarf libmcrypt tbb gperftools bzip2 openldap readline
       libelf uwimap binutils cyrus_sasl pam glog libpng libxslt ocaml
diff --git a/pkgs/development/compilers/julia/0.3.2.nix b/pkgs/development/compilers/julia/0.3.2.nix
new file mode 100644
index 000000000000..7ad2e5fc1fc5
--- /dev/null
+++ b/pkgs/development/compilers/julia/0.3.2.nix
@@ -0,0 +1,159 @@
+{ stdenv, fetchgit, gfortran, perl, m4, llvm, gmp, pcre, zlib
+ , readline, fftwSinglePrec, fftw, libunwind, suitesparse, glpk, fetchurl
+ , ncurses, libunistring, lighttpd, patchelf, openblas, liblapack
+ , tcl, tk, xproto, libX11, git, mpfr, which
+ } :
+
+assert stdenv.isLinux; 
+
+let
+  realGcc = stdenv.gcc.gcc;
+in
+stdenv.mkDerivation rec {
+  pname = "julia";
+  version = "0.3.2";
+  name = "${pname}-${version}";
+
+  dsfmt_ver = "2.2";
+  grisu_ver = "1.1.1";
+  openblas_ver = "v0.2.10";
+  lapack_ver = "3.5.0";
+  arpack_ver = "3.1.5";
+  lighttpd_ver = "1.4.29";
+  patchelf_ver = "0.6";
+  pcre_ver = "8.31";
+  utf8proc_ver = "1.1.6";
+
+  dsfmt_src = fetchurl {
+    url = "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-${dsfmt_ver}.tar.gz";
+    name = "dsfmt-${dsfmt_ver}.tar.gz";
+    sha256 = "bc3947a9b2253a869fcbab8ff395416cb12958be9dba10793db2cd7e37b26899";
+  };
+  grisu_src = fetchurl {
+    url = "http://double-conversion.googlecode.com/files/double-conversion-${grisu_ver}.tar.gz";
+    sha256 = "e1cabb73fd69e74f145aea91100cde483aef8b79dc730fcda0a34466730d4d1d";
+  };
+  openblas_src = fetchurl {
+    url = "https://github.com/xianyi/OpenBLAS/tarball/${openblas_ver}";
+    name = "openblas-${openblas_ver}.tar.gz";
+    sha256 = "06i0q4qnd5q5xljzrgvda0gjsczc6l2pl9hw6dn2qjpw38al73za";
+  };
+  arpack_src = fetchurl rec {
+    url = "https://github.com/opencollab/arpack-ng/archive/${arpack_ver}.tar.gz";
+    sha256 = "164hc2qcvr7fvvf7bn2k7z40hyyv8hhhzjr6jq0mq6a7l80x02gn";
+    name = "arpack-ng-${arpack_ver}.tar.gz";
+  };
+  lapack_src = fetchurl {
+    url = "http://www.netlib.org/lapack/lapack-${lapack_ver}.tgz";
+    name = "lapack-${lapack_ver}.tgz";
+    sha256 = "0lk3f97i9imqascnlf6wr5mjpyxqcdj73pgj97dj2mgvyg9z1n4s";
+  };
+  lighttpd_src = fetchurl {
+    url = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${lighttpd_ver}.tar.gz";
+    sha256 = "ff9f4de3901d03bb285634c5b149191223d17f1c269a16c863bac44238119c85";
+  };
+  patchelf_src = fetchurl {
+    url = "http://hydra.nixos.org/build/1524660/download/2/patchelf-${patchelf_ver}.tar.bz2";
+    sha256 = "00bw29vdsscsili65wcb5ay0gvg1w0ljd00sb5xc6br8bylpyzpw";
+  };
+  pcre_src = fetchurl {
+    url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${pcre_ver}.tar.bz2";
+    sha256 = "0g4c0z4h30v8g8qg02zcbv7n67j5kz0ri9cfhgkpwg276ljs0y2p";
+  };
+  utf8proc_src = fetchurl {
+    url = "http://www.public-software-group.org/pub/projects/utf8proc/v${utf8proc_ver}/utf8proc-v${utf8proc_ver}.tar.gz";
+    sha256 = "1rwr84pw92ajjlbcxq0da7yxgg3ijngmrj7vhh2qzsr2h2kqzp7y";
+  };
+
+  src = fetchgit {
+    url = "git://github.com/JuliaLang/julia.git";
+    rev = "refs/tags/v${version}";
+    sha256 = "11w81mznhlfcnn6vcv1rhrbajnyz8aim29wvwl92zsllq8z9hv2i";
+    name = "julia-git-v${version}";
+  };
+
+  buildInputs = [ gfortran perl m4 gmp pcre llvm readline zlib
+    fftw fftwSinglePrec libunwind suitesparse glpk ncurses libunistring patchelf
+    openblas liblapack tcl tk xproto libX11 git mpfr which
+    ];
+
+  configurePhase = ''
+    for i in GMP LLVM PCRE READLINE FFTW LIBUNWIND SUITESPARSE GLPK LIGHTTPD ZLIB MPFR;
+    do
+      makeFlags="$makeFlags USE_SYSTEM_$i=1 "
+    done
+
+    copy_kill_hash(){
+      cp "$1" "$2/$(basename "$1" | sed -e 's/^[a-z0-9]*-//')"
+    }
+
+    for i in "${grisu_src}" "${dsfmt_src}" "${arpack_src}" "${patchelf_src}" \
+        "${pcre_src}" "${utf8proc_src}" "${lapack_src}" "${openblas_src}"; do
+      copy_kill_hash "$i" deps
+    done
+
+    ${if realGcc ==null then "" else 
+    ''export NIX_LDFLAGS="$NIX_LDFLAGS -L${realGcc}/lib -L${realGcc}/lib64 -lpcre -llapack -lm -lfftw3f -lfftw3 -lglpk -lunistring -lz -lgmp -lmpfr -lblas -lopenblas -L$out/lib"''}
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC "
+
+    export LDFLAGS="-L${suitesparse}/lib -L$out/lib/julia -Wl,-rpath,$out/lib/julia"
+
+    export GLPK_PREFIX="${glpk}/include"
+
+    mkdir -p "$out/lib"
+    sed -e "s@/usr/local/lib@$out/lib@g" -i deps/Makefile
+    sed -e "s@/usr/lib@$out/lib@g" -i deps/Makefile
+
+    export makeFlags="$makeFlags PREFIX=$out SHELL=${stdenv.shell} prefix=$out"
+
+    export dontPatchELF=1
+
+    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/usr/lib:$PWD/usr/lib/julia"
+
+    patchShebangs . contrib
+
+    export PATH="$PATH:${stdenv.gcc.libc}/sbin"
+
+    # ldconfig doesn't seem to ever work on NixOS; system-wide ldconfig cache
+    # is probably not what we want anyway on non-NixOS
+    sed -e "s@/sbin/ldconfig@true@" -i src/ccall.*
+
+    ln -s "${openblas}/lib/libopenblas.so" "$out/lib/libblas.so"
+  '';
+
+  preBuild = ''
+    mkdir -p usr/lib
+    
+    echo "$out"
+    mkdir -p "$out/lib"
+    (
+    cd "$(mktemp -d)"
+    for i in "${suitesparse}"/lib/lib*.a; do
+      ar -x $i
+    done
+    gcc *.o --shared -o "$out/lib/libsuitesparse.so"
+    )
+    cp "$out/lib/libsuitesparse.so" usr/lib
+    for i in umfpack cholmod amd camd colamd spqr; do
+      ln -s libsuitesparse.so "$out"/lib/lib$i.so;
+      ln -s libsuitesparse.so "usr"/lib/lib$i.so;
+    done
+  '';
+
+  dontStrip = true;
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    rm -f "$out"/lib/julia/sys.{so,dylib,dll}
+  '';
+
+  meta = {
+    description = "High-level performance-oriented dynamical language for technical computing";
+    homepage = "http://julialang.org/";
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.raskin ];
+    platforms = with stdenv.lib.platforms; linux;
+    broken = false;
+  };
+}
diff --git a/pkgs/development/compilers/nasm/default.nix b/pkgs/development/compilers/nasm/default.nix
index 4456319ac243..8219882a2a21 100644
--- a/pkgs/development/compilers/nasm/default.nix
+++ b/pkgs/development/compilers/nasm/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "nasm-${version}";
-  version = "2.11.06";
+  version = "2.11.05";
   
   src = fetchurl {
     url = "http://www.nasm.us/pub/nasm/releasebuilds/${version}/${name}.tar.bz2";
-    sha256 = "0v1y1kx09nzmk8w4v79jxhn15fmi3g7l9nmgkn7ldjl1d5yxkdl7";
+    sha256 = "1sgspnascc0asmwlv3jm1mq4vzx653sa7vlg48z20pfybk7pnhaa";
   };
 
   meta = {
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index 535f2697fea6..09418f5f2af5 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name    = "sbcl-${version}";
-  version = "1.2.3";
+  version = "1.2.5";
 
   src = fetchurl {
     url    = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
-    sha256 = "0lz2a79dlxxyw05s14l6xp35zjsazgbp1dmqygqi0cmd8dc5vj6j";
+    sha256 = "0nmb9amygr5flzk2z9fa6wzwqknbgd2qrkybxkxkamvbdwyayvzr";
   };
 
   buildInputs = [ ]
diff --git a/pkgs/development/compilers/uhc/default.nix b/pkgs/development/compilers/uhc/default.nix
deleted file mode 100644
index 2f179d17548e..000000000000
--- a/pkgs/development/compilers/uhc/default.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{ stdenv, coreutils, glibc, fetchgit, m4, libtool, ghc, uulib
-, uuagc, mtl, network, binary, llvm, fgl, syb
-}:
-
-# this check won't be needed anymore after ghc-wrapper is fixed
-# to show ghc-builtin packages in "ghc-pkg list" output.
-let binaryIsBuiltIn = builtins.compareVersions "7.2.1" ghc.version != 1;
-
-in stdenv.mkDerivation {
-  name = "uhc-svn-git20120502";
-
-  src = fetchgit {
-     url = "https://github.com/UU-ComputerScience/uhc.git";
-     rev = "ab26d787657bb729d8a4f92ef5d067d9990f6ce3";
-     sha256 = "66c5b6d95dc80a652f6e17476a1b18fbef4b4ff6199a92d033f0055526ec97ff";
-  };
-
-  postUnpack = "sourceRoot=\${sourceRoot}/EHC";
-
-  propagatedBuildInputs = [mtl network binary fgl syb];
-  buildInputs = [coreutils m4 ghc libtool uulib uuagc];
-
-  # Can we rename this flag to "--with-cpp-uhc-options"?
-  configureFlags = "--with-cpp-ehc-options=-I${glibc}/include";
-
-  # UHC builds packages during compilation; these are by default
-  # installed in the user-specific package config file. We do not
-  # want that, and hack the build process to use a temporary package
-  # configuration file instead.
-  preConfigure = ''
-    p=`pwd`/uhc-local-packages
-    echo '[]' > $p
-    sed -i "s|--user|--package-db=$p|g" mk/shared.mk.in
-    sed -i "s|-fglasgow-exts|-fglasgow-exts -package-conf=$p|g" mk/shared.mk.in
-    sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/dist.mk
-    sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/config.mk.in
-  '' + stdenv.lib.optionalString binaryIsBuiltIn ''
-    sed -i "s|ghcLibBinary=no|ghcLibBinaryExists=yes|" configure
-  '';
-
-  meta = {
-    homepage = "http://www.cs.uu.nl/wiki/UHC";
-    description = "Utrecht Haskell Compiler";
-    platforms = stdenv.lib.platforms.linux;
-    hydraPlatforms = stdenv.lib.platforms.none;
-    broken = true;
-  };
-}
diff --git a/pkgs/development/guile-modules/guile-sdl/default.nix b/pkgs/development/guile-modules/guile-sdl/default.nix
new file mode 100644
index 000000000000..8c1706be5835
--- /dev/null
+++ b/pkgs/development/guile-modules/guile-sdl/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, guile, buildEnv
+, SDL, SDL_image, SDL_ttf, SDL_mixer
+}:
+
+stdenv.mkDerivation rec {
+  name = "guile-sdl-0.5.1";
+
+  meta = with stdenv.lib; {
+    description = "Guile bindings for SDL";
+    homepage    = "http://gnu.org/s/guile-sdl";
+    license     = licenses.gpl3Plus;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ iyzsong ];
+  };
+
+  src = fetchurl {
+    url = "mirror://gnu/guile-sdl/${name}.tar.xz";
+    sha256 = "126n4rd0ydh6i2s11ari5k85iivradlf12zq13b34shf9k1wn5am";
+  };
+
+  nativeBuildInputs = [ guile ];
+
+  buildInputs = [
+    SDL SDL_image SDL_ttf SDL_mixer
+  ];
+
+  GUILE_AUTO_COMPILE = 0;
+
+  makeFlags = let
+    sdl = buildEnv {
+      name = "sdl-env";
+      paths = buildInputs;
+    };
+  in "SDLMINUSI=-I${sdl}/include/SDL";
+}
diff --git a/pkgs/development/interpreters/angelscript/default.nix b/pkgs/development/interpreters/angelscript/default.nix
index 1167f121e624..7ed14b632f78 100644
--- a/pkgs/development/interpreters/angelscript/default.nix
+++ b/pkgs/development/interpreters/angelscript/default.nix
@@ -11,10 +11,10 @@ let
     (builtins.attrNames (builtins.removeAttrs x helperArgNames));
   sourceInfo = rec {
     baseName="angelscript";
-    version = "2.29.1";
+    version = "2.29.2";
     name="${baseName}-${version}";
     url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
-    sha256 = "081a0wnn1hl0hjgrg0nz63ff7k7dgrwsgszka5i7623ny407fkl5";
+    sha256 = "12ws4vp9iyxbgzxxdq7g9729vg1ld92f38gfznyhsknhsay4kmf5";
   };
 in
 rec {
diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix
index ad5d2f1cc587..c4634de5d3f2 100644
--- a/pkgs/development/interpreters/guile/default.nix
+++ b/pkgs/development/interpreters/guile/default.nix
@@ -27,7 +27,9 @@
   # A native Guile 2.0 is needed to cross-build Guile.
   selfNativeBuildInput = true;
 
-  enableParallelBuilding = true;
+  # Guile 2.0.11 repeatable fails with 8-core parallel building because
+  # libguile/vm-i-system.i is not created in time
+  enableParallelBuilding = false;
 
   patches = [ ./disable-gc-sensitive-tests.patch ./eai_system.patch ./clang.patch ] ++
     (stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch);
diff --git a/pkgs/development/interpreters/php/5.4.nix b/pkgs/development/interpreters/php/5.4.nix
index 4d70ba0e3587..0edf5e608010 100644
--- a/pkgs/development/interpreters/php/5.4.nix
+++ b/pkgs/development/interpreters/php/5.4.nix
@@ -9,7 +9,7 @@ in
 
 composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in {
 
-  version = "5.4.33";
+  version = "5.4.34";
 
   name = "php-${version}";
 
@@ -249,7 +249,7 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
 
   src = fetchurl {
     url = "http://www.php.net/distributions/php-${version}.tar.bz2";
-    sha256 = "1d8bwiw24k5p34fzkdqv8j8ndq50k2ahv66kdj4bhx2yhg8b4x8s";
+    sha256 = "0d425zxka3m1l0ygsls4r56qy374rf6skl4ggim0k2y1y08fmm2p";
   };
 
   meta = {
diff --git a/pkgs/development/interpreters/picolisp/default.nix b/pkgs/development/interpreters/picolisp/default.nix
index 196e7068e146..adc0261eddbd 100644
--- a/pkgs/development/interpreters/picolisp/default.nix
+++ b/pkgs/development/interpreters/picolisp/default.nix
@@ -12,18 +12,18 @@ let
   sourceInfo = rec {
     baseName="picolisp";
     tarballBaseName="picoLisp";
-    version="3.0.5";
+    version="3.1.8";
     name="${baseName}-${version}";
     tarballName="${tarballBaseName}-${version}";
     extension="tgz";
     url="http://www.software-lab.de/${tarballName}.${extension}";
-    hash="07w2aygllkmnfcnby3dy88n9giqsas35s77rp2lr2ll5yy2hkc0x";
+    sha256="0bkr1ck157871bv4a8dp9dmcvxigjsikm5rr2khylxc3l6il7s1i";
   };
 in
 rec {
   src = a.fetchurl {
     url = sourceInfo.url;
-    sha256 = sourceInfo.hash;
+    sha256 = sourceInfo.sha256;
   };
 
   inherit (sourceInfo) name version;
diff --git a/pkgs/development/interpreters/regina/default.nix b/pkgs/development/interpreters/regina/default.nix
index 992f7281554c..e6c84edacaf2 100644
--- a/pkgs/development/interpreters/regina/default.nix
+++ b/pkgs/development/interpreters/regina/default.nix
@@ -12,7 +12,7 @@ let
   sourceInfo = rec {
     baseName="Regina-REXX";
     pname="regina-rexx";
-    version = "3.8.2";
+    version = "3.9.0";
     name="${baseName}-${version}";
     url="mirror://sourceforge/${pname}/${pname}/${version}/${name}.tar.gz";
   };
@@ -20,7 +20,7 @@ in
 rec {
   src = a.fetchurl {
     url = sourceInfo.url;
-    sha256 = "06vr6p9pqr5zzsxm1l9iwb2w9z8qkm971c2knh0vf5bbm6znjz35";
+    sha256 = "051w6i5xyjq7j9yrhw4r14kw105gpylby6z5x9v31f5g824n4mfr";
   };
 
   inherit (sourceInfo) name version;
diff --git a/pkgs/development/libraries/CGAL/default.nix b/pkgs/development/libraries/CGAL/default.nix
index 512a17e6d3ea..505aab78242a 100644
--- a/pkgs/development/libraries/CGAL/default.nix
+++ b/pkgs/development/libraries/CGAL/default.nix
@@ -1,16 +1,16 @@
 { stdenv, fetchurl, cmake, boost, gmp, mpfr }:
 
 stdenv.mkDerivation rec {
-  version = "4.4";
+  version = "4.5";
 
   name = "cgal-${version}";
 
   src = fetchurl {
-    url = "https://gforge.inria.fr/frs/download.php/33526/CGAL-${version}.tar.xz";
-    sha256 = "1s0ylyrx74vgw6vsg6xxk4b07jrxh8pqcmxcbkx46v01nczv3ixj";
+    url = "https://gforge.inria.fr/frs/download.php/34139/CGAL-${version}.tar.xz";
+    sha256 = "00shds5yph4s09lqdrb6n60wnw9kpiwa25ghg9mbsgq3fnr8p7kr";
   };
 
-  buildInputs = [ cmake boost boost.lib gmp mpfr ];
+  buildInputs = [ cmake boost gmp mpfr ];
 
   doCheck = false;
 
diff --git a/pkgs/development/libraries/afflib/default.nix b/pkgs/development/libraries/afflib/default.nix
index ed88b89b14ee..d29349abe0cf 100644
--- a/pkgs/development/libraries/afflib/default.nix
+++ b/pkgs/development/libraries/afflib/default.nix
@@ -1,15 +1,29 @@
-{ stdenv, fetchurl, zlib, curl, expat, fuse, openssl }:
+{ stdenv, fetchgit, zlib, curl, expat, fuse, openssl
+, autoconf, automake, libtool, python
+}:
 
 stdenv.mkDerivation rec {
-  version = "3.7.4";
+  version = "3.7.5";
   name = "afflib-${version}";
 
-  src = fetchurl {
-    url = "http://digitalcorpora.org/downloads/afflib/${name}.tar.gz";
-    sha256 = "18j1gjb31qjcmz6lry4m2d933w2a80iagg9g5vrpw5ig80lv10f8";
+  src = fetchgit {
+    url = "https://github.com/sshock/AFFLIBv3/";
+    rev = "refs/tags/v${version}";
+    sha256 = "06dr3y6bd7vfjf0p9v85yp1xzg43x515zsa9587jcx7yy5h5ams5";
+    name = "afflib-${version}-checkout";
   };
 
-  buildInputs = [ zlib curl expat fuse openssl ];
+  buildInputs = [ zlib curl expat fuse openssl 
+    libtool autoconf automake python
+    ];
+
+  preConfigure = ''
+    libtoolize -f
+    autoheader -f
+    aclocal
+    automake --add-missing -c 
+    autoconf -f
+  '';
 
   meta = {
     homepage = http://afflib.sourceforge.net/;
diff --git a/pkgs/development/libraries/aspell/dictionaries.nix b/pkgs/development/libraries/aspell/dictionaries.nix
index 79a75708c169..cc0f51eb68d5 100644
--- a/pkgs/development/libraries/aspell/dictionaries.nix
+++ b/pkgs/development/libraries/aspell/dictionaries.nix
@@ -176,4 +176,14 @@ in {
     };
   };
 
+  sk = buildDict {
+    shortName = "sk-2.01-2";
+    fullName = "Slovak";
+    src = fetchurl {
+      url = mirror://gnu/aspell/dict/sk/aspell6-sk-2.01-2.tar.bz2;
+      sha256 = "19k0m1v5pcf7xr4lxgjkzqkdlks8nyb13bvi1n7521f3i4lhma66";
+    };
+  };
+
+
 }
diff --git a/pkgs/development/libraries/audio/lvtk/default.nix b/pkgs/development/libraries/audio/lvtk/default.nix
index 7b296ea6d13e..6e2b9a31b304 100644
--- a/pkgs/development/libraries/audio/lvtk/default.nix
+++ b/pkgs/development/libraries/audio/lvtk/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ boost gtkmm lv2 pkgconfig python ];
 
   configurePhase = ''
-    python waf configure --prefix=$out --boost-includes=${boost}/include
+    python waf configure --prefix=$out --boost-includes="${boost.dev}/include"
   '';
 
   buildPhase = "python waf";
diff --git a/pkgs/development/libraries/babl/0_0_22.nix b/pkgs/development/libraries/babl/0_0_22.nix
deleted file mode 100644
index 3983816a8b44..000000000000
--- a/pkgs/development/libraries/babl/0_0_22.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ stdenv, fetchurl }:
-
-stdenv.mkDerivation {
-  name = "babl-0.0.22";
-
-  src = fetchurl {
-    url = ftp://ftp.gtk.org/pub/babl/0.0/babl-0.0.22.tar.bz2;
-    sha256 = "0v8gbf9si4sd06199f8lfmrsbvi6i0hxphd34kyvsj6g2kkkg10s";
-  };
-
-  meta = { 
-    description = "Image pixel format conversion library";
-    homepage = http://gegl.org/babl/;
-    license = stdenv.lib.licenses.gpl3;
-  };
-}
diff --git a/pkgs/development/libraries/boost/1.44.nix b/pkgs/development/libraries/boost/1.44.nix
deleted file mode 100644
index c192acd23bde..000000000000
--- a/pkgs/development/libraries/boost/1.44.nix
+++ /dev/null
@@ -1,93 +0,0 @@
-{ stdenv, fetchurl, icu, expat, zlib, bzip2, python
-, enableRelease ? true
-, enableDebug ? false
-, enableSingleThreaded ? false
-, enableMultiThreaded ? true
-, enableShared ? true
-, enableStatic ? false
-, enablePIC ? false
-, taggedLayout ? false
-}:
-
-let
-
-  variant = stdenv.lib.concatStringsSep ","
-    (stdenv.lib.optional enableRelease "release" ++
-     stdenv.lib.optional enableDebug "debug");
-
-  threading = stdenv.lib.concatStringsSep ","
-    (stdenv.lib.optional enableSingleThreaded "single" ++
-     stdenv.lib.optional enableMultiThreaded "multi");
-
-  link = stdenv.lib.concatStringsSep ","
-    (stdenv.lib.optional enableShared "shared" ++
-     stdenv.lib.optional enableStatic "static");
-
-  # To avoid library name collisions
-  finalLayout = if (taggedLayout || (enableRelease && enableDebug) ||
-    (enableSingleThreaded && enableMultiThreaded) ||
-    (enableShared && enableStatic)) then
-    "tagged" else "system";
-
-  cflags = if enablePIC then "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC" else "";
-
-in
-
-stdenv.mkDerivation {
-  name = "boost-1.44.0";
-
-  meta = {
-    homepage = "http://boost.org/";
-    description = "Collection of C++ libraries";
-    license = "boost-license";
-
-    maintainers = [ stdenv.lib.maintainers.simons ];
-  };
-
-  src = fetchurl {
-    url = "mirror://sourceforge/boost/boost_1_44_0.tar.bz2";
-    sha256 = "1nvq36mvzr1fr85q0jh86rk3bk65s1y55jgqgzfg3lcpkl12ihs5";
-  };
-
-  enableParallelBuilding = true;
-
-  buildInputs = [icu expat zlib bzip2 python];
-
-  configureScript = "./bootstrap.sh";
-  configureFlags = "--with-icu=${icu} --with-python=${python}/bin/python";
-
-  buildPhase = "./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${finalLayout} variant=${variant} threading=${threading} link=${link} ${cflags} install";
-
-  installPhase = ":";
-
-  patches = [
-    # Patch to get rid of following error, experienced by some packages like encfs, bitcoin:
-    #    terminate called after throwing an instance of 'std::runtime_error'
-    #    what():  locale::facet::_S_create_c_locale name not valid
-    (fetchurl {
-       url = https://svn.boost.org/trac/boost/raw-attachment/ticket/4688/boost_filesystem.patch ;
-       sha256 = "15k91ihzs6190pnryh4cl0b3c2pjpl9d790mr14x16zq52y7px2d";
-     })
-    ./time_utc_144.patch
-    ./boost-149-cstdint.patch
-  ];
-
-  crossAttrs = rec {
-    buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
-    # all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
-    # override them.
-    propagatedBuildInputs = buildInputs;
-    # We want to substitute the contents of configureFlags, removing thus the
-    # usual --build and --host added on cross building.
-    preConfigure = ''
-      export configureFlags="--prefix=$out --without-icu"
-    '';
-    buildPhase = ''
-      set -x
-      cat << EOF > user-config.jam
-      using gcc : cross : $crossConfig-g++ ;
-      EOF
-      ./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
-    '';
-  };
-}
diff --git a/pkgs/development/libraries/boost/1.49.nix b/pkgs/development/libraries/boost/1.49.nix
deleted file mode 100644
index 9e61683238fa..000000000000
--- a/pkgs/development/libraries/boost/1.49.nix
+++ /dev/null
@@ -1,96 +0,0 @@
-{ stdenv, fetchurl, icu, expat, zlib, bzip2, python
-, enableRelease ? true
-, enableDebug ? false
-, enableSingleThreaded ? false
-, enableMultiThreaded ? true
-, enableShared ? true
-, enableStatic ? false
-, enablePIC ? false
-, enableExceptions ? false
-}:
-
-let
-
-  variant = stdenv.lib.concatStringsSep ","
-    (stdenv.lib.optional enableRelease "release" ++
-     stdenv.lib.optional enableDebug "debug");
-
-  threading = stdenv.lib.concatStringsSep ","
-    (stdenv.lib.optional enableSingleThreaded "single" ++
-     stdenv.lib.optional enableMultiThreaded "multi");
-
-  link = stdenv.lib.concatStringsSep ","
-    (stdenv.lib.optional enableShared "shared" ++
-     stdenv.lib.optional enableStatic "static");
-
-  # To avoid library name collisions
-  finalLayout = if ((enableRelease && enableDebug) ||
-    (enableSingleThreaded && enableMultiThreaded) ||
-    (enableShared && enableStatic)) then
-    "tagged" else "system";
-
-  cflags = if enablePIC && enableExceptions then
-             "cflags=-fPIC -fexceptions cxxflags=-fPIC linkflags=-fPIC"
-           else if enablePIC then
-             "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC"
-           else if enableExceptions then
-             "cflags=-fexceptions"
-           else
-             "";
-in
-
-stdenv.mkDerivation {
-  name = "boost-1.49.0";
-
-  meta = {
-    homepage = "http://boost.org/";
-    description = "Collection of C++ libraries";
-    license = "boost-license";
-
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.simons ];
-  };
-
-  src = fetchurl {
-    url = "mirror://sourceforge/boost/boost_1_49_0.tar.bz2";
-    sha256 = "0g0d33942rm073jgqqvj3znm3rk45b2y2lplfjpyg9q7amzqlx6x";
-  };
-
-  # See <http://svn.boost.org/trac/boost/ticket/4688>.
-  patches = [
-    ./CVE-2013-0252.patch # https://svn.boost.org/trac/boost/ticket/7743
-    ./boost_filesystem_post_1_49_0.patch
-    ./time_utc.patch
-    ./boost-149-cstdint.patch
-  ] ++ (stdenv.lib.optional stdenv.isDarwin ./boost-149-darwin.patch );
-
-  enableParallelBuilding = true;
-
-  buildInputs = [icu expat zlib bzip2 python];
-
-  configureScript = "./bootstrap.sh";
-  configureFlags = "--with-icu=${icu} --with-python=${python}/bin/python";
-
-  buildPhase = "./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${finalLayout} variant=${variant} threading=${threading} link=${link} ${cflags} install";
-
-  installPhase = ":";
-
-  crossAttrs = rec {
-    buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
-    # all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
-    # override them.
-    propagatedBuildInputs = buildInputs;
-    # We want to substitute the contents of configureFlags, removing thus the
-    # usual --build and --host added on cross building.
-    preConfigure = ''
-      export configureFlags="--prefix=$out --without-icu"
-    '';
-    buildPhase = ''
-      set -x
-      cat << EOF > user-config.jam
-      using gcc : cross : $crossConfig-g++ ;
-      EOF
-      ./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
-    '';
-  };
-}
diff --git a/pkgs/development/libraries/boost/1.55.nix b/pkgs/development/libraries/boost/1.55.nix
index 2c02ce13e8d2..808ff912e7db 100644
--- a/pkgs/development/libraries/boost/1.55.nix
+++ b/pkgs/development/libraries/boost/1.55.nix
@@ -1,101 +1,10 @@
-{ stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames
-, toolset ? if stdenv.isDarwin then "clang" else null
-, enableRelease ? true
-, enableDebug ? false
-, enableSingleThreaded ? false
-, enableMultiThreaded ? true
-, enableShared ? true
-, enableStatic ? false
-, enablePIC ? false
-, enableExceptions ? false
-, taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic))
-}:
+{ callPackage, fetchurl, ... } @ args:
 
-let
-
-  variant = stdenv.lib.concatStringsSep ","
-    (stdenv.lib.optional enableRelease "release" ++
-     stdenv.lib.optional enableDebug "debug");
-
-  threading = stdenv.lib.concatStringsSep ","
-    (stdenv.lib.optional enableSingleThreaded "single" ++
-     stdenv.lib.optional enableMultiThreaded "multi");
-
-  link = stdenv.lib.concatStringsSep ","
-    (stdenv.lib.optional enableShared "shared" ++
-     stdenv.lib.optional enableStatic "static");
-
-  # To avoid library name collisions
-  layout = if taggedLayout then "tagged" else "system";
-
-  cflags = if enablePIC && enableExceptions then
-             "cflags=\"-fPIC -fexceptions\" cxxflags=-fPIC linkflags=-fPIC"
-           else if enablePIC then
-             "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC"
-           else if enableExceptions then
-             "cflags=-fexceptions"
-           else
-             "";
-
-  withToolset = stdenv.lib.optionalString (toolset != null) " --with-toolset=${toolset}";
-in
-
-let res = stdenv.mkDerivation {
-  name = "boost-1.55.0";
-
-  meta = {
-    homepage = "http://boost.org/";
-    description = "Collection of C++ libraries";
-    license = "boost-license";
-
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.simons ];
-  };
+callPackage ./generic.nix (args // rec {
+  version = "1.55.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/boost/boost_1_55_0.tar.bz2";
     sha256 = "0lkv5dzssbl5fmh2nkaszi8x9qbj80pr4acf9i26sj3rvlih1w7z";
   };
-
-  patches = stdenv.lib.optional (toolset == "clang") [ ./boost-155-clang.patch ];
-
-  enableParallelBuilding = true;
-
-  buildInputs =
-    [ icu expat zlib bzip2 python ]
-    ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
-
-  configureScript = "./bootstrap.sh";
-  configureFlags = "--with-icu=${icu} --with-python=${python}/bin/python" + withToolset;
-
-  buildPhase = "${stdenv.lib.optionalString (toolset == "clang") "unset NIX_ENFORCE_PURITY; "}./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${layout} variant=${variant} threading=${threading} link=${link} ${cflags} install";
-
-  # normal install does not install bjam, this is a separate step
-  installPhase = ''
-    cd tools/build/v2
-    sh bootstrap.sh${withToolset}
-    ./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${layout} variant=${variant} threading=${threading} link=${link} ${cflags} install${withToolset}
-    rm $out/bin/bjam
-    ln -s $out/bin/b2 $out/bin/bjam
-    rm -rf $out/share/boost-build/example
-  '';
-
-  crossAttrs = rec {
-    buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
-    # all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
-    # override them.
-    propagatedBuildInputs = buildInputs;
-    # We want to substitute the contents of configureFlags, removing thus the
-    # usual --build and --host added on cross building.
-    preConfigure = ''
-      export configureFlags="--prefix=$out --without-icu"
-    '';
-    buildPhase = ''
-      set -x
-      cat << EOF > user-config.jam
-      using gcc : cross : $crossConfig-g++ ;
-      EOF
-      ./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${layout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
-    '';
-  };
-}; in res // { lib = res; }
+})
diff --git a/pkgs/development/libraries/boost/1.56.nix b/pkgs/development/libraries/boost/1.56.nix
index 212b6ca0dee5..fb62c2a07faf 100644
--- a/pkgs/development/libraries/boost/1.56.nix
+++ b/pkgs/development/libraries/boost/1.56.nix
@@ -1,146 +1,10 @@
-{ stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames
-, toolset ? null
-, enableRelease ? true
-, enableDebug ? false
-, enableSingleThreaded ? false
-, enableMultiThreaded ? true
-, enableShared ? true
-, enableStatic ? false
-, enablePIC ? false
-, enableExceptions ? false
-, taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic))
-}:
+{ callPackage, fetchurl, ... } @ args:
 
-# We must build at least one type of libraries
-assert !enableShared -> enableStatic;
-
-with stdenv.lib;
-let
-
-  variant = concatStringsSep ","
-    (optional enableRelease "release" ++
-     optional enableDebug "debug");
-
-  threading = concatStringsSep ","
-    (optional enableSingleThreaded "single" ++
-     optional enableMultiThreaded "multi");
-
-  link = concatStringsSep ","
-    (optional enableShared "shared" ++
-     optional enableStatic "static");
-
-  runtime-link = if enableShared then "shared" else "static";
-
-  # To avoid library name collisions
-  layout = if taggedLayout then "tagged" else "system";
-
-  cflags = if enablePIC && enableExceptions then
-             "cflags=\"-fPIC -fexceptions\" cxxflags=-fPIC linkflags=-fPIC"
-           else if enablePIC then
-             "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC"
-           else if enableExceptions then
-             "cflags=-fexceptions"
-           else
-             "";
-
-  withToolset = stdenv.lib.optionalString (toolset != null) "--with-toolset=${toolset}";
-
-  genericB2Flags = [
-    "--prefix=$out"
-    "--libdir=$lib/lib"
-    "-j$NIX_BUILD_CORES"
-    "--layout=${layout}"
-    "variant=${variant}"
-    "threading=${threading}"
-    "runtime-link=${runtime-link}"
-    "link=${link}"
-    "${cflags}"
-  ] ++ optional (variant == "release") "debug-symbols=off";
-
-  nativeB2Flags = [
-    "-sEXPAT_INCLUDE=${expat}/include"
-    "-sEXPAT_LIBPATH=${expat}/lib"
-  ] ++ optional (toolset != null) "toolset=${toolset}";
-  nativeB2Args = concatStringsSep " " (genericB2Flags ++ nativeB2Flags);
-
-  crossB2Flags = [
-    "-sEXPAT_INCLUDE=${expat.crossDrv}/include"
-    "-sEXPAT_LIBPATH=${expat.crossDrv}/lib"
-    "--user-config=user-config.jam"
-    "toolset=gcc-cross"
-    "--without-python"
-  ];
-  crossB2Args = concatMapStringsSep " " (genericB2Flags ++ crossB2Flags);
-
-  builder = b2Args: ''
-    ./b2 ${b2Args}
-  '';
-
-  installer = b2Args: ''
-    # boostbook is needed by some applications
-    mkdir -p $out/share/boostbook
-    cp -a tools/boostbook/{xsl,dtd} $out/share/boostbook/
-
-    # Let boost install everything else
-    ./b2 ${b2Args} install
-  '';
-
-  commonConfigureFlags = [
-    "--libdir=$(lib)/lib"
-  ];
-in
-
-stdenv.mkDerivation {
-  name = "boost-1.56.0";
-
-  meta = {
-    homepage = "http://boost.org/";
-    description = "Collection of C++ libraries";
-    license = "boost-license";
-
-    platforms = platforms.unix;
-    maintainers = with maintainers; [ simons wkennington ];
-  };
+callPackage ./generic.nix (args // rec {
+  version = "1.56.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/boost/boost_1_56_0.tar.bz2";
     sha256 = "07gz62nj767qzwqm3xjh11znpyph8gcii0cqhnx7wvismyn34iqk";
   };
-
-  enableParallelBuilding = true;
-
-  buildInputs = [ icu expat zlib bzip2 python ]
-    ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
-
-  configureScript = "./bootstrap.sh";
-  configureFlags = commonConfigureFlags ++ [
-    "--with-icu=${icu}"
-    "--with-python=${python}/bin/python"
-  ] ++ optional (toolset != null) "--with-toolset=${toolset}";
-
-  buildPhase = ''
-    ${stdenv.lib.optionalString (toolset == "clang") "unset NIX_ENFORCE_PURITY"}
-  '' + builder nativeB2Args;
-
-  installPhase = installer nativeB2Args;
-
-  outputs = [ "out" "lib" ];
-
-  crossAttrs = rec {
-    buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
-    # all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
-    # override them.
-    propagatedBuildInputs = buildInputs;
-    # We want to substitute the contents of configureFlags, removing thus the
-    # usual --build and --host added on cross building.
-    preConfigure = ''
-      export configureFlags="--prefix=$out --without-icu ${concatStringsSep " " commonConfigureFlags}"
-      set -x
-      cat << EOF > user-config.jam
-      using gcc : cross : $crossConfig-g++ ;
-      EOF
-    '';
-    buildPhase = builder crossB2Args;
-    installPhase = installer crossB2Args;
-  };
-}
+})
diff --git a/pkgs/development/libraries/boost/CVE-2013-0252.patch b/pkgs/development/libraries/boost/CVE-2013-0252.patch
deleted file mode 100644
index fce52d479692..000000000000
--- a/pkgs/development/libraries/boost/CVE-2013-0252.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Index: /boost/locale/utf.hpp

-===================================================================

---- /boost/locale/utf.hpp	(revision 78304)

-+++ /boost/locale/utf.hpp	(revision 81590)

-@@ -220,4 +220,6 @@

-                     return incomplete;

-                 tmp = *p++;

-+                if (!is_trail(tmp))

-+                    return illegal;

-                 c = (c << 6) | ( tmp & 0x3F);

-             case 2:

-@@ -225,4 +227,6 @@

-                     return incomplete;

-                 tmp = *p++;

-+                if (!is_trail(tmp))

-+                    return illegal;

-                 c = (c << 6) | ( tmp & 0x3F);

-             case 1:

-@@ -230,4 +234,6 @@

-                     return incomplete;

-                 tmp = *p++;

-+                if (!is_trail(tmp))

-+                    return illegal;

-                 c = (c << 6) | ( tmp & 0x3F);

-             }

-Index: /libs/locale/test/test_codepage_converter.cpp

-===================================================================

---- /libs/locale/test/test_codepage_converter.cpp	(revision 73786)

-+++ /libs/locale/test/test_codepage_converter.cpp	(revision 81590)

-@@ -140,4 +140,18 @@

-         TEST_TO("\xf8\x90\x80\x80\x80",illegal);  // 400 0000

-         TEST_TO("\xfd\xbf\xbf\xbf\xbf\xbf",illegal);  // 7fff ffff

-+

-+        std::cout << "-- Invalid trail" << std::endl;

-+        TEST_TO("\xC2\x7F",illegal);

-+        TEST_TO("\xdf\x7F",illegal);

-+        TEST_TO("\xe0\x7F\x80",illegal);

-+        TEST_TO("\xef\xbf\x7F",illegal);

-+        TEST_TO("\xe0\x7F\x80",illegal);

-+        TEST_TO("\xef\xbf\x7F",illegal);

-+        TEST_TO("\xf0\x7F\x80\x80",illegal);

-+        TEST_TO("\xf4\x7f\xbf\xbf",illegal);

-+        TEST_TO("\xf0\x90\x7F\x80",illegal);

-+        TEST_TO("\xf4\x8f\x7F\xbf",illegal);

-+        TEST_TO("\xf0\x90\x80\x7F",illegal);

-+        TEST_TO("\xf4\x8f\xbf\x7F",illegal);

- 

-         std::cout << "-- Invalid length" << std::endl;

diff --git a/pkgs/development/libraries/boost/boost-149-cstdint.patch b/pkgs/development/libraries/boost/boost-149-cstdint.patch
deleted file mode 100644
index 94c7b4716664..000000000000
--- a/pkgs/development/libraries/boost/boost-149-cstdint.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -ru -x '*~' boost_1_49_0-orig/boost/cstdint.hpp boost_1_49_0/boost/cstdint.hpp
---- boost_1_49_0-orig/boost/cstdint.hpp	2012-01-29 22:58:13.000000000 +0100
-+++ boost_1_49_0/boost/cstdint.hpp	2013-12-10 11:48:19.304042208 +0100
-@@ -41,7 +41,10 @@
- // so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG.
- // See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990
- //
--#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG))
-+#if defined(BOOST_HAS_STDINT_H)					\
-+  && (!defined(__GLIBC__)					\
-+      || defined(__GLIBC_HAVE_LONG_LONG)			\
-+      || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17)))))
- 
- // The following #include is an implementation artifact; not part of interface.
- # ifdef __hpux
diff --git a/pkgs/development/libraries/boost/boost-149-darwin.patch b/pkgs/development/libraries/boost/boost-149-darwin.patch
deleted file mode 100644
index 2485f883afc2..000000000000
--- a/pkgs/development/libraries/boost/boost-149-darwin.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff -rc boost_1_49_0/tools/build/v2/tools/darwin.jam boost_1_49_0-new/tools/build/v2/tools/darwin.jam
-*** boost_1_49_0/tools/build/v2/tools/darwin.jam	Mon Jun  6 22:36:21 2011
---- boost_1_49_0-new/tools/build/v2/tools/darwin.jam	Thu May 23 22:07:45 2013
-***************
-*** 498,504 ****
-  flags darwin.compile OPTIONS <link>shared : -dynamic ;
-  
-  # Misc options.
-! flags darwin.compile OPTIONS : -no-cpp-precomp -gdwarf-2 -fexceptions ;
-  #~ flags darwin.link OPTIONS : -fexceptions ;
-  
-  # Add the framework names to use.
---- 498,504 ----
-  flags darwin.compile OPTIONS <link>shared : -dynamic ;
-  
-  # Misc options.
-! flags darwin.compile OPTIONS : -gdwarf-2 -fexceptions ;
-  #~ flags darwin.link OPTIONS : -fexceptions ;
-  
-  # Add the framework names to use.
-diff -rc boost_1_49_0/tools/build/v2/tools/darwin.py boost_1_49_0-new/tools/build/v2/tools/darwin.py
-*** boost_1_49_0/tools/build/v2/tools/darwin.py	Wed Oct 28 08:47:51 2009
---- boost_1_49_0-new/tools/build/v2/tools/darwin.py	Thu May 23 21:58:12 2013
-***************
-*** 37,43 ****
-  feature.feature ('framework', [], ['free'])
-  
-  toolset.flags ('darwin.compile', 'OPTIONS', '<link>shared', ['-dynamic'])
-! toolset.flags ('darwin.compile', 'OPTIONS', None, ['-Wno-long-double', '-no-cpp-precomp'])
-  toolset.flags ('darwin.compile.c++', 'OPTIONS', None, ['-fcoalesce-templates'])
-  
-  toolset.flags ('darwin.link', 'FRAMEWORK', '<framework>')
---- 37,43 ----
-  feature.feature ('framework', [], ['free'])
-  
-  toolset.flags ('darwin.compile', 'OPTIONS', '<link>shared', ['-dynamic'])
-! toolset.flags ('darwin.compile', 'OPTIONS', None, ['-Wno-long-double'])
-  toolset.flags ('darwin.compile.c++', 'OPTIONS', None, ['-fcoalesce-templates'])
-  
-  toolset.flags ('darwin.link', 'FRAMEWORK', '<framework>')
diff --git a/pkgs/development/libraries/boost/boost_filesystem_post_1_49_0.patch b/pkgs/development/libraries/boost/boost_filesystem_post_1_49_0.patch
deleted file mode 100644
index 334533d98a65..000000000000
--- a/pkgs/development/libraries/boost/boost_filesystem_post_1_49_0.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ubr boost_1_49_0/libs/filesystem/v2/src/v2_path.cpp boost_1_49_0-patched/libs/filesystem/v2/src/v2_path.cpp
---- boost_1_49_0/libs/filesystem/v2/src/v2_path.cpp	2011-01-11 22:39:33.000000000 +0100
-+++ boost_1_49_0-patched/libs/filesystem/v2/src/v2_path.cpp	2012-02-25 20:00:33.628767485 +0100
-@@ -45,7 +45,7 @@
-   {
- #if !defined(macintosh) && !defined(__APPLE__) && !defined(__APPLE_CC__) 
-     // ISO C calls this "the locale-specific native environment":
--    static std::locale lc("");
-+    static std::locale lc;
- #else  // Mac OS
-     // "All BSD system functions expect their string parameters to be in UTF-8 encoding
-     // and nothing else."
diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix
new file mode 100644
index 000000000000..fdfc8b45a683
--- /dev/null
+++ b/pkgs/development/libraries/boost/generic.nix
@@ -0,0 +1,166 @@
+{ stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, makeSetupHook
+, toolset ? null
+, enableRelease ? true
+, enableDebug ? false
+, enableSingleThreaded ? false
+, enableMultiThreaded ? true
+, enableShared ? true
+, enableStatic ? false
+, enablePIC ? false
+, enableExceptions ? false
+, taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic))
+
+# Attributes inherit from specific versions
+, version, src
+, ...
+}:
+
+# We must build at least one type of libraries
+assert !enableShared -> enableStatic;
+
+with stdenv.lib;
+let
+
+  variant = concatStringsSep ","
+    (optional enableRelease "release" ++
+     optional enableDebug "debug");
+
+  threading = concatStringsSep ","
+    (optional enableSingleThreaded "single" ++
+     optional enableMultiThreaded "multi");
+
+  link = concatStringsSep ","
+    (optional enableShared "shared" ++
+     optional enableStatic "static");
+
+  runtime-link = if enableShared then "shared" else "static";
+
+  # To avoid library name collisions
+  layout = if taggedLayout then "tagged" else "system";
+
+  cflags = if enablePIC && enableExceptions then
+             "cflags=\"-fPIC -fexceptions\" cxxflags=-fPIC linkflags=-fPIC"
+           else if enablePIC then
+             "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC"
+           else if enableExceptions then
+             "cflags=-fexceptions"
+           else
+             "";
+
+  withToolset = stdenv.lib.optionalString (toolset != null) "--with-toolset=${toolset}";
+
+  genericB2Flags = [
+    "--includedir=$dev/include"
+    "--libdir=$lib/lib"
+    "-j$NIX_BUILD_CORES"
+    "--layout=${layout}"
+    "variant=${variant}"
+    "threading=${threading}"
+    "runtime-link=${runtime-link}"
+    "link=${link}"
+    "${cflags}"
+  ] ++ optional (variant == "release") "debug-symbols=off";
+
+  nativeB2Flags = [
+    "-sEXPAT_INCLUDE=${expat}/include"
+    "-sEXPAT_LIBPATH=${expat}/lib"
+  ] ++ optional (toolset != null) "toolset=${toolset}";
+  nativeB2Args = concatStringsSep " " (genericB2Flags ++ nativeB2Flags);
+
+  crossB2Flags = [
+    "-sEXPAT_INCLUDE=${expat.crossDrv}/include"
+    "-sEXPAT_LIBPATH=${expat.crossDrv}/lib"
+    "--user-config=user-config.jam"
+    "toolset=gcc-cross"
+    "--without-python"
+  ];
+  crossB2Args = concatMapStringsSep " " (genericB2Flags ++ crossB2Flags);
+
+  builder = b2Args: ''
+    ./b2 ${b2Args}
+  '';
+
+  installer = b2Args: ''
+    # boostbook is needed by some applications
+    mkdir -p $dev/share/boostbook
+    cp -a tools/boostbook/{xsl,dtd} $dev/share/boostbook/
+
+    # Let boost install everything else
+    ./b2 ${b2Args} install
+
+    # Create a derivation which encompasses everything, making buildInputs nicer
+    mkdir -p $out/nix-support
+    echo "${stripHeaderPathHook} $dev $lib" > $out/nix-support/propagated-native-build-inputs
+  '';
+
+  commonConfigureFlags = [
+    "--includedir=$(dev)/include"
+    "--libdir=$(lib)/lib"
+  ];
+
+  stripHeaderPathHook = makeSetupHook { } ./strip-header-path.sh;
+
+in
+
+stdenv.mkDerivation {
+  name = "boost-${version}";
+
+  inherit src;
+
+  meta = {
+    homepage = "http://boost.org/";
+    description = "Collection of C++ libraries";
+    license = "boost-license";
+
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ simons wkennington ];
+  };
+
+  preConfigure = ''
+    NIX_LDFLAGS="$(echo $NIX_LDFLAGS | sed "s,$out,$lib,g")"
+    if test -f tools/build/src/tools/clang-darwin.jam ; then
+        substituteInPlace tools/build/src/tools/clang-darwin.jam \
+          --replace '$(<[1]:D=)' "$lib/lib/\$(<[1]:D=)";
+    fi;
+  '';
+
+  NIX_CFLAGS_LINK = stdenv.lib.optionalString stdenv.isDarwin
+                      "-headerpad_max_install_names";
+
+  enableParallelBuilding = true;
+
+  buildInputs = [ icu expat zlib bzip2 python ]
+    ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  configureScript = "./bootstrap.sh";
+  configureFlags = commonConfigureFlags ++ [
+    "--with-icu=${icu}"
+    "--with-python=${python}/bin/python"
+  ] ++ optional (toolset != null) "--with-toolset=${toolset}";
+
+  buildPhase = ''
+    ${stdenv.lib.optionalString (toolset == "clang") "unset NIX_ENFORCE_PURITY"}
+  '' + builder nativeB2Args;
+
+  installPhase = installer nativeB2Args;
+
+  outputs = [ "out" "dev" "lib" ];
+
+  crossAttrs = rec {
+    buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
+    # all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
+    # override them.
+    propagatedBuildInputs = buildInputs;
+    # We want to substitute the contents of configureFlags, removing thus the
+    # usual --build and --host added on cross building.
+    preConfigure = ''
+      export configureFlags="--without-icu ${concatStringsSep " " commonConfigureFlags}"
+      set -x
+      cat << EOF > user-config.jam
+      using gcc : cross : $crossConfig-g++ ;
+      EOF
+    '';
+    buildPhase = builder crossB2Args;
+    installPhase = installer crossB2Args;
+  };
+}
diff --git a/pkgs/development/libraries/boost/strip-header-path.sh b/pkgs/development/libraries/boost/strip-header-path.sh
new file mode 100644
index 000000000000..f8243fc27be4
--- /dev/null
+++ b/pkgs/development/libraries/boost/strip-header-path.sh
@@ -0,0 +1,12 @@
+postPhases+=" boostHeaderStripPhase"
+
+boostHeaderStripPhase() {
+    runHook preBoostHeaderStrip
+    [ -z "$outputs" ] && outputs=out
+    for output in $outputs; do
+      eval "path=\$$outputs"
+      [ -d "$path/bin" ] || continue
+      find "$path/bin" -type f -exec sed -i "s,[^/]*\(-boost-[0-9.]*-dev\),xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\1,g" {} \;
+    done
+    runHook postBoostHeaderStrip
+}
diff --git a/pkgs/development/libraries/boost/time_utc.patch b/pkgs/development/libraries/boost/time_utc.patch
deleted file mode 100644
index 3585d0bfc6dd..000000000000
--- a/pkgs/development/libraries/boost/time_utc.patch
+++ /dev/null
@@ -1,320 +0,0 @@
-From: https://build.opensuse.org/package/view_file?file=boost-time_utc.patch&package=boost&project=Application%3AGeo
-
-From: https://svn.boost.org/trac/boost/changeset/78802
-
-Message:
-    Thread: fix TIME_UTC, WINVER, constexpr for tags, and don't use local files
-
-Only the TIME_UTC_ change is taken
- 
-Index: boost_1_49_0/boost/thread/xtime.hpp
-===================================================================
---- boost_1_49_0.orig/boost/thread/xtime.hpp
-+++ boost_1_49_0/boost/thread/xtime.hpp
-@@ -2,7 +2,7 @@
- // William E. Kempf
- // Copyright (C) 2007-8 Anthony Williams
- //
--//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
-+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
- //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- 
- #ifndef BOOST_XTIME_WEK070601_HPP
-@@ -20,7 +20,7 @@ namespace boost {
- 
- enum xtime_clock_types
- {
--    TIME_UTC=1
-+    TIME_UTC_=1
- //    TIME_TAI,
- //    TIME_MONOTONIC,
- //    TIME_PROCESS,
-@@ -53,14 +53,14 @@ struct xtime
-         boost::posix_time::microseconds((nsec+500)/1000);
- #endif
-     }
--    
-+
- };
- 
- inline xtime get_xtime(boost::system_time const& abs_time)
- {
-     xtime res;
-     boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0);
--            
-+
-     res.sec=static_cast<xtime::xtime_sec_t>(time_since_epoch.total_seconds());
-     res.nsec=static_cast<xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second()));
-     return res;
-@@ -68,7 +68,7 @@ inline xtime get_xtime(boost::system_tim
- 
- inline int xtime_get(struct xtime* xtp, int clock_type)
- {
--    if (clock_type == TIME_UTC)
-+    if (clock_type == TIME_UTC_)
-     {
-         *xtp=get_xtime(get_system_time());
-         return clock_type;
-@@ -81,7 +81,7 @@ inline int xtime_cmp(const xtime& xt1, c
- {
-     if (xt1.sec == xt2.sec)
-         return (int)(xt1.nsec - xt2.nsec);
--    else 
-+    else
-         return (xt1.sec > xt2.sec) ? 1 : -1;
- }
- 
-Index: boost_1_49_0/libs/thread/example/starvephil.cpp
-===================================================================
---- boost_1_49_0.orig/libs/thread/example/starvephil.cpp
-+++ boost_1_49_0/libs/thread/example/starvephil.cpp
-@@ -50,7 +50,7 @@ public:
-                       << "very hot ..." << std::endl;
-         }
-         boost::xtime xt;
--        boost::xtime_get(&xt, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         xt.sec += 3;
-         boost::thread::sleep(xt);
-         m_chickens += value;
-@@ -85,7 +85,7 @@ void chef()
-             std::cout << "(" << clock() << ") Chef: cooking ..." << std::endl;
-         }
-         boost::xtime xt;
--        boost::xtime_get(&xt, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         xt.sec += 2;
-         boost::thread::sleep(xt);
-         {
-@@ -111,7 +111,7 @@ struct phil
-             if (m_id > 0)
-             {
-                 boost::xtime xt;
--                boost::xtime_get(&xt, boost::TIME_UTC);
-+                boost::xtime_get(&xt, boost::TIME_UTC_);
-                 xt.sec += 3;
-                 boost::thread::sleep(xt);
-             }
-Index: boost_1_49_0/libs/thread/example/tennis.cpp
-===================================================================
---- boost_1_49_0.orig/libs/thread/example/tennis.cpp
-+++ boost_1_49_0/libs/thread/example/tennis.cpp
-@@ -1,7 +1,7 @@
- // Copyright (C) 2001-2003
- // William E. Kempf
- //
--//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
-+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
- //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- 
- #include <boost/thread/mutex.hpp>
-@@ -104,7 +104,7 @@ int main(int argc, char* argv[])
-     boost::thread thrdb(thread_adapter(&player, (void*)PLAYER_B));
- 
-     boost::xtime xt;
--    boost::xtime_get(&xt, boost::TIME_UTC);
-+    boost::xtime_get(&xt, boost::TIME_UTC_);
-     xt.sec += 1;
-     boost::thread::sleep(xt);
-     {
-Index: boost_1_49_0/libs/thread/example/thread.cpp
-===================================================================
---- boost_1_49_0.orig/libs/thread/example/thread.cpp
-+++ boost_1_49_0/libs/thread/example/thread.cpp
-@@ -14,7 +14,7 @@ struct thread_alarm
-     void operator()()
-     {
-         boost::xtime xt;
--        boost::xtime_get(&xt, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         xt.sec += m_secs;
- 
-         boost::thread::sleep(xt);
-Index: boost_1_49_0/libs/thread/example/xtime.cpp
-===================================================================
---- boost_1_49_0.orig/libs/thread/example/xtime.cpp
-+++ boost_1_49_0/libs/thread/example/xtime.cpp
-@@ -10,7 +10,7 @@
- int main(int argc, char* argv[])
- {
-     boost::xtime xt;
--    boost::xtime_get(&xt, boost::TIME_UTC);
-+    boost::xtime_get(&xt, boost::TIME_UTC_);
-     xt.sec += 1;
-     boost::thread::sleep(xt); // Sleep for 1 second
- }
-Index: boost_1_49_0/libs/thread/src/pthread/thread.cpp
-===================================================================
---- boost_1_49_0.orig/libs/thread/src/pthread/thread.cpp
-+++ boost_1_49_0/libs/thread/src/pthread/thread.cpp
-@@ -23,7 +23,7 @@
- #include <unistd.h>
- #endif
- 
--#include "timeconv.inl"
-+#include <libs/thread/src/pthread/timeconv.inl>
- 
- namespace boost
- {
-@@ -354,7 +354,7 @@ namespace boost
-                     cond.timed_wait(lock, xt);
- #   endif
-                     xtime cur;
--                    xtime_get(&cur, TIME_UTC);
-+                    xtime_get(&cur, TIME_UTC_);
-                     if (xtime_cmp(xt, cur) <= 0)
-                         return;
-                 }
-@@ -369,7 +369,7 @@ namespace boost
-             BOOST_VERIFY(!pthread_yield());
- #   else
-             xtime xt;
--            xtime_get(&xt, TIME_UTC);
-+            xtime_get(&xt, TIME_UTC_);
-             sleep(xt);
- #   endif
-         }
-Index: boost_1_49_0/libs/thread/src/pthread/timeconv.inl
-===================================================================
---- boost_1_49_0.orig/libs/thread/src/pthread/timeconv.inl
-+++ boost_1_49_0/libs/thread/src/pthread/timeconv.inl
-@@ -20,8 +20,8 @@ const int NANOSECONDS_PER_MICROSECOND =
- inline void to_time(int milliseconds, boost::xtime& xt)
- {
-     int res = 0;
--    res = boost::xtime_get(&xt, boost::TIME_UTC);
--    BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
-+    res = boost::xtime_get(&xt, boost::TIME_UTC_);
-+    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
- 
-     xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
-     xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
-@@ -56,8 +56,8 @@ inline void to_timespec_duration(const b
- {
-     boost::xtime cur;
-     int res = 0;
--    res = boost::xtime_get(&cur, boost::TIME_UTC);
--    BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
-+    res = boost::xtime_get(&cur, boost::TIME_UTC_);
-+    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
- 
-     if (boost::xtime_cmp(xt, cur) <= 0)
-     {
-@@ -87,8 +87,8 @@ inline void to_duration(boost::xtime xt,
- {
-     boost::xtime cur;
-     int res = 0;
--    res = boost::xtime_get(&cur, boost::TIME_UTC);
--    BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
-+    res = boost::xtime_get(&cur, boost::TIME_UTC_);
-+    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
- 
-     if (boost::xtime_cmp(xt, cur) <= 0)
-         milliseconds = 0;
-@@ -109,8 +109,8 @@ inline void to_microduration(boost::xtim
- {
-     boost::xtime cur;
-     int res = 0;
--    res = boost::xtime_get(&cur, boost::TIME_UTC);
--    BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
-+    res = boost::xtime_get(&cur, boost::TIME_UTC_);
-+    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
- 
-     if (boost::xtime_cmp(xt, cur) <= 0)
-         microseconds = 0;
-Index: boost_1_49_0/libs/thread/src/win32/timeconv.inl
-===================================================================
---- boost_1_49_0.orig/libs/thread/src/win32/timeconv.inl
-+++ boost_1_49_0/libs/thread/src/win32/timeconv.inl
-@@ -17,8 +17,8 @@ const int NANOSECONDS_PER_MICROSECOND =
- inline void to_time(int milliseconds, boost::xtime& xt)
- {
-     int res = 0;
--    res = boost::xtime_get(&xt, boost::TIME_UTC);
--    assert(res == boost::TIME_UTC);
-+    res = boost::xtime_get(&xt, boost::TIME_UTC_);
-+    assert(res == boost::TIME_UTC_);
- 
-     xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
-     xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
-@@ -54,8 +54,8 @@ inline void to_timespec_duration(const b
- {
-     boost::xtime cur;
-     int res = 0;
--    res = boost::xtime_get(&cur, boost::TIME_UTC);
--    assert(res == boost::TIME_UTC);
-+    res = boost::xtime_get(&cur, boost::TIME_UTC_);
-+    assert(res == boost::TIME_UTC_);
- 
-     if (boost::xtime_cmp(xt, cur) <= 0)
-     {
-@@ -85,8 +85,8 @@ inline void to_duration(boost::xtime xt,
- {
-     boost::xtime cur;
-     int res = 0;
--    res = boost::xtime_get(&cur, boost::TIME_UTC);
--    assert(res == boost::TIME_UTC);
-+    res = boost::xtime_get(&cur, boost::TIME_UTC_);
-+    assert(res == boost::TIME_UTC_);
- 
-     if (boost::xtime_cmp(xt, cur) <= 0)
-         milliseconds = 0;
-@@ -107,8 +107,8 @@ inline void to_microduration(boost::xtim
- {
-     boost::xtime cur;
-     int res = 0;
--    res = boost::xtime_get(&cur, boost::TIME_UTC);
--    assert(res == boost::TIME_UTC);
-+    res = boost::xtime_get(&cur, boost::TIME_UTC_);
-+    assert(res == boost::TIME_UTC_);
- 
-     if (boost::xtime_cmp(xt, cur) <= 0)
-         microseconds = 0;
-Index: boost_1_49_0/libs/thread/test/test_xtime.cpp
-===================================================================
---- boost_1_49_0.orig/libs/thread/test/test_xtime.cpp
-+++ boost_1_49_0/libs/thread/test/test_xtime.cpp
-@@ -17,8 +17,8 @@ void test_xtime_cmp()
- {
-     boost::xtime xt1, xt2, cur;
-     BOOST_CHECK_EQUAL(
--        boost::xtime_get(&cur, boost::TIME_UTC),
--        static_cast<int>(boost::TIME_UTC));
-+        boost::xtime_get(&cur, boost::TIME_UTC_),
-+        static_cast<int>(boost::TIME_UTC_));
- 
-     xt1 = xt2 = cur;
-     xt1.nsec -= 1;
-@@ -42,14 +42,14 @@ void test_xtime_get()
-     boost::xtime orig, cur, old;
-     BOOST_CHECK_EQUAL(
-         boost::xtime_get(&orig,
--            boost::TIME_UTC), static_cast<int>(boost::TIME_UTC));
-+            boost::TIME_UTC_), static_cast<int>(boost::TIME_UTC_));
-     old = orig;
- 
-     for (int x=0; x < 100; ++x)
-     {
-         BOOST_CHECK_EQUAL(
--            boost::xtime_get(&cur, boost::TIME_UTC),
--            static_cast<int>(boost::TIME_UTC));
-+            boost::xtime_get(&cur, boost::TIME_UTC_),
-+            static_cast<int>(boost::TIME_UTC_));
-         BOOST_CHECK(boost::xtime_cmp(cur, orig) >= 0);
-         BOOST_CHECK(boost::xtime_cmp(cur, old) >= 0);
-         old = cur;
-Index: boost_1_49_0/libs/thread/test/util.inl
-===================================================================
---- boost_1_49_0.orig/libs/thread/test/util.inl
-+++ boost_1_49_0/libs/thread/test/util.inl
-@@ -28,8 +28,8 @@ inline boost::xtime delay(int secs, int
-     const int NANOSECONDS_PER_MILLISECOND = 1000000;
- 
-     boost::xtime xt;
--    if (boost::TIME_UTC != boost::xtime_get (&xt, boost::TIME_UTC))
--        BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC");
-+    if (boost::TIME_UTC_ != boost::xtime_get (&xt, boost::TIME_UTC_))
-+        BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC_");
- 
-     nsecs += xt.nsec;
-     msecs += nsecs / NANOSECONDS_PER_MILLISECOND;
diff --git a/pkgs/development/libraries/boost/time_utc_144.patch b/pkgs/development/libraries/boost/time_utc_144.patch
deleted file mode 100644
index 512832c18295..000000000000
--- a/pkgs/development/libraries/boost/time_utc_144.patch
+++ /dev/null
@@ -1,520 +0,0 @@
-diff -rc boost_1_44_0/boost/thread/xtime.hpp boost_1_44_0-new/boost/thread/xtime.hpp
-*** boost_1_44_0/boost/thread/xtime.hpp	2008-06-18 15:01:08.000000000 +0200
---- boost_1_44_0-new/boost/thread/xtime.hpp	2013-04-12 14:00:27.125713549 +0200
-***************
-*** 20,26 ****
-  
-  enum xtime_clock_types
-  {
-!     TIME_UTC=1
-  //    TIME_TAI,
-  //    TIME_MONOTONIC,
-  //    TIME_PROCESS,
---- 20,26 ----
-  
-  enum xtime_clock_types
-  {
-!     TIME_UTC_=1
-  //    TIME_TAI,
-  //    TIME_MONOTONIC,
-  //    TIME_PROCESS,
-***************
-*** 68,74 ****
-  
-  inline int xtime_get(struct xtime* xtp, int clock_type)
-  {
-!     if (clock_type == TIME_UTC)
-      {
-          *xtp=get_xtime(get_system_time());
-          return clock_type;
---- 68,74 ----
-  
-  inline int xtime_get(struct xtime* xtp, int clock_type)
-  {
-!     if (clock_type == TIME_UTC_)
-      {
-          *xtp=get_xtime(get_system_time());
-          return clock_type;
-diff -rc boost_1_44_0/libs/interprocess/test/condition_test_template.hpp boost_1_44_0-new/libs/interprocess/test/condition_test_template.hpp
-*** boost_1_44_0/libs/interprocess/test/condition_test_template.hpp	2009-10-15 20:45:53.000000000 +0200
---- boost_1_44_0-new/libs/interprocess/test/condition_test_template.hpp	2013-04-12 14:00:20.215658855 +0200
-***************
-*** 49,56 ****
-      const int NANOSECONDS_PER_MILLISECOND = 1000000;
-  
-      boost::xtime xt;
-!     int ret = boost::xtime_get(&xt, boost::TIME_UTC);
-!     assert(ret == static_cast<int>(boost::TIME_UTC));(void)ret;
-      nsecs += xt.nsec;
-      msecs += nsecs / NANOSECONDS_PER_MILLISECOND;
-      secs += msecs / MILLISECONDS_PER_SECOND;
---- 49,56 ----
-      const int NANOSECONDS_PER_MILLISECOND = 1000000;
-  
-      boost::xtime xt;
-!     int ret = boost::xtime_get(&xt, boost::TIME_UTC_);
-!     assert(ret == static_cast<int>(boost::TIME_UTC_));(void)ret;
-      nsecs += xt.nsec;
-      msecs += nsecs / NANOSECONDS_PER_MILLISECOND;
-      secs += msecs / MILLISECONDS_PER_SECOND;
-diff -rc boost_1_44_0/libs/interprocess/test/util.hpp boost_1_44_0-new/libs/interprocess/test/util.hpp
-*** boost_1_44_0/libs/interprocess/test/util.hpp	2009-10-15 20:45:53.000000000 +0200
---- boost_1_44_0-new/libs/interprocess/test/util.hpp	2013-04-12 14:00:20.219658887 +0200
-***************
-*** 71,77 ****
-  boost::xtime xsecs(int secs)
-  {
-     boost::xtime ret;
-!    boost::xtime_get(&ret, boost::TIME_UTC);
-     ret.sec += secs;
-     return ret;
-  }
---- 71,77 ----
-  boost::xtime xsecs(int secs)
-  {
-     boost::xtime ret;
-!    boost::xtime_get(&ret, boost::TIME_UTC_);
-     ret.sec += secs;
-     return ret;
-  }
-diff -rc boost_1_44_0/libs/spirit/classic/test/grammar_mt_tests.cpp boost_1_44_0-new/libs/spirit/classic/test/grammar_mt_tests.cpp
-*** boost_1_44_0/libs/spirit/classic/test/grammar_mt_tests.cpp	2008-06-22 17:05:38.000000000 +0200
---- boost_1_44_0-new/libs/spirit/classic/test/grammar_mt_tests.cpp	2013-04-12 14:00:18.836647940 +0200
-***************
-*** 70,76 ****
-  {
-      static long const nanoseconds_per_second = 1000L*1000L*1000L;
-      boost::xtime xt;
-!     boost::xtime_get(&xt, boost::TIME_UTC);
-      xt.nsec+=1000*1000*milliseconds;
-      while (xt.nsec > nanoseconds_per_second)
-      {
---- 70,76 ----
-  {
-      static long const nanoseconds_per_second = 1000L*1000L*1000L;
-      boost::xtime xt;
-!     boost::xtime_get(&xt, boost::TIME_UTC_);
-      xt.nsec+=1000*1000*milliseconds;
-      while (xt.nsec > nanoseconds_per_second)
-      {
-diff -rc boost_1_44_0/libs/spirit/classic/test/owi_mt_tests.cpp boost_1_44_0-new/libs/spirit/classic/test/owi_mt_tests.cpp
-*** boost_1_44_0/libs/spirit/classic/test/owi_mt_tests.cpp	2008-06-22 17:05:38.000000000 +0200
---- boost_1_44_0-new/libs/spirit/classic/test/owi_mt_tests.cpp	2013-04-12 14:00:18.836647940 +0200
-***************
-*** 86,92 ****
-              return test_size;
-  
-          boost::xtime now;
-!         boost::xtime_get(&now, boost::TIME_UTC);
-          unsigned long seconds = now.sec - start_time.sec;
-          if (seconds < 4)
-          {
---- 86,92 ----
-              return test_size;
-  
-          boost::xtime now;
-!         boost::xtime_get(&now, boost::TIME_UTC_);
-          unsigned long seconds = now.sec - start_time.sec;
-          if (seconds < 4)
-          {
-***************
-*** 187,193 ****
-  void concurrent_creation_of_objects()
-  {
-      {
-!         boost::xtime_get(&start_time, boost::TIME_UTC);
-          boost::thread thread1(callable_ref(test1));
-          boost::thread thread2(callable_ref(test2));
-          boost::thread thread3(callable_ref(test3));
---- 187,193 ----
-  void concurrent_creation_of_objects()
-  {
-      {
-!         boost::xtime_get(&start_time, boost::TIME_UTC_);
-          boost::thread thread1(callable_ref(test1));
-          boost::thread thread2(callable_ref(test2));
-          boost::thread thread3(callable_ref(test3));
-diff -rc boost_1_44_0/libs/thread/example/starvephil.cpp boost_1_44_0-new/libs/thread/example/starvephil.cpp
-*** boost_1_44_0/libs/thread/example/starvephil.cpp	2006-09-14 23:51:01.000000000 +0200
---- boost_1_44_0-new/libs/thread/example/starvephil.cpp	2013-04-12 14:00:19.413652507 +0200
-***************
-*** 50,56 ****
-                        << "very hot ..." << std::endl;
-          }
-          boost::xtime xt;
-!         boost::xtime_get(&xt, boost::TIME_UTC);
-          xt.sec += 3;
-          boost::thread::sleep(xt);
-          m_chickens += value;
---- 50,56 ----
-                        << "very hot ..." << std::endl;
-          }
-          boost::xtime xt;
-!         boost::xtime_get(&xt, boost::TIME_UTC_);
-          xt.sec += 3;
-          boost::thread::sleep(xt);
-          m_chickens += value;
-***************
-*** 85,91 ****
-              std::cout << "(" << clock() << ") Chef: cooking ..." << std::endl;
-          }
-          boost::xtime xt;
-!         boost::xtime_get(&xt, boost::TIME_UTC);
-          xt.sec += 2;
-          boost::thread::sleep(xt);
-          {
---- 85,91 ----
-              std::cout << "(" << clock() << ") Chef: cooking ..." << std::endl;
-          }
-          boost::xtime xt;
-!         boost::xtime_get(&xt, boost::TIME_UTC_);
-          xt.sec += 2;
-          boost::thread::sleep(xt);
-          {
-***************
-*** 111,117 ****
-              if (m_id > 0)
-              {
-                  boost::xtime xt;
-!                 boost::xtime_get(&xt, boost::TIME_UTC);
-                  xt.sec += 3;
-                  boost::thread::sleep(xt);
-              }
---- 111,117 ----
-              if (m_id > 0)
-              {
-                  boost::xtime xt;
-!                 boost::xtime_get(&xt, boost::TIME_UTC_);
-                  xt.sec += 3;
-                  boost::thread::sleep(xt);
-              }
-diff -rc boost_1_44_0/libs/thread/example/tennis.cpp boost_1_44_0-new/libs/thread/example/tennis.cpp
-*** boost_1_44_0/libs/thread/example/tennis.cpp	2009-10-19 11:18:13.000000000 +0200
---- boost_1_44_0-new/libs/thread/example/tennis.cpp	2013-04-12 14:00:19.412652499 +0200
-***************
-*** 104,110 ****
-      boost::thread thrdb(thread_adapter(&player, (void*)PLAYER_B));
-  
-      boost::xtime xt;
-!     boost::xtime_get(&xt, boost::TIME_UTC);
-      xt.sec += 1;
-      boost::thread::sleep(xt);
-      {
---- 104,110 ----
-      boost::thread thrdb(thread_adapter(&player, (void*)PLAYER_B));
-  
-      boost::xtime xt;
-!     boost::xtime_get(&xt, boost::TIME_UTC_);
-      xt.sec += 1;
-      boost::thread::sleep(xt);
-      {
-diff -rc boost_1_44_0/libs/thread/example/thread.cpp boost_1_44_0-new/libs/thread/example/thread.cpp
-*** boost_1_44_0/libs/thread/example/thread.cpp	2006-09-14 23:51:01.000000000 +0200
---- boost_1_44_0-new/libs/thread/example/thread.cpp	2013-04-12 14:00:19.414652515 +0200
-***************
-*** 14,20 ****
-      void operator()()
-      {
-          boost::xtime xt;
-!         boost::xtime_get(&xt, boost::TIME_UTC);
-          xt.sec += m_secs;
-  
-          boost::thread::sleep(xt);
---- 14,20 ----
-      void operator()()
-      {
-          boost::xtime xt;
-!         boost::xtime_get(&xt, boost::TIME_UTC_);
-          xt.sec += m_secs;
-  
-          boost::thread::sleep(xt);
-diff -rc boost_1_44_0/libs/thread/example/xtime.cpp boost_1_44_0-new/libs/thread/example/xtime.cpp
-*** boost_1_44_0/libs/thread/example/xtime.cpp	2006-09-14 23:51:01.000000000 +0200
---- boost_1_44_0-new/libs/thread/example/xtime.cpp	2013-04-12 14:00:19.413652507 +0200
-***************
-*** 10,16 ****
-  int main(int argc, char* argv[])
-  {
-      boost::xtime xt;
-!     boost::xtime_get(&xt, boost::TIME_UTC);
-      xt.sec += 1;
-      boost::thread::sleep(xt); // Sleep for 1 second
-  }
---- 10,16 ----
-  int main(int argc, char* argv[])
-  {
-      boost::xtime xt;
-!     boost::xtime_get(&xt, boost::TIME_UTC_);
-      xt.sec += 1;
-      boost::thread::sleep(xt); // Sleep for 1 second
-  }
-diff -rc boost_1_44_0/libs/thread/src/pthread/thread.cpp boost_1_44_0-new/libs/thread/src/pthread/thread.cpp
-*** boost_1_44_0/libs/thread/src/pthread/thread.cpp	2010-07-09 21:13:09.000000000 +0200
---- boost_1_44_0-new/libs/thread/src/pthread/thread.cpp	2013-04-12 14:00:19.415652523 +0200
-***************
-*** 350,356 ****
-                      cond.timed_wait(lock, xt);
-  #   endif
-                      xtime cur;
-!                     xtime_get(&cur, TIME_UTC);
-                      if (xtime_cmp(xt, cur) <= 0)
-                          return;
-                  }
---- 350,356 ----
-                      cond.timed_wait(lock, xt);
-  #   endif
-                      xtime cur;
-!                     xtime_get(&cur, TIME_UTC_);
-                      if (xtime_cmp(xt, cur) <= 0)
-                          return;
-                  }
-***************
-*** 365,371 ****
-              BOOST_VERIFY(!pthread_yield());
-  #   else
-              xtime xt;
-!             xtime_get(&xt, TIME_UTC);
-              sleep(xt);
-  #   endif
-          }
---- 365,371 ----
-              BOOST_VERIFY(!pthread_yield());
-  #   else
-              xtime xt;
-!             xtime_get(&xt, TIME_UTC_);
-              sleep(xt);
-  #   endif
-          }
-diff -rc boost_1_44_0/libs/thread/src/pthread/timeconv.inl boost_1_44_0-new/libs/thread/src/pthread/timeconv.inl
-*** boost_1_44_0/libs/thread/src/pthread/timeconv.inl	2010-04-01 17:04:15.000000000 +0200
---- boost_1_44_0-new/libs/thread/src/pthread/timeconv.inl	2013-04-12 14:00:19.414652515 +0200
-***************
-*** 20,27 ****
-  inline void to_time(int milliseconds, boost::xtime& xt)
-  {
-      int res = 0;
-!     res = boost::xtime_get(&xt, boost::TIME_UTC);
-!     BOOST_ASSERT(res == boost::TIME_UTC);
-  
-      xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
-      xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
---- 20,27 ----
-  inline void to_time(int milliseconds, boost::xtime& xt)
-  {
-      int res = 0;
-!     res = boost::xtime_get(&xt, boost::TIME_UTC_);
-!     BOOST_ASSERT(res == boost::TIME_UTC_);
-  
-      xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
-      xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
-***************
-*** 57,64 ****
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC);
-!     BOOST_ASSERT(res == boost::TIME_UTC);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-      {
---- 57,64 ----
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC_);
-!     BOOST_ASSERT(res == boost::TIME_UTC_);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-      {
-***************
-*** 88,95 ****
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC);
-!     BOOST_ASSERT(res == boost::TIME_UTC);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-          milliseconds = 0;
---- 88,95 ----
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC_);
-!     BOOST_ASSERT(res == boost::TIME_UTC_);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-          milliseconds = 0;
-***************
-*** 110,117 ****
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC);
-!     BOOST_ASSERT(res == boost::TIME_UTC);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-          microseconds = 0;
---- 110,117 ----
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC_);
-!     BOOST_ASSERT(res == boost::TIME_UTC_);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-          microseconds = 0;
-diff -rc boost_1_44_0/libs/thread/src/win32/timeconv.inl boost_1_44_0-new/libs/thread/src/win32/timeconv.inl
-*** boost_1_44_0/libs/thread/src/win32/timeconv.inl	2007-11-25 19:38:02.000000000 +0100
---- boost_1_44_0-new/libs/thread/src/win32/timeconv.inl	2013-04-12 14:00:19.416652531 +0200
-***************
-*** 17,24 ****
-  inline void to_time(int milliseconds, boost::xtime& xt)
-  {
-      int res = 0;
-!     res = boost::xtime_get(&xt, boost::TIME_UTC);
-!     assert(res == boost::TIME_UTC);
-  
-      xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
-      xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
---- 17,24 ----
-  inline void to_time(int milliseconds, boost::xtime& xt)
-  {
-      int res = 0;
-!     res = boost::xtime_get(&xt, boost::TIME_UTC_);
-!     assert(res == boost::TIME_UTC_);
-  
-      xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
-      xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
-***************
-*** 54,61 ****
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC);
-!     assert(res == boost::TIME_UTC);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-      {
---- 54,61 ----
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC_);
-!     assert(res == boost::TIME_UTC_);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-      {
-***************
-*** 85,92 ****
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC);
-!     assert(res == boost::TIME_UTC);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-          milliseconds = 0;
---- 85,92 ----
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC_);
-!     assert(res == boost::TIME_UTC_);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-          milliseconds = 0;
-***************
-*** 107,114 ****
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC);
-!     assert(res == boost::TIME_UTC);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-          microseconds = 0;
---- 107,114 ----
-  {
-      boost::xtime cur;
-      int res = 0;
-!     res = boost::xtime_get(&cur, boost::TIME_UTC_);
-!     assert(res == boost::TIME_UTC_);
-  
-      if (boost::xtime_cmp(xt, cur) <= 0)
-          microseconds = 0;
-diff -rc boost_1_44_0/libs/thread/test/test_xtime.cpp boost_1_44_0-new/libs/thread/test/test_xtime.cpp
-*** boost_1_44_0/libs/thread/test/test_xtime.cpp	2008-07-08 09:44:55.000000000 +0200
---- boost_1_44_0-new/libs/thread/test/test_xtime.cpp	2013-04-12 14:00:19.432652657 +0200
-***************
-*** 17,24 ****
-  {
-      boost::xtime xt1, xt2, cur;
-      BOOST_CHECK_EQUAL(
-!         boost::xtime_get(&cur, boost::TIME_UTC),
-!         static_cast<int>(boost::TIME_UTC));
-  
-      xt1 = xt2 = cur;
-      xt1.nsec -= 1;
---- 17,24 ----
-  {
-      boost::xtime xt1, xt2, cur;
-      BOOST_CHECK_EQUAL(
-!         boost::xtime_get(&cur, boost::TIME_UTC_),
-!         static_cast<int>(boost::TIME_UTC_));
-  
-      xt1 = xt2 = cur;
-      xt1.nsec -= 1;
-***************
-*** 42,55 ****
-      boost::xtime orig, cur, old;
-      BOOST_CHECK_EQUAL(
-          boost::xtime_get(&orig,
-!             boost::TIME_UTC), static_cast<int>(boost::TIME_UTC));
-      old = orig;
-  
-      for (int x=0; x < 100; ++x)
-      {
-          BOOST_CHECK_EQUAL(
-!             boost::xtime_get(&cur, boost::TIME_UTC),
-!             static_cast<int>(boost::TIME_UTC));
-          BOOST_CHECK(boost::xtime_cmp(cur, orig) >= 0);
-          BOOST_CHECK(boost::xtime_cmp(cur, old) >= 0);
-          old = cur;
---- 42,55 ----
-      boost::xtime orig, cur, old;
-      BOOST_CHECK_EQUAL(
-          boost::xtime_get(&orig,
-!             boost::TIME_UTC_), static_cast<int>(boost::TIME_UTC));
-      old = orig;
-  
-      for (int x=0; x < 100; ++x)
-      {
-          BOOST_CHECK_EQUAL(
-!             boost::xtime_get(&cur, boost::TIME_UTC_),
-!             static_cast<int>(boost::TIME_UTC_));
-          BOOST_CHECK(boost::xtime_cmp(cur, orig) >= 0);
-          BOOST_CHECK(boost::xtime_cmp(cur, old) >= 0);
-          old = cur;
-diff -rc boost_1_44_0/libs/thread/test/util.inl boost_1_44_0-new/libs/thread/test/util.inl
-*** boost_1_44_0/libs/thread/test/util.inl	2008-11-03 23:29:39.000000000 +0100
---- boost_1_44_0-new/libs/thread/test/util.inl	2013-04-12 14:00:19.433652665 +0200
-***************
-*** 28,35 ****
-      const int NANOSECONDS_PER_MILLISECOND = 1000000;
-  
-      boost::xtime xt;
-!     if (boost::TIME_UTC != boost::xtime_get (&xt, boost::TIME_UTC))
-!         BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC");
-  
-      nsecs += xt.nsec;
-      msecs += nsecs / NANOSECONDS_PER_MILLISECOND;
---- 28,35 ----
-      const int NANOSECONDS_PER_MILLISECOND = 1000000;
-  
-      boost::xtime xt;
-!     if (boost::TIME_UTC_ != boost::xtime_get (&xt, boost::TIME_UTC))
-!         BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC_");
-  
-      nsecs += xt.nsec;
-      msecs += nsecs / NANOSECONDS_PER_MILLISECOND;
diff --git a/pkgs/development/libraries/botan/default.nix b/pkgs/development/libraries/botan/default.nix
index e603b904ddac..fc56d630837c 100644
--- a/pkgs/development/libraries/botan/default.nix
+++ b/pkgs/development/libraries/botan/default.nix
@@ -1,59 +1,7 @@
-x@{builderDefsPackage
-  , python
-  , bzip2, zlib, gmp, openssl
-  , boost
-  , ...}:
-builderDefsPackage
-(a :  
-let 
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
-    [];
+{ callPackage, ... } @ args:
 
-  buildInputs = [ boost.lib ]
-    ++ map (n: builtins.getAttr n x)
-      (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-  sourceInfo = rec {
-    baseName="botan";
-    tarBaseName="Botan";
-    baseVersion = "1.10";
-    revision = "8";
-    version="${baseVersion}.${revision}";
-    name="${baseName}-${version}";
-    url="http://files.randombit.net/${baseName}/v${baseVersion}/${tarBaseName}-${version}.tbz";
-    hash = "182f316rbdd6jrqn92vjms3jyb9syn4ic0nzi3b7rfjbj3zdabxw";
-  };
-in
-rec {
-  src = a.fetchurl {
-    url = sourceInfo.url;
-    sha256 = sourceInfo.hash;
-  };
-
-  inherit (sourceInfo) name version;
-  inherit buildInputs;
-
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doConfigure" "doMakeInstall" "fixPkgConfig"];
-  configureCommand = "python configure.py --with-gnump --with-bzip2 --with-zlib --with-openssl --with-tr1-implementation=boost";
-
-  fixPkgConfig = a.fullDepEntry ''
-    cd "$out"/lib/pkgconfig
-    ln -s botan-*.pc botan.pc || true
-  '' ["minInit" "doMakeInstall"];
-      
-  meta = {
-    description = "Cryptographic algorithms library";
-    maintainers = with a.lib.maintainers;
-    [
-      raskin
-    ];
-    platforms = with a.lib.platforms;
-      unix;
-    inherit version;
-  };
-  passthru = {
-    updateInfo = {
-      downloadPage = "http://files.randombit.net/botan/";
-    };
-  };
-}) x
+callPackage ./generic.nix (args // {
+  baseVersion = "1.10";
+  revision = "8";
+  sha256 = "182f316rbdd6jrqn92vjms3jyb9syn4ic0nzi3b7rfjbj3zdabxw";
+})
diff --git a/pkgs/development/libraries/botan/generic.nix b/pkgs/development/libraries/botan/generic.nix
new file mode 100644
index 000000000000..3fe8d1da7299
--- /dev/null
+++ b/pkgs/development/libraries/botan/generic.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, python, bzip2, zlib, gmp, openssl, boost
+# Passed by version specific builders
+, baseVersion, revision, sha256
+, ...
+}:
+
+stdenv.mkDerivation rec {
+  name = "botan-${version}";
+  version = "${baseVersion}.${revision}";
+
+  src = fetchurl {
+    name = "Botan-${version}.tar.bz2";
+    url = "http://files.randombit.net/botan/v${baseVersion}/Botan-${version}.tbz";
+    inherit sha256;
+  };
+
+  buildInputs = [ python bzip2 zlib gmp openssl boost ];
+
+  configurePhase = ''
+    python configure.py --prefix=$out --with-gnump --with-bzip2 --with-zlib --with-openssl
+  '';
+
+  postInstall = ''
+    cd "$out"/lib/pkgconfig
+    ln -s botan-*.pc botan.pc || true
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Cryptographic algorithms library";
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.unix;
+    license = licenses.bsd2;
+  };
+  passthru.updateInfo.downloadPage = "http://files.randombit.net/botan/";
+}
diff --git a/pkgs/development/libraries/botan/unstable.nix b/pkgs/development/libraries/botan/unstable.nix
index be541a1d8ec3..5b3a8720bfee 100644
--- a/pkgs/development/libraries/botan/unstable.nix
+++ b/pkgs/development/libraries/botan/unstable.nix
@@ -1,59 +1,7 @@
-x@{builderDefsPackage
-  , python
-  , bzip2, zlib, gmp, openssl
-  , boost
-  , ...}:
-builderDefsPackage
-(a :
-let
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
-    [];
+{ callPackage, ... } @ args:
 
-  buildInputs = [ boost.lib ]
-    ++ map (n: builtins.getAttr n x)
-      (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-  sourceInfo = rec {
-    baseName="botan";
-    tarBaseName="Botan";
-    baseVersion = "1.11";
-    revision = "9";
-    version="${baseVersion}.${revision}";
-    name="${baseName}-${version}";
-    url="http://files.randombit.net/${baseName}/v${baseVersion}/${tarBaseName}-${version}.tbz";
-    hash = "0jgx5va042gmr6nc91p5dd59wnfxlz19mz2nnyv74pvwwmizs09m";
-  };
-in
-rec {
-  src = a.fetchurl {
-    url = sourceInfo.url;
-    sha256 = sourceInfo.hash;
-  };
-
-  inherit (sourceInfo) name version;
-  inherit buildInputs;
-
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doConfigure" "doMakeInstall" "fixPkgConfig"];
-  configureCommand = "python configure.py --with-gnump --with-bzip2 --with-zlib --with-openssl";
-
-  fixPkgConfig = a.fullDepEntry ''
-    cd "$out"/lib/pkgconfig
-    ln -s botan-*.pc botan.pc || true
-  '' ["minInit" "doMakeInstall"];
-
-  meta = {
-    description = "Cryptographic algorithms library";
-    maintainers = with a.lib.maintainers;
-    [
-      raskin
-    ];
-    platforms = with a.lib.platforms;
-      unix;
-    inherit version;
-  };
-  passthru = {
-    updateInfo = {
-      downloadPage = "http://files.randombit.net/botan/";
-    };
-  };
-}) x
+callPackage ./generic.nix (args // {
+  baseVersion = "1.11";
+  revision = "9";
+  sha256 = "0jgx5va042gmr6nc91p5dd59wnfxlz19mz2nnyv74pvwwmizs09m";
+})
diff --git a/pkgs/development/libraries/cpp-netlib/default.nix b/pkgs/development/libraries/cpp-netlib/default.nix
index 3ce9dc38b3c1..2f088b4d3044 100644
--- a/pkgs/development/libraries/cpp-netlib/default.nix
+++ b/pkgs/development/libraries/cpp-netlib/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     md5 = "0765cf203f451394df98e6ddf7bf2541";
   };
 
-  buildInputs = [ cmake boost boost.lib openssl ];
+  buildInputs = [ cmake boost openssl ];
 
   cmakeFlags = [ "-DCPP-NETLIB_BUILD_SHARED_LIBS=ON" "-DCMAKE_BUILD_TYPE=RELEASE" ];
 
diff --git a/pkgs/development/libraries/exempi/default.nix b/pkgs/development/libraries/exempi/default.nix
index 4fb184f8d605..e941f0f65476 100644
--- a/pkgs/development/libraries/exempi/default.nix
+++ b/pkgs/development/libraries/exempi/default.nix
@@ -8,9 +8,9 @@ stdenv.mkDerivation rec {
     sha256 = "01vcd1mfn2s0iiq2cjyzgvnxx6kcq9cwra1iipijhs0vwvjx0yhf";
   };
 
-  configureFlags = [ "--with-boost=${boost}" ];
+  configureFlags = [ "--with-boost=${boost.dev}" ];
 
-  buildInputs = [ expat zlib boost boost.lib ];
+  buildInputs = [ expat zlib boost ];
 
   meta = with stdenv.lib; {
     homepage = http://libopenraw.freedesktop.org/wiki/Exempi/;
diff --git a/pkgs/development/libraries/ffmpeg/2.x.nix b/pkgs/development/libraries/ffmpeg/2.x.nix
index 3c712f320840..912db6f261df 100644
--- a/pkgs/development/libraries/ffmpeg/2.x.nix
+++ b/pkgs/development/libraries/ffmpeg/2.x.nix
@@ -5,12 +5,12 @@
 }:
 
 stdenv.mkDerivation rec {
-  version = "2.4.2";
+  version = "2.4.3";
   name = "ffmpeg-${version}";
 
   src = fetchurl {
     url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
-    sha256 = "0zps80jyjvkmgmjvp9s7drbddr820hcw4w5r78hkbs5xsylr0kwp";
+    sha256 = "00p6qi7kwc2rv7h98bczrdssa7nbda3fpz7avjwl77jg1qy3wp6a";
   };
 
   subtitleSupport = config.ffmpeg.subtitle or true;
diff --git a/pkgs/development/libraries/fox/fox-1.6.nix b/pkgs/development/libraries/fox/fox-1.6.nix
index 2fe104e849fd..604fe3c2fdf0 100644
--- a/pkgs/development/libraries/fox/fox-1.6.nix
+++ b/pkgs/development/libraries/fox/fox-1.6.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   meta = {
+    branch = "1.6";
     description = "FOX is a C++ based class library for building Graphical User Interfaces";
     longDescription = ''
         FOX stands for Free Objects for X.
diff --git a/pkgs/development/libraries/gegl/0_0_22.nix b/pkgs/development/libraries/gegl/0_0_22.nix
deleted file mode 100644
index 3f9a619ff6a1..000000000000
--- a/pkgs/development/libraries/gegl/0_0_22.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, glib, babl_0_0_22, libpng, cairo, libjpeg
-, librsvg, pango, gtk }:
-
-stdenv.mkDerivation {
-  name = "gegl-0.0.22";
-
-  src = fetchurl {
-    url = ftp://ftp.gimp.org/pub/gegl/0.0/gegl-0.0.22.tar.bz2;
-    sha256 = "0nx6r9amzhw5d2ghlw3z8qnry18rwz1ymvl2cm31b8p49z436wl5";
-  };
-
-  configureFlags = "--disable-docs"; # needs fonts otherwise  don't know how to pass them
-
-  buildInputs = [ pkgconfig glib babl_0_0_22 libpng cairo libjpeg librsvg pango gtk ];
-
-  meta = {
-    description = "Graph-based image processing framework";
-    homepage = http://www.gegl.org;
-    license = stdenv.lib.licenses.gpl3;
-  };
-}
diff --git a/pkgs/development/libraries/geoclue/2.0.nix b/pkgs/development/libraries/geoclue/2.0.nix
index 5ab9cb62443d..88d9837d5975 100644
--- a/pkgs/development/libraries/geoclue/2.0.nix
+++ b/pkgs/development/libraries/geoclue/2.0.nix
@@ -3,11 +3,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "geoclue-2.1.9";
+  name = "geoclue-2.1.10";
 
   src = fetchurl {
     url = "http://www.freedesktop.org/software/geoclue/releases/2.1/${name}.tar.xz";
-    sha256 = "0aq9fqlvvc8jqbshp3mbcc1j5hq4fzjy8hd1yxcl6xrd0jkfw5ml";
+    sha256 = "0s0ws2bx5g1cbjamxmm448r4n4crha2fwpzm8zbx6cq6qslygmzi";
   };
 
   buildInputs =
diff --git a/pkgs/development/libraries/gmp/4.3.2.nix b/pkgs/development/libraries/gmp/4.3.2.nix
index e9cfda032b17..aabb79d27a97 100644
--- a/pkgs/development/libraries/gmp/4.3.2.nix
+++ b/pkgs/development/libraries/gmp/4.3.2.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
   doCheck = false;
 
   meta = {
+    branch = "4";
     description = "GNU multiple precision arithmetic library";
 
     longDescription =
diff --git a/pkgs/development/libraries/gvfs/default.nix b/pkgs/development/libraries/gvfs/default.nix
index 0cd8e19cee92..739b0ad3136a 100644
--- a/pkgs/development/libraries/gvfs/default.nix
+++ b/pkgs/development/libraries/gvfs/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, pkgconfig, intltool, libtool
 , glib, dbus, udev, udisks2, libgcrypt
 , libgphoto2, avahi, libarchive, fuse, libcdio
-, libxml2, libxslt, docbook_xsl, samba
+, libxml2, libxslt, docbook_xsl, samba, libmtp
 , gnomeSupport ? false, gnome,libgnome_keyring, gconf, makeWrapper }:
 
 let
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ makeWrapper glib dbus.libs udev udisks2 libgcrypt
       libgphoto2 avahi libarchive fuse libcdio
-      libxml2 libxslt docbook_xsl samba
+      libxml2 libxslt docbook_xsl samba libmtp
       # ToDo: a ligther version of libsoup to have FTP/HTTP support?
     ] ++ stdenv.lib.optionals gnomeSupport (with gnome; [
       gtk libsoup libgnome_keyring gconf
diff --git a/pkgs/development/libraries/haskell/cairo/0.12.5.3.nix b/pkgs/development/libraries/haskell/cairo/0.12.5.3.nix
new file mode 100644
index 000000000000..5ff7b64d2ea4
--- /dev/null
+++ b/pkgs/development/libraries/haskell/cairo/0.12.5.3.nix
@@ -0,0 +1,22 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, cairo, gtk2hsBuildtools, libc, mtl, pkgconfig, utf8String
+, zlib
+}:
+
+cabal.mkDerivation (self: {
+  pname = "cairo";
+  version = "0.12.5.3";
+  sha256 = "1g5wn7dzz8cc7my09igr284j96d795jlnmy1q2hhlvssfhwbbvg7";
+  buildDepends = [ mtl utf8String ];
+  buildTools = [ gtk2hsBuildtools ];
+  extraLibraries = [ cairo libc pkgconfig zlib ];
+  pkgconfigDepends = [ cairo ];
+  meta = {
+    homepage = "http://projects.haskell.org/gtk2hs/";
+    description = "Binding to the Cairo library";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/cairo/default.nix b/pkgs/development/libraries/haskell/cairo/0.13.0.4.nix
index 10eedda6f24d..10eedda6f24d 100644
--- a/pkgs/development/libraries/haskell/cairo/default.nix
+++ b/pkgs/development/libraries/haskell/cairo/0.13.0.4.nix
diff --git a/pkgs/development/libraries/haskell/ghc-mod/default.nix b/pkgs/development/libraries/haskell/ghc-mod/default.nix
index 24f3e45b488f..93a3d895e366 100644
--- a/pkgs/development/libraries/haskell/ghc-mod/default.nix
+++ b/pkgs/development/libraries/haskell/ghc-mod/default.nix
@@ -9,8 +9,8 @@
 
 cabal.mkDerivation (self: {
   pname = "ghc-mod";
-  version = "5.2.0.0";
-  sha256 = "1zwdr3zlnc8d49d6jrvj2yrfnamp1120gffzd6vfxqgvapk71vfk";
+  version = "5.2.1.1";
+  sha256 = "09dg54970s4n54xxmalr5a2g4r5jnwccl9984shmmv0vsr3h5k26";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/glib/0.12.5.4.nix b/pkgs/development/libraries/haskell/glib/0.12.5.4.nix
new file mode 100644
index 000000000000..c819af766c22
--- /dev/null
+++ b/pkgs/development/libraries/haskell/glib/0.12.5.4.nix
@@ -0,0 +1,21 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, glib, gtk2hsBuildtools, libc, pkgconfig, utf8String
+}:
+
+cabal.mkDerivation (self: {
+  pname = "glib";
+  version = "0.12.5.4";
+  sha256 = "1jbqfcsmsghq67lwnk6yifs34lxvh6xfbzxzfryalifb4zglccz6";
+  buildDepends = [ utf8String ];
+  buildTools = [ gtk2hsBuildtools ];
+  extraLibraries = [ libc pkgconfig ];
+  pkgconfigDepends = [ glib ];
+  patches = self.stdenv.lib.optionals self.stdenv.isDarwin [ ./gtk2hs.patch ];
+  meta = {
+    homepage = "http://projects.haskell.org/gtk2hs/";
+    description = "Binding to the GLIB library for Gtk2Hs";
+    license = self.stdenv.lib.licenses.lgpl21;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/glib/default.nix b/pkgs/development/libraries/haskell/glib/0.13.0.5.nix
index 1229b7c8506e..1229b7c8506e 100644
--- a/pkgs/development/libraries/haskell/glib/default.nix
+++ b/pkgs/development/libraries/haskell/glib/0.13.0.5.nix
diff --git a/pkgs/development/libraries/haskell/glib/gtk2hs.patch b/pkgs/development/libraries/haskell/glib/gtk2hs.patch
new file mode 100644
index 000000000000..210cf2eb571a
--- /dev/null
+++ b/pkgs/development/libraries/haskell/glib/gtk2hs.patch
@@ -0,0 +1,15 @@
+Author: Hamish Mackenzie <Hamish.K.Mackenzie@googlemail.com>
+Date:   Mon Jul 7 21:28:50 2014 +1200
+
+    Fixes #1
+
+--- a/glib.cabal.orig	2014-11-03 14:52:40.000000000 -0600
++++ b/glib.cabal	2014-11-03 14:52:51.000000000 -0600
+@@ -36,6 +36,7 @@
+                         utf8-string >= 0.2 && < 0.4,
+                         containers
+         build-tools:    gtk2hsC2hs >= 0.13.8
++        cpp-options:    -U__BLOCKS__ -D__attribute__(A)=
+         if flag(closure_signals)
+           cpp-options:  -DUSE_GCLOSURE_SIGNALS_IMPL
+           c-sources: System/Glib/hsgclosure.ccommit aa22754e04616c354557fc350f96a8f7f331e984
diff --git a/pkgs/development/libraries/haskell/graphviz/default.nix b/pkgs/development/libraries/haskell/graphviz/default.nix
index 7fb47cf0ab72..c50e0403bd68 100644
--- a/pkgs/development/libraries/haskell/graphviz/default.nix
+++ b/pkgs/development/libraries/haskell/graphviz/default.nix
@@ -16,6 +16,7 @@ cabal.mkDerivation (self: {
   ];
   testDepends = [ fgl filepath QuickCheck systemGraphviz text ];
   jailbreak = true;
+  doCheck = false;
   meta = {
     homepage = "http://projects.haskell.org/graphviz/";
     description = "Bindings to Graphviz for graph visualisation";
diff --git a/pkgs/development/libraries/haskell/gtk/0.12.5.7.nix b/pkgs/development/libraries/haskell/gtk/0.12.5.7.nix
new file mode 100644
index 000000000000..34c1480c8c34
--- /dev/null
+++ b/pkgs/development/libraries/haskell/gtk/0.12.5.7.nix
@@ -0,0 +1,22 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, cairo, gio, glib, gtk, gtk2hsBuildtools, libc, mtl, pango
+, pkgconfig, text
+}:
+
+cabal.mkDerivation (self: {
+  pname = "gtk";
+  version = "0.12.5.7";
+  sha256 = "0hax4ixdz523753rc774c8g76bjlj56lsabyl5nwkpnppffpa73w";
+  buildDepends = [ cairo gio glib mtl pango text ];
+  buildTools = [ gtk2hsBuildtools ];
+  extraLibraries = [ libc pkgconfig ];
+  pkgconfigDepends = [ glib gtk ];
+  patches = self.stdenv.lib.optionals self.stdenv.isDarwin [ ./gtk.patch ];
+  meta = {
+    homepage = "http://projects.haskell.org/gtk2hs/";
+    description = "Binding to the Gtk+ graphical user interface library";
+    license = self.stdenv.lib.licenses.lgpl21;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/gtk/default.nix b/pkgs/development/libraries/haskell/gtk/0.13.0.3.nix
index e9a90659a95f..e9a90659a95f 100644
--- a/pkgs/development/libraries/haskell/gtk/default.nix
+++ b/pkgs/development/libraries/haskell/gtk/0.13.0.3.nix
diff --git a/pkgs/development/libraries/haskell/gtk/gtk.patch b/pkgs/development/libraries/haskell/gtk/gtk.patch
new file mode 100644
index 000000000000..242552950df1
--- /dev/null
+++ b/pkgs/development/libraries/haskell/gtk/gtk.patch
@@ -0,0 +1,10 @@
+--- a/gtk.cabal.orig	2014-11-03 15:13:42.000000000 -0600
++++ b/gtk.cabal	2014-11-03 15:14:05.000000000 -0600
+@@ -148,6 +148,7 @@
+ 
+         build-tools:    gtk2hsC2hs >= 0.13.8,
+                         gtk2hsHookGenerator, gtk2hsTypeGen
++        cpp-options:    -U__BLOCKS__ -D__attribute__(A)=
+ 
+         exposed-modules:
+           Graphics.UI.Gtk
diff --git a/pkgs/development/libraries/haskell/hsc3-server/default.nix b/pkgs/development/libraries/haskell/hsc3-server/default.nix
new file mode 100644
index 000000000000..31f59ed87413
--- /dev/null
+++ b/pkgs/development/libraries/haskell/hsc3-server/default.nix
@@ -0,0 +1,30 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, bitset, dataDefault, failure, hashtables, hosc, hsc3
+, hsc3Process, liftedBase, ListZipper, monadControl, QuickCheck
+, random, resourcet, testFramework, testFrameworkQuickcheck2
+, transformers, transformersBase
+}:
+
+cabal.mkDerivation (self: {
+  pname = "hsc3-server";
+  version = "0.9.2";
+  sha256 = "1lq4y57d555jb0yi10n4j69h4whwsm5h2k6j4r7f9avds5ahh6s2";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [
+    bitset dataDefault failure hashtables hosc hsc3 hsc3Process
+    liftedBase ListZipper monadControl random resourcet transformers
+    transformersBase
+  ];
+  testDepends = [
+    failure QuickCheck random testFramework testFrameworkQuickcheck2
+    transformers
+  ];
+  meta = {
+    homepage = "https://github.com/kaoskorobase/hsc3-server";
+    description = "SuperCollider server resource management and synchronization";
+    license = "GPL";
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/linear/default.nix b/pkgs/development/libraries/haskell/linear/default.nix
index ac172679c074..9f1883d3ef8a 100644
--- a/pkgs/development/libraries/haskell/linear/default.nix
+++ b/pkgs/development/libraries/haskell/linear/default.nix
@@ -8,8 +8,8 @@
 
 cabal.mkDerivation (self: {
   pname = "linear";
-  version = "1.11.2";
-  sha256 = "11xinkqg4p6q287qiljq7p9lq0s58hznw2as29ppb5n3q5pab3ib";
+  version = "1.11.3";
+  sha256 = "12a3qfkyb4h14630k312gpb5j7dxr38bqk5y2lnnafka8hcc6w5n";
   buildDepends = [
     adjunctions binary distributive hashable lens reflection
     semigroupoids semigroups tagged transformers unorderedContainers
diff --git a/pkgs/development/libraries/haskell/pango/0.12.5.3.nix b/pkgs/development/libraries/haskell/pango/0.12.5.3.nix
new file mode 100644
index 000000000000..e95c590e3545
--- /dev/null
+++ b/pkgs/development/libraries/haskell/pango/0.12.5.3.nix
@@ -0,0 +1,22 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, cairo, glib, gtk2hsBuildtools, libc, mtl, pango, pkgconfig
+, text
+}:
+
+cabal.mkDerivation (self: {
+  pname = "pango";
+  version = "0.12.5.3";
+  sha256 = "1n64ppz0jqrbzvimbz4avwnx3z0n5z2gbmbmca0hw9wqf9j6y79a";
+  buildDepends = [ cairo glib mtl text ];
+  buildTools = [ gtk2hsBuildtools ];
+  extraLibraries = [ libc pkgconfig ];
+  pkgconfigDepends = [ cairo pango ];
+  patches = self.stdenv.lib.optionals self.stdenv.isDarwin [ ./pango.patch ];
+  meta = {
+    homepage = "http://projects.haskell.org/gtk2hs/";
+    description = "Binding to the Pango text rendering engine";
+    license = self.stdenv.lib.licenses.lgpl21;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/pango/default.nix b/pkgs/development/libraries/haskell/pango/0.13.0.3.nix
index c3ce339f7d55..c3ce339f7d55 100644
--- a/pkgs/development/libraries/haskell/pango/default.nix
+++ b/pkgs/development/libraries/haskell/pango/0.13.0.3.nix
diff --git a/pkgs/development/libraries/haskell/pango/pango.patch b/pkgs/development/libraries/haskell/pango/pango.patch
new file mode 100644
index 000000000000..af338cbe32ce
--- /dev/null
+++ b/pkgs/development/libraries/haskell/pango/pango.patch
@@ -0,0 +1,10 @@
+--- a/pango.cabal.orig	2014-11-03 15:11:35.000000000 -0600
++++ b/pango.cabal	2014-11-03 15:11:57.000000000 -0600
+@@ -52,6 +52,7 @@
+           build-depends:  base < 4
+ 
+         build-tools:    gtk2hsC2hs >= 0.13.8, gtk2hsTypeGen
++        cpp-options:    -U__BLOCKS__ -D__attribute__(A)=
+ 
+         exposed-modules: Graphics.Rendering.Pango
+                          Graphics.Rendering.Pango.Font
diff --git a/pkgs/development/libraries/haskell/profunctors/default.nix b/pkgs/development/libraries/haskell/profunctors/default.nix
index 00d339fa44e8..b1336cd59daf 100644
--- a/pkgs/development/libraries/haskell/profunctors/default.nix
+++ b/pkgs/development/libraries/haskell/profunctors/default.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "profunctors";
-  version = "4.2.0.1";
-  sha256 = "00cfria3zjijx9nm533a25x240c7q0sn9vna6m4y4rz1f7l2gnqc";
+  version = "4.3.2";
+  sha256 = "06dv9bjz2hsm32kzfqqm6z54197dfjm3wycnbbgl9pib711w484v";
   buildDepends = [
     comonad distributive semigroupoids tagged transformers
   ];
diff --git a/pkgs/development/libraries/haskell/sdl2/default.nix b/pkgs/development/libraries/haskell/sdl2/default.nix
index d433fb59b839..3e6a66685856 100644
--- a/pkgs/development/libraries/haskell/sdl2/default.nix
+++ b/pkgs/development/libraries/haskell/sdl2/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "sdl2";
-  version = "1.1.3";
-  sha256 = "111kbairf50j8kkndcc54i0gsfaffnyla7zw49gbqlqs4kgxj6b5";
+  version = "1.2.0";
+  sha256 = "19q7x74b9ismxmlsblqvfy4w91bspl9n1fjccz8w1qylyilr6ca2";
   extraLibraries = [ SDL2 ];
   pkgconfigDepends = [ SDL2 ];
   meta = {
diff --git a/pkgs/development/libraries/imlib2/default.nix b/pkgs/development/libraries/imlib2/default.nix
index 5b19323f9434..53f978551cdd 100644
--- a/pkgs/development/libraries/imlib2/default.nix
+++ b/pkgs/development/libraries/imlib2/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, x11, libjpeg, libtiff, libungif, libpng, bzip2, pkgconfig }:
+{ stdenv, fetchurl, x11, libjpeg, libtiff, giflib, libpng, bzip2, pkgconfig }:
 
 stdenv.mkDerivation rec {
   name = "imlib2-1.4.6";
@@ -8,10 +8,14 @@ stdenv.mkDerivation rec {
     sha256 = "0x1j0ylpclkp8cfpwfpkjywqz124bqskyxbw8pvwzkv2gmrbwldg";
   };
 
-  buildInputs = [ x11 libjpeg libtiff libungif libpng bzip2 ];
+  buildInputs = [ x11 libjpeg libtiff giflib libpng bzip2 ];
 
   nativeBuildInputs = [ pkgconfig ];
 
+  # From
+  # https://github.com/PhantomX/slackbuilds/blob/master/imlib2/patches/imlib2-giflib51.patch
+  patches = [ ./giflib51.patch ];
+
   preConfigure = ''
     substituteInPlace imlib2-config.in \
       --replace "@my_libs@" ""
diff --git a/pkgs/development/libraries/imlib2/giflib51.patch b/pkgs/development/libraries/imlib2/giflib51.patch
new file mode 100644
index 000000000000..97eaeb0b96e6
--- /dev/null
+++ b/pkgs/development/libraries/imlib2/giflib51.patch
@@ -0,0 +1,64 @@
+diff -ruN imlib2-1.4.6.orig/src/modules/loaders/loader_gif.c imlib2-1.4.6/src/modules/loaders/loader_gif.c
+--- imlib2-1.4.6.orig/src/modules/loaders/loader_gif.c	2013-12-21 10:16:10.000000000 +0000
++++ imlib2-1.4.6/src/modules/loaders/loader_gif.c	2014-05-27 09:52:35.857291512 +0000
+@@ -36,7 +36,7 @@
+ #endif
+    if (fd < 0)
+       return 0;
+-   gif = DGifOpenFileHandle(fd);
++   gif = DGifOpenFileHandle(fd, NULL);
+    if (!gif)
+      {
+         close(fd);
+@@ -60,13 +60,13 @@
+              h = gif->Image.Height;
+              if (!IMAGE_DIMENSIONS_OK(w, h))
+                {
+-                  DGifCloseFile(gif);
++                  DGifCloseFile(gif, NULL);
+                   return 0;
+                }
+              rows = malloc(h * sizeof(GifRowType *));
+              if (!rows)
+                {
+-                  DGifCloseFile(gif);
++                  DGifCloseFile(gif, NULL);
+                   return 0;
+                }
+              for (i = 0; i < h; i++)
+@@ -78,7 +78,7 @@
+                   rows[i] = malloc(w * sizeof(GifPixelType));
+                   if (!rows[i])
+                     {
+-                       DGifCloseFile(gif);
++                       DGifCloseFile(gif, NULL);
+                        for (i = 0; i < h; i++)
+                          {
+                             if (rows[i])
+@@ -150,7 +150,7 @@
+         im->data = (DATA32 *) malloc(sizeof(DATA32) * w * h);
+         if (!im->data)
+           {
+-             DGifCloseFile(gif);
++             DGifCloseFile(gif, NULL);
+              free(rows);
+              return 0;
+           }
+@@ -181,7 +181,7 @@
+                        last_per = (int)per;
+                        if (!(progress(im, (int)per, 0, last_y, w, i)))
+                          {
+-                            DGifCloseFile(gif);
++                            DGifCloseFile(gif, NULL);
+                             for (i = 0; i < h; i++)
+                               {
+                                  free(rows[i]);
+@@ -198,7 +198,7 @@
+      {
+         progress(im, 100, 0, last_y, w, h);
+      }
+-   DGifCloseFile(gif);
++   DGifCloseFile(gif, NULL);
+    for (i = 0; i < h; i++)
+      {
+         free(rows[i]);
\ No newline at end of file
diff --git a/pkgs/development/libraries/libcaca/default.nix b/pkgs/development/libraries/libcaca/default.nix
index f183d9c3cd06..8e68e10d940f 100644
--- a/pkgs/development/libraries/libcaca/default.nix
+++ b/pkgs/development/libraries/libcaca/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl, ncurses}:
 
 stdenv.mkDerivation rec {
-  name = "libcaca-0.99.beta18";
+  name = "libcaca-0.99.beta19";
   
   src = fetchurl {
     url = "http://caca.zoy.org/files/libcaca/${name}.tar.gz";
-    sha256 = "189kdh7zi88gxb3w33rh0p5l0yhn7s1c2xjgrpf24q2a7xihdskp";
+    sha256 = "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj";
   };
   
   configureFlags = "--disable-x11 --disable-imlib2 --disable-doc";
diff --git a/pkgs/development/libraries/libcec/default.nix b/pkgs/development/libraries/libcec/default.nix
index 6f19eb502d3a..51c23451fec8 100644
--- a/pkgs/development/libraries/libcec/default.nix
+++ b/pkgs/development/libraries/libcec/default.nix
@@ -12,11 +12,17 @@ stdenv.mkDerivation {
 
   buildInputs = [ autoreconfHook pkgconfig udev ];
 
-  meta = {
+  # Fix dlopen path
+  patchPhase = ''
+    substituteInPlace include/cecloader.h --replace "libcec.so" "$out/lib/libcec.so"
+  '';
+
+  meta = with stdenv.lib; {
     description = "USB CEC adapter communication library";
     homepage = "http://libcec.pulse-eight.com";
     repositories.git = "https://github.com/Pulse-Eight/libcec.git";
     license = "GPLv2+";
-    platforms = stdenv.lib.platforms.linux;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.titanous ];
   };
 }
diff --git a/pkgs/development/libraries/libfakekey/default.nix b/pkgs/development/libraries/libfakekey/default.nix
new file mode 100644
index 000000000000..4e74762f3f9d
--- /dev/null
+++ b/pkgs/development/libraries/libfakekey/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, libX11, libXi, libXtst, pkgconfig, xextproto }:
+
+stdenv.mkDerivation rec {
+  name = "libfakekey-${version}";
+  version = "0.1";
+
+  src = fetchurl {
+    url = "http://downloads.yoctoproject.org/releases/matchbox/libfakekey/0.1/${name}.tar.gz";
+    sha256 = "10msplyn535hmzbmbdnx4zc20hkaw6d81if5lzxs82k8sq2mkx9k";
+  };
+
+  buildInputs = [ libX11 libXi libXtst pkgconfig xextproto ];
+
+  meta = with stdenv.lib; {
+    description = "X virtual keyboard library";
+    homepage = https://www.yoctoproject.org/tools-resources/projects/matchbox;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/development/libraries/libmwaw/default.nix b/pkgs/development/libraries/libmwaw/default.nix
index 297d0a2f2ee6..7cb49dc3524b 100644
--- a/pkgs/development/libraries/libmwaw/default.nix
+++ b/pkgs/development/libraries/libmwaw/default.nix
@@ -3,10 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="libmwaw";
-    version="0.3.2";
+    version="0.3.3";
     name="${baseName}-${version}";
-    url="mirror://sourceforge/project/libmwaw/libmwaw/libmwaw-${version}/libmwaw-${version}.tar.bz2";
-    sha256="0rzp2bbwyxdq1i9b2y5jz5b2ic7466l8ifgmz7lk8bsmqxbb0a0d";
+    hash="0dqwrswqmdhbj7gxsivvnwnsly181x27a5zq9fpizk82cnx2s8ks";
+    url="mirror://sourceforge/project/libmwaw/libmwaw/libmwaw-0.3.3/libmwaw-0.3.3.tar.xz";
+    sha256="0dqwrswqmdhbj7gxsivvnwnsly181x27a5zq9fpizk82cnx2s8ks";
   };
   buildInputs = [
     boost pkgconfig cppunit zlib libwpg libwpd librevenge
diff --git a/pkgs/development/libraries/libotr/default.nix b/pkgs/development/libraries/libotr/default.nix
index 7b8f40d1886a..aeae2a70d6c3 100644
--- a/pkgs/development/libraries/libotr/default.nix
+++ b/pkgs/development/libraries/libotr/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, libgcrypt, autoreconfHook }:
 
 stdenv.mkDerivation rec {
-  name = "libotr-4.0.0";
+  name = "libotr-4.1.0";
 
   src = fetchurl {
     url = "https://otr.cypherpunks.ca/${name}.tar.gz";
-    sha256 = "1d4k0b7v4d3scwm858cmqr9c6xgd6ppla1vk4x2yg64q82a1k49z";
+    sha256 = "0c6rkh58s6wqzcrpccwdik5qs91qj6dgd60a340d72gc80cqknsg";
   };
 
   buildInputs = [ autoreconfHook ];
diff --git a/pkgs/development/libraries/libre/default.nix b/pkgs/development/libraries/libre/default.nix
index c67df46e89c0..25b4f6617bea 100644
--- a/pkgs/development/libraries/libre/default.nix
+++ b/pkgs/development/libraries/libre/default.nix
@@ -1,10 +1,10 @@
 {stdenv, fetchurl, zlib, openssl}:
 stdenv.mkDerivation rec {
-  version = "0.4.9";
+  version = "0.4.10";
   name = "libre-${version}";
   src=fetchurl {
     url = "http://www.creytiv.com/pub/re-${version}.tar.gz";
-    sha256 = "1i98z9qw3jpkaq419189vr8h3qcxqlz40dls77rbn4c0agc69703";
+    sha256 = "1ckp5rwdqlhr6n8nwzfd3jwxa6f6n4gxh9ny3c1wcrbzvpkkhkv3";
   };
   buildInputs = [zlib openssl];
   makeFlags = [
diff --git a/pkgs/development/libraries/libtorrent-rasterbar/0.16.nix b/pkgs/development/libraries/libtorrent-rasterbar/0.16.nix
new file mode 100644
index 000000000000..6298f2f0c0f3
--- /dev/null
+++ b/pkgs/development/libraries/libtorrent-rasterbar/0.16.nix
@@ -0,0 +1,6 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // {
+  version = "0.16.17";
+  sha256 = "1w5gcizd6jlvzwgy0307az856h0cly685yf275p1v6bdcafd58b7";
+})
diff --git a/pkgs/development/libraries/libtorrent-rasterbar/default.nix b/pkgs/development/libraries/libtorrent-rasterbar/default.nix
index b7abd8bcab77..e1f1fc179d63 100644
--- a/pkgs/development/libraries/libtorrent-rasterbar/default.nix
+++ b/pkgs/development/libraries/libtorrent-rasterbar/default.nix
@@ -1,28 +1,6 @@
-{ stdenv, fetchurl, boost, openssl, pkgconfig, zlib, python, libiconvOrNull, geoip }:
+{ callPackage, ... } @ args:
 
-stdenv.mkDerivation rec {
-  name = "libtorrent-rasterbar-1.0.2";
-  
-  src = fetchurl {
-    url = "mirror://sourceforge/libtorrent/${name}.tar.gz";
-    sha256 = "1ph4cb6nrk2hiy89j3kz1wj16ph0b9yixrf4f4935rnzhha8x31w";
-  };
-
-  buildInputs = [ boost boost.lib pkgconfig openssl zlib python libiconvOrNull geoip ];
-
-  configureFlags = [ 
-    "--with-boost=${boost}/include/boost" 
-    "--with-boost-libdir=${boost.lib}/lib" 
-    "--enable-python-binding"
-    "--with-libgeoip=system"
-    "--with-libiconv=yes"
-    "--with-boost=${boost.lib}"
- ];
-  
-  meta = with stdenv.lib; {
-    homepage = http://www.rasterbar.com/products/libtorrent/;
-    description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
-    license = licenses.bsd3;
-    maintainers = [ maintainers.phreedom ];
-  };
-}
+callPackage ./generic.nix (args // {
+  version = "1.0.2";
+  sha256 = "1ph4cb6nrk2hiy89j3kz1wj16ph0b9yixrf4f4935rnzhha8x31w";
+})
diff --git a/pkgs/development/libraries/libtorrent-rasterbar/generic.nix b/pkgs/development/libraries/libtorrent-rasterbar/generic.nix
new file mode 100644
index 000000000000..f47ff1081bc8
--- /dev/null
+++ b/pkgs/development/libraries/libtorrent-rasterbar/generic.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, boost, openssl, pkgconfig, zlib, python, libiconvOrNull, geoip
+# Version specific options
+, version, sha256
+, ... }:
+
+stdenv.mkDerivation rec {
+  name = "libtorrent-rasterbar-${version}";
+  
+  src = fetchurl {
+    url = "mirror://sourceforge/libtorrent/${name}.tar.gz";
+    inherit sha256;
+  };
+
+  buildInputs = [ boost pkgconfig openssl zlib python libiconvOrNull geoip ];
+
+  configureFlags = [ 
+    "--enable-python-binding"
+    "--with-libgeoip=system"
+    "--with-libiconv=yes"
+    "--with-boost=${boost.dev}"
+    "--with-boost-libdir=${boost.lib}/lib"
+  ] ++ stdenv.lib.optional (libiconvOrNull != null) "--with-libiconv=yes";
+  
+  meta = with stdenv.lib; {
+    homepage = http://www.rasterbar.com/products/libtorrent/;
+    description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.phreedom ];
+  };
+}
diff --git a/pkgs/development/libraries/mdds/default.nix b/pkgs/development/libraries/mdds/default.nix
index 296744e1d56c..25e1eb0c7269 100644
--- a/pkgs/development/libraries/mdds/default.nix
+++ b/pkgs/development/libraries/mdds/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  version = "0.10.3";
+  version = "0.11.1";
   name = "mdds-${version}";
 
   src = fetchurl {
     url = "http://kohei.us/files/mdds/src/mdds_${version}.tar.bz2";
-    sha256 = "1hp0472mcsgzrz1v60jpywxrrqmpb8bchfsi7ydmp6vypqnr646v";
+    sha256 = "1xr74ss8vr67nmwxls4a54hgljwrc8fs485ablh0bxykf6dyr0j1";
   };
 
   postInstall = ''
diff --git a/pkgs/development/libraries/ogre/default.nix b/pkgs/development/libraries/ogre/default.nix
index 527bb25dce18..93803b61fb14 100644
--- a/pkgs/development/libraries/ogre/default.nix
+++ b/pkgs/development/libraries/ogre/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv
+{ fetchhg, stdenv
 , cmake, mesa
 , freetype, freeimage, zziplib, randrproto, libXrandr
 , libXaw, freeglut, libXt, libpng, boost, ois
@@ -8,11 +8,12 @@
 , nvidia_cg_toolkit }:
 
 stdenv.mkDerivation {
-  name = "ogre-1.8.1";
+  name = "ogre-1.9.0";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/ogre/1.8.1/ogre_src_v1-8-1.tar.bz2";
-    sha256 = "1avadx87sdfdk8165wlffnd5dzks694dcdnkg3ijap966k4qm46s";
+  src = fetchhg {
+    url = "https://bitbucket.org/sinbad/ogre/src/";
+    rev = "v1-9-0";
+    sha256 = "06hnf4c2kpycm3mglwdyywvj931k8ym808c15xighpyd8h9j4xdi";
   };
 
   cmakeFlags = [ "-DOGRE_INSTALL_SAMPLES=yes" ]
diff --git a/pkgs/development/libraries/opencsg/default.nix b/pkgs/development/libraries/opencsg/default.nix
index 4df3abcdd71a..89176c10843e 100644
--- a/pkgs/development/libraries/opencsg/default.nix
+++ b/pkgs/development/libraries/opencsg/default.nix
@@ -2,11 +2,11 @@
   }:
 
 stdenv.mkDerivation rec {
-  version = "1.3.2";
+  version = "1.4.0";
   name = "opencsg-${version}";
   src = fetchurl {
     url = "http://www.opencsg.org/OpenCSG-${version}.tar.gz";
-    sha256 = "09drnck27py8qg1l6gqaia85a9skqn0mz0nybjrkq4gpk0lwk467";
+    sha256 = "13c73jxadm27h7spdh3qj1v6rnn81v4xwqlv5a6k72pv9kjnpd7c";
   };
 
   buildInputs = [mesa freeglut glew libXmu libXext libX11];
diff --git a/pkgs/development/libraries/wxGTK-2.8/default.nix b/pkgs/development/libraries/wxGTK-2.8/default.nix
index 62d2de0238f1..d7ca92f70d9b 100644
--- a/pkgs/development/libraries/wxGTK-2.8/default.nix
+++ b/pkgs/development/libraries/wxGTK-2.8/default.nix
@@ -57,4 +57,8 @@ stdenv.mkDerivation rec {
   passthru = {inherit gtk compat24 compat26 unicode;};
 
   enableParallelBuilding = true;
+  
+  meta = {
+    platforms = stdenv.lib.platforms.all;
+  };
 }
diff --git a/pkgs/development/libraries/wxGTK-2.9/default.nix b/pkgs/development/libraries/wxGTK-2.9/default.nix
index f61c7eafd732..47760cdb2884 100644
--- a/pkgs/development/libraries/wxGTK-2.9/default.nix
+++ b/pkgs/development/libraries/wxGTK-2.9/default.nix
@@ -55,4 +55,8 @@ stdenv.mkDerivation {
   passthru = {inherit gtk compat24 compat26 unicode;};
 
   enableParallelBuilding = true;
+  
+  meta = {
+    platforms = stdenv.lib.platforms.all;
+  };
 }
diff --git a/pkgs/development/libraries/wxGTK-3.0/default.nix b/pkgs/development/libraries/wxGTK-3.0/default.nix
index 9e9bf9c83dd3..93f771e8c8ff 100644
--- a/pkgs/development/libraries/wxGTK-3.0/default.nix
+++ b/pkgs/development/libraries/wxGTK-3.0/default.nix
@@ -55,4 +55,8 @@ stdenv.mkDerivation {
   passthru = {inherit gtk compat24 compat26 unicode;};
 
   enableParallelBuilding = true;
+  
+  meta = {
+    platforms = stdenv.lib.platforms.all;
+  };
 }
diff --git a/pkgs/development/libraries/x265/default.nix b/pkgs/development/libraries/x265/default.nix
new file mode 100644
index 000000000000..d7e66a4f618b
--- /dev/null
+++ b/pkgs/development/libraries/x265/default.nix
@@ -0,0 +1,7 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // {
+  version = "1.4";
+  rev = "5e604833c5aa605d0b6efbe5234492b5e7d8ac61";
+  sha256 = "1aqksqi1qmjpva5cal6j7h0hzk298wk3nhqv73wnyqdchq2sa8v5";
+})
\ No newline at end of file
diff --git a/pkgs/development/libraries/x265/generic.nix b/pkgs/development/libraries/x265/generic.nix
new file mode 100644
index 000000000000..58a39dbbe384
--- /dev/null
+++ b/pkgs/development/libraries/x265/generic.nix
@@ -0,0 +1,58 @@
+{ stdenv, cmake, fetchhg, mercurial, yasm
+, rev , sha256, version
+, highBitDepth ? false
+, debuggingSupport ? false
+, enableCli ? true
+, testSupport ? false
+, ...
+}:
+
+stdenv.mkDerivation rec {
+  name = "x265-${version}";
+
+  src = fetchhg {
+    url = "https://bitbucket.org/multicoreware/x265/src";
+    inherit rev;
+    inherit sha256;
+  };
+
+  patchPhase = ''
+    sed -i 's/unknown/${version}/g' source/cmake/version.cmake
+  '';
+
+  cmakeFlags = with stdenv.lib; 
+    ''
+      ${if debuggingSupport
+        then "-DCHECKED_BUILD=ON"
+        else "-DCHECKED_BUILD=OFF"
+      }
+      -DSTATIC_LINK_CRT=OFF
+      ${if (stdenv.system == "x86_64-linux" && highBitDepth)
+        then "-DHIGH_BIT_DEPTH=ON"
+        else "-DHIGH_BIT_DEPTH=OFF"
+      }
+      -DWARNINGS_AS_ERRORS=OFF
+      -DENABLE_PPA=OFF
+      -DENABLE_SHARED=ON
+      ${if enableCli
+        then "-DENABLE_CLI=ON"
+        else "-DENABLE_CLI=OFF"
+      }
+      ${if testSupport
+        then "-DENABLE_TESTS=ON"
+        else "-DENABLE_TESTS=OFF"
+      }
+    '';
+
+  preConfigure = "cd source";
+
+  buildInputs = [ cmake yasm ];
+
+  meta = with stdenv.lib; {
+    homepage = "http://x265.org";
+    description = "Library for encoding h.265/HEVC video streams";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ codyopel ];
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/libraries/x265/hg.nix b/pkgs/development/libraries/x265/hg.nix
new file mode 100644
index 000000000000..db15e223047e
--- /dev/null
+++ b/pkgs/development/libraries/x265/hg.nix
@@ -0,0 +1,7 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "hg-${rev}";
+  rev = "eebb372eec893efc50e66806fcc19b1c1bd89683";
+  sha256 = "03dpbjqcmbmyid45560byabybfzy2bvic0gqa6k6hxci6rvmynpi";
+})
\ No newline at end of file
diff --git a/pkgs/development/lisp-modules/asdf/default.nix b/pkgs/development/lisp-modules/asdf/default.nix
index 100577b3a7ff..33cd07b48076 100644
--- a/pkgs/development/lisp-modules/asdf/default.nix
+++ b/pkgs/development/lisp-modules/asdf/default.nix
@@ -3,11 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="asdf";
-    version="3.1.3";
+    version="3.1.4";
     name="${baseName}-${version}";
-    hash="11jgbl2ys98i7lir0z76g0msm89zmz1b91gwkdz0gnxr6gavj6cn";
-    url="http://common-lisp.net/project/asdf/archives/asdf-3.1.3.tar.gz";
-    sha256="11jgbl2ys98i7lir0z76g0msm89zmz1b91gwkdz0gnxr6gavj6cn";
+    hash="0hyc2g22khcmvxmlcaq0xbxqhq59spgc2nc1s0gz1r9mcgrzm2xw";
+    url="http://common-lisp.net/project/asdf/archives/asdf-3.1.4.tar.gz";
+    sha256="0hyc2g22khcmvxmlcaq0xbxqhq59spgc2nc1s0gz1r9mcgrzm2xw";
   };
   buildInputs = [
     texinfo texLive
@@ -19,6 +19,7 @@ stdenv.mkDerivation {
   src = fetchurl {
     inherit (s) url sha256;
   };
+  sourceRoot=".";
   buildPhase = ''
     make build/asdf.lisp
     make -C doc asdf.info asdf.html
diff --git a/pkgs/development/lisp-modules/lisp-packages.nix b/pkgs/development/lisp-modules/lisp-packages.nix
index d9359da0a6a9..0d9383a465fd 100644
--- a/pkgs/development/lisp-modules/lisp-packages.nix
+++ b/pkgs/development/lisp-modules/lisp-packages.nix
@@ -19,13 +19,14 @@ let lispPackages = rec {
 
   clx = buildLispPackage rec {
     baseName = "clx";
-    version = "2013-09";
+    version = "2014-11-03";
     description = "X11 bindings for Common Lisp";
     deps = [];
     src = pkgs.fetchgit {
       url = "https://github.com/sharplispers/clx.git";
-      rev = "e2b762ac93d78d6eeca4f36698c8dfd1537ce998";
-      sha256 = "0jcrmlaayz7m8ixgriq7id3pdklyk785qvpcxdpcp4aqnfiiqhij";
+      rev = "c2910c5d707a97e87b354de3f2fbe2ae038e9bc8";
+      sha256 = "1jk0hfk6rb9cf58xhqq7vaisj63k3x9jpj06wqpa32y5ppjcyijw";
+      name = "clx-git-checkout-${version}";
     };
   };
 
diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix
index 8a7045e263ad..9700a1d8cc5e 100644
--- a/pkgs/development/ocaml-modules/eliom/default.nix
+++ b/pkgs/development/ocaml-modules/eliom/default.nix
@@ -1,30 +1,34 @@
 { stdenv, fetchurl, ocaml, findlib, which, ocsigen_server, ocsigen_deriving,
   js_of_ocaml, ocaml_react, ocaml_lwt, calendar, cryptokit, tyxml,
-  ocaml_ipaddr, ocamlnet, ocaml_ssl, ocaml_pcre, ocaml_optcomp}:
+  ocaml_ipaddr, ocamlnet, ocaml_ssl, ocaml_pcre, ocaml_optcomp,
+  reactivedata, opam}:
 
-stdenv.mkDerivation
+stdenv.mkDerivation rec
 {
-  name = "eliom-4.0.0";
+  pname = "eliom";
+  version = "4.1.0";
+  name = "${pname}-${version}";
 
   src = fetchurl {
-    url = https://github.com/ocsigen/eliom/archive/4.0.0.tar.gz;
-    sha256 = "1xf2l6lvngxzwaw6lvr6sgi48rz0wxg65q9lz4jzqjarkp0sx206";
+    url = https://github.com/ocsigen/eliom/archive/4.1.0.tar.gz;
+    sha256 = "10v7mrq3zsbxdlg8k8xif777mbvcdpabvnd1g7p2yqivr7f1qm24";
   };
 
   buildInputs = [ocaml which ocsigen_server findlib ocsigen_deriving
-                 js_of_ocaml ocaml_react ocaml_lwt calendar
-                 cryptokit tyxml ocaml_ipaddr ocamlnet ocaml_ssl
-                 ocaml_pcre ocaml_optcomp];
-
-  preConfigure =
-  ''chmod a+x configure
-    sed s/deriving-ocsigen/deriving/g -i configure
+                 js_of_ocaml ocaml_optcomp opam];
+
+  propagatedBuildInputs = [ ocaml_lwt reactivedata tyxml ocaml_ipaddr
+                            calendar cryptokit ocamlnet ocaml_react ocaml_ssl
+                            ocaml_pcre ];
+
+  installPhase =
+  let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version;
+  in
+  ''opam-installer --script --prefix=$out ${pname}.install > install.sh
+    sh install.sh
+    ln -s $out/lib/${pname} $out/lib/ocaml/${ocamlVersion}/site-lib/
   '';
 
-  configureFlags = "--root $(out) --prefix /";
-
-  dontAddPrefix = true;  
-
   createFindlibDestdir = true;
 
   meta = {
diff --git a/pkgs/development/ocaml-modules/gg/default.nix b/pkgs/development/ocaml-modules/gg/default.nix
new file mode 100644
index 000000000000..a40d4ae79784
--- /dev/null
+++ b/pkgs/development/ocaml-modules/gg/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchurl, ocaml, findlib, opam }:
+
+let
+  inherit (stdenv.lib) getVersion versionAtLeast;
+
+  pname = "gg";
+  version = "0.9.0";
+  webpage = "http://erratique.ch/software/${pname}";
+in
+
+assert versionAtLeast (getVersion ocaml) "4.01.0";
+
+stdenv.mkDerivation rec {
+
+  name = "ocaml-${pname}-${version}";
+
+  src = fetchurl {
+    url = "${webpage}/releases/${pname}-${version}.tbz";
+    sha256 = "055pza6jbjjj7wgzf7pbn0ccxw76i8w5b2bcnaz8b9m4x6jaa6gh";
+  };
+
+  buildInputs = [ ocaml findlib opam ];
+
+  createFindlibDestdir = true;
+
+  unpackCmd = "tar xjf $src";
+
+  buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
+
+  installPhase = ''
+    opam-installer --script --prefix=$out ${pname}.install | sh
+    ln -s $out/lib/${pname} $out/lib/ocaml/${getVersion ocaml}/site-lib/${pname}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Basic types for computer graphics in OCaml";
+    longDescription = ''
+      Gg is an OCaml module providing basic types for computer graphics. It
+      defines types and functions for floats, vectors, points, sizes,
+      matrices, quaternions, axis aligned boxes, colors, color spaces, and
+      raster data.
+    '';
+    homepage = "${webpage}";
+    platforms = ocaml.meta.platforms;
+    license = licenses.bsd3;
+    maintainers = [ maintainers.jirkamarsik ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/lablgtk/default.nix b/pkgs/development/ocaml-modules/lablgtk/default.nix
index 19b0bf63ee39..4c1665540ec2 100644
--- a/pkgs/development/ocaml-modules/lablgtk/default.nix
+++ b/pkgs/development/ocaml-modules/lablgtk/default.nix
@@ -3,7 +3,7 @@
 let
   ocaml_version = (builtins.parseDrvName ocaml.name).version;
   pname = "lablgtk";
-  version = "2.18.2";
+  version = "2.18.3";
 in
 
 assert stdenv.lib.versionAtLeast ocaml_version "3.12";
@@ -11,8 +11,8 @@ assert stdenv.lib.versionAtLeast ocaml_version "3.12";
 stdenv.mkDerivation {
   name = "${pname}-${version}";
   src = fetchurl {
-    url = https://forge.ocamlcore.org/frs/download.php/1456/lablgtk-2.18.2.tar.gz;
-    sha256 = "0f9rs4av0v7p5k8hifcq4b49xx8jmmfch3sdk9pij8a8jfgwxvfy";
+    url = https://forge.ocamlcore.org/frs/download.php/1479/lablgtk-2.18.3.tar.gz;
+    sha256 = "1bybn3jafxf4cx25zvn8h2xj9agn1xjbn7j3ywxxqx6az7rfnnwp";
   };
 
   buildInputs = [ocaml findlib pkgconfig gtk libgnomecanvas libglade gtksourceview camlp4];
diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix
index 061dbb398fe2..4254b78287c5 100644
--- a/pkgs/development/ocaml-modules/lwt/default.nix
+++ b/pkgs/development/ocaml-modules/lwt/default.nix
@@ -1,7 +1,9 @@
-{stdenv, fetchgit, which, cryptopp, ocaml, findlib, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, ocaml_text, glib}:
+{stdenv, fetchgit, which, cryptopp, ocaml, findlib, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, ocaml_text, glib, camlp4}:
 
 let
   version = "2.4.5";
+  inherit (stdenv.lib) optional getVersion versionAtLeast;
+  ocaml_version = getVersion ocaml;
 in
 
 stdenv.mkDerivation {
@@ -15,21 +17,22 @@ stdenv.mkDerivation {
     sha256 = "2bbf4f216dd62eeb765a89413f3b2b6d417a9c289ca49d595bb4d7a0545e343e";
   };
 
-  buildInputs = [ocaml_oasis pkgconfig which cryptopp ocaml findlib glib libev ncurses];
+  buildInputs = [ocaml_oasis pkgconfig which cryptopp ocaml findlib glib libev ncurses camlp4];
 
   propagatedBuildInputs = [ ocaml_react ocaml_ssl ocaml_text ];
 
-  configureFlags = [ "--enable-all" ];
+  configureFlags = [ "--enable-react" "--enable-glib" "--enable-ssl" "--enable-text" ]
+  ++ optional (versionAtLeast ocaml_version "4.0" && ! versionAtLeast ocaml_version "4.02") "--enable-toplevel";
 
   createFindlibDestdir = true;
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://ocsigen.org/lwt;
     description = "Lightweight thread library for Objective Caml";
-    license = "LGPL";
+    license = licenses.lgpl21;
     platforms = ocaml.meta.platforms;
-    maintainers = [
-      stdenv.lib.maintainers.z77z stdenv.lib.maintainers.gal_bolle
+    maintainers = with maintainers; [
+      z77z vbgl gal_bolle
     ];
   };
 }
diff --git a/pkgs/development/ocaml-modules/ocsigen-server/default.nix b/pkgs/development/ocaml-modules/ocsigen-server/default.nix
index e33d40373796..d5c066ae2aa0 100644
--- a/pkgs/development/ocaml-modules/ocsigen-server/default.nix
+++ b/pkgs/development/ocaml-modules/ocsigen-server/default.nix
@@ -1,14 +1,18 @@
-{stdenv, fetchurl, ocaml, findlib, which, ocaml_react, ocaml_ssl, ocaml_lwt, ocamlnet, ocaml_pcre, cryptokit, tyxml, ocaml_ipaddr, zlib, libev, openssl, ocaml_sqlite3, tree}:
+{stdenv, fetchurl, ocaml, findlib, which, ocaml_react, ocaml_ssl,
+ocaml_lwt, ocamlnet, ocaml_pcre, cryptokit, tyxml, ocaml_ipaddr, zlib,
+libev, openssl, ocaml_sqlite3, tree, uutf}:
 
 stdenv.mkDerivation {
-  name = "ocsigenserver-2.4.0";
+  name = "ocsigenserver-2.5";
   
   src = fetchurl {
-    url = https://github.com/ocsigen/ocsigenserver/archive/2.4.0.tar.gz;
-    sha256 = "1fjj8g6ivyfsa0446w77rjihhbw0gh5pgx7brywql2shk999riby";
+    url = https://github.com/ocsigen/ocsigenserver/archive/2.5.tar.gz;
+    sha256 = "0ayzlzjwg199va4sclsldlcp0dnwdj45ahhg9ckb51m28c2pw46r";
   };
 
-  buildInputs = [ocaml which findlib ocaml_react ocaml_ssl ocaml_lwt ocamlnet ocaml_pcre cryptokit tyxml ocaml_ipaddr zlib libev openssl ocaml_sqlite3 tree];
+  buildInputs = [ocaml which findlib ocaml_react ocaml_ssl ocaml_lwt
+  ocamlnet ocaml_pcre cryptokit tyxml ocaml_ipaddr zlib libev openssl
+  ocaml_sqlite3 tree uutf];
 
   configureFlags = "--root $(out) --prefix /";
 
diff --git a/pkgs/development/ocaml-modules/otfm/default.nix b/pkgs/development/ocaml-modules/otfm/default.nix
new file mode 100644
index 000000000000..5a118c0bcd89
--- /dev/null
+++ b/pkgs/development/ocaml-modules/otfm/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchurl, ocaml, findlib, opam, uutf }:
+
+let
+  inherit (stdenv.lib) getVersion versionAtLeast;
+
+  pname = "otfm";
+  version = "0.2.0";
+  webpage = "http://erratique.ch/software/${pname}";
+in
+
+assert versionAtLeast (getVersion ocaml) "4.01.0";
+
+stdenv.mkDerivation rec {
+
+  name = "ocaml-${pname}-${version}";
+
+  src = fetchurl {
+    url = "${webpage}/releases/${pname}-${version}.tbz";
+    sha256 = "1wgi9plf98gd7x3b7fzjxds089sivsap97bl1bw2lj73nxwnyb9c";
+  };
+
+  buildInputs = [ ocaml findlib opam ];
+
+  propagatedBuildInputs = [ uutf ];
+
+  createFindlibDestdir = true;
+
+  unpackCmd = "tar xjf $src";
+
+  buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
+
+  installPhase = ''
+    opam-installer --script --prefix=$out ${pname}.install | sh
+    ln -s $out/lib/${pname} $out/lib/ocaml/${getVersion ocaml}/site-lib/${pname}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "OpenType font decoder for OCaml";
+    longDescription = ''
+      Otfm is an in-memory decoder for the OpenType font data format. It
+      provides low-level access to font tables and functions to decode some
+      of them.
+    '';
+    homepage = "${webpage}";
+    platforms = ocaml.meta.platforms;
+    license = licenses.bsd3;
+    maintainers = [ maintainers.jirkamarsik ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/tyxml/default.nix b/pkgs/development/ocaml-modules/tyxml/default.nix
index 648f0a9cd170..77cf0638255f 100644
--- a/pkgs/development/ocaml-modules/tyxml/default.nix
+++ b/pkgs/development/ocaml-modules/tyxml/default.nix
@@ -1,15 +1,17 @@
-{stdenv, fetchurl, ocaml, findlib, ocaml_oasis, camlp4}:
+{stdenv, fetchurl, ocaml, findlib, ocaml_oasis, camlp4, uutf}:
 
 stdenv.mkDerivation {
-  name = "tyxml-3.1.1";
+  name = "tyxml-3.3.0";
 
   src = fetchurl {
-    url = http://github.com/ocsigen/tyxml/archive/3.1.1.tar.gz;
-    sha256 = "1r8im382r68kn8qy0857nv3y7h42i6ajyclxzmigfai7v2xdd05z";
+    url = http://github.com/ocsigen/tyxml/archive/3.3.0.tar.gz;
+    sha256 = "0r1hj8qy91i48nd7wj0x2dqrgspqrry5awraxl4pl10vh0mn6pk7";
     };
 
   buildInputs = [ocaml findlib ocaml_oasis camlp4];
 
+  propagatedBuildInputs = [uutf];
+
   createFindlibDestdir = true;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/ocaml-modules/vg/default.nix b/pkgs/development/ocaml-modules/vg/default.nix
new file mode 100644
index 000000000000..bfff4c68cef9
--- /dev/null
+++ b/pkgs/development/ocaml-modules/vg/default.nix
@@ -0,0 +1,62 @@
+{ stdenv, fetchurl, ocaml, findlib, opam, gg, uutf, otfm, js_of_ocaml,
+  pdfBackend ? true, # depends on uutf and otfm
+  htmlcBackend ? true # depends on js_of_ocaml
+}:
+
+let
+  inherit (stdenv.lib) getVersion optionals versionAtLeast;
+
+  pname = "vg";
+  version = "0.8.1";
+  webpage = "http://erratique.ch/software/${pname}";
+in
+
+assert versionAtLeast (getVersion ocaml) "4.01.0";
+
+stdenv.mkDerivation rec {
+
+  name = "ocaml-${pname}-${version}";
+
+  src = fetchurl {
+    url = "${webpage}/releases/${pname}-${version}.tbz";
+    sha256 = "1cdcvsr5z8845ndilnrz7p4n6yn4gv2p91z2mgi4vrailcmn5vzd";
+  };
+
+  buildInputs = [ ocaml findlib opam ];
+
+  propagatedBuildInputs = [ gg ]
+                          ++ optionals pdfBackend [ uutf otfm ]
+                          ++ optionals htmlcBackend [ js_of_ocaml ];
+
+  createFindlibDestdir = true;
+
+  unpackCmd = "tar xjf $src";
+
+  buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"
+               + (if pdfBackend then " uutf=true otfm=true"
+                                else " uutf=false otfm=false")
+               + (if htmlcBackend then " jsoo=true"
+                                  else " jsoo=false");
+
+  installPhase = ''
+    opam-installer --script --prefix=$out ${pname}.install | sh
+    ln -s $out/lib/${pname} $out/lib/ocaml/${getVersion ocaml}/site-lib/${pname}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Declarative 2D vector graphics for OCaml";
+    longDescription = ''
+    Vg is an OCaml module for declarative 2D vector graphics. In Vg, images
+    are values that denote functions mapping points of the cartesian plane
+    to colors. The module provides combinators to define and compose these
+    values.
+
+    Renderers for PDF, SVG and the HTML canvas are distributed with the
+    module. An API allows to implement new renderers.
+    '';
+    homepage = "${webpage}";
+    platforms = ocaml.meta.platforms;
+    license = licenses.bsd3;
+    maintainers = [ maintainers.jirkamarsik ];
+  };
+}
diff --git a/pkgs/development/python-modules/wxPython/2.8.nix b/pkgs/development/python-modules/wxPython/2.8.nix
index 64dd59242c2d..a6fd0100f587 100644
--- a/pkgs/development/python-modules/wxPython/2.8.nix
+++ b/pkgs/development/python-modules/wxPython/2.8.nix
@@ -17,4 +17,8 @@ if isPyPy then throw "wxPython-${version} not supported for interpreter ${python
   buildInputs = [ pkgconfig wxGTK (wxGTK.gtk) pythonPackages.python pythonPackages.wrapPython ];
   
   passthru = { inherit wxGTK; };
+
+  meta = {
+    platforms = stdenv.lib.platforms.all;
+  };
 }
diff --git a/pkgs/development/python-modules/wxPython/3.0.nix b/pkgs/development/python-modules/wxPython/3.0.nix
index 4f89dbeb4105..4974daebb2bb 100644
--- a/pkgs/development/python-modules/wxPython/3.0.nix
+++ b/pkgs/development/python-modules/wxPython/3.0.nix
@@ -22,4 +22,8 @@ if isPyPy then throw "wxPython-${version} not supported for interpreter ${python
   inherit openglSupport;
 
   passthru = { inherit wxGTK openglSupport; };
-}
+  
+  meta = {
+    platforms = stdenv.lib.platforms.all;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/r-modules/cran-packages.nix b/pkgs/development/r-modules/cran-packages.nix
index 19e4006bd0d9..c75f46f0dab7 100644
--- a/pkgs/development/r-modules/cran-packages.nix
+++ b/pkgs/development/r-modules/cran-packages.nix
@@ -4332,7 +4332,9 @@ let self = _self // overrides; _self = with self; {
   RcmdrPlugin_plotByGroup = derive { name="RcmdrPlugin.plotByGroup"; version="0.1-0"; sha256="10wc7lnihsrldsynq2s0syr1aqmvfnj9rhgwh1nkk7jlrwcgj0z6"; depends=[Rcmdr lattice]; };
   RcmdrPlugin_pointG = derive { name="RcmdrPlugin.pointG"; version="0.6.6"; sha256="0sc3akbpdys353va05b40g3rq8qihw0pmhvv0kckkhsgrbr8mc07"; depends=[Rcmdr RColorBrewer]; };
   RcmdrPlugin_qual = derive { name="RcmdrPlugin.qual"; version="2.2.6"; sha256="00wznh0k909cd9vwdj1ag3224xkqnwjsad1bfkgxbszsx0w6xvy9"; depends=[Rcmdr]; };
+  /* Broken; the build goes on indefinitely, complaining about some freaky symlink problem.
   RcmdrPlugin_ROC = derive { name="RcmdrPlugin.ROC"; version="1.0-16"; sha256="1pxv0izdkqjhvmbvln6n2lhr1mamfy4q20ld6dqkldxj9bivzckb"; depends=[Rcmdr pROC ROCR ResourceSelection PredictABEL]; };
+  */
   RcmdrPlugin_sampling = derive { name="RcmdrPlugin.sampling"; version="1.1"; sha256="0fx0s63wq0si1jydl9xyj9ny7iglg91zpvkyrnc05i5pan9l3xd9"; depends=[lpSolve sampling MASS Rcmdr]; };
   RcmdrPlugin_SCDA = derive { name="RcmdrPlugin.SCDA"; version="1.0"; sha256="0z43hhp798kga70xmiq4wzp5iad553rndn17g3va3dh6lz1k3y3h"; depends=[SCVA SCRT SCMA Rcmdr]; };
   RcmdrPlugin_seeg = derive { name="RcmdrPlugin.seeg"; version="1.0"; sha256="105c2rl3mrcv7r3iqa9d2zs6cys7vfpyydylkg2cggfqkghxgr95"; depends=[Rcmdr seeg sgeostat]; };
diff --git a/pkgs/development/tools/build-managers/leiningen/builder.sh b/pkgs/development/tools/build-managers/leiningen/builder.sh
index c28854ca0896..a4aaed8f12f3 100644
--- a/pkgs/development/tools/build-managers/leiningen/builder.sh
+++ b/pkgs/development/tools/build-managers/leiningen/builder.sh
@@ -8,7 +8,6 @@ out_bin=$out/bin/lein
 
 cp -v $src $out_bin
 cp -v $jarsrc $out/share/java
-cp -v $clojure/share/java/* $out/share/java/
 
 for p in $patches;
 do
diff --git a/pkgs/development/tools/build-managers/leiningen/default.nix b/pkgs/development/tools/build-managers/leiningen/default.nix
index 49e1dcb29c34..69db7da17bcf 100644
--- a/pkgs/development/tools/build-managers/leiningen/default.nix
+++ b/pkgs/development/tools/build-managers/leiningen/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, makeWrapper
-, coreutils, findutils, jdk, rlwrap, clojure, gnupg }:
+, coreutils, findutils, jdk, rlwrap, gnupg }:
 
 stdenv.mkDerivation rec {
   pname = "leiningen";
@@ -18,13 +18,13 @@ stdenv.mkDerivation rec {
 
   patches = [ ./lein-fix-jar-path.patch ];
 
-  inherit rlwrap clojure gnupg findutils coreutils jdk;
+  inherit rlwrap gnupg findutils coreutils jdk;
 
   builder = ./builder.sh;
 
   buildInputs = [ makeWrapper ];
 
-  propagatedBuildInputs = [ jdk clojure ];
+  propagatedBuildInputs = [ jdk ];
 
   meta = {
     homepage = http://leiningen.org/;
diff --git a/pkgs/development/tools/build-managers/sbt/default.nix b/pkgs/development/tools/build-managers/sbt/default.nix
index 39937f7d378b..9b1e8b7c6fc3 100644
--- a/pkgs/development/tools/build-managers/sbt/default.nix
+++ b/pkgs/development/tools/build-managers/sbt/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "sbt-${version}";
-  version = "0.13.5";
+  version = "0.13.6";
 
   src = fetchurl {
     url = "http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${version}/sbt-launch.jar";
-    sha256 = "05zvb3j7xxswpz7fz2nwbl4dwfdf0cyx5xzjis5fyi2dbzmfdrmp";
+    sha256 = "928ddfdee8aa05c297e7252699b211748139bbb3b2d25c22e590c939352c3bff";
   };
 
   phases = [ "installPhase" ];
diff --git a/pkgs/development/tools/haskell/hscope/default.nix b/pkgs/development/tools/haskell/hscope/default.nix
index 529ad2ef47ec..a295cc4896ca 100644
--- a/pkgs/development/tools/haskell/hscope/default.nix
+++ b/pkgs/development/tools/haskell/hscope/default.nix
@@ -6,20 +6,18 @@
 
 cabal.mkDerivation (self: {
   pname = "hscope";
-  version = "0.4";
-  sha256 = "1jb2d61c1as6li54zw33jsyvfap214pqxpkr2m6lkzaizh8396hg";
+  version = "0.4.1";
+  sha256 = "1m5mp45pvf64pnpc3lsig382177vfc232bbm9g3a8q58jrwridy7";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
     cereal cpphs deepseq haskellSrcExts mtl pureCdb uniplate vector
   ];
   testDepends = [ mtl testSimple Unixutils ];
-  doCheck = false;
   meta = {
     homepage = "https://github.com/bosu/hscope";
     description = "cscope like browser for Haskell code";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    broken = true;
   };
 })
diff --git a/pkgs/development/tools/haskell/threadscope/default.nix b/pkgs/development/tools/haskell/threadscope/default.nix
index 892faca8e8cd..a4961440a3ec 100644
--- a/pkgs/development/tools/haskell/threadscope/default.nix
+++ b/pkgs/development/tools/haskell/threadscope/default.nix
@@ -14,6 +14,7 @@ cabal.mkDerivation (self: {
     binary cairo deepseq filepath ghcEvents glib gtk mtl pango time
   ];
   configureFlags = "--ghc-options=-rtsopts";
+  patches = [ ./threadscope.patch ];
   meta = {
     homepage = "http://www.haskell.org/haskellwiki/ThreadScope";
     description = "A graphical tool for profiling parallel Haskell programs";
diff --git a/pkgs/development/tools/haskell/threadscope/threadscope.patch b/pkgs/development/tools/haskell/threadscope/threadscope.patch
new file mode 100644
index 000000000000..af504a11f26e
--- /dev/null
+++ b/pkgs/development/tools/haskell/threadscope/threadscope.patch
@@ -0,0 +1,14 @@
+--- a/threadscope.cabal.orig	2014-11-03 15:23:29.000000000 -0600
++++ b/threadscope.cabal	2014-11-03 15:24:01.000000000 -0600
+@@ -41,7 +41,10 @@
+ Executable threadscope
+   Main-is:           Main.hs
+   Build-Depends:     base >= 4.0 && < 5,
+-                     gtk >= 0.12, cairo, glib, pango,
++                     gtk >= 0.12 && < 0.13,
++                     cairo < 0.13,
++                     glib < 0.13,
++                     pango < 0.13,
+                      binary, array, mtl, filepath,
+                      ghc-events >= 0.4.2,
+                      containers >= 0.2 && < 0.6,
diff --git a/pkgs/development/tools/misc/automake/automake-1.11.x.nix b/pkgs/development/tools/misc/automake/automake-1.11.x.nix
index 2cd80eb4bac5..879c7e0e8709 100644
--- a/pkgs/development/tools/misc/automake/automake-1.11.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.11.x.nix
@@ -31,6 +31,7 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   meta = {
+    branch = "1.11";
     homepage = http://www.gnu.org/software/automake/;
     description = "GNU standard-compliant makefile generator";
 
diff --git a/pkgs/development/tools/misc/automake/automake-1.12.x.nix b/pkgs/development/tools/misc/automake/automake-1.12.x.nix
index 6a93cdc78fdc..a875298486ff 100644
--- a/pkgs/development/tools/misc/automake/automake-1.12.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.12.x.nix
@@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
   dontPatchShebangs = true;
 
   meta = {
+    branch = "1.12";
     homepage = http://www.gnu.org/software/automake/;
     description = "GNU standard-compliant makefile generator";
 
diff --git a/pkgs/development/tools/misc/automake/automake-1.13.x.nix b/pkgs/development/tools/misc/automake/automake-1.13.x.nix
index d4369787f1b6..a512cffa0075 100644
--- a/pkgs/development/tools/misc/automake/automake-1.13.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.13.x.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
   dontPatchShebangs = true;
 
   meta = {
+    branch = "1.13";
     homepage = "http://www.gnu.org/software/automake/";
     description = "GNU standard-compliant makefile generator";
     license = stdenv.lib.licenses.gpl2Plus;
diff --git a/pkgs/development/tools/misc/automake/automake-1.14.x.nix b/pkgs/development/tools/misc/automake/automake-1.14.x.nix
index 0c6ed42825a9..f95b7de2e17a 100644
--- a/pkgs/development/tools/misc/automake/automake-1.14.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.14.x.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
   dontPatchShebangs = true;
 
   meta = {
+    branch = "1.14";
     homepage = "http://www.gnu.org/software/automake/";
     description = "GNU standard-compliant makefile generator";
     license = stdenv.lib.licenses.gpl2Plus;
diff --git a/pkgs/development/tools/misc/cgdb/default.nix b/pkgs/development/tools/misc/cgdb/default.nix
index 09c9325d4ff2..fa13b4d6ebb4 100644
--- a/pkgs/development/tools/misc/cgdb/default.nix
+++ b/pkgs/development/tools/misc/cgdb/default.nix
@@ -1,11 +1,12 @@
 { stdenv, fetchurl, ncurses, readline }:
 
 stdenv.mkDerivation rec {
-  name = "cgdb-0.6.6";
+  name = "cgdb-${version}";
+  version = "0.6.7";
 
   src = fetchurl {
-    url = "mirror://sourceforge/cgdb/${name}.tar.gz";
-    sha256 = "0iap84ikpk1h58wy14zzi1kwszv1hsnvpvnz14swkz54yrh9z7ng";
+    url = "http://cgdb.me/files/${name}.tar.gz";
+    sha256 = "1agxk6a97v6q0n097zw57qqpaza4j79jg36x99bh8yl23qfx6kh7";
   };
 
   buildInputs = [ ncurses readline ];
@@ -13,7 +14,7 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A curses interface to gdb";
 
-    homepage = http://cgdb.sourceforge.net/;
+    homepage = https://cgdb.github.io/;
 
     repositories.git = git://github.com/cgdb/cgdb.git;
 
diff --git a/pkgs/development/tools/misc/swig/3.x.nix b/pkgs/development/tools/misc/swig/3.x.nix
index 653fb0616034..1a02c88bb71e 100644
--- a/pkgs/development/tools/misc/swig/3.x.nix
+++ b/pkgs/development/tools/misc/swig/3.x.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pcre }:
 
 stdenv.mkDerivation rec {
-  name = "swig-3.0.0";
+  name = "swig-3.0.2";
 
   src = fetchurl {
     url = "mirror://sourceforge/swig/${name}.tar.gz";
-    sha256 = "99cab1055877d00280509f0e04c1fe76643ec3792e9b8e7efcc9aa6e247229df";
+    sha256 = "04vqrij3k6pcq41y7rzl5rmhnghqg905f11wyrqw7vdwr9brcrm2";
   };
 
   buildInputs = [ pcre ];
diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff b/pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff
index ee39855fec9d..e6fc96038ff8 100644
--- a/pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff
+++ b/pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff
@@ -3,7 +3,7 @@
 @@ -1,6 +1,6 @@
  
  # Where binaries are installed:
--BINDIR := /usr/local/bin
+-BINDIR := `dirname  \`which ocamlc\``
 +BINDIR := $(out)/bin
  
  ####
diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
index a7167d0c2262..103b0bfa45e5 100644
--- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
+++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
@@ -1,13 +1,15 @@
-{stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving}:
+{stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving, camlp4,
+ cmdliner, tyxml, reactivedata}:
 
 stdenv.mkDerivation {
-  name = "js_of_ocaml";
+  name = "js_of_ocaml-2.5";
   src = fetchurl {
-    url = https://github.com/ocsigen/js_of_ocaml/archive/2.2.tar.gz;
-    sha256 = "1cp81gpvyxgvzxg0vzyl8aa2zvcixp6m433w8zjifrg6vb7lhp97";
+    url = https://github.com/ocsigen/js_of_ocaml/archive/2.5.tar.gz;
+    sha256 = "1prm08nf8szmd3p13ysb0yx1cy6lr671bnwsp25iny8hfbs39sjv";
     };
   
-  buildInputs = [ocaml findlib ocaml_lwt menhir ocsigen_deriving];
+  buildInputs = [ocaml findlib ocaml_lwt menhir ocsigen_deriving
+                 cmdliner tyxml camlp4 reactivedata];
 
   patches = [ ./Makefile.conf.diff ];  
 
diff --git a/pkgs/development/tools/ocaml/merlin/default.nix b/pkgs/development/tools/ocaml/merlin/default.nix
index 30fabf193620..b20354e76b2f 100644
--- a/pkgs/development/tools/ocaml/merlin/default.nix
+++ b/pkgs/development/tools/ocaml/merlin/default.nix
@@ -1,19 +1,23 @@
-{stdenv, fetchurl, ocaml, findlib, yojson, menhir}:
+{stdenv, fetchurl, ocaml, findlib, yojson, menhir
+, withEmacsMode ? false, emacs}:
 
 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.00";
 
 stdenv.mkDerivation {
 
-  name = "merlin-1.7.1";
+  name = "merlin-2.0";
 
   src = fetchurl {
-    url = https://github.com/the-lambda-church/merlin/archive/v1.7.1.tar.gz;
-    sha256 = "c3b60c7b3fddaa2860e0d8ac0d4fed2ed60e319875734c7ac1a93df524c67aff";
+    url = https://github.com/the-lambda-church/merlin/archive/v2.0.tar.gz;
+    sha256 = "1khvmncj6gfk9p5wl07gp6ii9csc5s1bcv892lkfpfbnsspis7cp";
   };
 
-  buildInputs = [ ocaml findlib yojson menhir ];
+  buildInputs = [ ocaml findlib yojson menhir ]
+    ++ stdenv.lib.optional withEmacsMode emacs;
 
+  preConfigure = "mkdir -p $out/bin";
   prefixKey = "--prefix ";
+  configureFlags = stdenv.lib.optional withEmacsMode "--enable-compiled-emacs-mode";
 
   meta = with stdenv.lib; {
     description = "An editor-independent tool to ease the development of programs in OCaml";
diff --git a/pkgs/development/tools/ocaml/oasis/default.nix b/pkgs/development/tools/ocaml/oasis/default.nix
index 3f172e6aaf2b..29507f49c186 100644
--- a/pkgs/development/tools/ocaml/oasis/default.nix
+++ b/pkgs/development/tools/ocaml/oasis/default.nix
@@ -2,11 +2,11 @@
  ocamlmod, ocamlify, ounit, expect}:
 
 stdenv.mkDerivation {
-  name = "ocaml-oasis-0.4.4";
+  name = "ocaml-oasis-0.4.5";
 
   src = fetchurl {
-    url = http://forge.ocamlcore.org/frs/download.php/1355/oasis-0.4.4.tar.bz2;
-    sha256 = "1lsnw9f1jh6106kphxg40qp0sia6cbkbb9ahs5y6ifnfkmllkjhj";
+    url = http://forge.ocamlcore.org/frs/download.php/1475/oasis-0.4.5.tar.gz;
+    sha256 = "0i1fifzig2slhb07d1djx6i690b8ys0avsx6ssnihisw841sc8v6";
   };
 
   createFindlibDestdir = true;
diff --git a/pkgs/development/tools/ocaml/ocamlscript/Makefile.patch b/pkgs/development/tools/ocaml/ocamlscript/Makefile.patch
new file mode 100644
index 000000000000..1a4a6a225a49
--- /dev/null
+++ b/pkgs/development/tools/ocaml/ocamlscript/Makefile.patch
@@ -0,0 +1,25 @@
+--- a/Makefile	2012-02-04 01:24:21.000000000 +0000
++++ b/Makefile	2014-10-29 14:42:08.690188302 +0000
+@@ -4,6 +4,8 @@
+   version.ml pipeline.mli pipeline.ml common.mli common.ml \
+   utils.mli utils.ml ocaml.mli ocaml.ml
+ 
++CAMLP4 := $(shell ocamlfind query camlp4)
++
+ STDBIN = $(shell dirname `which ocamlfind`)
+ ifndef PREFIX
+   PREFIX = $(shell dirname $(STDBIN))
+@@ -36,11 +38,11 @@
+ 
+ common: version.ml
+ 	ocamlc -pp 'camlp4orf -loc _loc' -c \
+-		-I +camlp4 pa_opt310.ml && \
++		-I $(CAMLP4) pa_opt310.ml && \
+ 		cp pa_opt310.cmo pa_opt.cmo && \
+ 		cp pa_opt310.cmi pa_opt.cmi
+ 	ocamlc -pp 'camlp4orf -loc _loc' -c \
+-		-I +camlp4 pa_tryfinally310.ml && \
++		-I $(CAMLP4) pa_tryfinally310.ml && \
+ 		cp pa_tryfinally310.cmo pa_tryfinally.cmo && \
+ 		cp pa_tryfinally310.cmi pa_tryfinally.cmi
+ 
diff --git a/pkgs/development/tools/ocaml/ocamlscript/default.nix b/pkgs/development/tools/ocaml/ocamlscript/default.nix
new file mode 100644
index 000000000000..50b9c496abaf
--- /dev/null
+++ b/pkgs/development/tools/ocaml/ocamlscript/default.nix
@@ -0,0 +1,26 @@
+{stdenv, fetchurl, ocaml, findlib, camlp4}:
+stdenv.mkDerivation {
+  name = "ocamlscript-2.0.3";
+  src = fetchurl {
+    url = http://mjambon.com/releases/ocamlscript/ocamlscript-2.0.3.tar.gz;
+    sha256 = "1v1i24gijxwris8w4hi95r9swld6dm7jbry0zp72767a3g5ivlrd";
+  };
+
+  buildInputs = [ ocaml findlib camlp4 ];
+
+  patches = [ ./Makefile.patch ];
+
+  buildFlags = "PREFIX=$(out)";
+  installFlags = "PREFIX=$(out)";
+
+  preInstall = "mkdir $out/bin";
+  createFindlibDestdir = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://martin.jambon.free.fr/ocamlscript.html;
+    license = licenses.boost;
+    platforms = ocaml.meta.platforms;
+    description = "Natively-compiled OCaml scripts";
+    maintainers = [ maintainers.vbgl ];
+  };
+}
diff --git a/pkgs/development/tools/ocaml/opam/1.2.0-src_ext-Makefile.patch b/pkgs/development/tools/ocaml/opam/1.2.0-src_ext-Makefile.patch
new file mode 100644
index 000000000000..523d0f6524e7
--- /dev/null
+++ b/pkgs/development/tools/ocaml/opam/1.2.0-src_ext-Makefile.patch
@@ -0,0 +1,11 @@
+--- opam-1.2.0/src_ext/Makefile	2014-10-15 21:32:13.000000000 -0400
++++ opam-1.2.0/src_ext/Makefile.new	2014-10-29 17:37:00.785365601 -0400
+@@ -51,7 +51,7 @@ archives: $(SRC_EXTS:=.download)
+ 	[ -e  $(notdir $(URL_$*)) ] || $(FETCH) $(URL_$*)
+ 	$(MD5CHECK) $(notdir $(URL_$*)) $(MD5_$*)
+ 
+-%.stamp: %.download
++%.stamp:
+ 	mkdir -p tmp
+ 	cd tmp && tar xf$(if $(patsubst %.tar.gz,,$(URL_$*)),j,z) ../$(notdir $(URL_$*))
+ 	rm -rf $*
diff --git a/pkgs/development/tools/ocaml/opam/1.2.0.nix b/pkgs/development/tools/ocaml/opam/1.2.0.nix
new file mode 100644
index 000000000000..9081bcbcb09a
--- /dev/null
+++ b/pkgs/development/tools/ocaml/opam/1.2.0.nix
@@ -0,0 +1,79 @@
+{ stdenv, fetchgit, fetchurl, ocaml, unzip, ncurses, curl }:
+
+# Opam 1.2.0 only works with ocaml >= 3.12.1 according to ./configure
+assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12.1";
+
+let
+  srcs = {
+    cudf = fetchurl {
+      url = "https://gforge.inria.fr/frs/download.php/file/33593/cudf-0.7.tar.gz";
+      sha256 = "92c8a9ed730bbac73f3513abab41127d966c9b9202ab2aaffcd02358c030a701";
+    };
+    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.5.tar.gz";
+      sha256 = "d167466435a155c779d5ec25b2db83ad851feb42ebc37dca8ffa345ddaefb82f";
+    };
+    dose3 = fetchurl {
+      url = "https://gforge.inria.fr/frs/download.php/file/33677/dose3-3.2.2.tar.gz";
+      sha256 = "a30a189f9f298ed1de96d7098440c951f3df2c8da626f7f37f38cbfddefc909c";
+    };
+    cmdliner = fetchurl {
+      url = "http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.4.tbz";
+      sha256 = "ecb65e2cfd984ec07e97a78f334a80cda41fb8f8bb5e37c41fd33e6a0e2e69ef";
+    };
+    uutf = fetchurl {
+      url = "http://erratique.ch/software/uutf/releases/uutf-0.9.3.tbz";
+      sha256 = "1f364f89b1179e5182a4d3ad8975f57389d45548735d19054845e06a27107877";
+    };
+    jsonm = fetchurl {
+      url = "http://erratique.ch/software/jsonm/releases/jsonm-0.9.1.tbz";
+      sha256 = "3fd4dca045d82332da847e65e981d8b504883571d299a3f7e71447d46bc65f73";
+    };
+    opam = fetchurl {
+      url = "https://github.com/ocaml/opam/archive/1.2.0.zip";
+      sha256 = "b78bb9570fbd1dae50583792525a3dd612f8f90db367771fabd7bf4571ba25f7";
+    };
+  };
+in
+stdenv.mkDerivation rec {
+  name = "opam-1.2.0";
+
+  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}
+    ln -sv ${srcs.uutf} $sourceRoot/src_ext/${srcs.uutf.name}
+    ln -sv ${srcs.jsonm} $sourceRoot/src_ext/${srcs.jsonm.name}
+  '';
+
+  patches = [ ./1.2.0-src_ext-Makefile.patch ];
+
+  postConfigure = "make lib-ext";
+
+  # Dirty, but apparently ocp-build requires a TERM
+  makeFlags = ["TERM=screen"];
+
+  doCheck = false;
+
+  meta = {
+    maintainers = [ stdenv.lib.maintainers.henrytill ];
+    description = "A package manager for OCaml";
+    homepage = "http://opam.ocamlpro.com/";
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/tools/parsing/flex/2.5.35.nix b/pkgs/development/tools/parsing/flex/2.5.35.nix
index 8047080a125d..14209225bc61 100644
--- a/pkgs/development/tools/parsing/flex/2.5.35.nix
+++ b/pkgs/development/tools/parsing/flex/2.5.35.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation {
   };
 
   meta = {
+    branch = "2.5.35";
     homepage = http://flex.sourceforge.net/;
     description = "A fast lexical analyser generator";
   };
diff --git a/pkgs/development/tools/slimerjs/default.nix b/pkgs/development/tools/slimerjs/default.nix
index 696a83e9d45d..39e2daf6b3ab 100644
--- a/pkgs/development/tools/slimerjs/default.nix
+++ b/pkgs/development/tools/slimerjs/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, fetchgit, zip, unzip, xulrunner, bash}:
+{stdenv, fetchurl, fetchgit, zip, unzip, firefox, bash}:
 let
   s = # Generated upstream information
   rec {
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
     cp LICENSE README* "$out/share/doc/slimerjs"
     cp -r * "$out/lib/slimerjs"
     echo '#!${bash}/bin/bash' >>  "$out/bin/slimerjs"
-    echo 'export SLIMERJSLAUNCHER=${xulrunner}/bin/xulrunner' >>  "$out/bin/slimerjs"
+    echo 'export SLIMERJSLAUNCHER=${firefox}/bin/firefox' >>  "$out/bin/slimerjs"
     echo "'$out/lib/slimerjs/slimerjs' \"\$@\"" >> "$out/bin/slimerjs"
     chmod a+x "$out/bin/slimerjs"
     sed -e 's@MaxVersion=32[.]@MaxVersion=33.@' -i "$out/lib/slimerjs/application.ini"