summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2014-11-03 23:03:01 +0100
committerPeter Simons <simons@cryp.to>2014-11-03 23:03:01 +0100
commitb5fed52c43360c8a1e6b632236ad41d98c59f804 (patch)
treeefcffbcbed9a980ee912f914baf535bf6181e74d
parent0346efdabfeef55d64c738e093795acc0e80d2d8 (diff)
parent8d605dafc65ede7c4d33178192807612527c911d (diff)
downloadnixlib-b5fed52c43360c8a1e6b632236ad41d98c59f804.tar
nixlib-b5fed52c43360c8a1e6b632236ad41d98c59f804.tar.gz
nixlib-b5fed52c43360c8a1e6b632236ad41d98c59f804.tar.bz2
nixlib-b5fed52c43360c8a1e6b632236ad41d98c59f804.tar.lz
nixlib-b5fed52c43360c8a1e6b632236ad41d98c59f804.tar.xz
nixlib-b5fed52c43360c8a1e6b632236ad41d98c59f804.tar.zst
nixlib-b5fed52c43360c8a1e6b632236ad41d98c59f804.zip
Merge pull request #4238 from wkennington/master.boost
Make boost 156 the default
-rw-r--r--nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix1
-rw-r--r--nixos/modules/profiles/base.nix1
-rw-r--r--nixos/modules/rename.nix1
-rw-r--r--nixos/modules/services/logging/syslog-ng.nix18
-rw-r--r--pkgs/applications/audio/guitarix/default.nix2
-rw-r--r--pkgs/applications/audio/ingen/default.nix2
-rw-r--r--pkgs/applications/audio/pamixer/default.nix2
-rw-r--r--pkgs/applications/audio/yoshimi/default.nix2
-rw-r--r--pkgs/applications/graphics/freecad/default.nix2
-rw-r--r--pkgs/applications/graphics/geeqie/default.nix40
-rw-r--r--pkgs/applications/graphics/luminance-hdr/default.nix2
-rw-r--r--pkgs/applications/graphics/openimageio/default.nix2
-rw-r--r--pkgs/applications/graphics/openscad/default.nix2
-rw-r--r--pkgs/applications/graphics/rapcad/default.nix2
-rw-r--r--pkgs/applications/graphics/synfigstudio/default.nix20
-rw-r--r--pkgs/applications/misc/bitcoin/default.nix4
-rw-r--r--pkgs/applications/misc/bitcoin/dogecoin.nix1
-rw-r--r--pkgs/applications/misc/blender/default.nix2
-rw-r--r--pkgs/applications/misc/d4x/default.nix4
-rw-r--r--pkgs/applications/misc/freicoin/default.nix2
-rw-r--r--pkgs/applications/misc/gnuradio/default.nix2
-rw-r--r--pkgs/applications/misc/librecad/2.0.nix2
-rw-r--r--pkgs/applications/misc/monero/default.nix2
-rw-r--r--pkgs/applications/misc/namecoin/default.nix2
-rw-r--r--pkgs/applications/misc/namecoin/qt.nix2
-rw-r--r--pkgs/applications/misc/twmn/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/ekiga/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/twinkle/default.nix2
-rw-r--r--pkgs/applications/networking/linssid/default.nix2
-rw-r--r--pkgs/applications/networking/p2p/eiskaltdcpp/default.nix2
-rw-r--r--pkgs/applications/networking/p2p/qbittorrent/default.nix15
-rw-r--r--pkgs/applications/networking/p2p/twister/default.nix1
-rw-r--r--pkgs/applications/office/ledger/3.0.nix2
-rw-r--r--pkgs/applications/office/libreoffice/default.nix14
-rw-r--r--pkgs/applications/science/electronics/pulseview/default.nix2
-rw-r--r--pkgs/applications/science/logic/stp/default.nix2
-rw-r--r--pkgs/applications/version-management/gource/default.nix4
-rw-r--r--pkgs/applications/video/aegisub/default.nix4
-rw-r--r--pkgs/applications/video/gnash/default.nix9
-rw-r--r--pkgs/applications/video/mkvtoolnix/default.nix1
-rw-r--r--pkgs/development/compilers/hhvm/default.nix2
-rw-r--r--pkgs/development/libraries/CGAL/default.nix2
-rw-r--r--pkgs/development/libraries/audio/lvtk/default.nix2
-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.nix97
-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.nix159
-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/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/games/asc/default.nix2
-rw-r--r--pkgs/games/globulation/default.nix100
-rw-r--r--pkgs/games/pingus/default.nix2
-rw-r--r--pkgs/games/spring/default.nix2
-rw-r--r--pkgs/games/spring/springlobby.nix2
-rw-r--r--pkgs/games/wesnoth/default.nix2
-rw-r--r--pkgs/servers/amqp/qpid-cpp/default.nix2
-rw-r--r--pkgs/servers/nosql/mongodb/default.nix2
-rw-r--r--pkgs/servers/nosql/rethinkdb/default.nix2
-rw-r--r--pkgs/servers/rippled/default.nix18
-rw-r--r--pkgs/servers/rippled/scons-env.patch46
-rw-r--r--pkgs/tools/filesystems/ceph/default.nix11
-rw-r--r--pkgs/tools/filesystems/grive/default.nix2
-rw-r--r--pkgs/tools/filesystems/jfsrec/default.nix23
-rw-r--r--pkgs/tools/filesystems/jfsrec/jfsrec-gcc-4.3.patch24
-rw-r--r--pkgs/tools/graphics/enblend-enfuse/default.nix2
-rw-r--r--pkgs/tools/graphics/povray/default.nix5
-rw-r--r--pkgs/tools/security/meo/default.nix2
-rw-r--r--pkgs/tools/system/syslog-ng-incubator/default.nix18
-rw-r--r--pkgs/tools/system/syslog-ng/default.nix9
-rw-r--r--pkgs/tools/text/source-highlight/default.nix6
-rw-r--r--pkgs/top-level/all-packages.nix65
-rw-r--r--pkgs/top-level/release.nix1
86 files changed, 491 insertions, 1842 deletions
diff --git a/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix b/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix
index 7d3346e4ea1f..bbf0311c04d6 100644
--- a/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix
+++ b/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix
@@ -76,7 +76,6 @@ in
       pkgs.ntfsprogs # for resizing NTFS partitions
       pkgs.btrfsProgs
       pkgs.jfsutils
-      pkgs.jfsrec
 
       # Some compression/archiver tools.
       pkgs.unzip
diff --git a/nixos/modules/profiles/base.nix b/nixos/modules/profiles/base.nix
index 7a6f76572058..3d1412b56859 100644
--- a/nixos/modules/profiles/base.nix
+++ b/nixos/modules/profiles/base.nix
@@ -34,7 +34,6 @@
     pkgs.xfsprogs
     pkgs.jfsutils
     pkgs.f2fs-tools
-    #pkgs.jfsrec # disabled because of Boost dependency
 
     # Some compression/archiver tools.
     pkgs.unzip
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index ea7d9763ce64..073a22207652 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -131,6 +131,5 @@ in zipModules ([]
 ++ obsolete' [ "programs" "bash" "enable" ]
 ++ obsolete' [ "services" "samba" "defaultShare" ]
 ++ obsolete' [ "services" "syslog-ng" "serviceName" ]
-++ obsolete' [ "services" "syslog-ng" "listenToJournal" ]
 
 )
diff --git a/nixos/modules/services/logging/syslog-ng.nix b/nixos/modules/services/logging/syslog-ng.nix
index 2bf6d1ff7904..f3991a411ec4 100644
--- a/nixos/modules/services/logging/syslog-ng.nix
+++ b/nixos/modules/services/logging/syslog-ng.nix
@@ -43,6 +43,15 @@ in {
           The package providing syslog-ng binaries.
         '';
       };
+      listenToJournal = mkOption {
+        type = types.bool;
+        default = true;
+        description = ''
+          Whether syslog-ng should listen to the syslog socket used
+          by journald, and therefore receive all logs that journald
+          produces.
+        '';
+      };
       extraModulePaths = mkOption {
         type = types.listOf types.str;
         default = [];
@@ -65,7 +74,7 @@ in {
       configHeader = mkOption {
         type = types.lines;
         default = ''
-          @version: 3.6
+          @version: 3.5
           @include "scl.conf"
         '';
         description = ''
@@ -77,13 +86,18 @@ in {
   };
 
   config = mkIf cfg.enable {
+    systemd.sockets.syslog = mkIf cfg.listenToJournal {
+      wantedBy = [ "sockets.target" ];
+      socketConfig.Service = "syslog-ng.service";
+    };
     systemd.services.syslog-ng = {
       description = "syslog-ng daemon";
       preStart = "mkdir -p /{var,run}/syslog-ng";
-      wantedBy = [ "multi-user.target" ];
+      wantedBy = optional (!cfg.listenToJournal) "multi-user.target";
       after = [ "multi-user.target" ]; # makes sure hostname etc is set
       serviceConfig = {
         Type = "notify";
+        Sockets = if cfg.listenToJournal then "syslog.socket" else null;
         StandardOutput = "null";
         Restart = "on-failure";
         ExecStart = "${cfg.package}/sbin/syslog-ng ${concatStringsSep " " syslogngOptions}";
diff --git a/pkgs/applications/audio/guitarix/default.nix b/pkgs/applications/audio/guitarix/default.nix
index fd61c65dba2e..5e88da8f856e 100644
--- a/pkgs/applications/audio/guitarix/default.nix
+++ b/pkgs/applications/audio/guitarix/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    avahi boost boost.lib eigen fftw gettext glib glibmm gtk gtkmm intltool
+    avahi boost eigen fftw gettext glib glibmm gtk gtkmm intltool
     jack2 ladspaH librdf libsndfile lilv lv2 pkgconfig python serd sord sratom
   ];
 
diff --git a/pkgs/applications/audio/ingen/default.nix b/pkgs/applications/audio/ingen/default.nix
index f6c0d9e99450..450b57a68195 100644
--- a/pkgs/applications/audio/ingen/default.nix
+++ b/pkgs/applications/audio/ingen/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation  rec {
   };
 
   buildInputs = [
-    boost boost.lib ganv glibmm gtk gtkmm jack2 lilv lv2 pkgconfig python
+    boost ganv glibmm gtk gtkmm jack2 lilv lv2 pkgconfig python
     raul serd sord sratom suil
   ];
 
diff --git a/pkgs/applications/audio/pamixer/default.nix b/pkgs/applications/audio/pamixer/default.nix
index 769af20c0ed0..d273c2381778 100644
--- a/pkgs/applications/audio/pamixer/default.nix
+++ b/pkgs/applications/audio/pamixer/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
     sha256 = "03r0sbfj85wp6yxa87pjg69ivmk0mxxa2nykr8gf2c607igmb034";
   };
 
-  buildInputs = [ pulseaudio boost boost.lib ];
+  buildInputs = [ pulseaudio boost ];
 
   installPhase = ''
     mkdir -p $out/bin
diff --git a/pkgs/applications/audio/yoshimi/default.nix b/pkgs/applications/audio/yoshimi/default.nix
index ec168486f6d3..bab6cdcf33f0 100644
--- a/pkgs/applications/audio/yoshimi/default.nix
+++ b/pkgs/applications/audio/yoshimi/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation  rec {
   };
 
   buildInputs = [
-    alsaLib boost boost.lib cairo fftwSinglePrec fltk jack2 libsndfile mesa
+    alsaLib boost cairo fftwSinglePrec fltk jack2 libsndfile mesa
     minixml zlib xorg.libpthreadstubs
   ];
 
diff --git a/pkgs/applications/graphics/freecad/default.nix b/pkgs/applications/graphics/freecad/default.nix
index 0235f892b8dc..a7665177046b 100644
--- a/pkgs/applications/graphics/freecad/default.nix
+++ b/pkgs/applications/graphics/freecad/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ cmake coin3d xercesc ode eigen qt4 opencascade gts boost
-    boost.lib zlib python swig gfortran soqt libf2c makeWrapper matplotlib
+    zlib python swig gfortran soqt libf2c makeWrapper matplotlib
     pycollada pyside pysideShiboken
   ];
 
diff --git a/pkgs/applications/graphics/geeqie/default.nix b/pkgs/applications/graphics/geeqie/default.nix
index e914186ac815..902538991fd3 100644
--- a/pkgs/applications/graphics/geeqie/default.nix
+++ b/pkgs/applications/graphics/geeqie/default.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchgit, pkgconfig, autoconf, automake, gtk, libpng, exiv2, lcms
-, intltool, gettext, libchamplain, fbida }:
+{ stdenv, fetchgit, autoconf, automake, libtool, pkgconfig, gtk, libpng, exiv2
+, lcms, intltool, gettext, libchamplain, fbida
+}:
 
 stdenv.mkDerivation rec {
   name = "geeqie-${version}";
@@ -11,22 +12,25 @@ stdenv.mkDerivation rec {
     sha256 = "1h9w0jrcqcp5jjgmks5pvpppnfxhcd1s3vqlyb3qyil2wfk8n8wp";
   };
 
-  preConfigure = "./autogen.sh";
-
-  configureFlags = [ "--enable-gps" ];
-
-  buildInputs =
-    [ pkgconfig autoconf automake gtk libpng exiv2 lcms intltool gettext
-      libchamplain
-    ];
-
-  postInstall =
-    ''
-      # Allow geeqie to find exiv2 and exiftran, necessary to
-      # losslessly rotate JPEG images.
-      sed -i $out/lib/geeqie/geeqie-rotate \
-          -e '1 a export PATH=${exiv2}/bin:${fbida}/bin:$PATH'
-    '';
+  configureFlags = [
+    "--enable-gps"
+  ];
+
+  configurePhase = ''
+    ./autogen.sh $configureFlags
+  '';
+
+  buildInputs = [
+    autoconf automake libtool pkgconfig gtk libpng exiv2 lcms intltool gettext
+    libchamplain
+  ];
+
+  postInstall = ''
+    # Allow geeqie to find exiv2 and exiftran, necessary to
+    # losslessly rotate JPEG images.
+    sed -i $out/lib/geeqie/geeqie-rotate \
+        -e '1 a export PATH=${exiv2}/bin:${fbida}/bin:$PATH'
+  '';
 
   meta = with stdenv.lib; {
     description = "Lightweight GTK+ based image viewer";
diff --git a/pkgs/applications/graphics/luminance-hdr/default.nix b/pkgs/applications/graphics/luminance-hdr/default.nix
index 7f2d3e245890..7558b0aef4b6 100644
--- a/pkgs/applications/graphics/luminance-hdr/default.nix
+++ b/pkgs/applications/graphics/luminance-hdr/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
 
   NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR";
 
-  buildInputs = [ qt5 boost boost.lib exiv2 fftwFloat gsl ilmbase lcms2 libraw libtiff openexr ];
+  buildInputs = [ qt5 boost exiv2 fftwFloat gsl ilmbase lcms2 libraw libtiff openexr ];
 
   nativeBuildInputs = [ cmake pkgconfig ];
 
diff --git a/pkgs/applications/graphics/openimageio/default.nix b/pkgs/applications/graphics/openimageio/default.nix
index f6d7c25b196d..00ba14d98af6 100644
--- a/pkgs/applications/graphics/openimageio/default.nix
+++ b/pkgs/applications/graphics/openimageio/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    boost boost.lib cmake ilmbase libjpeg libpng libtiff opencolorio openexr
+    boost cmake ilmbase libjpeg libpng libtiff opencolorio openexr
     unzip
   ];
 
diff --git a/pkgs/applications/graphics/openscad/default.nix b/pkgs/applications/graphics/openscad/default.nix
index 67611d2f67cc..e6d5ee5528f0 100644
--- a/pkgs/applications/graphics/openscad/default.nix
+++ b/pkgs/applications/graphics/openscad/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    qt4 bison flex eigen boost boost.lib mesa glew opencsg cgal mpfr gmp glib
+    qt4 bison flex eigen boost mesa glew opencsg cgal mpfr gmp glib
     pkgconfig
   ];
 
diff --git a/pkgs/applications/graphics/rapcad/default.nix b/pkgs/applications/graphics/rapcad/default.nix
index b314bdaf6baa..2ff824124098 100644
--- a/pkgs/applications/graphics/rapcad/default.nix
+++ b/pkgs/applications/graphics/rapcad/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "37c7107dc4fcf8942a4ad35377c4e42e6aedfa35296e5fcf8d84882ae35087c7";
   };
   
-  buildInputs = [qt4 cgal boost boost.lib gmp mpfr flex bison dxflib];
+  buildInputs = [qt4 cgal boost gmp mpfr flex bison dxflib];
 
   configurePhase = ''
     qmake;
diff --git a/pkgs/applications/graphics/synfigstudio/default.nix b/pkgs/applications/graphics/synfigstudio/default.nix
index fb95510fa130..6af51e817785 100644
--- a/pkgs/applications/graphics/synfigstudio/default.nix
+++ b/pkgs/applications/graphics/synfigstudio/default.nix
@@ -23,29 +23,37 @@ let
        sha256 = "04mx321z929ngl65hfc1hv5jw37wqbh8y2avmpvajagvn6lp3zdl";
     };
 
+    configureFlags = [
+      "--with-boost=${boost.dev}"
+      "--with-boost-libdir=${boost.lib}/lib"
+    ];
+
     patches = [ ./synfig-cstring.patch ];
 
     buildInputs = [
-      ETL boost boost.lib cairo gettext glibmm libsigcxx libtool libxmlxx pango
+      ETL boost cairo gettext glibmm libsigcxx libtool libxmlxx pango
       pkgconfig
     ];
-
-    configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ];
   };
 in
 stdenv.mkDerivation rec {
   name = "synfigstudio-${version}";
 
   src = fetchurl {
-       url = "mirror://sourceforge/synfig/${name}.tar.gz";
-       sha256 = "13hw4z6yx70g4mnjmvmxkk7b1qzlwmqjhxflq5dd6cqdsmfw9mc7";
-    };
+    url = "mirror://sourceforge/synfig/${name}.tar.gz";
+    sha256 = "13hw4z6yx70g4mnjmvmxkk7b1qzlwmqjhxflq5dd6cqdsmfw9mc7";
+  };
 
   buildInputs = [
     ETL boost cairo fontsConf gettext glibmm gtk gtkmm imagemagick intltool
     intltool libsigcxx libtool libxmlxx pkgconfig synfig
   ];
 
+  configureFlags = [
+    "--with-boost=${boost.dev}"
+    "--with-boost-libdir=${boost.lib}/lib"
+  ];
+
   preBuild = ''
     export FONTCONFIG_FILE=${fontsConf}
   '';
diff --git a/pkgs/applications/misc/bitcoin/default.nix b/pkgs/applications/misc/bitcoin/default.nix
index 242ee4e9c9f5..808984ad664d 100644
--- a/pkgs/applications/misc/bitcoin/default.nix
+++ b/pkgs/applications/misc/bitcoin/default.nix
@@ -23,10 +23,6 @@ stdenv.mkDerivation rec {
     cd bitcoin*
   '';
 
-  configureFlags = [
-    "--with-boost=${boost}"
-  ];
-
   preCheck = ''
     # At least one test requires writing in $HOME
     HOME=$TMPDIR
diff --git a/pkgs/applications/misc/bitcoin/dogecoin.nix b/pkgs/applications/misc/bitcoin/dogecoin.nix
index 7ace3c161c7b..21da32104d34 100644
--- a/pkgs/applications/misc/bitcoin/dogecoin.nix
+++ b/pkgs/applications/misc/bitcoin/dogecoin.nix
@@ -30,7 +30,6 @@ let
       ./autogen.sh \
       && ./configure --prefix=$out \
                      --with-incompatible-bdb \
-                     --with-boost-libdir=${boost}/lib \
                      ${ if withGui then "--with-gui" else "" }
     '';
 
diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix
index 5b2c5776cf43..01f9b861bf27 100644
--- a/pkgs/applications/misc/blender/default.nix
+++ b/pkgs/applications/misc/blender/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs =
-    [ SDL boost boost.lib cmake ffmpeg gettext glew ilmbase libXi
+    [ SDL boost cmake ffmpeg gettext glew ilmbase libXi
       libjpeg libpng libsamplerate libsndfile libtiff mesa openal
       opencolorio openexr openimageio /* openjpeg */ python zlib fftw
     ]
diff --git a/pkgs/applications/misc/d4x/default.nix b/pkgs/applications/misc/d4x/default.nix
index d6ca3939d137..66fceec9a51b 100644
--- a/pkgs/applications/misc/d4x/default.nix
+++ b/pkgs/applications/misc/d4x/default.nix
@@ -10,10 +10,6 @@ stdenv.mkDerivation {
     sha256 = "1i1jj02bxynisqapv31481sz9jpfp3f023ky47spz1v1wlwbs13m";
   };
 
-  configurePhase = "./configure --prefix=\$out "
-    + " --with-boost-libdir=\$boost/lib"
-    + " --with-boost-includedir=\$boost/include";
-    
   buildInputs = [ gtk glib pkgconfig openssl boost ];
 
   meta = { 
diff --git a/pkgs/applications/misc/freicoin/default.nix b/pkgs/applications/misc/freicoin/default.nix
index 06ea5e9ad5cb..65265fc07a5a 100644
--- a/pkgs/applications/misc/freicoin/default.nix
+++ b/pkgs/applications/misc/freicoin/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   # I think that openssl and zlib are required, but come through other
   # packages
-  buildInputs = [ db boost boost.lib gmp mpfr miniupnpc qt4 unzip ];
+  buildInputs = [ db boost gmp mpfr miniupnpc qt4 unzip ];
 
   configurePhase = "qmake";
 
diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix
index db8595e1baa8..045d6f9f92ab 100644
--- a/pkgs/applications/misc/gnuradio/default.nix
+++ b/pkgs/applications/misc/gnuradio/default.nix
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    cmake pkgconfig git boost boost.lib cppunit fftw python swig2 orc lxml qt4
+    cmake pkgconfig git boost cppunit fftw python swig2 orc lxml qt4
     qwt alsaLib SDL libusb1 uhd gsl makeWrapper
   ];
 
diff --git a/pkgs/applications/misc/librecad/2.0.nix b/pkgs/applications/misc/librecad/2.0.nix
index 8b7a9a40c872..6cc775b72d39 100644
--- a/pkgs/applications/misc/librecad/2.0.nix
+++ b/pkgs/applications/misc/librecad/2.0.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
   '';
 
   configurePhase = ''
-    qmake librecad.pro PREFIX=$out MUPARSER_DIR=${muparser} BOOST_DIR=${boost}
+    qmake librecad.pro PREFIX=$out MUPARSER_DIR=${muparser} BOOST_DIR=${boost.dev}
   '';
 
   installPhase = ''
diff --git a/pkgs/applications/misc/monero/default.nix b/pkgs/applications/misc/monero/default.nix
index 52e8d20495b9..1fe5406384f8 100644
--- a/pkgs/applications/misc/monero/default.nix
+++ b/pkgs/applications/misc/monero/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
     sha256 = "0bbhqjjzh922aymjqrnl2hd3r8x6p7x5aa5jidv3l4d77drhlgzy";
   };
 
-  buildInputs = [ cmake boost boost.lib ];
+  buildInputs = [ cmake boost ];
 
   # these tests take a long time and don't
   # always complete in the build environment
diff --git a/pkgs/applications/misc/namecoin/default.nix b/pkgs/applications/misc/namecoin/default.nix
index 94ee63fe2de2..d9e09923c3be 100644
--- a/pkgs/applications/misc/namecoin/default.nix
+++ b/pkgs/applications/misc/namecoin/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
 
   # Don't build with miniupnpc due to namecoin using a different verison that
   # ships with NixOS and it is API incompatible.
-  buildInputs = [ db4 boost boost.lib openssl unzip ];
+  buildInputs = [ db4 boost openssl unzip ];
 
   patchPhase = ''
     sed -e 's/-Wl,-Bstatic//g' -e 's/-l gthread-2.0//g' -e 's/-l z//g' -i src/Makefile
diff --git a/pkgs/applications/misc/namecoin/qt.nix b/pkgs/applications/misc/namecoin/qt.nix
index 6b63bf7ca348..2a83a4d11d6f 100644
--- a/pkgs/applications/misc/namecoin/qt.nix
+++ b/pkgs/applications/misc/namecoin/qt.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
 
   # Don't build with miniupnpc due to namecoin using a different verison that
   # ships with NixOS and it is API incompatible.
-  buildInputs = [ db4 boost boost.lib openssl unzip qt4 ];
+  buildInputs = [ db4 boost openssl unzip qt4 ];
 
   configurePhase = ''
     qmake USE_UPNP=-
diff --git a/pkgs/applications/misc/twmn/default.nix b/pkgs/applications/misc/twmn/default.nix
index e144d12f762e..65c2ccb5ff0b 100644
--- a/pkgs/applications/misc/twmn/default.nix
+++ b/pkgs/applications/misc/twmn/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "1jd2y0ydcpjdmjbx77lw35710sqfwbgyrnpv66mi3gwvrbyiwpf3";
   };
 
-  buildInputs = [ qt4 pkgconfig boost boost.lib ];
+  buildInputs = [ qt4 pkgconfig boost ];
   propagatedBuildInputs = [ dbus ];
 
   configurePhase = "qmake";
diff --git a/pkgs/applications/networking/instant-messengers/ekiga/default.nix b/pkgs/applications/networking/instant-messengers/ekiga/default.nix
index 41bd4ca45131..cae9fe294f34 100644
--- a/pkgs/applications/networking/instant-messengers/ekiga/default.nix
+++ b/pkgs/applications/networking/instant-messengers/ekiga/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
                   perl perlXMLParser evolution_data_server gnome_doc_utils avahi
                   libsigcxx gtk dbus_glib libnotify libXext xextproto sqlite
                   gnome3.libsoup glib gnome3.gnome_icon_theme_symbolic
-                  hicolor_icon_theme gnome3.gnome_icon_theme boost boost.lib
+                  hicolor_icon_theme gnome3.gnome_icon_theme boost
                   autoreconfHook pkgconfig libxml2 videoproto unixODBC db nspr
                   nss zlib libsecret libXrandr randrproto which libxslt libtasn1
                   gmp nettle makeWrapper ];
diff --git a/pkgs/applications/networking/instant-messengers/twinkle/default.nix b/pkgs/applications/networking/instant-messengers/twinkle/default.nix
index 961ab997384e..c7f33c1f5805 100644
--- a/pkgs/applications/networking/instant-messengers/twinkle/default.nix
+++ b/pkgs/applications/networking/instant-messengers/twinkle/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
   configureFlags = "--with-extra-includes=${libjpeg}/include";
 
   buildInputs =
-    [ pkgconfig autoreconfHook commoncpp2 openssl boost boost.lib libsndfile
+    [ pkgconfig autoreconfHook commoncpp2 openssl boost libsndfile
       libxml2 libjpeg readline qt3 perl file
       # optional ? :
       alsaLib speex
diff --git a/pkgs/applications/networking/linssid/default.nix b/pkgs/applications/networking/linssid/default.nix
index 00ff1110c32f..2b4c5f564bec 100644
--- a/pkgs/applications/networking/linssid/default.nix
+++ b/pkgs/applications/networking/linssid/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "13d35rlcjncd8lx3khkgn9x8is2xjd5fp6ns5xsn3w6l4xj9b4gl";
   };
 
-  buildInputs = [ qt5 pkgconfig boost boost.lib ];
+  buildInputs = [ qt5 pkgconfig boost ];
 
   postPatch = ''
     sed -e "s|/usr/include/|/nonexistent/|g" -i linssid-app/*.pro
diff --git a/pkgs/applications/networking/p2p/eiskaltdcpp/default.nix b/pkgs/applications/networking/p2p/eiskaltdcpp/default.nix
index ba71e1985b46..e4ca6d423cdc 100644
--- a/pkgs/applications/networking/p2p/eiskaltdcpp/default.nix
+++ b/pkgs/applications/networking/p2p/eiskaltdcpp/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "3d9170645450f9cb0a605278b8646fec2110b9637910d86fd27cf245cbe24eaf";
   };
 
-  buildInputs = [ cmake pkgconfig qt4 boost boost.lib bzip2 libX11 pcre libidn lua5 miniupnpc aspell gettext ];
+  buildInputs = [ cmake pkgconfig qt4 boost bzip2 libX11 pcre libidn lua5 miniupnpc aspell gettext ];
 
   cmakeFlags = ''
     -DUSE_ASPELL=ON
diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix
index ccf129881f5d..51c43771bcf7 100644
--- a/pkgs/applications/networking/p2p/qbittorrent/default.nix
+++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix
@@ -2,18 +2,21 @@
 , pkgconfig }:
 
 stdenv.mkDerivation rec {
-  name = "qbittorrent-3.1.10";
+  name = "qbittorrent-3.1.11";
 
   src = fetchurl {
     url = "mirror://sourceforge/qbittorrent/${name}.tar.xz";
-    sha256 = "0xhqli191r5v9b5x6wj1wsjlj6svf6ldgzl7jza39q3ipr5c2pg6";
+    sha256 = "0qvz8ifk01b9sw9x5yh3b5kmssx5yi026zvgvabdvfaqkvcmw43i";
   };
 
-  buildInputs = [ qt4 which dbus_libs boost libtorrentRasterbar
-    pkgconfig ];
+  buildInputs = [
+    qt4 which dbus_libs boost libtorrentRasterbar pkgconfig
+  ];
 
-  configureFlags = "--with-libboost-inc=${boost}/include "
-    + "--with-libboost-lib=${boost}/lib";
+  configureFlags = [
+    "--with-libboost-lib=${boost.lib}/lib"
+    "--with-libboost-inc=${boost.dev}/include"
+  ];
 
   # https://github.com/qbittorrent/qBittorrent/issues/1992 
   #enableParallelBuilding = true;
diff --git a/pkgs/applications/networking/p2p/twister/default.nix b/pkgs/applications/networking/p2p/twister/default.nix
index 36f83a0611bf..8d47ab2d777d 100644
--- a/pkgs/applications/networking/p2p/twister/default.nix
+++ b/pkgs/applications/networking/p2p/twister/default.nix
@@ -26,7 +26,6 @@ in stdenv.mkDerivation rec {
   configureFlags = [
     "--with-libgeoip"
     "--with-libiconv"
-    "--with-boost=${boost}"
     "--disable-deprecated-functions"
     "--enable-tests"
     "--enable-python-binding"
diff --git a/pkgs/applications/office/ledger/3.0.nix b/pkgs/applications/office/ledger/3.0.nix
index 22f15f652175..6118d377a79f 100644
--- a/pkgs/applications/office/ledger/3.0.nix
+++ b/pkgs/applications/office/ledger/3.0.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
     sha256 = "0fmmhr3as4v2kb6h64k1fq979080cqhd75jvxfg7axk2mylb6b3q";
   };
 
-  buildInputs = [ cmake boost boost.lib gmp mpfr libedit python texinfo gnused ];
+  buildInputs = [ cmake boost gmp mpfr libedit python texinfo gnused ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix
index b63948690a4e..036f21fdead3 100644
--- a/pkgs/applications/office/libreoffice/default.nix
+++ b/pkgs/applications/office/libreoffice/default.nix
@@ -40,9 +40,9 @@ let
        sha256 = "10amvz7fzr1kcy3svfspkdykmspqgpjdmk44cyr406wi7v4lwnf9";
      };
 
-     configureFlags = "--with-boost=${boost}";
+     buildInputs = [ boost mdds pkgconfig ];
 
-     buildInputs = [ boost boost.lib mdds pkgconfig ];
+     configureFlags = [ "--with-boost=${boost.dev}" ];
   };
 
   fetchThirdParty = {name, md5, brief, subDir ? ""}: fetchurl {
@@ -60,9 +60,10 @@ let
       (x: x.name == "${name}.tar.bz2")
       ("Error: update liborcus version inside LO expression")
       (import ./libreoffice-srcs.nix));
-    configureFlags = "--with-boost=${boost}";
 
-    buildInputs = [ boost boost.lib mdds pkgconfig zlib libixion ];
+    buildInputs = [ boost mdds pkgconfig zlib libixion ];
+
+    configureFlags = [ "--with-boost=${boost.dev}" ];
   };
 
   fetchSrc = {name, sha256}: fetchurl {
@@ -183,6 +184,8 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags = [
+    "--with-boost=${boost.dev}"
+    "--with-boost-libdir=${boost.lib}/lib"
     "--with-vendor=NixOS"
 
     # Without these, configure does not finish
@@ -198,7 +201,6 @@ stdenv.mkDerivation rec {
     "--with-system-headers"
     "--with-system-openssl"
     "--with-system-openldap"
-    "--with-boost-libdir=${boost.lib}/lib"
     "--without-system-libwps"  # TODO
     "--without-doxygen"
 
@@ -236,7 +238,7 @@ stdenv.mkDerivation rec {
   '';
 
   buildInputs = with xorg;
-    [ ant ArchiveZip autoconf automake bison boost boost.lib cairo clucene_core
+    [ ant ArchiveZip autoconf automake bison boost cairo clucene_core
       CompressZlib cppunit cups curl db dbus_glib expat file flex fontconfig
       freetype GConf getopt gnome_vfs gperf gst_plugins_base gstreamer gtk
       hunspell icu jdk kde4.kdelibs lcms libcdr libexttextcat unixODBC libjpeg
diff --git a/pkgs/applications/science/electronics/pulseview/default.nix b/pkgs/applications/science/electronics/pulseview/default.nix
index f9369efe96e5..07724d932541 100644
--- a/pkgs/applications/science/electronics/pulseview/default.nix
+++ b/pkgs/applications/science/electronics/pulseview/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "1pf1dgwd9j586nqmni6gqf3qxrsmawcmi9wzqfzqkjci18xd7dgy";
   };
 
-  buildInputs = [ pkgconfig cmake glib qt4 boost boost.lib libsigrok
+  buildInputs = [ pkgconfig cmake glib qt4 boost libsigrok
     libsigrokdecode libserialport libzip udev libusb1 libftdi
   ];
 
diff --git a/pkgs/applications/science/logic/stp/default.nix b/pkgs/applications/science/logic/stp/default.nix
index 109d9fe3d4be..cfe96bc6983a 100644
--- a/pkgs/applications/science/logic/stp/default.nix
+++ b/pkgs/applications/science/logic/stp/default.nix
@@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
     rev    = "3aa11620a823d617fc033d26aedae91853d18635";
     sha256 = "832520787f57f63cf47364d080f30ad10d6d6e00f166790c19b125be3d6dd45c";
   };
-  buildInputs = [ cmake boost boost.lib bison flex perl zlib ];
+  buildInputs = [ cmake boost bison flex perl zlib ];
   cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
   patchPhase = ''
       sed -e 's,^export(PACKAGE.*,,' -i CMakeLists.txt
diff --git a/pkgs/applications/version-management/gource/default.nix b/pkgs/applications/version-management/gource/default.nix
index 74eee4778472..56095762f04b 100644
--- a/pkgs/applications/version-management/gource/default.nix
+++ b/pkgs/applications/version-management/gource/default.nix
@@ -13,10 +13,10 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     glew SDL ftgl pkgconfig libpng libjpeg pcre SDL_image mesa
-    boost boost.lib glm
+    boost glm
   ];
 
-  configureFlags = "--with-boost-libdir=${boost.lib}/lib";
+  configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ];
 
   NIX_CFLAGS_COMPILE = "-fpermissive"; # fix build with newer gcc versions
 
diff --git a/pkgs/applications/video/aegisub/default.nix b/pkgs/applications/video/aegisub/default.nix
index b42e781704a0..579990746097 100644
--- a/pkgs/applications/video/aegisub/default.nix
+++ b/pkgs/applications/video/aegisub/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = with stdenv.lib;
-  [ intltool libX11 gettext wxGTK libiconv fontconfig freetype mesa libass fftw ffms ffmpeg pkgconfig zlib icu boost boost.lib ]
+  [ intltool libX11 gettext wxGTK libiconv fontconfig freetype mesa libass fftw ffms ffmpeg pkgconfig zlib icu boost ]
   ++ optional spellChecking hunspell
   ++ optional automationSupport lua
   ++ optional openalSupport openal
@@ -40,8 +40,6 @@ stdenv.mkDerivation rec {
 
   NIX_LDFLAGS = "-liconv -lavutil -lavformat -lavcodec -lswscale -lz -lm -lGL";
 
-  configureFlags = "--with-boost-libdir=${boost.lib}/lib/";
-
   postInstall = "ln -s $out/bin/aegisub-* $out/bin/aegisub";
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/video/gnash/default.nix b/pkgs/applications/video/gnash/default.nix
index 879fa08ea382..5a519e231c80 100644
--- a/pkgs/applications/video/gnash/default.nix
+++ b/pkgs/applications/video/gnash/default.nix
@@ -30,12 +30,11 @@ stdenv.mkDerivation rec {
     patch -p1 < ${patch_CVE}
 
     # Add all libs to `macros/libslist', a list of library search paths.
-    for lib in ${lib.concatStringsSep " "
-                                      (map (lib: "\"${lib}\"/lib")
-                                           (buildInputs ++ [stdenv.glibc]))}
-    do
+    libs=$(echo "$NIX_LDFLAGS" | tr ' ' '\n' | sed -n 's/.*-L\(.*\).*/\1/p')
+    for lib in $libs; do
       echo -n "$lib " >> macros/libslist
     done
+    echo -n "${stdenv.glibc}/lib" >> macros/libslist
 
     # Make sure to honor $TMPDIR, for chroot builds.
     for file in configure gui/Makefile.in Makefile.in
@@ -54,7 +53,7 @@ stdenv.mkDerivation rec {
   buildInputs = [
     gettext x11 SDL SDL_mixer gstreamer gst_plugins_base gst_plugins_good
     gst_ffmpeg speex libtool
-    libogg libxml2 libjpeg mesa libpng libungif boost boost.lib freetype agg
+    libogg libxml2 libjpeg mesa libpng libungif boost freetype agg
     dbus curl pkgconfig glib gtk gtkglext pangox_compat
     xulrunner
     makeWrapper
diff --git a/pkgs/applications/video/mkvtoolnix/default.nix b/pkgs/applications/video/mkvtoolnix/default.nix
index 1523aa4377df..a6c2ff0b822a 100644
--- a/pkgs/applications/video/mkvtoolnix/default.nix
+++ b/pkgs/applications/video/mkvtoolnix/default.nix
@@ -28,7 +28,6 @@ stdenv.mkDerivation rec {
     expat wxGTK zlib ruby gettext pkgconfig curl
   ];
 
-  configureFlags = "--with-boost-libdir=${boost}/lib";
   buildPhase = ''
     ruby ./drake
   '';
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/libraries/CGAL/default.nix b/pkgs/development/libraries/CGAL/default.nix
index c22cee15fa04..505aab78242a 100644
--- a/pkgs/development/libraries/CGAL/default.nix
+++ b/pkgs/development/libraries/CGAL/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "00shds5yph4s09lqdrb6n60wnw9kpiwa25ghg9mbsgq3fnr8p7kr";
   };
 
-  buildInputs = [ cmake boost boost.lib gmp mpfr ];
+  buildInputs = [ cmake boost gmp mpfr ];
 
   doCheck = false;
 
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/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 31469b3e06c5..808ff912e7db 100644
--- a/pkgs/development/libraries/boost/1.55.nix
+++ b/pkgs/development/libraries/boost/1.55.nix
@@ -1,99 +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:
 
-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";
   };
-
-  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${withToolset}";
-
-  # 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..f4a78f201c9d
--- /dev/null
+++ b/pkgs/development/libraries/boost/generic.nix
@@ -0,0 +1,159 @@
+{ 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")"
+  '';
+
+  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/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/games/asc/default.nix b/pkgs/games/asc/default.nix
index 41c527f462ce..5243316734e3 100644
--- a/pkgs/games/asc/default.nix
+++ b/pkgs/games/asc/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   NIX_CFLAGS_COMPILE = "-fpermissive"; # I'm too lazy to catch all gcc47-related problems
 
   buildInputs = [
-    SDL SDL_image SDL_mixer SDL_sound libsigcxx physfs boost boost.lib expat
+    SDL SDL_image SDL_mixer SDL_sound libsigcxx physfs boost expat
     freetype libjpeg wxGTK lua perl pkgconfig zlib zip bzip2 libpng
   ];
 
diff --git a/pkgs/games/globulation/default.nix b/pkgs/games/globulation/default.nix
index 7ac83d512b30..ed134bcf3c92 100644
--- a/pkgs/games/globulation/default.nix
+++ b/pkgs/games/globulation/default.nix
@@ -1,80 +1,50 @@
-x@{builderDefsPackage
-  , mesa, SDL, scons, SDL_ttf, SDL_image, zlib, SDL_net, speex, libvorbis
-  , libogg, boost, fribidi, bsdiff
-  , ...}:
-builderDefsPackage
-(a :  
-let 
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
-    [];
-
-  buildInputs = [ boost.lib ]
-    ++ map (n: builtins.getAttr n x)
-     (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-  sourceInfo = rec {
-   baseName="glob2";
-    version="0.9.4";
-    patchlevel="4";
-    name="${baseName}-${version}.${patchlevel}";
-    url="mirror://savannah/glob2/${version}/${name}.tar.gz";
-    hash="1f0l2cqp2g3llhr9jl6jj15k0wb5q8n29vqj99xy4p5hqs78jk8g";
-  };
-in
-rec {
-  src = a.fetchurl {
-    url = sourceInfo.url;
-    sha256 = sourceInfo.hash;
-  };
-
-  tutorial4patch = a.fetchurl {
+{ stdenv, fetchurl, mesa, SDL, scons, SDL_ttf, SDL_image, zlib, SDL_net
+, speex, libvorbis, libogg, boost, fribidi, bsdiff
+}:
+let
+  version = "0.9.4";
+  patchlevel = "4";
+  tutorial4patch = fetchurl {
     url = "http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=34;filename=tutorial-part4.map.bspatch;att=1;bug=595448";
     name = "globulation2-tutorial4-map-patch-debian.bspatch";
     sha256 = "d3511ac0f822d512c42abd34b3122f2990862d3d0af6ce464ff372f5bd7f35e9";
   };
+in
+stdenv.mkDerivation rec {
+  name = "glob2-${version}.${patchlevel}";
 
-  inherit (sourceInfo) name version;
-  inherit buildInputs;
-
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doUnpack" "doPatch" "doBspatch" "workaroundScons" "doScons"];
+  src = fetchurl {
+    url = "mirror://savannah/glob2/${version}/${name}.tar.gz";
+    sha256 = "1f0l2cqp2g3llhr9jl6jj15k0wb5q8n29vqj99xy4p5hqs78jk8g";
+  };
 
-  patches = [./header-order.patch];
+  patches = [ ./header-order.patch ];
 
-  doBspatch = a.fullDepEntry ''
+  postPatch = ''
     cp campaigns/tutorial-part4.map{,.orig}
     bspatch  campaigns/tutorial-part4.map{.orig,} ${tutorial4patch}
-  '' ["minInit" "doUnpack" "addInputs"];
+    sed -i -e "s@env = Environment()@env = Environment( ENV = os.environ )@" SConstruct
+  '';
 
-  # FIXME
-  # I officially fail to understand what goes on, but that seems to work
-  # too well not to use. Yes, it is ugly, I know...
-  workaroundScons = a.fullDepEntry ''
-    echo '#! ${a.stdenv.shell}' >> o
-    echo 'g++ -o "$@"' >> o
-    chmod a+x o
-    export PATH="$PATH:$PWD"
-  '' ["minInit"];
+  buildInputs = [ mesa SDL scons SDL_ttf SDL_image zlib SDL_net speex libvorbis libogg boost fribidi bsdiff ];
 
-  sconsFlags = [
-    "DATADIR=$out/share/globulation2/glob2"
-    "BINDIR=$out/bin"
-    "INSTALLDIR=$out/share/globulation2"
-  ];
+  buildPhase = ''
+    scons
+  '';
+
+  installPhase = ''
+    scons install \
+      BINDIR=$out/bin \
+      INSTALLDIR=$out/share/globulation2 \
+      DATADIR=$out/share/globulation2/glob2
+  '';
       
-  meta = {
+  meta = with stdenv.lib; {
     description = "RTS without micromanagement";
-    maintainers = with a.lib.maintainers;
-    [
-      raskin
-    ];
-    platforms = with a.lib.platforms;
-      linux;
-    license = a.lib.licenses.gpl3;
-  };
-  passthru = {
-    updateInfo = {
-      downloadPage = "http://globulation2.org/wiki/Download_and_Install";
-    };
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+    license = licenses.gpl3;
   };
-}) x
+  passthru.updateInfo.downloadPage = "http://globulation2.org/wiki/Download_and_Install";
+}
 
diff --git a/pkgs/games/pingus/default.nix b/pkgs/games/pingus/default.nix
index af635379ac8a..43cdc2031bf5 100644
--- a/pkgs/games/pingus/default.nix
+++ b/pkgs/games/pingus/default.nix
@@ -1,7 +1,7 @@
 {stdenv, fetchurl, scons, SDL, SDL_image, boost, libpng, SDL_mixer, pkgconfig
 , mesa}:
 let
-  buildInputs = [scons SDL SDL_image boost boost.lib libpng SDL_mixer pkgconfig mesa];
+  buildInputs = [scons SDL SDL_image boost libpng SDL_mixer pkgconfig mesa];
   s = # Generated upstream information
   rec {
     baseName="pingus";
diff --git a/pkgs/games/spring/default.nix b/pkgs/games/spring/default.nix
index 1c26dde00a94..f045a8f496bb 100644
--- a/pkgs/games/spring/default.nix
+++ b/pkgs/games/spring/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
                 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON"
                 "-DPREFER_STATIC_LIBS:BOOL=OFF"];
 
-  buildInputs = [ cmake lzma boost boost.lib libdevil zlib p7zip openal libvorbis freetype SDL
+  buildInputs = [ cmake lzma boost libdevil zlib p7zip openal libvorbis freetype SDL
     xlibs.libX11 xlibs.libXcursor mesa glew asciidoc libxslt docbook_xsl curl makeWrapper
     docbook_xsl_ns systemd ]
     ++ stdenv.lib.optional withAI jdk
diff --git a/pkgs/games/spring/springlobby.nix b/pkgs/games/spring/springlobby.nix
index 5305759369b7..bbcbd1920e9d 100644
--- a/pkgs/games/spring/springlobby.nix
+++ b/pkgs/games/spring/springlobby.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     cmake wxGTK openal pkgconfig curl gettext libtorrentRasterbar
-    boost boost.lib libpng libX11 libnotify gtk doxygen makeWrapper
+    boost libpng libX11 libnotify gtk doxygen makeWrapper
   ];
 
   prePatch = ''
diff --git a/pkgs/games/wesnoth/default.nix b/pkgs/games/wesnoth/default.nix
index c1c1b5b07567..bcd3f3a453a7 100644
--- a/pkgs/games/wesnoth/default.nix
+++ b/pkgs/games/wesnoth/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ SDL SDL_image SDL_mixer SDL_net SDL_ttf pango gettext zlib
-                  boost boost.lib fribidi cmake freetype libpng pkgconfig lua
+                  boost fribidi cmake freetype libpng pkgconfig lua
                   dbus fontconfig libtool ];
 
   cmakeFlags = [ "-DENABLE_STRICT_COMPILATION=FALSE" ]; # newer gcc problems http://gna.org/bugs/?21030
diff --git a/pkgs/servers/amqp/qpid-cpp/default.nix b/pkgs/servers/amqp/qpid-cpp/default.nix
index 6a71994091d0..69c0a3dff41c 100644
--- a/pkgs/servers/amqp/qpid-cpp/default.nix
+++ b/pkgs/servers/amqp/qpid-cpp/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "1c03yi19d5h5h78h37add9csmy0mzvvmvn7zkcalwszabdhsb5yk";
   };
 
-  buildInputs = [ cmake python boost boost.lib libuuid ruby ];
+  buildInputs = [ cmake python boost libuuid ruby ];
 
   # the subdir managementgen wants to install python stuff in ${python} and
   # the installation tries to create some folders in /var
diff --git a/pkgs/servers/nosql/mongodb/default.nix b/pkgs/servers/nosql/mongodb/default.nix
index f3132d66d2a9..02cdc02cd4d8 100644
--- a/pkgs/servers/nosql/mongodb/default.nix
+++ b/pkgs/servers/nosql/mongodb/default.nix
@@ -13,7 +13,7 @@ let version = "2.6.5";
       # "v8"
     ] ++ optionals (!stdenv.isDarwin) [ "tcmalloc" ];
     buildInputs = [
-      sasl boost boost.lib gperftools pcre snappy
+      sasl boost gperftools pcre snappy
       libyamlcpp sasl openssl libpcap
     ];
 
diff --git a/pkgs/servers/nosql/rethinkdb/default.nix b/pkgs/servers/nosql/rethinkdb/default.nix
index 79fd61390e46..727fb810e6e8 100644
--- a/pkgs/servers/nosql/rethinkdb/default.nix
+++ b/pkgs/servers/nosql/rethinkdb/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = "--lib-path ${gperftools}/lib";
 
-  buildInputs = [ protobuf boost boost.lib zlib curl ];
+  buildInputs = [ protobuf boost zlib curl ];
 
   nativeBuildInputs = [ which m4 python ];
 
diff --git a/pkgs/servers/rippled/default.nix b/pkgs/servers/rippled/default.nix
index d930c5b6a976..ca0a331e3212 100644
--- a/pkgs/servers/rippled/default.nix
+++ b/pkgs/servers/rippled/default.nix
@@ -1,20 +1,22 @@
-{ stdenv, fetchurl, scons, pkgconfig, openssl, protobuf, boost, zlib}:
+{ stdenv, fetchFromGitHub, scons, pkgconfig, openssl, protobuf, boost, zlib}:
 
 stdenv.mkDerivation rec {
   name = "rippled-${version}";
-  version = "0.23.0";
+  version = "0.26.0";
 
-  src = fetchurl {
-    url = "https://github.com/ripple/rippled/archive/${version}.tar.gz";
-    sha256 = "0js734sk11jn19fyp403mk6p62azlc6s9kyhr5jfg466fiak537p";
+  src = fetchFromGitHub {
+    owner = "ripple";
+    repo = "rippled";
+    rev = "0.26.2";
+    sha256 = "06hcc3nnzp9f6j00890f41rrn4djwlcwkzmqnw4yra74sswgji5y";
   };
 
-  patches = [ ./scons-env.patch ];
+  postPatch = ''
+    sed -i -e "s@ENV = dict.*@ENV = os.environ@g" SConstruct
+  '';
 
   buildInputs = [ scons pkgconfig openssl protobuf boost zlib ];
 
-  RIPPLED_BOOST_HOME = boost.out;
-  RIPPLED_ZLIB_HOME = zlib.out;
   buildPhase = "scons build/rippled";
 
   installPhase = ''
diff --git a/pkgs/servers/rippled/scons-env.patch b/pkgs/servers/rippled/scons-env.patch
deleted file mode 100644
index 5b80e77bb2e0..000000000000
--- a/pkgs/servers/rippled/scons-env.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff --git a/SConstruct b/SConstruct
-index 8ba8bbd..95eab3b 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -24,6 +24,8 @@ USING_CLANG = OSX or os.environ.get('CC', None) == 'clang'
- #
- BOOST_HOME = os.environ.get("RIPPLED_BOOST_HOME", None)
- 
-+ZLIB_HOME = os.environ.get("RIPPLED_ZLIB_HOME", None)
-+
- 
- if OSX or Ubuntu or Debian or Archlinux:
-     CTAGS = 'ctags'
-@@ -36,7 +38,7 @@ else:
- # scons tools
- #
- 
--HONOR_ENVS = ['CC', 'CXX', 'PATH']
-+HONOR_ENVS = ['CC', 'CXX', 'PATH', 'PKG_CONFIG_PATH']
- 
- env = Environment(
-     tools = ['default', 'protoc'],
-@@ -156,8 +158,8 @@ INCLUDE_PATHS = [
-     'build/proto'
-     ]
- 
--# if BOOST_HOME:
--#     INCLUDE_PATHS.append(BOOST_HOME)
-+if BOOST_HOME:
-+    INCLUDE_PATHS.append("%s/include" % BOOST_HOME)
- 
- #-------------------------------------------------------------------------------
- #
-@@ -261,7 +263,11 @@ env.Append(
- # such, as installed into `/usr/lib/`
- if BOOST_HOME is not None:
-     env.Prepend(
--        LIBPATH = ["%s/stage/lib" % BOOST_HOME])
-+        LIBPATH = ["%s/lib" % BOOST_HOME])
-+
-+if ZLIB_HOME is not None:
-+    env.Prepend(
-+        LIBPATH = ["%s/lib" % ZLIB_HOME])
- 
- if not OSX:
-     env.Append(LINKFLAGS = [
diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix
index 7edf0f37e05d..44e39bdc4920 100644
--- a/pkgs/tools/filesystems/ceph/default.nix
+++ b/pkgs/tools/filesystems/ceph/default.nix
@@ -14,19 +14,22 @@ let
 in
 stdenv.mkDerivation rec {
   name="ceph-${version}";
-  version="0.86";
+  version="0.87";
 
   src = fetchgit {
     url = "git://github.com/ceph/ceph.git";
     rev = "refs/tags/v${version}";
-    sha256 = "19bl96z97kvsrliwid4g6dl7s3i0nw5z9nmg964i7jdwlsl98cfj";
+    sha256 = "0l3ig4kr50j78snjzj4h1lbmjz508yykvchqyfdcqv02dfklc8qd";
   };
 
-  patches = [ ./0001-Makefile-env-Don-t-force-sbin.patch ];
+  patches = [
+    ./0001-Cleanup-boost-optionals.patch # Remove in >0.87 patch is applied
+    ./0001-Makefile-env-Don-t-force-sbin.patch
+  ];
 
   nativeBuildInputs = [ autoconf automake makeWrapper pkgconfig libtool which ];
   buildInputs = [
-    boost boost.lib btrfsProgs cryptopp curl expat fcgi fuse gperftools keyutils
+    boost btrfsProgs cryptopp curl expat fcgi fuse gperftools keyutils
     libatomic_ops leveldb libaio libedit libuuid linuxHeaders openssl python
     snappy udev xfsprogs.lib xz zfs
   ];
diff --git a/pkgs/tools/filesystems/grive/default.nix b/pkgs/tools/filesystems/grive/default.nix
index 559e2ae4c513..c6d2776f437a 100644
--- a/pkgs/tools/filesystems/grive/default.nix
+++ b/pkgs/tools/filesystems/grive/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "f2b978cc93a2d16262c7b78c62019b2a58044eaef4ca95feaa74dfd4dfcbfa36";
   };
 
-  buildInputs = [cmake libgcrypt json_c curl expat stdenv binutils boost boost.lib];
+  buildInputs = [cmake libgcrypt json_c curl expat stdenv binutils boost];
 
   # work around new binutils headers, see
   # http://stackoverflow.com/questions/11748035/binutils-bfd-h-wants-config-h-now
diff --git a/pkgs/tools/filesystems/jfsrec/default.nix b/pkgs/tools/filesystems/jfsrec/default.nix
deleted file mode 100644
index 5b5e7c8808e1..000000000000
--- a/pkgs/tools/filesystems/jfsrec/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ stdenv, fetchurl, boost }:
-
-stdenv.mkDerivation {
-  name = "jfsrec-0-pre-svn-7";
-
-  src = fetchurl {
-    url = mirror://sourceforge/jfsrec/jfsrec-svn-7.tar.gz;
-    sha256 = "163z6ljr05vw2k5mj4fim2nlg4khjyibrii95370pvn474mg28vg";
-  };
-
-  patches = [ ./jfsrec-gcc-4.3.patch ];
-  buildInputs = [ boost ];
-
-  preConfigure =
-    ''
-      sed -e '/[#]include [<]config.h[>]/a\#include <string.h>' -i src/unicode_to_utf8.cpp
-    '';
-
-  meta = {
-    description = "JFS recovery tool";
-    homepage = http://jfsrec.sourceforge.net/;
-  };
-}
diff --git a/pkgs/tools/filesystems/jfsrec/jfsrec-gcc-4.3.patch b/pkgs/tools/filesystems/jfsrec/jfsrec-gcc-4.3.patch
deleted file mode 100644
index 063a7c24813b..000000000000
--- a/pkgs/tools/filesystems/jfsrec/jfsrec-gcc-4.3.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Taken from Archlinux, although this solves the build in gcc 4.4, not 4.3.
-http://aur.archlinux.org/packages/jfsrec-svn/jfsrec-svn/jfsrec-gcc-4.3.patch
-diff -uBdr jfsrec/src/device.cpp jfsrec-build/src/device.cpp
---- jfsrec/src/device.cpp	2009-12-01 18:34:03.860437077 +0100
-+++ jfsrec-build/src/device.cpp	2009-12-01 18:39:48.297067088 +0100
-@@ -20,6 +20,7 @@
- //Parts of the code in this file was originally taken from JFS's xpeek (debugfs_jfs)
- 
- #include "device.h"
-+#include <stdio.h>
- #ifdef __linux__
-  #include <linux/fs.h>
-  #include <sys/ioctl.h>
-diff -uBdr jfsrec/src/unicode_to_utf8.cpp jfsrec-build/src/unicode_to_utf8.cpp
---- jfsrec/src/unicode_to_utf8.cpp	2009-12-01 18:34:03.860437077 +0100
-+++ jfsrec-build/src/unicode_to_utf8.cpp	2009-12-01 18:39:43.501626737 +0100
-@@ -8,6 +8,7 @@
-  */
- #include <config.h>
- #include "unicode_to_utf8.h"
-+#include <string.h>
- #define JFS_PATH_MAX 4096
- 
- /*
diff --git a/pkgs/tools/graphics/enblend-enfuse/default.nix b/pkgs/tools/graphics/enblend-enfuse/default.nix
index ac49a3c13a34..6b65d3df0d3f 100644
--- a/pkgs/tools/graphics/enblend-enfuse/default.nix
+++ b/pkgs/tools/graphics/enblend-enfuse/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "1b7r1nnwaind0344ckwggy0ghl0ipbk9jzylsxcjfl05rnasw00w";
   };
 
-  buildInputs = [ boost boost.lib freeglut glew gsl lcms2 libpng libtiff libxmi mesa vigra ];
+  buildInputs = [ boost freeglut glew gsl lcms2 libpng libtiff libxmi mesa vigra ];
 
   nativeBuildInputs = [ perl pkgconfig ];
 
diff --git a/pkgs/tools/graphics/povray/default.nix b/pkgs/tools/graphics/povray/default.nix
index b4a1d1a7d67a..79ca54fe0ed5 100644
--- a/pkgs/tools/graphics/povray/default.nix
+++ b/pkgs/tools/graphics/povray/default.nix
@@ -1,6 +1,5 @@
-{stdenv, fetchgit, autoconf, automake, boost149, zlib, libpng, libjpeg, libtiff}:
+{stdenv, fetchgit, autoconf, automake, boost, zlib, libpng, libjpeg, libtiff}:
 
-let boost = boost149; in
 stdenv.mkDerivation {
   name = "povray-3.7";
 
@@ -24,7 +23,7 @@ stdenv.mkDerivation {
                  sed -i -e 's/^povgroup.*/povgroup=nogroup/' Makefile.{am,in}
                '';
 
-  configureFlags = "COMPILED_BY='nix' --with-boost-libdir=${boost}/lib --with-boost-includedir=${boost}/include";
+  configureFlags = [ "COMPILED_BY='nix'" ];
 
   preInstall = ''
     mkdir "$TMP/bin"
diff --git a/pkgs/tools/security/meo/default.nix b/pkgs/tools/security/meo/default.nix
index 051b6579f17a..be678b18dda0 100644
--- a/pkgs/tools/security/meo/default.nix
+++ b/pkgs/tools/security/meo/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
 
   buildFlags = "QMAKE=qmake";
 
-  buildInputs = [ openssl pcre qt4 boost boost.lib pkcs11helper ];
+  buildInputs = [ openssl pcre qt4 boost pkcs11helper ];
 
   preConfigure = ''
     sed -i s,-mt$,, meo-gui/meo-gui.pro
diff --git a/pkgs/tools/system/syslog-ng-incubator/default.nix b/pkgs/tools/system/syslog-ng-incubator/default.nix
index 34a0f15ec1db..73d1f8fdff6a 100644
--- a/pkgs/tools/system/syslog-ng-incubator/default.nix
+++ b/pkgs/tools/system/syslog-ng-incubator/default.nix
@@ -1,23 +1,23 @@
-{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, glib, syslogng
-, eventlog, perl, python, yacc, riemann_c_client, libivykis, protobufc }:
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, syslogng
+, eventlog, perl, python, yacc, riemann_c_client, libivykis, protobufc
+}:
 
 stdenv.mkDerivation rec {
   name = "syslog-ng-incubator-${version}";
-
   version = "0.3.3";
 
-  src = fetchurl {
-    url = "https://github.com/balabit/syslog-ng-incubator/archive/${name}.tar.gz";
-    sha256 = "1yx2gdq1vhrcp113hxgl66z5df4ya9nznvq00nvy4v9yn8wf9fb8";
+  src = fetchFromGitHub {
+    owner = "balabit";
+    repo = "syslog-ng-incubator";
+    rev = name;
+    sha256 = "0pswajcw9f651c1jmprbf1mlr6qadiaplyygz5j16vj0d23x4mal";
   };
 
   buildInputs = [
-    autoconf automake libtool pkgconfig glib syslogng eventlog perl python
+    autoreconfHook pkgconfig glib syslogng eventlog perl python
     yacc riemann_c_client libivykis protobufc
   ];
 
-  preConfigure = "autoreconf -i";
-
   configureFlags = [
     "--without-ivykis"
     "--with-riemann"
diff --git a/pkgs/tools/system/syslog-ng/default.nix b/pkgs/tools/system/syslog-ng/default.nix
index cec906e1f439..a62f81052bad 100644
--- a/pkgs/tools/system/syslog-ng/default.nix
+++ b/pkgs/tools/system/syslog-ng/default.nix
@@ -1,17 +1,16 @@
-{ stdenv, fetchurl, eventlog, pkgconfig, glib, python, systemd, perl
-, riemann_c_client, protobufc, yacc }:
+{ stdenv, fetchurl, eventlog, pkgconfig, glib, python, systemd, perl }:
 
 stdenv.mkDerivation rec {
   name = "syslog-ng-${version}";
 
-  version = "3.6.1";
+  version = "3.5.6";
 
   src = fetchurl {
     url = "http://www.balabit.com/downloads/files?path=/syslog-ng/sources/${version}/source/syslog-ng_${version}.tar.gz";
-    sha256 = "1s3lsxk2pky3jkfamkw5ivpxq2kazikcvdgpmxiyn5w10dwkd0m7";
+    sha256 = "19i1idklpgn6mz0mg7194by5fjgvvh5n4v2a0rr1z0778l2038kc";
   };
 
-  buildInputs = [ eventlog pkgconfig glib python systemd perl riemann_c_client protobufc yacc ];
+  buildInputs = [ eventlog pkgconfig glib python systemd perl ];
 
   configureFlags = [
     "--enable-dynamic-linking"
diff --git a/pkgs/tools/text/source-highlight/default.nix b/pkgs/tools/text/source-highlight/default.nix
index a7d1ddb0f3b5..d5530a3df916 100644
--- a/pkgs/tools/text/source-highlight/default.nix
+++ b/pkgs/tools/text/source-highlight/default.nix
@@ -12,13 +12,11 @@ stdenv.mkDerivation {
     sha256 = "1s49ld8cnpzhhwq0r7s0sfm3cg3nhhm0wla27lwraifrrl3y1cp1";
   };
 
-  configureFlags = [ "--with-boost=${boost}" ];
-
   buildInputs = [ boost ];
 
-  enableParallelBuilding = false;
+  configureFlags = [ "--with-boost=${boost.lib}" ];
 
-  doCheck = true;
+  enableParallelBuilding = false;
 
   meta = {
     description = "Source code renderer with syntax highlighting";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 2b39de955ba1..acc4be8c410b 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1081,7 +1081,7 @@ let
 
   evtest = callPackage ../applications/misc/evtest { };
 
-  exempi = callPackage ../development/libraries/exempi { };
+  exempi = callPackage ../development/libraries/exempi { boost = boost155; };
 
   execline = callPackage ../tools/misc/execline { };
 
@@ -1280,7 +1280,7 @@ let
 
   googleAuthenticator = callPackage ../os-specific/linux/google-authenticator { };
 
-  gource = callPackage ../applications/version-management/gource {};
+  gource = callPackage ../applications/version-management/gource { };
 
   gparted = callPackage ../tools/misc/gparted { };
 
@@ -1479,10 +1479,6 @@ let
 
   jdiskreport = callPackage ../tools/misc/jdiskreport { };
 
-  jfsrec = callPackage ../tools/filesystems/jfsrec {
-    boost = boost144;
-  };
-
   jfsutils = callPackage ../tools/filesystems/jfsutils { };
 
   jhead = callPackage ../tools/graphics/jhead { };
@@ -1643,7 +1639,9 @@ let
 
   memtest86plus = callPackage ../tools/misc/memtest86+ { };
 
-  meo = callPackage ../tools/security/meo { };
+  meo = callPackage ../tools/security/meo {
+    boost = boost155;
+  };
 
   mc = callPackage ../tools/misc/mc { };
 
@@ -2342,10 +2340,7 @@ let
 
   socat2pre = lowPrio (callPackage ../tools/networking/socat/2.x.nix { });
 
-  sourceHighlight = callPackage ../tools/text/source-highlight {
-    # Boost 1.54 causes the "test_regexranges" test to fail
-    boost = boost149;
-  };
+  sourceHighlight = callPackage ../tools/text/source-highlight { };
 
   spaceFM = callPackage ../applications/misc/spacefm { };
 
@@ -4830,11 +4825,9 @@ let
 
   boolstuff = callPackage ../development/libraries/boolstuff { };
 
-  boost144 = callPackage ../development/libraries/boost/1.44.nix { };
-  boost149 = callPackage ../development/libraries/boost/1.49.nix { };
   boost155 = callPackage ../development/libraries/boost/1.55.nix { };
   boost156 = callPackage ../development/libraries/boost/1.56.nix { };
-  boost = boost155;
+  boost = boost156;
 
   botan = callPackage ../development/libraries/botan { };
   botanUnstable = callPackage ../development/libraries/botan/unstable.nix { };
@@ -6066,6 +6059,13 @@ let
       else stdenv;
   };
 
+  libtorrentRasterbar_0_16 = callPackage ../development/libraries/libtorrent-rasterbar/0.16.nix {
+    # fix "unrecognized option -arch" error
+    stdenv = if stdenv.isDarwin
+      then clangStdenv
+      else stdenv;
+  };
+
   libtoxcore = callPackage ../development/libraries/libtoxcore { };
 
   libtsm = callPackage ../development/libraries/libtsm { };
@@ -7413,9 +7413,7 @@ let
 
   freeswitch = callPackage ../servers/sip/freeswitch { };
 
-  ghostOne = callPackage ../servers/games/ghost-one {
-    boost = boost144.override { taggedLayout = true; };
-  };
+  ghostOne = callPackage ../servers/games/ghost-one { };
 
   ircdHybrid = callPackage ../servers/irc/ircd-hybrid { };
 
@@ -7602,9 +7600,13 @@ let
 
   restund = callPackage ../servers/restund {};
 
-  rethinkdb = callPackage ../servers/nosql/rethinkdb { };
+  rethinkdb = callPackage ../servers/nosql/rethinkdb {
+    boost = boost155;
+  };
 
-  rippled = callPackage ../servers/rippled { };
+  rippled = callPackage ../servers/rippled {
+    boost = boost155;
+  };
 
   s6 = callPackage ../servers/s6 { };
 
@@ -9010,7 +9012,6 @@ let
 
   compiz = callPackage ../applications/window-managers/compiz {
     inherit (gnome) GConf ORBit2 metacity;
-    boost = boost149; # https://bugs.launchpad.net/compiz/+bug/1131864
   };
 
   coriander = callPackage ../applications/video/coriander {
@@ -9688,7 +9689,9 @@ let
     fltk = fltk13;
   };
 
-  hugin = callPackage ../applications/graphics/hugin { };
+  hugin = callPackage ../applications/graphics/hugin {
+    boost = boost155;
+  };
 
   hydrogen = callPackage ../applications/audio/hydrogen { };
 
@@ -9789,7 +9792,7 @@ let
 
   k3d = callPackage ../applications/graphics/k3d {
     inherit (pkgs.gnome2) gtkglext;
-    boost = boost149;
+    boost = boost155;
   };
 
   keepnote = callPackage ../applications/office/keepnote {
@@ -9849,6 +9852,7 @@ let
     inherit (gnome) GConf ORBit2 gnome_vfs;
     zip = zip.override { enableNLS = false; };
     jdk = openjdk;
+    boost = boost155;
     fontsConf = makeFontsConf {
       fontDirectories = [
         freefont_ttf xorg.fontmiscmisc xorg.fontbhttf
@@ -9978,7 +9982,6 @@ let
 
   monotone = callPackage ../applications/version-management/monotone {
     lua = lua5;
-    boost = boost149;
   };
 
   monotoneViz = builderDefsPackage (import ../applications/version-management/monotone-viz/mtn-head.nix) {
@@ -10303,7 +10306,9 @@ let
 
   pythonmagick = callPackage ../applications/graphics/PythonMagick { };
 
-  qbittorrent = callPackage ../applications/networking/p2p/qbittorrent { };
+  qbittorrent = callPackage ../applications/networking/p2p/qbittorrent {
+    libtorrentRasterbar = libtorrentRasterbar_0_16;
+  };
 
   eiskaltdcpp = callPackage ../applications/networking/p2p/eiskaltdcpp { lua5 = lua5_1; };
 
@@ -11239,7 +11244,9 @@ let
 
   glestae = callPackage ../games/glestae {};
 
-  globulation2 = callPackage ../games/globulation {};
+  globulation2 = callPackage ../games/globulation {
+    boost = boost155;
+  };
 
   gltron = callPackage ../games/gltron { };
 
@@ -11259,7 +11266,9 @@ let
 
   icbm3d = callPackage ../games/icbm3d { };
 
-  ingen = callPackage ../applications/audio/ingen { };
+  ingen = callPackage ../applications/audio/ingen {
+    boost = boost155;
+  };
 
   instead = callPackage ../games/instead {
     lua = lua5;
@@ -11364,7 +11373,9 @@ let
   # You still can override by passing more arguments.
   spaceOrbit = callPackage ../games/orbit { };
 
-  spring = callPackage ../games/spring { };
+  spring = callPackage ../games/spring {
+    boost = boost155;
+  };
 
   springLobby = callPackage ../games/spring/springlobby.nix { };
 
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index b07efec5c674..a788427aa20c 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -129,7 +129,6 @@ let
       inkscape = linux;
       irssi = linux;
       jfsutils = linux;
-      jfsrec = linux;
       jnettop = linux;
       jwhois = linux;
       kbd = linux;