summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2017-01-04 01:42:10 +0100
committerDaiderd Jordan <daiderd@gmail.com>2017-01-04 01:42:26 +0100
commit27660cfdc01c9a7481b4646285ab155cca784c38 (patch)
tree3bfb5e18da3df6f88fd42ea7ad6e950aed68ac42 /pkgs
parent293551a16286f2e1134707babdb013a29bf778ce (diff)
parent61d125b8425da501f07765197186ed7351a55f48 (diff)
downloadnixlib-27660cfdc01c9a7481b4646285ab155cca784c38.tar
nixlib-27660cfdc01c9a7481b4646285ab155cca784c38.tar.gz
nixlib-27660cfdc01c9a7481b4646285ab155cca784c38.tar.bz2
nixlib-27660cfdc01c9a7481b4646285ab155cca784c38.tar.lz
nixlib-27660cfdc01c9a7481b4646285ab155cca784c38.tar.xz
nixlib-27660cfdc01c9a7481b4646285ab155cca784c38.tar.zst
nixlib-27660cfdc01c9a7481b4646285ab155cca784c38.zip
Merge branch 'master' into staging
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/audio/audacity/default.nix38
-rw-r--r--pkgs/applications/audio/puddletag/default.nix11
-rw-r--r--pkgs/applications/editors/eclipse/default.nix24
-rw-r--r--pkgs/applications/editors/kile/frameworks.nix3
-rw-r--r--pkgs/applications/misc/procmail/default.nix4
-rw-r--r--pkgs/applications/misc/subsurface/default.nix12
-rw-r--r--pkgs/applications/misc/synapse/default.nix2
-rw-r--r--pkgs/applications/misc/xca/default.nix26
-rw-r--r--pkgs/applications/misc/yakuake/3.0.nix4
-rw-r--r--pkgs/applications/networking/browsers/chromium/browser.nix3
-rw-r--r--pkgs/applications/networking/browsers/chromium/upstream-info.nix18
-rw-r--r--pkgs/applications/networking/browsers/qutebrowser/default.nix6
-rw-r--r--pkgs/applications/networking/cluster/terraform/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/baresip/default.nix4
-rw-r--r--pkgs/applications/networking/irc/konversation/1.6.nix3
-rw-r--r--pkgs/applications/networking/sync/rclone/default.nix16
-rw-r--r--pkgs/applications/networking/sync/rclone/deps.nix219
-rw-r--r--pkgs/applications/networking/syncthing/default.nix10
-rw-r--r--pkgs/applications/office/libreoffice/default.nix3
-rw-r--r--pkgs/applications/office/libreoffice/still.nix3
-rw-r--r--pkgs/applications/science/logic/z3/default.nix4
-rw-r--r--pkgs/applications/science/math/maxima/default.nix4
-rw-r--r--pkgs/applications/video/avidemux/default.nix4
-rw-r--r--pkgs/applications/window-managers/compiz/default.nix8
-rw-r--r--pkgs/desktops/gnome-3/3.20/apps/evolution/default.nix3
-rw-r--r--pkgs/desktops/gnome-3/3.22/apps/evolution/default.nix3
-rw-r--r--pkgs/desktops/kde-5/applications/ark/default.nix3
-rw-r--r--pkgs/desktops/kde-5/applications/dolphin.nix3
-rw-r--r--pkgs/desktops/kde-5/applications/filelight.nix5
-rw-r--r--pkgs/desktops/kde-5/applications/gwenview.nix3
-rw-r--r--pkgs/desktops/kde-5/applications/kate.nix3
-rw-r--r--pkgs/desktops/kde-5/applications/kcalc.nix5
-rw-r--r--pkgs/desktops/kde-5/applications/kcolorchooser.nix5
-rw-r--r--pkgs/desktops/kde-5/applications/kdenlive.nix3
-rw-r--r--pkgs/desktops/kde-5/applications/kdf.nix5
-rw-r--r--pkgs/desktops/kde-5/applications/khelpcenter.nix5
-rw-r--r--pkgs/desktops/kde-5/applications/kompare.nix5
-rw-r--r--pkgs/desktops/kde-5/applications/konsole.nix5
-rw-r--r--pkgs/desktops/kde-5/applications/kwalletmanager.nix3
-rw-r--r--pkgs/desktops/kde-5/applications/marble.nix3
-rw-r--r--pkgs/desktops/kde-5/applications/okular.nix3
-rw-r--r--pkgs/desktops/kde-5/applications/spectacle.nix3
-rw-r--r--pkgs/desktops/kde-5/plasma/oxygen.nix3
-rw-r--r--pkgs/desktops/xfce/default.nix1
-rw-r--r--pkgs/desktops/xfce/panel-plugins/xfce4-windowck-plugin.nix30
-rw-r--r--pkgs/development/compilers/ecl/16.1.2.nix59
-rw-r--r--pkgs/development/compilers/ecl/default.nix8
-rw-r--r--pkgs/development/compilers/emscripten-fastcomp/default.nix48
-rw-r--r--pkgs/development/compilers/emscripten/default.nix8
-rw-r--r--pkgs/development/compilers/gcl/2.6.13-pre.nix46
-rw-r--r--pkgs/development/compilers/ghc/head.nix21
-rw-r--r--pkgs/development/compilers/ghc/nokinds.nix83
-rw-r--r--pkgs/development/compilers/llvm/3.7/default.nix4
-rw-r--r--pkgs/development/compilers/rust/nightlyBin.nix38
-rw-r--r--pkgs/development/compilers/sbcl/1.3.12.nix104
-rw-r--r--pkgs/development/compilers/sbcl/default.nix4
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix2
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-nokinds.nix102
-rw-r--r--pkgs/development/haskell-modules/generic-builder.nix35
-rw-r--r--pkgs/development/interpreters/angelscript/default.nix4
-rw-r--r--pkgs/development/interpreters/python/cpython/2.7/boot.nix94
-rw-r--r--pkgs/development/interpreters/python/pypy/2.7/default.nix6
-rw-r--r--pkgs/development/libraries/czmqpp/default.nix16
-rw-r--r--pkgs/development/libraries/eigen/3.3.nix25
-rw-r--r--pkgs/development/libraries/git2/0.23.nix27
-rw-r--r--pkgs/development/libraries/kde-frameworks/kde-wrapper.nix80
-rw-r--r--pkgs/development/libraries/libdivecomputer/subsurface.nix25
-rw-r--r--pkgs/development/libraries/libgphoto2/default.nix13
-rw-r--r--pkgs/development/libraries/libmwaw/default.nix8
-rw-r--r--pkgs/development/libraries/libpng/default.nix8
-rw-r--r--pkgs/development/libraries/rocksdb/default.nix9
-rw-r--r--pkgs/development/libraries/webkitgtk/2.14.nix11
-rw-r--r--pkgs/development/node-packages/node-env.nix109
-rw-r--r--pkgs/development/tools/build-managers/cmake/default.nix58
-rw-r--r--pkgs/development/tools/build-managers/gradle/default.nix6
-rw-r--r--pkgs/development/tools/build-managers/scons/default.nix4
-rw-r--r--pkgs/development/tools/misc/luarocks/default.nix8
-rw-r--r--pkgs/development/tools/slimerjs/default.nix8
-rw-r--r--pkgs/development/tools/vultr/default.nix22
-rw-r--r--pkgs/games/sgt-puzzles/default.nix4
-rw-r--r--pkgs/misc/emulators/wine/sources.nix14
-rw-r--r--pkgs/os-specific/darwin/cctools/port.nix4
-rw-r--r--pkgs/os-specific/linux/autofs/default.nix9
-rw-r--r--pkgs/os-specific/linux/busybox/busybox-in-store.patch16
-rw-r--r--pkgs/os-specific/linux/busybox/default.nix4
-rw-r--r--pkgs/os-specific/linux/eudev/default.nix4
-rw-r--r--pkgs/os-specific/linux/firejail/default.nix10
-rw-r--r--pkgs/os-specific/linux/kernel/linux-testing.nix6
-rw-r--r--pkgs/os-specific/linux/ofp/default.nix40
-rw-r--r--pkgs/os-specific/linux/pktgen/default.nix5
-rw-r--r--pkgs/os-specific/linux/pommed-light/default.nix65
-rw-r--r--pkgs/os-specific/linux/sssd/default.nix87
-rw-r--r--pkgs/os-specific/linux/sysdig/default.nix4
-rw-r--r--pkgs/servers/http/nginx/mainline.nix4
-rw-r--r--pkgs/servers/nosql/apache-jena/fuseki-binary.nix4
-rw-r--r--pkgs/tools/compression/lrzip/default.nix4
-rw-r--r--pkgs/tools/filesystems/glusterfs/default.nix8
-rw-r--r--pkgs/tools/graphics/graphviz/default.nix16
-rw-r--r--pkgs/tools/misc/ding-libs/default.nix27
-rw-r--r--pkgs/tools/misc/kronometer/default.nix3
-rw-r--r--pkgs/tools/misc/libbitcoin/libbitcoin-client.nix36
-rw-r--r--pkgs/tools/misc/libbitcoin/libbitcoin-explorer.nix36
-rw-r--r--pkgs/tools/misc/libbitcoin/libbitcoin.nix35
-rw-r--r--pkgs/tools/misc/peruse/default.nix3
-rw-r--r--pkgs/tools/misc/youtube-dl/default.nix4
-rw-r--r--pkgs/tools/networking/curl/default.nix6
-rw-r--r--pkgs/tools/networking/curl/fix-http2-window-size.patch88
-rw-r--r--pkgs/tools/networking/i2p/default.nix4
-rw-r--r--pkgs/tools/networking/i2p/i2p.patch34
-rw-r--r--pkgs/tools/networking/openvpn/default.nix9
-rw-r--r--pkgs/tools/networking/openvpn/systemd-notify.patch14
-rw-r--r--pkgs/tools/networking/strongswan/default.nix5
-rw-r--r--pkgs/tools/package-management/nix/default.nix4
-rw-r--r--pkgs/tools/system/dd_rescue/default.nix4
-rw-r--r--pkgs/tools/system/iops/default.nix2
-rw-r--r--pkgs/tools/system/ipmiutil/default.nix4
-rw-r--r--pkgs/tools/text/sgml/jade/default.nix38
-rw-r--r--pkgs/top-level/all-packages.nix96
-rw-r--r--pkgs/top-level/haskell-packages.nix9
-rw-r--r--pkgs/top-level/lua-packages.nix12
-rw-r--r--pkgs/top-level/perl-packages.nix44
121 files changed, 1470 insertions, 993 deletions
diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix
index cc96f6dbbb31..f91fc03ec019 100644
--- a/pkgs/applications/audio/audacity/default.nix
+++ b/pkgs/applications/audio/audacity/default.nix
@@ -1,8 +1,10 @@
-{ stdenv, fetchurl, wxGTK30, pkgconfig, gettext, gtk2, glib, zlib, perl, intltool,
+{ stdenv, fetchurl, wxGTK30, pkgconfig, file, gettext, gtk2, glib, zlib, perl, intltool,
   libogg, libvorbis, libmad, libjack2, lv2, lilv, serd, sord, sratom, suil, alsaLib, libsndfile, soxr, flac, lame, fetchpatch,
   expat, libid3tag, ffmpeg, soundtouch /*, portaudio - given up fighting their portaudio.patch */
   }:
 
+with stdenv.lib;
+
 stdenv.mkDerivation rec {
   version = "2.1.2";
   name = "audacity-${version}";
@@ -23,12 +25,34 @@ stdenv.mkDerivation rec {
     mkdir lib-src
     mv lib-src-rm/{Makefile*,lib-widget-extra,portaudio-v19,portmixer,portsmf,FileDialog,sbsms,libnyquist} lib-src/
     rm -r lib-src-rm/
+
+    # we will get a (possibly harmless) warning during configure without this
+    substituteInPlace configure \
+      --replace /usr/bin/file ${file}/bin/file
   '';
 
-  configureFlags = [ "--with-libsamplerate" ];
+  configureFlags = [
+    "--with-libsamplerate"
+  ];
+
+  # audacity only looks for lame and ffmpeg at runtime, so we need to link them in manually
+  NIX_LDFLAGS = [
+    # LAME
+    "-lmp3lame"
+    # ffmpeg
+    "-lavcodec"
+    "-lavdevice"
+    "-lavfilter"
+    "-lavformat"
+    "-lavresample"
+    "-lavutil"
+    "-lpostproc"
+    "-lswresample"
+    "-lswscale"
+  ];
 
   buildInputs = [
-    pkgconfig gettext wxGTK30 expat alsaLib
+    pkgconfig file gettext wxGTK30 expat alsaLib
     libsndfile soxr libid3tag libjack2 lv2 lilv serd sord sratom suil gtk2
     ffmpeg libmad lame libvorbis flac soundtouch
   ]; #ToDo: detach sbsms
@@ -36,11 +60,11 @@ stdenv.mkDerivation rec {
   dontDisableStatic = true;
   doCheck = false; # Test fails
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Sound editor with graphical UI";
     homepage = http://audacityteam.org/;
-    license = stdenv.lib.licenses.gpl2Plus;
-    platforms = with stdenv.lib.platforms; linux;
-    maintainers = with stdenv.lib.maintainers; [ the-kenny ];
+    license = licenses.gpl2Plus;
+    platforms = with platforms; linux;
+    maintainers = with maintainers; [ the-kenny ];
   };
 }
diff --git a/pkgs/applications/audio/puddletag/default.nix b/pkgs/applications/audio/puddletag/default.nix
index 631a5701591d..c140e1a46e55 100644
--- a/pkgs/applications/audio/puddletag/default.nix
+++ b/pkgs/applications/audio/puddletag/default.nix
@@ -1,10 +1,9 @@
 { stdenv, fetchFromGitHub, python2Packages, makeWrapper, chromaprint }:
 
 let
-  pypkgs = python2Packages;
   pname = "puddletag";
 
-in pypkgs.buildPythonApplication rec {
+in python2Packages.buildPythonApplication rec {
   name = "${pname}-${version}";
   version = "1.2.0";
 
@@ -17,11 +16,9 @@ in pypkgs.buildPythonApplication rec {
 
   sourceRoot = "${pname}-v${version}-src/source";
 
-  disabled = pypkgs.isPy3k; # work to support python 3 has not begun
+  disabled = python2Packages.isPy3k; # work to support python 3 has not begun
 
-  outputs = [ "out" ];
-
-  propagatedBuildInputs = [ chromaprint ] ++ (with pypkgs; [
+  propagatedBuildInputs = [ chromaprint ] ++ (with python2Packages; [
     configobj
     mutagen
     pyparsing
@@ -35,7 +32,7 @@ in pypkgs.buildPythonApplication rec {
     siteDir=$(toPythonPath $out)
     mkdir -p $siteDir
     PYTHONPATH=$PYTHONPATH:$siteDir
-    ${pypkgs.python.interpreter} setup.py install --prefix $out
+    ${python2Packages.python.interpreter} setup.py install --prefix $out
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix
index 4663e8c64f8b..cde3475196f3 100644
--- a/pkgs/applications/editors/eclipse/default.nix
+++ b/pkgs/applications/editors/eclipse/default.nix
@@ -88,16 +88,16 @@ rec {
   eclipse-platform = eclipse-platform-46;
 
   eclipse-platform-46 = buildEclipse {
-    name = "eclipse-platform-4.6.1";
-    description = "Eclipse platform";
+    name = "eclipse-platform-4.6.2";
+    description = "Eclipse Platform Neon 2";
     sources = {
       "x86_64-linux" = fetchurl {
-          url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.1-201609071200/eclipse-SDK-4.6.1-linux-gtk-x86_64.tar.gz;
-          sha256 = "1mr7sj4whz23iwz5j6mbqd80a39177qv0r7b6cip7dji4n2agl8j";
+          url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.2-201611241400/eclipse-platform-4.6.2-linux-gtk-x86_64.tar.gz;
+          sha256 = "1fmpirjkp210angyfz3nr5jp58snjy6784zkkbmdxkiyg9kg2wqq";
         };
       "i686-linux" = fetchurl {
-          url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.1-201609071200/eclipse-SDK-4.6.1-linux-gtk.tar.gz;
-          sha256 = "0kgj0zpgzwx90q13c4mr8swf63azd56532ycxgq2rbs0d1qbl87j";
+          url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.2-201611241400/eclipse-platform-4.6.2-linux-gtk.tar.gz;
+          sha256 = "0274g6ypiqsqkch10868ygbm6avc5pa57saz9wd196kdivl1bdpm";
         };
     };
   };
@@ -123,16 +123,16 @@ rec {
   ### Eclipse SDK
 
   eclipse-sdk-46 = buildEclipse {
-    name = "eclipse-sdk-4.6.1";
-    description = "Eclipse Neon Classic";
+    name = "eclipse-sdk-4.6.2";
+    description = "Eclipse Neon 2 Classic";
     sources = {
       "x86_64-linux" = fetchurl {
-          url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.1-201609071200/eclipse-SDK-4.6.1-linux-gtk-x86_64.tar.gz;
-          sha256 = "1mr7sj4whz23iwz5j6mbqd80a39177qv0r7b6cip7dji4n2agl8j";
+          url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.2-201611241400/eclipse-SDK-4.6.2-linux-gtk-x86_64.tar.gz;
+          sha256 = "0g3nk1gcz178j8xk6nblkfsaysm8gq8101383fx60x6w25rdfgjb";
         };
       "i686-linux" = fetchurl {
-          url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.1-201609071200/eclipse-SDK-4.6.1-linux-gtk.tar.gz;
-          sha256 = "0kgj0zpgzwx90q13c4mr8swf63azd56532ycxgq2rbs0d1qbl87j";
+          url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.2-201611241400/eclipse-SDK-4.6.2-linux-gtk.tar.gz;
+          sha256 = "09wlkcxs5h3j8habqxgr4all99vkgmyixc0vr9dj3qs0kl85k5mz";
         };
     };
   };
diff --git a/pkgs/applications/editors/kile/frameworks.nix b/pkgs/applications/editors/kile/frameworks.nix
index 7a02c3d3f8c6..34ea76478937 100644
--- a/pkgs/applications/editors/kile/frameworks.nix
+++ b/pkgs/applications/editors/kile/frameworks.nix
@@ -60,8 +60,9 @@ let
       };
     };
 in
-kdeWrapper unwrapped
+kdeWrapper
 {
+  inherit unwrapped;
   targets = [ "bin/kile" ];
   paths = [ konsole.unwrapped ];
 }
diff --git a/pkgs/applications/misc/procmail/default.nix b/pkgs/applications/misc/procmail/default.nix
index 0bdc771e2bdd..b62c6b77cac3 100644
--- a/pkgs/applications/misc/procmail/default.nix
+++ b/pkgs/applications/misc/procmail/default.nix
@@ -6,11 +6,15 @@ stdenv.mkDerivation {
   patches = [ ./CVE-2014-3618.patch ];
 
   # getline is defined differently in glibc now. So rename it.
+  # Without the .PHONY target "make install" won't install anything on Darwin.
   postPatch = ''
     sed -e "s%^RM.*$%#%" -i Makefile
     sed -e "s%^BASENAME.*%\BASENAME=$out%" -i Makefile
     sed -e "s%^LIBS=.*%LIBS=-lm%" -i Makefile
     sed -e "s%getline%thisgetline%g" -i src/*.c src/*.h
+    sed -e "3i\
+.PHONY: install
+" -i Makefile
   '';
 
   src = fetchurl {
diff --git a/pkgs/applications/misc/subsurface/default.nix b/pkgs/applications/misc/subsurface/default.nix
index be4a004fb8ba..a1b03f48b220 100644
--- a/pkgs/applications/misc/subsurface/default.nix
+++ b/pkgs/applications/misc/subsurface/default.nix
@@ -20,15 +20,14 @@
 }:
 
 stdenv.mkDerivation rec {
-  version = "4.5.6";
+  version = "4.5.97";
   name = "subsurface-${version}";
 
-  # use fetchgit instead of the official tgz is not complete
   src = fetchgit {
-    sha256 = "156rqcszy0c4plk2mv7wdd4h7s7mygpq5sdc64pjfs4qvvsdj10f";
+    sha256 = "0mbf8m5sbimbyvlh65sjlydrycr4ssfyfzdlqyl0wcpzw7h0qfp8";
     url = "git://git.subsurface-divelog.org/subsurface";
-    rev = "4d8d7c2a0fa1b4b0e6953d92287c75b6f97472d0";
-    branchName = "v4.5-branch";
+    rev = "5f15ad5a86ada3c5e574041a5f9d85235322dabb";
+    branchName = "master";
   };
 
   buildInputs = [ qtbase libdivecomputer libmarble-ssrf libxslt
@@ -43,8 +42,7 @@ stdenv.mkDerivation rec {
     marble_libs=$(echo $(echo $CMAKE_LIBRARY_PATH | grep -o "/nix/store/[[:alnum:]]*-libmarble-ssrf-[a-zA-Z0-9\-]*/lib")/libssrfmarblewidget.so)
     cmakeFlags="$cmakeFlags -DCMAKE_BUILD_TYPE=Debug \
                             -DMARBLE_LIBRARIES=$marble_libs \
-                            -DNO_PRINTING=OFF \
-                            -DUSE_LIBGIT23_API=1"
+                            -DNO_PRINTING=OFF"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/misc/synapse/default.nix b/pkgs/applications/misc/synapse/default.nix
index 21c0c0f5ea31..e7d2a595684b 100644
--- a/pkgs/applications/misc/synapse/default.nix
+++ b/pkgs/applications/misc/synapse/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
       '';
       homepage = https://launchpad.net/synapse-project;
       license = stdenv.lib.licenses.gpl3;
-      maintainers = with stdenv.lib.maintainers; mahe;
+      maintainers = with stdenv.lib.maintainers; [ mahe ];
       platforms = with stdenv.lib.platforms; all;
   };
 }
diff --git a/pkgs/applications/misc/xca/default.nix b/pkgs/applications/misc/xca/default.nix
index e861973b13cc..8515efc56bce 100644
--- a/pkgs/applications/misc/xca/default.nix
+++ b/pkgs/applications/misc/xca/default.nix
@@ -1,4 +1,7 @@
-{ stdenv, fetchurl, pkgconfig, which, openssl, qt4, libtool, gcc, makeWrapper }:
+{ stdenv, fetchurl, pkgconfig, which, makeQtWrapper,
+  libtool, openssl, qtbase, qttools }:
+
+with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "xca-${version}";
@@ -9,19 +12,28 @@ stdenv.mkDerivation rec {
     sha256 = "1r2w9gpahjv221j963bd4vn0gj4cxmb9j42f3cd9qdn890hizw84";
   };
 
-  postInstall = ''
-    wrapProgram "$out/bin/xca" \
-      --prefix LD_LIBRARY_PATH : \
-        "${gcc.cc.lib}/lib64:${stdenv.lib.makeLibraryPath [ qt4 gcc.cc openssl libtool ]}"
+  enableParallelBuilding = false;
+
+  buildInputs = [ libtool openssl qtbase qttools ];
+
+  nativeBuildInputs = [ makeQtWrapper pkgconfig which ];
+
+  preBuild = ''
+    substituteInPlace Local.mak \
+      --replace ${qtbase}/bin/moc ${qtbase.dev}/bin/moc \
+      --replace ${qtbase}/bin/uic ${qtbase.dev}/bin/uic
   '';
 
-  buildInputs = [ openssl qt4 libtool gcc makeWrapper ];
-  nativeBuildInputs = [ pkgconfig ];
+  postInstall = ''
+    wrapQtProgram "$out/bin/xca"
+    wrapQtProgram "$out/bin/xca_db_stat"
+  '';
 
   meta = with stdenv.lib; {
     description = "Interface for managing asymetric keys like RSA or DSA";
     homepage = http://xca.sourceforge.net/;
     platforms = platforms.all;
     license = licenses.bsd3;
+    maintainers = with maintainers; [ offline peterhoeg ];
   };
 }
diff --git a/pkgs/applications/misc/yakuake/3.0.nix b/pkgs/applications/misc/yakuake/3.0.nix
index 4ccef7f435a4..8bce26deefc3 100644
--- a/pkgs/applications/misc/yakuake/3.0.nix
+++ b/pkgs/applications/misc/yakuake/3.0.nix
@@ -55,9 +55,9 @@ let
 
 
 in
-kdeWrapper unwrapped
+kdeWrapper
 {
+  inherit unwrapped;
   targets = [ "bin/yakuake" ];
   paths = [ konsole.unwrapped ];
 }
-
diff --git a/pkgs/applications/networking/browsers/chromium/browser.nix b/pkgs/applications/networking/browsers/chromium/browser.nix
index 58e5ab98c168..75f2dcda6a62 100644
--- a/pkgs/applications/networking/browsers/chromium/browser.nix
+++ b/pkgs/applications/networking/browsers/chromium/browser.nix
@@ -42,6 +42,8 @@ mkChromiumDerivation (base: rec {
 
   passthru = { inherit sandboxExecutableName; };
 
+  requiredSystemFeatures = [ "big-parallel" ];
+
   meta = {
     description = "An open source web browser from Google";
     homepage = http://www.chromium.org/;
@@ -49,6 +51,5 @@ mkChromiumDerivation (base: rec {
     license = licenses.bsd3;
     platforms = platforms.linux;
     hydraPlatforms = if channel == "stable" then ["x86_64-linux"] else [];
-    requiredSystemFeatures = [ "big-parallel" ];
   };
 })
diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.nix b/pkgs/applications/networking/browsers/chromium/upstream-info.nix
index fa24ed9146f5..2337cd51cbb7 100644
--- a/pkgs/applications/networking/browsers/chromium/upstream-info.nix
+++ b/pkgs/applications/networking/browsers/chromium/upstream-info.nix
@@ -1,18 +1,18 @@
 # This file is autogenerated from update.sh in the same directory.
 {
   beta = {
-    sha256 = "0mafk3cxwc16qbd7jzqj8rw1ys6s2bv7f9byixjcgssvjf073ksv";
-    sha256bin64 = "0sb2d7vyrckkbg823rnl7y3k6q3kvmxp13lpm0ncy821cx89m89a";
-    version = "55.0.2883.75";
+    sha256 = "00mq90h5kjj3x7asclp97x5mqy6pvcj0vqxcf77djlyjmsy1q10i";
+    sha256bin64 = "1prmj546sp627crnjfj2sxprr6ahb59ajgqp8jwy4wiy1x5c3j88";
+    version = "56.0.2924.28";
   };
   dev = {
-    sha256 = "1g4jy8zpmgqh9br2jcvbrnnr8fc5i4s5hvv01bs433rlcgaqk066";
-    sha256bin64 = "08vzar0zshf39390xhr8l7gvzai9pxcqzwqzrmizaaqi9m5pijdr";
-    version = "56.0.2924.18";
+    sha256 = "1dnqqlhdxawwy4zdk2p8zn6vg0cpi3hqpl9rf3j0xylvm3knr9a1";
+    sha256bin64 = "1hnmca8jqvammsb3y847p2n9hm93129li5zfi5pacqizqlakmv3z";
+    version = "57.0.2950.4";
   };
   stable = {
-    sha256 = "0mafk3cxwc16qbd7jzqj8rw1ys6s2bv7f9byixjcgssvjf073ksv";
-    sha256bin64 = "0qfqj8067vjqklg1zm203dh6c29sbhk6w7flvi8h3z28y1pws2qw";
-    version = "55.0.2883.75";
+    sha256 = "0n0sp3f3cmac2lblzn3mjkkhm8p6vy34dafr0kpdz14w1lad66z8";
+    sha256bin64 = "1cvp9fvdpd8qrl48lzs7f6k43bqd43gp0sbzz6h7yrpzw1c49r0m";
+    version = "55.0.2883.87";
   };
 }
diff --git a/pkgs/applications/networking/browsers/qutebrowser/default.nix b/pkgs/applications/networking/browsers/qutebrowser/default.nix
index 5e5f8848ebe0..3746bbe4f7ec 100644
--- a/pkgs/applications/networking/browsers/qutebrowser/default.nix
+++ b/pkgs/applications/networking/browsers/qutebrowser/default.nix
@@ -24,12 +24,12 @@ let
 
 in buildPythonApplication rec {
   name = "qutebrowser-${version}";
-  version = "0.8.4";
+  version = "0.9.0";
   namePrefix = "";
 
   src = fetchurl {
     url = "https://github.com/The-Compiler/qutebrowser/releases/download/v${version}/${name}.tar.gz";
-    sha256 = "0wc6iq7rw89625v595bs4y8spzhid6nnz2gq67f2kbjppk2rikpm";
+    sha256 = "1fp7yddx8xmy6hx01gg4z3vnw8b9qa5ixam7150i3xaalx0gjzfq";
   };
 
   # Needs tox
@@ -79,7 +79,7 @@ in buildPythonApplication rec {
   '';
 
   meta = {
-    homepage = https://github.com/The-Compiler/qutebrowser;
+    homepage = "https://github.com/The-Compiler/qutebrowser";
     description = "Keyboard-focused browser with a minimal GUI";
     license = stdenv.lib.licenses.gpl3Plus;
     maintainers = [ stdenv.lib.maintainers.jagajaga ];
diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix
index 78e167cc0e9b..d436aa99d4b2 100644
--- a/pkgs/applications/networking/cluster/terraform/default.nix
+++ b/pkgs/applications/networking/cluster/terraform/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "terraform-${version}";
-  version = "0.8.1";
+  version = "0.8.2";
   rev = "v${version}";
 
   goPackagePath = "github.com/hashicorp/terraform";
@@ -11,7 +11,7 @@ buildGoPackage rec {
     inherit rev;
     owner = "hashicorp";
     repo = "terraform";
-    sha256 = "1fgnivhn6hrxpwwajl80vj2w81lv6vypprlbgif8m0z0na7p8956";
+    sha256 = "1645la750lqx2m57sbl6xg1cnqgwrfk5dhcw08wm4z7zxdnqys7b";
   };
 
   postInstall = ''
diff --git a/pkgs/applications/networking/instant-messengers/baresip/default.nix b/pkgs/applications/networking/instant-messengers/baresip/default.nix
index dbb7b3fe2373..3ce638e6b58a 100644
--- a/pkgs/applications/networking/instant-messengers/baresip/default.nix
+++ b/pkgs/applications/networking/instant-messengers/baresip/default.nix
@@ -4,11 +4,11 @@
 , gsm, speex, portaudio, spandsp, libuuid, ccache
 }:
 stdenv.mkDerivation rec {
-  version = "0.4.20";
+  version = "0.5.0";
   name = "baresip-${version}";
   src=fetchurl {
     url = "http://www.creytiv.com/pub/baresip-${version}.tar.gz";
-    sha256 = "0m8afbfdc9a57cy94ny7g6jv2ndfmrvkx0lgk64i8w870958gkwb";
+    sha256 = "0dhlgjkqn7jkd1pmdyid41c829clzmi5kczjdwxzh5ygn95lydjc";
   };
   buildInputs = [zlib openssl libre librem pkgconfig
     cairo mpg123 gstreamer gst_ffmpeg gst_plugins_base gst_plugins_bad gst_plugins_good
diff --git a/pkgs/applications/networking/irc/konversation/1.6.nix b/pkgs/applications/networking/irc/konversation/1.6.nix
index c68764054627..9724ae5f4bf0 100644
--- a/pkgs/applications/networking/irc/konversation/1.6.nix
+++ b/pkgs/applications/networking/irc/konversation/1.6.nix
@@ -75,7 +75,8 @@ let
       homepage = https://konversation.kde.org;
     };
   };
-in kdeWrapper unwrapped {
+in kdeWrapper {
+  inherit unwrapped;
   targets = [ "bin/konversation" ];
 }
 
diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix
index dc10b8d2ec80..adbadba411c9 100644
--- a/pkgs/applications/networking/sync/rclone/default.nix
+++ b/pkgs/applications/networking/sync/rclone/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, buildGoPackage, fetchFromGitHub, fetchhg, fetchbzr, fetchsvn }:
+{ stdenv, buildGoPackage, fetchFromGitHub }:
 
 buildGoPackage rec {
   name = "rclone-${version}";
-  version = "1.33";
+  version = "1.35";
 
   goPackagePath = "github.com/ncw/rclone";
 
@@ -10,16 +10,14 @@ buildGoPackage rec {
     owner = "ncw";
     repo = "rclone";
     rev = "v${version}";
-    sha256 = "00y48ww40x73xpdvkzfhllwvbh9a2ffmmkc6ri9343wvmb53laqk";
+    sha256 = "15dmppb7qgr3vg76dsv770l51lmsl8n8k3rvbnhhks5a2cz0kf2i";
   };
 
-  goDeps = ./deps.nix;
-
-  meta = {
+  meta = with stdenv.lib; {
     description = "Command line program to sync files and directories to and from major cloud storage";
     homepage = "http://rclone.org";
-    license = stdenv.lib.licenses.mit;
-    maintainers = [ ];
-    platforms = stdenv.lib.platforms.all;
+    license = licenses.mit;
+    maintainers = with maintainers; [ danielfullmer ];
+    platforms = platforms.all;
   };
 }
diff --git a/pkgs/applications/networking/sync/rclone/deps.nix b/pkgs/applications/networking/sync/rclone/deps.nix
deleted file mode 100644
index 4fd802f66c06..000000000000
--- a/pkgs/applications/networking/sync/rclone/deps.nix
+++ /dev/null
@@ -1,219 +0,0 @@
-# This file was generated by go2nix.
-[
-  {
-    goPackagePath = "bazil.org/fuse";
-    fetch = {
-      type = "git";
-      url = "https://github.com/bazil/fuse";
-      rev = "371fbbdaa8987b715bdd21d6adc4c9b20155f748";
-      sha256 = "1x5p301py7mcxgwklfm6pqqkzssln0nfzllng49pnk60m03ilp4w";
-    };
-  }
-  {
-    goPackagePath = "cloud.google.com/go";
-    fetch = {
-      type = "git";
-      url = "https://code.googlesource.com/gocloud";
-      rev = "90296fd601ebfc594192e722a022663b0c3f8756";
-      sha256 = "0qg0d1afhqmpfaq2lh29c87d18s5148yshg0s295dhzdn1m9nhww";
-    };
-  }
-  {
-    goPackagePath = "github.com/Unknwon/goconfig";
-    fetch = {
-      type = "git";
-      url = "https://github.com/Unknwon/goconfig";
-      rev = "5aa4f8cd5a472c2411c778b4680f59f2223f1966";
-      sha256 = "0r6na17sz762c1dyn6gb16v2zhvzg6krmz7pcjg1m0l5wxdf4n0d";
-    };
-  }
-  {
-    goPackagePath = "github.com/VividCortex/ewma";
-    fetch = {
-      type = "git";
-      url = "https://github.com/VividCortex/ewma";
-      rev = "c595cd886c223c6c28fc9ae2727a61b5e4693d85";
-      sha256 = "0f09886vm4rkhgqqh2b20r8rws4syvny3la107hh6qby027bpab2";
-    };
-  }
-  {
-    goPackagePath = "github.com/aws/aws-sdk-go";
-    fetch = {
-      type = "git";
-      url = "https://github.com/aws/aws-sdk-go";
-      rev = "13a12060f716145019378a10e2806c174356b857";
-      sha256 = "09yl85kk2y4ayk44af5rbnkq4vy82vbh2z5ac4vpl2vgv7zyh46h";
-    };
-  }
-  {
-    goPackagePath = "github.com/cpuguy83/go-md2man";
-    fetch = {
-      type = "git";
-      url = "https://github.com/cpuguy83/go-md2man";
-      rev = "a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa";
-      sha256 = "1rm3zjrmfpzy0l3qp02xmd5pqzl77pdql9pbxhl0k1qw2vfzrjv6";
-    };
-  }
-  {
-    goPackagePath = "github.com/google/go-querystring";
-    fetch = {
-      type = "git";
-      url = "https://github.com/google/go-querystring";
-      rev = "9235644dd9e52eeae6fa48efd539fdc351a0af53";
-      sha256 = "0q398679fwp7vlnpd2rlzz452a7a4qvpcspak81psfl3xwimpzgq";
-    };
-  }
-  {
-    goPackagePath = "github.com/mreiferson/go-httpclient";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mreiferson/go-httpclient";
-      rev = "31f0106b4474f14bc441575c19d3a5fa21aa1f6c";
-      sha256 = "1iz95p7fl43smyh1lzjnwk6gq9y7q15m2qdkf0f4kxf3x5731v9i";
-    };
-  }
-  {
-    goPackagePath = "github.com/ncw/go-acd";
-    fetch = {
-      type = "git";
-      url = "https://github.com/ncw/go-acd";
-      rev = "56da839497f9854a91f99fe752c33c7977a6f48b";
-      sha256 = "1va6hpl73ps443r0s2icplcx113gkhmi2gbsgpaw2iii5lji5085";
-    };
-  }
-  {
-    goPackagePath = "github.com/ncw/swift";
-    fetch = {
-      type = "git";
-      url = "https://github.com/ncw/swift";
-      rev = "b964f2ca856aac39885e258ad25aec08d5f64ee6";
-      sha256 = "0c86ap1zb56r6g96cnbn5j3i3r96c5l8rl98h3sxlqi5agwp3km4";
-    };
-  }
-  {
-    goPackagePath = "github.com/ogier/pflag";
-    fetch = {
-      type = "git";
-      url = "https://github.com/ogier/pflag";
-      rev = "45c278ab3607870051a2ea9040bb85fcb8557481";
-      sha256 = "0620v75wppfd84d95n312wpngcb73cph4q3ivs1h0waljfnsrd5l";
-    };
-  }
-  {
-    goPackagePath = "github.com/pkg/errors";
-    fetch = {
-      type = "git";
-      url = "https://github.com/pkg/errors";
-      rev = "645ef00459ed84a119197bfb8d8205042c6df63d";
-      sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
-    };
-  }
-  {
-    goPackagePath = "github.com/rfjakob/eme";
-    fetch = {
-      type = "git";
-      url = "https://github.com/rfjakob/eme";
-      rev = "601d0e278ceda9aa2085a61c9265f6e690ef5255";
-      sha256 = "1ryh5f2a42psrqcpjh73shk3p0mva2vcyyfav4nhxmfqall77k5z";
-    };
-  }
-  {
-    goPackagePath = "github.com/skratchdot/open-golang";
-    fetch = {
-      type = "git";
-      url = "https://github.com/skratchdot/open-golang";
-      rev = "75fb7ed4208cf72d323d7d02fd1a5964a7a9073c";
-      sha256 = "1b67imqbsdvg19vif1q1dfmapxy3v2anagacbql95fwnnw0v8jga";
-    };
-  }
-  {
-    goPackagePath = "github.com/spf13/cobra";
-    fetch = {
-      type = "git";
-      url = "https://github.com/spf13/cobra";
-      rev = "9c28e4bbd74e5c3ed7aacbc552b2cab7cfdfe744";
-      sha256 = "02bgp0yy9bi05k2in9axqi3db1c6mjffdsmki51pn9iryxz4zkh3";
-    };
-  }
-  {
-    goPackagePath = "github.com/spf13/pflag";
-    fetch = {
-      type = "git";
-      url = "https://github.com/spf13/pflag";
-      rev = "c7e63cf4530bcd3ba943729cee0efeff2ebea63f";
-      sha256 = "197mlkgb01zk86fxfl8r8maymcxsspqblg7hmngjxf7ivdid1i1l";
-    };
-  }
-  {
-    goPackagePath = "github.com/stacktic/dropbox";
-    fetch = {
-      type = "git";
-      url = "https://github.com/stacktic/dropbox";
-      rev = "58f839b21094d5e0af7caf613599830589233d20";
-      sha256 = "1psmxpnn40ri9bgjvivljnd4p977f635mh3w7m5mglxxgc9392pi";
-    };
-  }
-  {
-    goPackagePath = "github.com/tsenart/tb";
-    fetch = {
-      type = "git";
-      url = "https://github.com/tsenart/tb";
-      rev = "19f4c3d79d2bd67d0911b2e310b999eeea4454c1";
-      sha256 = "148vy4xij5qm8dq5plyczx2wbpi4gpg8ksr5r3b4m8j0z1kjws8y";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/crypto";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/crypto";
-      rev = "5dc8cb4b8a8eb076cbb5a06bc3b8682c15bdbbd3";
-      sha256 = "18c1vpqlj10z1id66hglgnv51d9gwphgsdvxgghc6mcm01f1g5xj";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/net";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/net";
-      rev = "6acef71eb69611914f7a30939ea9f6e194c78172";
-      sha256 = "1fcsv50sbq0lpzrhx3m9jw51wa255fsbqjwsx9iszq4d0gysnnvc";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/oauth2";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/oauth2";
-      rev = "3c3a985cb79f52a3190fbc056984415ca6763d01";
-      sha256 = "0c7x8wkya56z03j2qfm61932npsddgqyggi75hkla9755d1inqlv";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/text";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/text";
-      rev = "a71fd10341b064c10f4a81ceac72bcf70f26ea34";
-      sha256 = "1igxqrgnnb6983fl0yck0xal2hwnkcgbslr7cxyrg7a65vawd0q1";
-    };
-  }
-  {
-    goPackagePath = "google.golang.org/api";
-    fetch = {
-      type = "git";
-      url = "https://code.googlesource.com/google-api-go-client";
-      rev = "eb84d1a029af1654777e7ba65c979085305c3e38";
-      sha256 = "0ldmzcx5lxa81lcr39djcvyhd0ls11jlswj5877rinq3505ayf5l";
-    };
-  }
-  {
-    goPackagePath = "github.com/stretchr/testify/";
-    fetch = {
-      type = "git";
-      url = "https://github.com/stretchr/testify";
-      rev = "1f4a1643a57e798696635ea4c126e9127adb7d3c";
-      sha256 = "0nam9d68rn8ha8ldif22kkgv6k6ph3y88fp26159wdrs63ca3bzl";
-    };
-  }
-]
diff --git a/pkgs/applications/networking/syncthing/default.nix b/pkgs/applications/networking/syncthing/default.nix
index 628e645ab608..8e568798df81 100644
--- a/pkgs/applications/networking/syncthing/default.nix
+++ b/pkgs/applications/networking/syncthing/default.nix
@@ -1,14 +1,14 @@
 { stdenv, lib, fetchFromGitHub, go, pkgs }:
 
 stdenv.mkDerivation rec {
-  version = "0.14.17";
+  version = "0.14.18";
   name = "syncthing-${version}";
 
   src = fetchFromGitHub {
     owner  = "syncthing";
     repo   = "syncthing";
     rev    = "v${version}";
-    sha256 = "0l220jnm8xwfc5jrznan15290al05bim5yyy4wngj9c55av6mlzq";
+    sha256 = "099r1n9awznv17ac1fm4ff6az40bvk6xxwaw8x8fx7ikqi1wv8vp";
   };
 
   buildInputs = [ go ];
@@ -45,8 +45,8 @@ stdenv.mkDerivation rec {
   meta = with stdenv.lib; {
     homepage = https://www.syncthing.net/;
     description = "Open Source Continuous File Synchronization";
-    license = stdenv.lib.licenses.mpl20;
-    maintainers = with stdenv.lib.maintainers; [ pshendry joko peterhoeg ];
-    platforms = stdenv.lib.platforms.unix;
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ pshendry joko peterhoeg ];
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix
index 39d4688b639e..29cc1dc118fe 100644
--- a/pkgs/applications/office/libreoffice/default.nix
+++ b/pkgs/applications/office/libreoffice/default.nix
@@ -251,6 +251,8 @@ in stdenv.mkDerivation rec {
     inherit srcs;
   };
 
+  requiredSystemFeatures = [ "big-parallel" ];
+
   meta = with lib; {
     description = "Comprehensive, professional-quality productivity suite, a variant of openoffice.org";
     homepage = http://libreoffice.org/;
@@ -258,6 +260,5 @@ in stdenv.mkDerivation rec {
     maintainers = with maintainers; [ viric raskin ];
     platforms = platforms.linux;
     hydraPlatforms = [];
-    requiredSystemFeatures = [ "big-parallel" ];
   };
 }
diff --git a/pkgs/applications/office/libreoffice/still.nix b/pkgs/applications/office/libreoffice/still.nix
index b3d69ef7f195..75d295887f63 100644
--- a/pkgs/applications/office/libreoffice/still.nix
+++ b/pkgs/applications/office/libreoffice/still.nix
@@ -254,12 +254,13 @@ in stdenv.mkDerivation rec {
     inherit srcs;
   };
 
+  requiredSystemFeatures = [ "big-parallel" ];
+
   meta = with lib; {
     description = "Comprehensive, professional-quality productivity suite (Still/stable release)";
     homepage = http://libreoffice.org/;
     license = licenses.lgpl3;
     maintainers = with maintainers; [ viric raskin ];
     platforms = platforms.linux;
-    requiredSystemFeatures = [ "big-parallel" ];
   };
 }
diff --git a/pkgs/applications/science/logic/z3/default.nix b/pkgs/applications/science/logic/z3/default.nix
index fa5c9ba175e0..9683579af475 100644
--- a/pkgs/applications/science/logic/z3/default.nix
+++ b/pkgs/applications/science/logic/z3/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, python2 }:
+{ stdenv, fetchFromGitHub, python2, fixDarwinDylibNames }:
 
 let
   python = python2;
@@ -13,7 +13,7 @@ in stdenv.mkDerivation rec {
     sha256 = "0ssp190ksak93hiz61z90x6hy9hcw1ywp8b2dzmbhn6fbd4bnxzp";
   };
 
-  buildInputs = [ python ];
+  buildInputs = [ python fixDarwinDylibNames ];
   enableParallelBuilding = true;
 
   configurePhase = ''
diff --git a/pkgs/applications/science/math/maxima/default.nix b/pkgs/applications/science/math/maxima/default.nix
index 55443f90c6f9..85a13f7ac377 100644
--- a/pkgs/applications/science/math/maxima/default.nix
+++ b/pkgs/applications/science/math/maxima/default.nix
@@ -4,7 +4,7 @@ tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false
 
 let
   name    = "maxima";
-  version = "5.38.1";
+  version = "5.39.0";
 
   searchPath =
     stdenv.lib.makeBinPath
@@ -15,7 +15,7 @@ stdenv.mkDerivation ({
 
   src = fetchurl {
     url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz";
-    sha256 = "1p6646rvq43hk09msyp0dk50cqpkh07mf4x0bc2fqisqmcv6b1hf";
+    sha256 = "1cvignn5y6qzrby6qb885yc8zdcdqdr1d50vcvc3gapw2f0gk3zm";
   };
 
   buildInputs = stdenv.lib.filter (x: x != null)
diff --git a/pkgs/applications/video/avidemux/default.nix b/pkgs/applications/video/avidemux/default.nix
index 01687b588677..44b9dca90b6f 100644
--- a/pkgs/applications/video/avidemux/default.nix
+++ b/pkgs/applications/video/avidemux/default.nix
@@ -14,11 +14,11 @@
 }:
 
 let
-  version = "2.6.15";
+  version = "2.6.16";
 
   src = fetchurl {
     url = "mirror://sourceforge/avidemux/avidemux/${version}/avidemux_${version}.tar.gz";
-    sha256 = "0mr2nll81ki9d1s68klhm19jmr15450wjaws1p0b0y2qqwyrprdh";
+    sha256 = "0jipvpvw871qhhkyykrrrqc9vfbw24v243vzmm8lqifj73h6qvgc";
   };
 
   common = {
diff --git a/pkgs/applications/window-managers/compiz/default.nix b/pkgs/applications/window-managers/compiz/default.nix
index e9f5d9bdbf26..240bc19dd453 100644
--- a/pkgs/applications/window-managers/compiz/default.nix
+++ b/pkgs/applications/window-managers/compiz/default.nix
@@ -18,11 +18,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="compiz";
-    version="0.9.13.0";
+    version="0.9.13.1";
     name="${baseName}-${version}";
-    hash="00m73im5kdpbfjg9ryzxnab5qvx5j51gxwr3wzimkrcbax6vb3ph";
-    url="https://launchpad.net/compiz/0.9.13/0.9.13.0/+download/compiz-0.9.13.0.tar.bz2";
-    sha256="00m73im5kdpbfjg9ryzxnab5qvx5j51gxwr3wzimkrcbax6vb3ph";
+    hash="1grc4a4gc662hjs5adzdd3zlgsg1rh1wqm9aanbs8wm0l8mq0m4q";
+    url="https://launchpad.net/compiz/0.9.13/0.9.13.1/+download/compiz-0.9.13.1.tar.bz2";
+    sha256="1grc4a4gc662hjs5adzdd3zlgsg1rh1wqm9aanbs8wm0l8mq0m4q";
   };
   buildInputs = [cmake pkgconfig
     libXrender renderproto gtk2 libwnck pango cairo
diff --git a/pkgs/desktops/gnome-3/3.20/apps/evolution/default.nix b/pkgs/desktops/gnome-3/3.20/apps/evolution/default.nix
index 0a52acbc30e9..095c6e7814eb 100644
--- a/pkgs/desktops/gnome-3/3.20/apps/evolution/default.nix
+++ b/pkgs/desktops/gnome-3/3.20/apps/evolution/default.nix
@@ -35,12 +35,13 @@ in stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  requiredSystemFeatures = [ "big-parallel" ];
+
   meta = with stdenv.lib; {
     homepage = https://wiki.gnome.org/Apps/Evolution;
     description = "Personal information management application that provides integrated mail, calendaring and address book functionality";
     maintainers = gnome3.maintainers;
     license = licenses.lgpl2Plus;
     platforms = platforms.linux;
-    requiredSystemFeatures = [ "big-parallel" ];
   };
 }
diff --git a/pkgs/desktops/gnome-3/3.22/apps/evolution/default.nix b/pkgs/desktops/gnome-3/3.22/apps/evolution/default.nix
index 0b72bf5965e0..87a014f8f74e 100644
--- a/pkgs/desktops/gnome-3/3.22/apps/evolution/default.nix
+++ b/pkgs/desktops/gnome-3/3.22/apps/evolution/default.nix
@@ -35,12 +35,13 @@ in stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  requiredSystemFeatures = [ "big-parallel" ];
+
   meta = with stdenv.lib; {
     homepage = https://wiki.gnome.org/Apps/Evolution;
     description = "Personal information management application that provides integrated mail, calendaring and address book functionality";
     maintainers = gnome3.maintainers;
     license = licenses.lgpl2Plus;
     platforms = platforms.linux;
-    requiredSystemFeatures = [ "big-parallel" ];
   };
 }
diff --git a/pkgs/desktops/kde-5/applications/ark/default.nix b/pkgs/desktops/kde-5/applications/ark/default.nix
index 249027570663..6b471614f5a6 100644
--- a/pkgs/desktops/kde-5/applications/ark/default.nix
+++ b/pkgs/desktops/kde-5/applications/ark/default.nix
@@ -36,7 +36,8 @@ let
       };
     };
 in
-kdeWrapper unwrapped
+kdeWrapper
 {
+  inherit unwrapped;
   targets = [ "bin/ark" ];
 }
diff --git a/pkgs/desktops/kde-5/applications/dolphin.nix b/pkgs/desktops/kde-5/applications/dolphin.nix
index 4e636ae31863..9be40e9439b6 100644
--- a/pkgs/desktops/kde-5/applications/dolphin.nix
+++ b/pkgs/desktops/kde-5/applications/dolphin.nix
@@ -24,8 +24,9 @@ let
       ];
     };
 in
-kdeWrapper unwrapped
+kdeWrapper
 {
+  inherit unwrapped;
   targets = [ "bin/dolphin" ];
   paths = [ dolphin-plugins konsole.unwrapped ];
 }
diff --git a/pkgs/desktops/kde-5/applications/filelight.nix b/pkgs/desktops/kde-5/applications/filelight.nix
index acc5808b4a34..e3d9172145c8 100644
--- a/pkgs/desktops/kde-5/applications/filelight.nix
+++ b/pkgs/desktops/kde-5/applications/filelight.nix
@@ -18,4 +18,7 @@ let
       ];
     };
 in
-kdeWrapper unwrapped { targets = [ "bin/filelight" ]; }
+kdeWrapper {
+  inherit unwrapped;
+  targets = [ "bin/filelight" ];
+}
diff --git a/pkgs/desktops/kde-5/applications/gwenview.nix b/pkgs/desktops/kde-5/applications/gwenview.nix
index 18f5036127d0..b97e4ce3bd6e 100644
--- a/pkgs/desktops/kde-5/applications/gwenview.nix
+++ b/pkgs/desktops/kde-5/applications/gwenview.nix
@@ -20,7 +20,8 @@ let
       ];
     };
 in
-kdeWrapper unwrapped {
+kdeWrapper {
+  inherit unwrapped;
   targets = [ "bin/gwenview" ];
   paths = [ kipi-plugins ];
 }
diff --git a/pkgs/desktops/kde-5/applications/kate.nix b/pkgs/desktops/kde-5/applications/kate.nix
index ab0087930c01..03cc0e1fe33b 100644
--- a/pkgs/desktops/kde-5/applications/kate.nix
+++ b/pkgs/desktops/kde-5/applications/kate.nix
@@ -24,8 +24,9 @@ let
       ];
     };
 in
-kdeWrapper unwrapped
+kdeWrapper
 {
+  inherit unwrapped;
   targets = [ "bin/kate" "bin/kwrite" ];
   paths = [ konsole.unwrapped ];
 }
diff --git a/pkgs/desktops/kde-5/applications/kcalc.nix b/pkgs/desktops/kde-5/applications/kcalc.nix
index f6d87e3e6e97..10164692f770 100644
--- a/pkgs/desktops/kde-5/applications/kcalc.nix
+++ b/pkgs/desktops/kde-5/applications/kcalc.nix
@@ -18,4 +18,7 @@ let
       ];
     };
 in
-kdeWrapper unwrapped { targets = [ "bin/kcalc" ]; }
+kdeWrapper {
+  inherit unwrapped;
+  targets = [ "bin/kcalc" ];
+}
diff --git a/pkgs/desktops/kde-5/applications/kcolorchooser.nix b/pkgs/desktops/kde-5/applications/kcolorchooser.nix
index 45a72a0bbc1b..1dc6ccbc44c4 100644
--- a/pkgs/desktops/kde-5/applications/kcolorchooser.nix
+++ b/pkgs/desktops/kde-5/applications/kcolorchooser.nix
@@ -15,4 +15,7 @@ let
       propagatedBuildInputs = [ ki18n kwidgetsaddons kxmlgui ];
     };
 in
-kdeWrapper unwrapped { targets = [ "bin/kcolorchooser" ]; }
+kdeWrapper {
+  inherit unwrapped;
+  targets = [ "bin/kcolorchooser" ];
+}
diff --git a/pkgs/desktops/kde-5/applications/kdenlive.nix b/pkgs/desktops/kde-5/applications/kdenlive.nix
index 00826060b69b..071ec21bbd01 100644
--- a/pkgs/desktops/kde-5/applications/kdenlive.nix
+++ b/pkgs/desktops/kde-5/applications/kdenlive.nix
@@ -74,8 +74,9 @@ unwrapped = kdeApp {
   };
 };
 in
-kdeWrapper unwrapped
+kdeWrapper
 {
+  inherit unwrapped;
   targets = [ "bin/kdenlive" ];
   paths = [ kinit ];
 }
diff --git a/pkgs/desktops/kde-5/applications/kdf.nix b/pkgs/desktops/kde-5/applications/kdf.nix
index 835f0344da74..c73eadc1df44 100644
--- a/pkgs/desktops/kde-5/applications/kdf.nix
+++ b/pkgs/desktops/kde-5/applications/kdf.nix
@@ -18,4 +18,7 @@ let
       ];
     };
 in
-kdeWrapper unwrapped { targets = [ "bin/kdf" ]; }
+kdeWrapper {
+  inherit unwrapped;
+  targets = [ "bin/kdf" ];
+}
diff --git a/pkgs/desktops/kde-5/applications/khelpcenter.nix b/pkgs/desktops/kde-5/applications/khelpcenter.nix
index 934f13425e8a..3f13d131c77a 100644
--- a/pkgs/desktops/kde-5/applications/khelpcenter.nix
+++ b/pkgs/desktops/kde-5/applications/khelpcenter.nix
@@ -16,4 +16,7 @@ let
       ];
     };
 in
-kdeWrapper unwrapped { targets = [ "bin/khelpcenter" ]; }
+kdeWrapper {
+  inherit unwrapped;
+  targets = [ "bin/khelpcenter" ];
+}
diff --git a/pkgs/desktops/kde-5/applications/kompare.nix b/pkgs/desktops/kde-5/applications/kompare.nix
index 3b2143af615c..45789edbfcc8 100644
--- a/pkgs/desktops/kde-5/applications/kompare.nix
+++ b/pkgs/desktops/kde-5/applications/kompare.nix
@@ -15,4 +15,7 @@ let
       ];
     };
 in
-kdeWrapper unwrapped { targets = [ "bin/kompare" ]; }
+kdeWrapper {
+  inherit unwrapped;
+  targets = [ "bin/kompare" ];
+}
diff --git a/pkgs/desktops/kde-5/applications/konsole.nix b/pkgs/desktops/kde-5/applications/konsole.nix
index bf3a497fefaa..2dfd305b46b2 100644
--- a/pkgs/desktops/kde-5/applications/konsole.nix
+++ b/pkgs/desktops/kde-5/applications/konsole.nix
@@ -24,4 +24,7 @@ let
       ];
     };
 in
-kdeWrapper unwrapped { targets = [ "bin/konsole" ]; }
+kdeWrapper {
+  inherit unwrapped;
+  targets = [ "bin/konsole" ];
+}
diff --git a/pkgs/desktops/kde-5/applications/kwalletmanager.nix b/pkgs/desktops/kde-5/applications/kwalletmanager.nix
index a7a7ba47f432..03c2ab3853a1 100644
--- a/pkgs/desktops/kde-5/applications/kwalletmanager.nix
+++ b/pkgs/desktops/kde-5/applications/kwalletmanager.nix
@@ -30,6 +30,7 @@ let
       kxmlgui
     ];
   };
-in kdeWrapper unwrapped {
+in kdeWrapper {
+  inherit unwrapped;
   targets = ["bin/kwalletmanager5"];
 }
diff --git a/pkgs/desktops/kde-5/applications/marble.nix b/pkgs/desktops/kde-5/applications/marble.nix
index 8d6ee5a0f7c5..5b8a82dbf098 100644
--- a/pkgs/desktops/kde-5/applications/marble.nix
+++ b/pkgs/desktops/kde-5/applications/marble.nix
@@ -18,7 +18,8 @@ let
       enableParallelBuilding = true;
     };
 in
-kdeWrapper unwrapped {
+kdeWrapper {
+  inherit unwrapped;
   targets = [ "bin/marble-qt" ];
   paths = [ unwrapped ];
 }
diff --git a/pkgs/desktops/kde-5/applications/okular.nix b/pkgs/desktops/kde-5/applications/okular.nix
index faebf3e679b2..499e8cc93681 100644
--- a/pkgs/desktops/kde-5/applications/okular.nix
+++ b/pkgs/desktops/kde-5/applications/okular.nix
@@ -25,6 +25,7 @@ let
     };
   };
 in
-kdeWrapper unwrapped {
+kdeWrapper {
+  inherit unwrapped;
   targets = [ "bin/okular" ];
 }
diff --git a/pkgs/desktops/kde-5/applications/spectacle.nix b/pkgs/desktops/kde-5/applications/spectacle.nix
index aa618ffcde11..4c3a5246b2e7 100644
--- a/pkgs/desktops/kde-5/applications/spectacle.nix
+++ b/pkgs/desktops/kde-5/applications/spectacle.nix
@@ -18,7 +18,8 @@ let
       ];
     };
 in
-kdeWrapper unwrapped {
+kdeWrapper {
+  inherit unwrapped;
   targets = [ "bin/spectacle" ];
   paths = [ kipi-plugins ];
 }
diff --git a/pkgs/desktops/kde-5/plasma/oxygen.nix b/pkgs/desktops/kde-5/plasma/oxygen.nix
index f880f2e3ab23..ca63c8d7a377 100644
--- a/pkgs/desktops/kde-5/plasma/oxygen.nix
+++ b/pkgs/desktops/kde-5/plasma/oxygen.nix
@@ -15,6 +15,7 @@ let
     ];
   };
 in
-kdeWrapper unwrapped {
+kdeWrapper {
+  inherit unwrapped;
   targets = [ "bin/oxygen-demo5" "bin/oxygen-settings5" ];
 }
diff --git a/pkgs/desktops/xfce/default.nix b/pkgs/desktops/xfce/default.nix
index 609ed57ab3cc..ace5f289ab4d 100644
--- a/pkgs/desktops/xfce/default.nix
+++ b/pkgs/desktops/xfce/default.nix
@@ -95,6 +95,7 @@ xfce_self = rec { # the lines are very long but it seems better than the even-od
   xfce4_xkb_plugin              = callPackage ./panel-plugins/xfce4-xkb-plugin.nix              { };
   xfce4_weather_plugin          = callPackage ./panel-plugins/xfce4-weather-plugin.nix          { };
   xfce4_whiskermenu_plugin      = callPackage ./panel-plugins/xfce4-whiskermenu-plugin.nix      { };
+  xfce4_windowck_plugin         = callPackage ./panel-plugins/xfce4-windowck-plugin.nix         { };
   xfce4_pulseaudio_plugin       = callPackage ./panel-plugins/xfce4-pulseaudio-plugin.nix       { };
 
 }; # xfce_self
diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-windowck-plugin.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-windowck-plugin.nix
new file mode 100644
index 000000000000..523283b453a7
--- /dev/null
+++ b/pkgs/desktops/xfce/panel-plugins/xfce4-windowck-plugin.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, pkgconfig, intltool, python3, imagemagick, libwnck, gtk2
+, exo, libxfce4ui, libxfce4util, xfce4panel, xfconf, xfce4_dev_tools }:
+
+stdenv.mkDerivation rec {
+  p_name  = "xfce4-windowck-plugin";
+  version = "0.4.4";
+
+  src = fetchFromGitHub {
+    owner = "cedl38";
+    repo = "xfce4-windowck-plugin";
+    rev = "v${version}";
+    sha256 = "0c6a1ibh39dpq9x0dha5lsg0vzmgaf051fgwz0nlky0s94nwzvgv";
+  };
+  name = "${p_name}-${version}";
+
+  buildInputs = [ pkgconfig intltool python3 imagemagick libwnck gtk2
+    exo libxfce4ui libxfce4util xfce4panel xfconf xfce4_dev_tools ];
+
+  preConfigure = "./autogen.sh";
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = "http://goodies.xfce.org/projects/panel-plugins/${p_name}";
+    description = "Set of two plugins which allows you to put the maximized window title and windows buttons on the panel";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.volth ];
+  };
+}
diff --git a/pkgs/development/compilers/ecl/16.1.2.nix b/pkgs/development/compilers/ecl/16.1.2.nix
new file mode 100644
index 000000000000..30fee77321f5
--- /dev/null
+++ b/pkgs/development/compilers/ecl/16.1.2.nix
@@ -0,0 +1,59 @@
+{stdenv, fetchurl
+, libtool, autoconf, automake
+, gmp, mpfr, libffi, makeWrapper
+, noUnicode ? false
+, gcc
+, threadSupport ? true
+}:
+let
+  s = # Generated upstream information
+  rec {
+    baseName="ecl";
+    version="16.1.2";
+    name="${baseName}-${version}";
+    url="https://common-lisp.net/project/ecl/static/files/release/ecl-16.1.2.tgz";
+    sha256="16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d";
+  };
+  buildInputs = [
+    libtool autoconf automake makeWrapper
+  ];
+  propagatedBuildInputs = [
+    libffi gmp mpfr gcc
+  ];
+in
+stdenv.mkDerivation {
+  inherit (s) name version;
+  inherit buildInputs propagatedBuildInputs;
+
+  src = fetchurl {
+    inherit (s) url sha256;
+  };
+
+  configureFlags = [
+    (if threadSupport then "--enable-threads" else "--disable-threads")
+    "--with-gmp-prefix=${gmp.dev}"
+    "--with-libffi-prefix=${libffi.dev}"
+    ]
+    ++
+    (stdenv.lib.optional (! noUnicode)
+      "--enable-unicode")
+    ;
+
+  hardeningDisable = [ "format" ];
+
+  postInstall = ''
+    sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config
+    wrapProgram "$out/bin/ecl" \
+      --prefix PATH ':' "${gcc}/bin" \
+      --prefix NIX_LDFLAGS ' ' "-L${gmp.lib or gmp.out or gmp}/lib" \
+      --prefix NIX_LDFLAGS ' ' "-L${libffi.lib or libffi.out or libffi}/lib"
+  '';
+
+  meta = {
+    inherit (s) version;
+    description = "Lisp implementation aiming to be small, fast and easy to embed";
+    license = stdenv.lib.licenses.mit ;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/development/compilers/ecl/default.nix b/pkgs/development/compilers/ecl/default.nix
index 60293fa2ec18..e506e3aace1f 100644
--- a/pkgs/development/compilers/ecl/default.nix
+++ b/pkgs/development/compilers/ecl/default.nix
@@ -9,11 +9,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="ecl";
-    version="16.1.2";
+    version="16.1.3";
     name="${baseName}-${version}";
-    hash="16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d";
-    url="https://common-lisp.net/project/ecl/static/files/release/ecl-16.1.2.tgz";
-    sha256="16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d";
+    hash="0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn";
+    url="https://common-lisp.net/project/ecl/static/files/release/ecl-16.1.3.tgz";
+    sha256="0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn";
   };
   buildInputs = [
     libtool autoconf automake makeWrapper
diff --git a/pkgs/development/compilers/emscripten-fastcomp/default.nix b/pkgs/development/compilers/emscripten-fastcomp/default.nix
index 5403c29baab4..c457ae158389 100644
--- a/pkgs/development/compilers/emscripten-fastcomp/default.nix
+++ b/pkgs/development/compilers/emscripten-fastcomp/default.nix
@@ -1,44 +1,52 @@
-{ stdenv, fetchFromGitHub, python }:
+{ stdenv, fetchFromGitHub, cmake, python, ... }:
 
 let
-  rev = "1.36.4";
+  rev = "1.37.1";
+  gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
 in
-
 stdenv.mkDerivation rec {
   name = "emscripten-fastcomp-${rev}";
 
-  srcFC = fetchFromGitHub {
+  src = fetchFromGitHub {
     owner = "kripken";
     repo = "emscripten-fastcomp";
-    sha256 = "0838rl0n9hyq5dd0gmj5rvigbmk5mhrhzyjk0zd8mjs2mk8z510l";
+    sha256 = "08jci6h73j4pcd6iq5r4zn8c6qpd6qxc7xivxh3iama9hghmxyk9";
     inherit rev;
   };
 
   srcFL = fetchFromGitHub {
     owner = "kripken";
     repo = "emscripten-fastcomp-clang";
-    sha256 = "169hfabamv3jmf88flhl4scwaxdh24196gwpz3sdb26lzcns519q";
+    sha256 = "053svm8vnsma61jzzr8n1224brmjw4pzvklh572bm1p7yg32chaw";
     inherit rev;
   };
 
-  buildInputs = [ python ];
-  buildCommand = ''
-    cp -as ${srcFC} $TMPDIR/src
-    chmod +w $TMPDIR/src/tools
-    cp -as ${srcFL} $TMPDIR/src/tools/clang
-
-    chmod +w $TMPDIR/src
-    mkdir $TMPDIR/src/build
-    cd $TMPDIR/src/build
-
-    ../configure --enable-optimized --disable-assertions --enable-targets=host,js
-    make
-    cp -a Release/bin $out
+  nativeBuildInputs = [ cmake python ];
+  preConfigure = ''
+    cp -Lr ${srcFL} tools/clang
+    chmod +w -R tools/clang
   '';
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=Release"
+    "-DLLVM_TARGETS_TO_BUILD='X86;JSBackend'"
+    "-DLLVM_INCLUDE_EXAMPLES=OFF"
+    "-DLLVM_INCLUDE_TESTS=OFF"
+    # "-DCLANG_INCLUDE_EXAMPLES=OFF"
+    "-DCLANG_INCLUDE_TESTS=OFF"
+  ] ++ (stdenv.lib.optional stdenv.isLinux
+    # necessary for clang to find crtend.o
+    "-DGCC_INSTALL_PREFIX=${gcc}"
+  );
+  enableParallelBuilding = true;
+
+  passthru = {
+    isClang = true;
+    inherit gcc;
+  };
 
   meta = with stdenv.lib; {
     homepage = https://github.com/kripken/emscripten-fastcomp;
-    description = "Emscripten llvm";
+    description = "Emscripten LLVM";
     platforms = platforms.all;
     maintainers = with maintainers; [ qknight matthewbauer ];
     license = stdenv.lib.licenses.ncsa;
diff --git a/pkgs/development/compilers/emscripten/default.nix b/pkgs/development/compilers/emscripten/default.nix
index c78808b81bce..f94e826defbb 100644
--- a/pkgs/development/compilers/emscripten/default.nix
+++ b/pkgs/development/compilers/emscripten/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchFromGitHub, emscriptenfastcomp, python, nodejs, closurecompiler, jre }:
 
 let
-  rev = "1.36.4";
+  rev = "1.37.1";
   appdir = "share/emscripten";
 in
 
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
   src = fetchFromGitHub {
     owner = "kripken";
     repo = "emscripten";
-    sha256 = "1c9592i891z1v9rp4a4lnsp14nwiqfxnh37g6xwwjd1bqx7x4hn7";
+    sha256 = "0xl8lv0ihxsnwnhma3i34pkbz0v1yyc93ac6mdqmzv6fx2wczm04";
     inherit rev;
   };
 
@@ -23,11 +23,13 @@ stdenv.mkDerivation {
     sed -i -e "s,EM_CONFIG = '~/.emscripten',EM_CONFIG = '$out/${appdir}/config'," $out/${appdir}/tools/shared.py
     sed -i -e 's,^.*did not see a source tree above the LLVM.*$,      return True,' $out/${appdir}/tools/shared.py
     sed -i -e 's,def check_sanity(force=False):,def check_sanity(force=False):\n  return,' $out/${appdir}/tools/shared.py
+    # fixes cmake support
+    sed -i -e "s/print \('emcc (Emscript.*\)/sys.stderr.write(\1); sys.stderr.flush()/g" $out/${appdir}/emcc.py
     mkdir $out/bin
     ln -s $out/${appdir}/{em++,em-config,emar,embuilder.py,emcc,emcmake,emconfigure,emlink.py,emmake,emranlib,emrun,emscons} $out/bin
 
     echo "EMSCRIPTEN_ROOT = '$out/${appdir}'" > $out/${appdir}/config
-    echo "LLVM_ROOT = '${emscriptenfastcomp}'" >> $out/${appdir}/config
+    echo "LLVM_ROOT = '${emscriptenfastcomp}/bin'" >> $out/${appdir}/config
     echo "PYTHON = '${python}/bin/python'" >> $out/${appdir}/config
     echo "NODE_JS = '${nodejs}/bin/node'" >> $out/${appdir}/config
     echo "JS_ENGINES = [NODE_JS]" >> $out/${appdir}/config
diff --git a/pkgs/development/compilers/gcl/2.6.13-pre.nix b/pkgs/development/compilers/gcl/2.6.13-pre.nix
new file mode 100644
index 000000000000..2a80eccfb403
--- /dev/null
+++ b/pkgs/development/compilers/gcl/2.6.13-pre.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchgit, mpfr, m4, binutils, fetchcvs, emacs, zlib, which
+, texinfo, libX11, xproto, inputproto, libXi, gmp, readline, strace
+, libXext, xextproto, libXt, libXaw, libXmu } :
+
+assert stdenv ? cc ;
+assert stdenv.cc.isGNU ;
+assert stdenv.cc ? libc ;
+assert stdenv.cc.libc != null ;
+
+stdenv.mkDerivation rec {
+  name = "gcl-${version}";
+  version = "2.6.13pre50";
+
+  src = fetchgit {
+    sha256 = "0vpxb6z5g9fjavrgx8gz8fsjvskfz64f63qibh5s00fvvndlwi88";
+    url = "http://git.savannah.gnu.org/r/gcl.git";
+    rev = "refs/tags/Version_2_6_13pre50";
+  };
+
+  postPatch = ''
+    sed -e 's/<= obj-date/<= (if (= 0 obj-date) 1 obj-date)/' -i lsp/make.lisp
+  '';
+
+  sourceRoot = "gcl/gcl";
+
+  patches = [];
+
+  buildInputs = [
+    mpfr m4 binutils emacs gmp
+    libX11 xproto inputproto libXi
+    libXext xextproto libXt libXaw libXmu
+    zlib which texinfo readline strace
+  ];
+
+  configureFlags = [
+    "--enable-ansi"
+  ];
+
+  hardeningDisable = [ "pic" "bindnow" ];
+
+  meta = {
+    description = "GNU Common Lisp compiler working via GCC";
+    maintainers = [ stdenv.lib.maintainers.raskin ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index 7573451695c3..0581038d18df 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils
-, autoconf, automake, happy, alex, crossSystem, selfPkgs, cross ? null
+, autoconf, automake, happy, alex, python3, crossSystem, selfPkgs, cross ? null
 }:
 
 let
   inherit (bootPkgs) ghc;
 
-  commonBuildInputs = [ ghc perl autoconf automake happy alex ];
+  commonBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
 
-  version = "8.1.20161115";
+  version = "8.1.20161224";
 
   commonPreConfigure =  ''
     sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
@@ -19,27 +19,26 @@ let
 in stdenv.mkDerivation (rec {
   inherit version;
   name = "ghc-${version}";
-  rev = "017d11e0a36866b05ace32ece1af11adf652a619";
+  rev = "2689a1692636521777f007861a484e7064b2d696";
 
   src = fetchgit {
     url = "git://git.haskell.org/ghc.git";
     inherit rev;
-    sha256 = "1ryggmz961qd0fl50rkjjvi6g9azwla2vx9310a9nzjaj5x6ib4y";
+    sha256 = "0rk6xy7kgxx849nprq1ji459p88nyy93236g841m5p6mdh7mmrcr";
   };
 
-  postPatch = ''
+  postPatch = "patchShebangs .";
+
+  preConfigure = ''
     echo ${version} >VERSION
     echo ${rev} >GIT_COMMIT_ID
-    patchShebangs .
     ./boot
-  '';
+  '' + commonPreConfigure ;
 
   buildInputs = commonBuildInputs;
 
   enableParallelBuilding = true;
 
-  preConfigure = commonPreConfigure;
-
   configureFlags = [
     "CC=${stdenv.cc}/bin/cc"
     "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
@@ -52,6 +51,8 @@ in stdenv.mkDerivation (rec {
   # that in turn causes GHCi to abort
   stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
 
+  checkTarget = "test";
+
   postInstall = ''
     paxmark m $out/lib/${name}/bin/{ghc,haddock}
 
diff --git a/pkgs/development/compilers/ghc/nokinds.nix b/pkgs/development/compilers/ghc/nokinds.nix
deleted file mode 100644
index a041ff02f936..000000000000
--- a/pkgs/development/compilers/ghc/nokinds.nix
+++ /dev/null
@@ -1,83 +0,0 @@
-{ stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, libiconv, autoconf, automake, happy, alex }:
-
-let
-  inherit (bootPkgs) ghc;
-
-  buildMK = ''
-    libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
-    libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
-    libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
-    libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
-    DYNAMIC_BY_DEFAULT = NO
-    SRC_HC_OPTS        = -H64m -O -fasm
-    GhcLibHcOpts       = -O -dcore-lint
-    GhcStage1HcOpts    = -Rghc-timing -O -fasm
-    GhcStage2HcOpts    = -Rghc-timing -O0 -DDEBUG
-    SplitObjs          = NO
-    HADDOCK_DOCS       = NO
-    BUILD_DOCBOOK_HTML = NO
-    BUILD_DOCBOOK_PS   = NO
-    BUILD_DOCBOOK_PDF  = NO
-    LAX_DEPENDENCIES   = YES
-    ${stdenv.lib.optionalString stdenv.isDarwin ''
-      libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
-      libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
-    ''}
-  '';
-
-in
-
-stdenv.mkDerivation rec {
-  version = "7.11.20150826";
-  name = "ghc-${version}"; # We cannot add a "nokinds" tag here; see git comment for details.
-  rev = "5f7f64b7fc879b5ecfd6987ec5565bd90f7c0179";
-
-  src = fetchgit {
-    url = "https://github.com/goldfirere/ghc.git";
-    inherit rev;
-    sha256 = "183l4v6aw52r3ydwl8bxg1lh3cwfakb35rpy6mjg23dqmqsynmcn";
-  };
-
-  patches = [ ./relocation.patch ];
-
-  postUnpack = ''
-    pushd ghc-${builtins.substring 0 7 rev}
-    echo ${version} >VERSION
-    echo ${rev} >GIT_COMMIT_ID
-    patchShebangs .
-    ./boot
-    popd
-  '';
-
-  buildInputs = [ ghc perl autoconf automake happy alex ];
-
-  preConfigure = ''
-    echo >mk/build.mk "${buildMK}"
-    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
-  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
-    export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
-  '';
-
-  configureFlags = [
-    "--with-gcc=${stdenv.cc}/bin/cc"
-    "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
-  ];
-
-  enableParallelBuilding = true;
-
-  # required, because otherwise all symbols from HSffi.o are stripped, and
-  # that in turn causes GHCi to abort
-  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
-
-  passthru = {
-    inherit bootPkgs;
-  };
-
-  meta = {
-    homepage = "http://haskell.org/ghc";
-    description = "The dependently-typed 'nokinds' branch of the Glasgow Haskell Compiler by Richard Eisenberg";
-    maintainers = with stdenv.lib.maintainers; [ deepfire ];
-    inherit (ghc.meta) license platforms;
-  };
-
-}
diff --git a/pkgs/development/compilers/llvm/3.7/default.nix b/pkgs/development/compilers/llvm/3.7/default.nix
index 3df20086f79b..b7155defb437 100644
--- a/pkgs/development/compilers/llvm/3.7/default.nix
+++ b/pkgs/development/compilers/llvm/3.7/default.nix
@@ -1,6 +1,6 @@
-{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun }:
+{ newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun }:
 let
-  callPackage = newScope (self // { inherit stdenv isl version fetch; });
+  callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl version fetch; });
 
   version = "3.7.1";
 
diff --git a/pkgs/development/compilers/rust/nightlyBin.nix b/pkgs/development/compilers/rust/nightlyBin.nix
index a60d17fb7cbe..6f7cca9aff22 100644
--- a/pkgs/development/compilers/rust/nightlyBin.nix
+++ b/pkgs/development/compilers/rust/nightlyBin.nix
@@ -1,15 +1,15 @@
-{ stdenv, fetchurl, makeWrapper, cacert, zlib }:
+{ stdenv, fetchurl, makeWrapper, cacert, zlib, buildRustPackage }:
 
 let
   inherit (stdenv.lib) optionalString;
 
-  platform = if stdenv.system == "x86_64-linux" 
+  platform = if stdenv.system == "x86_64-linux"
     then "x86_64-unknown-linux-gnu"
     else abort "missing boostrap url for platform ${stdenv.system}";
 
   bootstrapHash =
     if stdenv.system == "x86_64-linux"
-    then "1afsqaavhwiaxm38zr08cbq0985c7lrb1jzdcmq0jh6y8rb8ikff"
+    then "05bppmc6hqgv2g4x76rj95xf40x2aikqmcnql5li27rqwliyxznj"
     else throw "missing boostrap hash for platform ${stdenv.system}";
 
   needsPatchelf = stdenv.isLinux;
@@ -19,10 +19,12 @@ let
      sha256 = bootstrapHash;
   };
 
-  version = "2016-12-05";
+  version = "2016-12-29";
 in
 
 rec {
+  inherit buildRustPackage;
+
   rustc = stdenv.mkDerivation rec {
     name = "rustc-nightly-${version}";
 
@@ -49,5 +51,33 @@ rec {
           "$out/bin/rustc"
       ''}
     '';
+
+  };
+  cargo = stdenv.mkDerivation rec {
+    name = "cargo-nightly-${version}";
+
+    inherit version;
+    inherit src;
+
+    meta = with stdenv.lib; {
+      homepage = http://www.rust-lang.org/;
+      description = "A safe, concurrent, practical language";
+      maintainers = with maintainers; [ qknight ];
+      license = [ licenses.mit licenses.asl20 ];
+    };
+
+    buildInputs = [ makeWrapper ];
+    phases = ["unpackPhase" "installPhase"];
+
+    installPhase = ''
+      ./install.sh --prefix=$out \
+        --components=cargo
+
+      ${optionalString needsPatchelf ''
+        patchelf \
+          --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+          "$out/bin/cargo"
+      ''}
+    '';
   };
 }
diff --git a/pkgs/development/compilers/sbcl/1.3.12.nix b/pkgs/development/compilers/sbcl/1.3.12.nix
new file mode 100644
index 000000000000..8fa4741a4a14
--- /dev/null
+++ b/pkgs/development/compilers/sbcl/1.3.12.nix
@@ -0,0 +1,104 @@
+{ stdenv, fetchurl, writeText, sbclBootstrap
+, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
+, threadSupport ? (stdenv.isi686 || stdenv.isx86_64)
+  # Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
+  # Note that the created binaries still need `patchelf --set-interpreter ...`
+  # to get rid of ${glibc} dependency.
+, purgeNixReferences ? false
+}:
+
+stdenv.mkDerivation rec {
+  name    = "sbcl-${version}";
+  version = "1.3.12";
+
+  src = fetchurl {
+    url    = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
+    sha256 = "1hjr2xqazy4j0m58y4na6fz8ii3xflqairxy7vpd7ajbs00yqfc0";
+  };
+
+  patchPhase = ''
+    echo '"${version}.nixos"' > version.lisp-expr
+    echo "
+    (lambda (features)
+      (flet ((enable (x)
+               (pushnew x features))
+             (disable (x)
+               (setf features (remove x features))))
+    ''
+    + (if threadSupport then "(enable :sb-thread)" else "(disable :sb-thread)")
+    + stdenv.lib.optionalString stdenv.isArm "(enable :arm)"
+    + ''
+      )) " > customize-target-features.lisp
+
+    pwd
+
+    # SBCL checks whether files are up-to-date in many places..
+    # Unfortunately, same timestamp is not good enough
+    sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp
+    sed -e '/(date)/i((= date 2208988801) 2208988800)' -i contrib/asdf/asdf.lisp
+    sed -i src/cold/slam.lisp -e \
+      '/file-write-date input/a)'
+    sed -i src/cold/slam.lisp -e \
+      '/file-write-date output/i(or (and (= 2208988801 (file-write-date output)) (= 2208988801 (file-write-date input)))'
+    sed -i src/code/target-load.lisp -e \
+      '/date defaulted-fasl/a)'
+    sed -i src/code/target-load.lisp -e \
+      '/date defaulted-source/i(or (and (= 2208988801 (file-write-date defaulted-source-truename)) (= 2208988801 (file-write-date defaulted-fasl-truename)))'
+
+    # Fix the tests
+    sed -e '/deftest pwent/inil' -i contrib/sb-posix/posix-tests.lisp
+    sed -e '/deftest grent/inil' -i contrib/sb-posix/posix-tests.lisp
+    sed -e '/deftest .*ent.non-existing/,+5d' -i contrib/sb-posix/posix-tests.lisp
+    sed -e '/deftest \(pw\|gr\)ent/,+3d' -i contrib/sb-posix/posix-tests.lisp
+
+    sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
+    sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
+
+    # Use whatever `cc` the stdenv provides
+    substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
+
+    substituteInPlace src/runtime/Config.x86-64-darwin \
+      --replace mmacosx-version-min=10.4 mmacosx-version-min=10.5
+  ''
+  + (if purgeNixReferences
+    then
+      # This is the default location to look for the core; by default in $out/lib/sbcl
+      ''
+        sed 's@^\(#define SBCL_HOME\) .*$@\1 "/no-such-path"@' \
+          -i src/runtime/runtime.c
+      ''
+    else
+      # Fix software version retrieval
+      ''
+        sed -e "s@/bin/uname@$(command -v uname)@g" -i src/code/*-os.lisp
+      ''
+    );
+
+
+  preBuild = ''
+    export INSTALL_ROOT=$out
+    mkdir -p test-home
+    export HOME=$PWD/test-home
+  '';
+
+  buildPhase = ''
+    sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}"
+  '';
+
+  installPhase = ''
+    INSTALL_ROOT=$out sh install.sh
+  '';
+
+  # Specifying $SBCL_HOME is only truly needed with `purgeNixReferences = true`.
+  setupHook = writeText "setupHook.sh" ''
+    envHooks+=(_setSbclHome)
+    _setSbclHome() {
+      export SBCL_HOME='@out@/lib/sbcl/'
+    }
+  '';
+
+  meta = sbclBootstrap.meta // {
+    inherit version;
+    updateWalker = true;
+  };
+}
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index 8fa4741a4a14..85c558c92e8e 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -9,11 +9,11 @@
 
 stdenv.mkDerivation rec {
   name    = "sbcl-${version}";
-  version = "1.3.12";
+  version = "1.3.13";
 
   src = fetchurl {
     url    = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
-    sha256 = "1hjr2xqazy4j0m58y4na6fz8ii3xflqairxy7vpd7ajbs00yqfc0";
+    sha256 = "1k3nij1pchkard02p51mbbsn4rrj116v1apjjpd3f9h2m7j3asac";
   };
 
   patchPhase = ''
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 9b03d4633bc2..da95981c5e38 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -1095,7 +1095,7 @@ self: super: {
 
   # https://github.com/NixOS/nixpkgs/issues/19612
   wai-app-file-cgi = (dontCheck super.wai-app-file-cgi).overrideScope (self: super: {
-    http-client = self.http-client_0_5_3_2;
+    http-client = self.http-client_0_5_5;
     http-client-tls = self.http-client-tls_0_3_3;
     http-conduit = self.http-conduit_2_2_3;
   });
diff --git a/pkgs/development/haskell-modules/configuration-ghc-nokinds.nix b/pkgs/development/haskell-modules/configuration-ghc-nokinds.nix
deleted file mode 100644
index 413984a7bd31..000000000000
--- a/pkgs/development/haskell-modules/configuration-ghc-nokinds.nix
+++ /dev/null
@@ -1,102 +0,0 @@
-{ pkgs }:
-
-with import ./lib.nix { inherit pkgs; };
-
-self: super: {
-
-  # Use the latest LLVM.
-  inherit (pkgs) llvmPackages;
-
-  # Disable GHC 7.11.x core libraries.
-  array = null;
-  base = null;
-  binary = null;
-  bin-package-db = null;
-  bytestring = null;
-  Cabal = null;
-  containers = null;
-  deepseq = null;
-  directory = null;
-  filepath = null;
-  ghc-prim = null;
-  haskeline = null;
-  hoopl = null;
-  hpc = null;
-  integer-gmp = null;
-  pretty = null;
-  process = null;
-  rts = null;
-  template-haskell = null;
-  terminfo = null;
-  time = null;
-  transformers = null;
-  unix = null;
-  xhtml = null;
-
-  # Don't use jailbreak built with Cabal 1.22.x because of https://github.com/peti/jailbreak-cabal/issues/9.
-  jailbreak-cabal = pkgs.haskell.packages.ghc784.jailbreak-cabal;
-
-  # GHC 7.10.x's Haddock binary cannot generate hoogle files.
-  # https://ghc.haskell.org/trac/ghc/ticket/9921
-  mkDerivation = drv: super.mkDerivation (drv // { doHoogle = false; doHaddock = false; });
-
-  # haddock: No input file(s).
-  nats = dontHaddock super.nats;
-  bytestring-builder = dontHaddock super.bytestring-builder;
-
-  # We have time 1.5
-  aeson = disableCabalFlag super.aeson "old-locale";
-
-  # Show works differently for record syntax now, breaking haskell-src-exts' parser tests
-  # https://github.com/haskell-suite/haskell-src-exts/issues/224
-  haskell-src-exts = dontCheck super.haskell-src-exts;
-
-  mono-traversable = appendPatch super.mono-traversable (pkgs.fetchpatch {
-    url = "https://github.com/snoyberg/mono-traversable/pull/77.patch";
-    sha256 = "1qrvrh3cqfkymi5yb9y9z88rq4n7ag0ac2k00mcnqh4dz1vh4fg1";
-  });
-  yesod-auth = appendPatch super.yesod-auth (pkgs.fetchpatch {
-    url = "https://github.com/yesodweb/yesod/pull/1006.patch";
-    sha256 = "0l6wjj8cfz6jy6j92kywsccafyffhlm5240q82bzirb278adqvar";
-    stripLen = 1;
-  });
-
-  # Setup: At least the following dependencies are missing: base <4.8
-  hspec-expectations = overrideCabal super.hspec-expectations (drv: {
-    postPatch = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
-  });
-  utf8-string = overrideCabal super.utf8-string (drv: {
-    postPatch = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal";
-  });
-
-  # bos/attoparsec#92
-  attoparsec = dontCheck super.attoparsec;
-
-  # test suite hangs silently for at least 10 minutes
-  split = dontCheck super.split;
-
-  # Test suite fails with some (seemingly harmless) error.
-  # https://code.google.com/p/scrapyourboilerplate/issues/detail?id=24
-  syb = dontCheck super.syb;
-
-  # Test suite has stricter version bounds
-  retry = dontCheck super.retry;
-
-  # Test suite fails with time >= 1.5
-  http-date = dontCheck super.http-date;
-
-  # Version 1.19.5 fails its test suite.
-  happy = dontCheck super.happy;
-
-  # Workaround for a workaround, see comment for "ghcjs" flag.
-  jsaddle = let jsaddle' = disableCabalFlag super.jsaddle "ghcjs";
-            in addBuildDepends jsaddle' [ self.glib self.gtk3 self.webkitgtk3
-                                          self.webkitgtk3-javascriptcore ];
-
-  # The compat library is empty in the presence of mtl 2.2.x.
-  mtl-compat = dontHaddock super.mtl-compat;
-
-  # Won't work with LLVM 3.5.
-  llvm-general = markBrokenVersion "3.4.5.3" super.llvm-general;
-
-}
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix
index dfe9f68ec617..092d4ae45242 100644
--- a/pkgs/development/haskell-modules/generic-builder.nix
+++ b/pkgs/development/haskell-modules/generic-builder.nix
@@ -86,7 +86,7 @@ let
   # We cannot enable -j<n> parallelism for libraries because GHC is far more
   # likely to generate a non-determistic library ID in that case. Further
   # details are at <https://github.com/peti/ghc-library-id-bug>.
-  enableParallelBuilding = versionOlder "7.8" ghc.version && !hasActiveLibrary;
+  enableParallelBuilding = (versionOlder "7.8" ghc.version && !hasActiveLibrary) || versionOlder "8.0.1" ghc.version;
 
   crossCabalFlags = [
     "--with-ghc=${ghc.cross.config}-ghc"
@@ -114,7 +114,6 @@ let
     (optionalString (isGhcjs || versionOlder "7" ghc.version) (enableFeature enableStaticLibraries "library-vanilla"))
     (optionalString (isGhcjs || versionOlder "7.4" ghc.version) (enableFeature enableSharedExecutables "executable-dynamic"))
     (optionalString (isGhcjs || versionOlder "7" ghc.version) (enableFeature doCheck "tests"))
-    (optionalString (versionOlder "8.0.1" ghc.version) "--ghc-option=-j$NIX_BUILD_CORES")
   ] ++ optionals isGhcjs [
     "--with-hsc2hs=${nativeGhc}/bin/hsc2hs"
     "--ghcjs"
@@ -245,41 +244,9 @@ stdenv.mkDerivation ({
     runHook postConfigure
   '';
 
-  # The darwin pre/post build sections are a workaround https://github.com/haskell/cabal/issues/4183
-  # It seems like --extra-lib-dirs from the previous steps is not detected properly,
-  # to work around this we build using a DYLD_LIBRARY_PATH and fixup the build afterwards.
   buildPhase = ''
     runHook preBuild
-    ${optionalString stdenv.isDarwin ''
-      local inputClosure=""
-      for i in $propagatedNativeBuildInputs $nativeBuildInputs; do
-        findInputs $i inputClosure propagated-native-build-inputs
-      done
-      local -a inputLibs=()
-      for p in $inputClosure; do
-        if [ -d "$p/lib/${ghc.name}/package.conf.d" ]; then
-          continue
-        fi
-        if [ -d "$p/lib" ]; then
-          inputLibs+="$p/lib"
-        fi
-      done
-
-      for lib in $inputLibs; do
-        export DYLD_LIBRARY_PATH="$lib:''${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}"
-      done
-    ''}
     ${setupCommand} build ${buildTarget}${crossCabalFlagsString}
-    ${optionalString stdenv.isDarwin ''
-      unset DYLD_LIBRARY_PATH
-
-      local outputLib=dist/build/*-ghc${ghc.version}.dylib
-      for lib in $inputLib/*.dylib; do
-        for name in $(otool -L $outputLib | awk '$1 ~ /^'$(basename lib)'/ {print $1}' | cat); do
-          install_name_tool -change $name $lib $outputLib
-        done
-      done
-    ''}
     runHook postBuild
   '';
 
diff --git a/pkgs/development/interpreters/angelscript/default.nix b/pkgs/development/interpreters/angelscript/default.nix
index 16042091a47a..2608388e1526 100644
--- a/pkgs/development/interpreters/angelscript/default.nix
+++ b/pkgs/development/interpreters/angelscript/default.nix
@@ -3,10 +3,10 @@ let
   s = # Generated upstream information
   rec {
     baseName="angelscript";
-    version = "2.31.1";
+    version = "2.31.2";
     name="${baseName}-${version}";
     url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
-    sha256 = "00z0x2w1dnfd2h8xvmq3qy2n8gqxyi9gxwnsz0q420by8vnrljmh";
+    sha256 = "1cl1yg36ad4wq0vks4xg0hv7iyvq6yzsd4y1jng5qdf8qybq02qc";
   };
   buildInputs = [
     unzip
diff --git a/pkgs/development/interpreters/python/cpython/2.7/boot.nix b/pkgs/development/interpreters/python/cpython/2.7/boot.nix
new file mode 100644
index 000000000000..1fecdfdf560e
--- /dev/null
+++ b/pkgs/development/interpreters/python/cpython/2.7/boot.nix
@@ -0,0 +1,94 @@
+{ stdenv, fetchurl, CF, configd, coreutils }:
+
+with stdenv.lib;
+
+let
+
+  mkPaths = paths: {
+    C_INCLUDE_PATH = makeSearchPathOutput "dev" "include" paths;
+    LIBRARY_PATH = makeLibraryPath paths;
+  };
+
+in
+
+stdenv.mkDerivation rec {
+  name = "python-boot-${version}";
+  version = "2.7.12";
+  libPrefix = "python2.7";
+
+  src = fetchurl {
+    url = "https://www.python.org/ftp/python/2.7.12/Python-${version}.tar.xz";
+    sha256 = "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp";
+  };
+
+  inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH;
+
+  LDFLAGS = optionalString (!stdenv.isDarwin) "-lgcc_s";
+  NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2";
+
+  buildInputs = optionals stdenv.isDarwin [ CF configd ];
+
+  patches =
+    [ # Look in C_INCLUDE_PATH and LIBRARY_PATH for stuff.
+      ./search-path.patch
+
+      # Python recompiles a Python if the mtime stored *in* the
+      # pyc/pyo file differs from the mtime of the source file.  This
+      # doesn't work in Nix because Nix changes the mtime of files in
+      # the Nix store to 1.  So treat that as a special case.
+      ./nix-store-mtime.patch
+
+      # patch python to put zero timestamp into pyc
+      # if DETERMINISTIC_BUILD env var is set
+      ./deterministic-build.patch
+    ];
+
+  DETERMINISTIC_BUILD = 1;
+
+  preConfigure = ''
+      # Purity.
+      for i in /usr /sw /opt /pkg; do
+        substituteInPlace ./setup.py --replace $i /no-such-path
+      done
+    '' + optionalString (stdenv ? cc && stdenv.cc.libc != null) ''
+      for i in Lib/plat-*/regen; do
+        substituteInPlace $i --replace /usr/include/ ${stdenv.cc.libc}/include/
+      done
+    '' + optionalString stdenv.isDarwin ''
+      substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"'
+      substituteInPlace Lib/multiprocessing/__init__.py \
+        --replace 'os.popen(comm)' 'os.popen("${coreutils}/bin/nproc")'
+    '';
+
+  configureFlags = [ "--enable-shared" "--with-threads" "--enable-unicode=ucs4" ]
+    ++ optionals stdenv.isCygwin [ "ac_cv_func_bind_textdomain_codeset=yes" ]
+    ++ optionals stdenv.isDarwin [ "--disable-toolbox-glue" ];
+
+  postInstall =
+    ''
+      ln -s $out/share/man/man1/{python2.7.1.gz,python.1.gz}
+
+      paxmark E $out/bin/python2.7
+
+      rm "$out"/lib/python*/plat-*/regen # refers to glibc.dev
+    '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = "http://python.org";
+    description = "A high-level dynamically-typed programming language";
+    longDescription = ''
+      Python is a remarkably powerful dynamic programming language that
+      is used in a wide variety of application domains. Some of its key
+      distinguishing features include: clear, readable syntax; strong
+      introspection capabilities; intuitive object orientation; natural
+      expression of procedural code; full modularity, supporting
+      hierarchical packages; exception-based error handling; and very
+      high level dynamic data types.
+    '';
+    license = stdenv.lib.licenses.psfl;
+    platforms = stdenv.lib.platforms.all;
+    maintainers = with stdenv.lib.maintainers; [ lnl7 chaoflow domenkozar ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/pypy/2.7/default.nix b/pkgs/development/interpreters/python/pypy/2.7/default.nix
index 1fd9eaee4303..467c9a078bba 100644
--- a/pkgs/development/interpreters/python/pypy/2.7/default.nix
+++ b/pkgs/development/interpreters/python/pypy/2.7/default.nix
@@ -8,8 +8,8 @@
 assert zlibSupport -> zlib != null;
 
 let
-  majorVersion = "5.4";
-  minorVersion = "1";
+  majorVersion = "5.6";
+  minorVersion = "0";
   minorVersionSuffix = "";
   pythonVersion = "2.7";
   version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
@@ -23,7 +23,7 @@ let
 
     src = fetchurl {
       url = "https://bitbucket.org/pypy/pypy/get/release-pypy${pythonVersion}-v${version}.tar.bz2";
-      sha256 = "1x8sa5x1nkrb8wrmicri94ji8kvyxihyryi8br5fk7gak0agcai0";
+      sha256 = "145a0kd5c0s1v2rpavw9ihncfb05s2x7chc70v8fssvyxq601911";
     };
 
    # http://bugs.python.org/issue27369
diff --git a/pkgs/development/libraries/czmqpp/default.nix b/pkgs/development/libraries/czmqpp/default.nix
index 672a89cc3c02..0c026b9f47a5 100644
--- a/pkgs/development/libraries/czmqpp/default.nix
+++ b/pkgs/development/libraries/czmqpp/default.nix
@@ -11,18 +11,18 @@ stdenv.mkDerivation rec {
     sha256 = "0z8lwq53yk4h7pgibicx3q9idz15qb95r0pjpz0j5vql6qh46rja";
   };
 
-  meta = with stdenv.lib; {
-    inherit (src.meta) homepage;
-    description = "C++ wrapper for czmq. Aims to be minimal, simple and consistent";
-    license = licenses.lgpl3;
-    platforms = platforms.linux;
-    maintainers = with maintainers; [ chris-martin ];
-  };
-
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
 
   propagatedBuildInputs = [ czmq ];
 
   # https://github.com/zeromq/czmqpp/issues/42
   patches = [ ./socket.patch ];
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "C++ wrapper for czmq. Aims to be minimal, simple and consistent";
+    license = licenses.lgpl3;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ chris-martin ];
+  };
 }
diff --git a/pkgs/development/libraries/eigen/3.3.nix b/pkgs/development/libraries/eigen/3.3.nix
new file mode 100644
index 000000000000..ca3d44022062
--- /dev/null
+++ b/pkgs/development/libraries/eigen/3.3.nix
@@ -0,0 +1,25 @@
+{stdenv, fetchurl, cmake}:
+
+let
+  version = "3.3.1";
+in
+stdenv.mkDerivation {
+  name = "eigen-${version}";
+  
+  src = fetchurl {
+    url = "http://bitbucket.org/eigen/eigen/get/${version}.tar.gz";
+    name = "eigen-${version}.tar.gz";
+    sha256 = "141axgv5kykq7125scisjvnfcdx7qcj8n8zlk7g09r7fhqgjr79w";
+  };
+  
+  nativeBuildInputs = [ cmake ];
+  
+  meta = with stdenv.lib; {
+    description = "C++ template library for linear algebra: vectors, matrices, and related algorithms";
+    license = licenses.lgpl3Plus;
+    homepage = http://eigen.tuxfamily.org ;
+    platforms = platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ sander urkud raskin ];
+    inherit version;
+  };
+}
diff --git a/pkgs/development/libraries/git2/0.23.nix b/pkgs/development/libraries/git2/0.23.nix
deleted file mode 100644
index 3cf429ab1d73..000000000000
--- a/pkgs/development/libraries/git2/0.23.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, cmake, zlib, python, libssh2, openssl, http-parser, libiconv }:
-
-stdenv.mkDerivation (rec {
-  version = "0.23.2";
-  name = "libgit2-${version}";
-
-  src = fetchurl {
-    name = "${name}.tar.gz";
-    url = "https://github.com/libgit2/libgit2/tarball/v${version}";
-    sha256 = "1d3901bmgvdnmzrx21afi1d0llsqmca3ckj942p0i2wpdpr1kbcp";
-  };
-
-  cmakeFlags = "-DTHREADSAFE=ON";
-
-  nativeBuildInputs = [ cmake python pkgconfig ];
-  buildInputs = [ zlib libssh2 openssl http-parser ];
-
-  meta = {
-    description = "the Git linkable library";
-    homepage = http://libgit2.github.com/;
-    license = stdenv.lib.licenses.gpl2;
-    platforms = with stdenv.lib.platforms; all;
-  };
-} // stdenv.lib.optionalAttrs (!stdenv.isLinux) {
-  NIX_LDFLAGS = "-liconv";
-  propagatedBuildInputs = [ libiconv ];
-})
diff --git a/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix b/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix
index 890ec1e4eec3..9ab6f7a10898 100644
--- a/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix
+++ b/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix
@@ -1,53 +1,73 @@
 { stdenv, lib, makeWrapper, buildEnv }:
 
-drv:
-
-{ targets, paths ? [] }:
+packages:
 
 let
+  packages_ = if builtins.isList packages then packages else [packages];
+
+  unwrapped = lib.concatMap (p: if builtins.isList p.unwrapped then p.unwrapped else [p.unwrapped]) packages_;
+  targets = lib.concatMap (p: p.targets) packages_;
+  paths = lib.concatMap (p: p.paths or []) packages_;
+
+  name =
+    if builtins.length unwrapped == 1
+    then (lib.head unwrapped).name
+    else "kde-application";
+  meta =
+    if builtins.length unwrapped == 1
+    then (lib.head unwrapped).meta
+    else {};
+
   env = buildEnv {
-    inherit (drv) name meta;
-    paths = builtins.map lib.getBin ([drv] ++ paths);
+    inherit name meta;
+    paths = builtins.map lib.getBin (unwrapped ++ paths);
     pathsToLink = [ "/bin" "/share" "/lib/qt5" "/etc/xdg" ];
   };
 in
 
 stdenv.mkDerivation {
-  inherit (drv) name meta;
+  inherit name meta;
   preferLocalBuild = true;
 
-  paths = builtins.map lib.getBin ([drv] ++ paths);
-  inherit drv env targets;
-  passthru = { unwrapped = drv; };
+  inherit unwrapped env targets;
 
-  nativeBuildInputs = [ makeWrapper ];
+  passthru = {
+    inherit targets paths;
+    unwrapped = if builtins.length unwrapped == 1 then lib.head unwrapped else unwrapped;
+  };
 
-  builder = builtins.toFile "builder.sh" ''
-    . $stdenv/setup
+  nativeBuildInputs = [ makeWrapper ];
 
+  buildCommand = ''
     for t in $targets; do
-        if [ -a "$drv/$t" ]; then
-            makeWrapper "$drv/$t" "$out/$t" \
-                --argv0 '"$0"' \
-                --suffix PATH : "$env/bin" \
-                --prefix XDG_CONFIG_DIRS : "$env/share" \
-                --prefix XDG_DATA_DIRS : "$env/etc/xdg" \
-                --set QML_IMPORT_PATH "$env/lib/qt5/imports" \
-                --set QML2_IMPORT_PATH "$env/lib/qt5/qml" \
-                --set QT_PLUGIN_PATH "$env/lib/qt5/plugins"
-        else
-            echo "no such file or directory: $drv/$t"
+        good=""
+        for drv in $unwrapped; do
+            if [ -a "$drv/$t" ]; then
+                makeWrapper "$drv/$t" "$out/$t" \
+                    --argv0 '"$0"' \
+                    --suffix PATH : "$env/bin" \
+                    --prefix XDG_CONFIG_DIRS : "$env/share" \
+                    --prefix XDG_DATA_DIRS : "$env/etc/xdg" \
+                    --set QML_IMPORT_PATH "$env/lib/qt5/imports" \
+                    --set QML2_IMPORT_PATH "$env/lib/qt5/qml" \
+                    --set QT_PLUGIN_PATH "$env/lib/qt5/plugins"
+                good="1"
+                break
+            fi
+        done
+        if [ -z "$good" ]; then
+            echo "file or directory not found in derivations: $t"
             exit 1
         fi
     done
 
-    if [ -a "$drv/share" ]; then
-        ln -s "$drv/share" "$out"
-    fi
+    ln -s "$env/share" "$out"
 
-    if [ -a "$drv/nix-support/propagated-user-env-packages" ]; then
-        mkdir -p "$out/nix-support"
-        ln -s "$drv/nix-support/propagated-user-env-packages" "$out/nix-support/"
-    fi
+    for drv in $unwrapped; do
+        if [ -a "$drv/nix-support/propagated-user-env-packages" ]; then
+            mkdir -p "$out/nix-support"
+            cat "$drv/nix-support/propagated-user-env-packages" >> "$out/nix-support/propagated-user-env-packages"
+        fi
+    done
   '';
 }
diff --git a/pkgs/development/libraries/libdivecomputer/subsurface.nix b/pkgs/development/libraries/libdivecomputer/subsurface.nix
new file mode 100644
index 000000000000..5840ea2ef85e
--- /dev/null
+++ b/pkgs/development/libraries/libdivecomputer/subsurface.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchgit, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  name = "libdivecomputer-${version}";
+  version = "ssrf-0.5.0";
+
+  src = fetchgit {
+    url = "git://subsurface-divelog.org/libdc";
+    rev = "534dd2f34b8271b2a1cac0e3151bfdc81da40e47";
+    branchName = "Subsurface-branch";
+    sha256 = "0iw9pczmwqlfjlgrik79b2pd4lmipxhjzj60ysk8qzl3axadjycp";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.libdivecomputer.org;
+    description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
+    maintainers = [ maintainers.mguentner ];
+    license = licenses.lgpl21;
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/libgphoto2/default.nix b/pkgs/development/libraries/libgphoto2/default.nix
index e9b6968d13bc..6a7b747f7f99 100644
--- a/pkgs/development/libraries/libgphoto2/default.nix
+++ b/pkgs/development/libraries/libgphoto2/default.nix
@@ -7,15 +7,10 @@ stdenv.mkDerivation rec {
     owner = "gphoto";
     repo = "libgphoto2";
     rev = "${meta.tag}";
-    sha256 = "17k3jxib2jcr2wk83p34h3lvvjbs2gqhqfcngm8zmlrwb385yalh";
+    sha256 = "01nirw0xb8fjjv0jz88bmddv26bgg82w1wg65q51iblmy9z8azfh";
   };
 
-  patches = [(fetchpatch {
-    name = "libjpeg_turbo_1.5.0_fix.patch";
-    url = "https://anonscm.debian.org/cgit/pkg-phototools/libgphoto2.git/plain"
-      + "/debian/patches/libjpeg_turbo_1.5.0_fix.patch?id=8ce79a2a02d";
-    sha256 = "1zclgg20nv4krj8gigq3ylirxqiv1v8p59cfji041m156hy80gy2";
-  })];
+  patches = [];
 
   nativeBuildInputs = [ pkgconfig gettext autoreconfHook ];
   buildInputs = [ libtool libjpeg libusb1  ];
@@ -38,8 +33,8 @@ stdenv.mkDerivation rec {
       MTP, and other vendor specific protocols for controlling and transferring data
       from digital cameras.
     '';
-    version = "2.5.10";
-    tag = "libgphoto2-2_5_10-release";
+    version = "2.5.11";
+    tag = "libgphoto2-2_5_11-release";
     # XXX: the homepage claims LGPL, but several src files are lgpl21Plus
     license = stdenv.lib.licenses.lgpl21Plus;
     platforms = with stdenv.lib.platforms; unix;
diff --git a/pkgs/development/libraries/libmwaw/default.nix b/pkgs/development/libraries/libmwaw/default.nix
index fc2ed6c60867..a52e25e7cf23 100644
--- a/pkgs/development/libraries/libmwaw/default.nix
+++ b/pkgs/development/libraries/libmwaw/default.nix
@@ -3,11 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="libmwaw";
-    version="0.3.8";
+    version="0.3.9";
     name="${baseName}-${version}";
-    hash="019vk8cj3lgbrpgj48zy25mpkgmllwxznkfd94hh9vbb1cjvpz3a";
-    url="mirror://sourceforge/project/libmwaw/libmwaw/libmwaw-0.3.8/libmwaw-0.3.8.tar.xz";
-    sha256="019vk8cj3lgbrpgj48zy25mpkgmllwxznkfd94hh9vbb1cjvpz3a";
+    hash="185jnp7b7s550xpz3bhaii275qw5yd3j29zijkd2rr8h2p9s9z7p";
+    url="https://heanet.dl.sourceforge.net/project/libmwaw/libmwaw/libmwaw-0.3.9/libmwaw-0.3.9.tar.xz";
+    sha256="185jnp7b7s550xpz3bhaii275qw5yd3j29zijkd2rr8h2p9s9z7p";
   };
   buildInputs = [
     boost pkgconfig cppunit zlib libwpg libwpd librevenge
diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix
index a20bc7e5f3c5..8c6e1c4af15a 100644
--- a/pkgs/development/libraries/libpng/default.nix
+++ b/pkgs/development/libraries/libpng/default.nix
@@ -3,10 +3,12 @@
 assert zlib != null;
 
 let
-  version = "1.6.26";
-  sha256 = "1ybkgcqqsd4iiiyv60pxjfi1csszb50bd2cxxsy3sv4q4sil6rr6";
+  version = "1.6.27";
+  patchVersion = "1.6.26";
+  # patchVersion = version;
+  sha256 = "0yxmajq2ri1smpz5spi0f055izbdkmmr7a5zp7d6qd9nfgczz8pw";
   patch_src = fetchurl {
-    url = "mirror://sourceforge/libpng-apng/libpng-${version}-apng.patch.gz";
+    url = "mirror://sourceforge/libpng-apng/libpng-${patchVersion}-apng.patch.gz";
     sha256 = "0b6p2k4afvhk1svargpllcvhxb4g3p857wkqk85cks0yv42ckph1";
   };
   whenPatched = stdenv.lib.optionalString apngSupport;
diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix
index 9a481c0b20f1..10d77c9988c8 100644
--- a/pkgs/development/libraries/rocksdb/default.nix
+++ b/pkgs/development/libraries/rocksdb/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub
+{ stdenv, fetchFromGitHub, fixDarwinDylibNames
 
 # Optional Arguments
 , snappy ? null, google-gflags ? null, zlib ? null, bzip2 ? null, lz4 ? null
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
     sha256 = "1bxyykj13mw48yk108bkmxlfrp6bd95f27bysayax4lqxkgx0zzw";
   };
 
-  buildInputs = [ snappy google-gflags zlib bzip2 lz4 malloc ];
+  buildInputs = [ snappy google-gflags zlib bzip2 lz4 malloc fixDarwinDylibNames ];
 
   postPatch = ''
     # Hack to fix typos
@@ -36,11 +36,16 @@ stdenv.mkDerivation rec {
   JEMALLOC_LIB = stdenv.lib.optionalString (malloc == jemalloc) "-ljemalloc";
 
   buildFlags = [
+    "DEBUG_LEVEL=0"
+    "shared_lib"
     "static_lib"
   ];
 
   installFlags = [
     "INSTALL_PATH=\${out}"
+    "DEBUG_LEVEL=0"
+    "install-shared"
+    "install-static"
   ];
 
   postInstall = ''
diff --git a/pkgs/development/libraries/webkitgtk/2.14.nix b/pkgs/development/libraries/webkitgtk/2.14.nix
index 3c92527ea705..6835f59f5863 100644
--- a/pkgs/development/libraries/webkitgtk/2.14.nix
+++ b/pkgs/development/libraries/webkitgtk/2.14.nix
@@ -1,7 +1,8 @@
 { stdenv, fetchurl, perl, python2, ruby, bison, gperf, cmake
 , pkgconfig, gettext, gobjectIntrospection, libnotify, gnutls
 , gtk2, gtk3, wayland, libwebp, enchant, xlibs, libxkbcommon, epoxy, at_spi2_core
-, libxml2, libsoup, libsecret, libxslt, harfbuzz, libpthreadstubs
+, libxml2, libsoup, libsecret, libxslt, harfbuzz, libpthreadstubs, pcre, nettle, libtasn1, p11_kit
+, libidn
 , enableGeoLocation ? true, geoclue2, sqlite
 , gst-plugins-base
 }:
@@ -11,7 +12,7 @@ assert enableGeoLocation -> geoclue2 != null;
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "webkitgtk-${version}";
-  version = "2.14.1";
+  version = "2.14.2";
 
   meta = {
     description = "Web content rendering engine, GTK+ port";
@@ -26,7 +27,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://webkitgtk.org/releases/${name}.tar.xz";
-    sha256 = "1dffnz20psgc604azhbzn9a6cdhafar9dw74w3bbwrfy531pcb9f";
+    sha256 = "0mjmcxhafh6l6j062z2nwfqbbvfyx16iqrzrbajswijh23awpnrf";
   };
 
   # see if we can clean this up....
@@ -49,8 +50,8 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs = [
-    gtk2 wayland libwebp enchant libnotify gnutls
-    libxml2 libsecret libxslt harfbuzz libpthreadstubs
+    gtk2 wayland libwebp enchant libnotify gnutls pcre nettle libidn
+    libxml2 libsecret libxslt harfbuzz libpthreadstubs libtasn1 p11_kit
     gst-plugins-base libxkbcommon epoxy at_spi2_core
   ] ++ optional enableGeoLocation geoclue2
     ++ (with xlibs; [ libXdmcp libXt libXtst ]);
diff --git a/pkgs/development/node-packages/node-env.nix b/pkgs/development/node-packages/node-env.nix
index 414f60420af2..389ccae2fe52 100644
--- a/pkgs/development/node-packages/node-env.nix
+++ b/pkgs/development/node-packages/node-env.nix
@@ -8,19 +8,19 @@ let
   # Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
   tarWrapper = runCommand "tarWrapper" {} ''
     mkdir -p $out/bin
-    
+
     cat > $out/bin/tar <<EOF
     #! ${stdenv.shell} -e
     $(type -p tar) "\$@" --warning=no-unknown-keyword
     EOF
-    
+
     chmod +x $out/bin/tar
   '';
-  
+
   # Function that generates a TGZ file from a NPM project
   buildNodeSourceDist =
     { name, version, src, ... }:
-    
+
     stdenv.mkDerivation {
       name = "node-tarball-${name}-${version}";
       inherit src;
@@ -44,13 +44,13 @@ let
           # Bundle the dependencies of the package
           mkdir -p node_modules
           cd node_modules
-          
+
           # Only include dependencies if they don't exist. They may also be bundled in the package.
           if [ ! -e "${dependency.name}" ]
           then
               ${composePackage dependency}
           fi
-          
+
           cd ..
         ''
       ) dependencies);
@@ -63,13 +63,13 @@ let
         text = ''
           var fs = require('fs');
           var url = require('url');
-          
+
           /*
            * Replaces an impure version specification by *
            */
           function replaceImpureVersionSpec(versionSpec) {
               var parsedUrl = url.parse(versionSpec);
-              
+
               if(versionSpec == "latest" || versionSpec == "unstable" ||
                   versionSpec.substr(0, 2) == ".." || dependency.substr(0, 2) == "./" || dependency.substr(0, 2) == "~/" || dependency.substr(0, 1) == '/')
                   return '*';
@@ -79,9 +79,9 @@ let
               else
                   return versionSpec;
           }
-      
+
           var packageObj = JSON.parse(fs.readFileSync('./package.json'));
-      
+
           /* Replace dependencies */
           if(packageObj.dependencies !== undefined) {
               for(var dependency in packageObj.dependencies) {
@@ -89,7 +89,7 @@ let
                   packageObj.dependencies[dependency] = replaceImpureVersionSpec(versionSpec);
               }
           }
-          
+
           /* Replace development dependencies */
           if(packageObj.devDependencies !== undefined) {
               for(var dependency in packageObj.devDependencies) {
@@ -97,7 +97,7 @@ let
                   packageObj.devDependencies[dependency] = replaceImpureVersionSpec(versionSpec);
               }
           }
-          
+
           /* Replace optional dependencies */
           if(packageObj.optionalDependencies !== undefined) {
               for(var dependency in packageObj.optionalDependencies) {
@@ -105,7 +105,7 @@ let
                   packageObj.optionalDependencies[dependency] = replaceImpureVersionSpec(versionSpec);
               }
           }
-          
+
           /* Write the fixed JSON file */
           fs.writeFileSync("package.json", JSON.stringify(packageObj));
         '';
@@ -114,40 +114,47 @@ let
     ''
       DIR=$(pwd)
       cd $TMPDIR
-      
+
       unpackFile ${src}
-      
+
       # Make the base dir in which the target dependency resides first
       mkdir -p "$(dirname "$DIR/${packageName}")"
 
       if [ -f "${src}" ]
       then
           # Figure out what directory has been unpacked
-          packageDir=$(find . -type d -maxdepth 1 | tail -1)
-          
+          packageDir="$(find . -maxdepth 1 -type d | tail -1)"
+
           # Restore write permissions to make building work
           find "$packageDir" -type d -print0 | xargs -0 chmod u+x
           chmod -R u+w "$packageDir"
-          
+
           # Move the extracted tarball into the output folder
           mv "$packageDir" "$DIR/${packageName}"
       elif [ -d "${src}" ]
       then
+          # Get a stripped name (without hash) of the source directory.
+          # On old nixpkgs it's already set internally.
+          if [ -z "$strippedName" ]
+          then
+              strippedName="$(stripHash ${src})"
+          fi
+
           # Restore write permissions to make building work
-          chmod -R u+w $strippedName
-          
+          chmod -R u+w "$strippedName"
+
           # Move the extracted directory into the output folder
-          mv $strippedName "$DIR/${packageName}"
+          mv "$strippedName" "$DIR/${packageName}"
       fi
 
       # Unset the stripped name to not confuse the next unpack step
       unset strippedName
-      
+
       # Some version specifiers (latest, unstable, URLs, file paths) force NPM to make remote connections or consult paths outside the Nix store.
       # The following JavaScript replaces these by * to prevent that
       cd "$DIR/${packageName}"
       node ${fixImpureDependencies}
-      
+
       # Include the dependencies of the package
       ${includeDependencies { inherit dependencies; }}
       cd ..
@@ -160,36 +167,36 @@ let
     tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
     mv node-* $out
   '';
-  
+
   # Builds and composes an NPM package including all its dependencies
   buildNodePackage = { name, packageName, version, dependencies ? [], production ? true, npmFlags ? "", dontNpmInstall ? false, preRebuild ? "", ... }@args:
-    
+
     stdenv.lib.makeOverridable stdenv.mkDerivation (builtins.removeAttrs args [ "dependencies" ] // {
       name = "node-${name}-${version}";
       buildInputs = [ tarWrapper python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
       dontStrip = args.dontStrip or true; # Striping may fail a build for some package deployments
-      
+
       inherit dontNpmInstall preRebuild;
-      
+
       unpackPhase = args.unpackPhase or "true";
-      
+
       buildPhase = args.buildPhase or "true";
-      
+
       compositionScript = composePackage args;
       passAsFile = [ "compositionScript" ];
-      
+
       installPhase = args.installPhase or ''
         # Create and enter a root node_modules/ folder
         mkdir -p $out/lib/node_modules
         cd $out/lib/node_modules
-          
+
         # Compose the package and all its dependencies
         source $compositionScriptPath
-        
+
         # Patch the shebangs of the bundled modules to prevent them from
         # calling executables outside the Nix store as much as possible
         patchShebangs .
-        
+
         # Deploy the Node.js package by running npm install. Since the
         # dependencies have been provided already by ourselves, it should not
         # attempt to install them again, which is good, because we want to make
@@ -199,23 +206,26 @@ let
         #
         # The other responsibilities of NPM are kept -- version checks, build
         # steps, postprocessing etc.
-        
+
         export HOME=$TMPDIR
         cd "${packageName}"
         runHook preRebuild
         npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
-        
+
         if [ "$dontNpmInstall" != "1" ]
         then
+            # NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
+            rm -f npm-shrinkwrap.json
+
             npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
         fi
-        
+
         # Create symlink to the deployed executable folder, if applicable
         if [ -d "$out/lib/node_modules/.bin" ]
         then
             ln -s $out/lib/node_modules/.bin $out/bin
         fi
-        
+
         # Create symlinks to the deployed manual page folders, if applicable
         if [ -d "$out/lib/node_modules/${packageName}/man" ]
         then
@@ -229,7 +239,7 @@ let
                 done
             done
         fi
-        
+
         # Run post install hook, if provided
         runHook postInstall
       '';
@@ -240,17 +250,17 @@ let
     let
       nodeDependencies = stdenv.mkDerivation {
         name = "node-dependencies-${name}-${version}";
-        
+
         buildInputs = [ tarWrapper python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
-        
+
         includeScript = includeDependencies { inherit dependencies; };
         passAsFile = [ "includeScript" ];
-        
+
         buildCommand = ''
           mkdir -p $out/lib
           cd $out/lib
           source $includeScriptPath
-          
+
           # Create fake package.json to make the npm commands work properly
           cat > package.json <<EOF
           {
@@ -258,15 +268,18 @@ let
               "version": "${version}"
           }
           EOF
-          
+
           # Patch the shebangs of the bundled modules to prevent them from
           # calling executables outside the Nix store as much as possible
           patchShebangs .
-          
-          export HOME=$TMPDIR
+
+          export HOME=$PWD
           npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
-          
+
           ${stdenv.lib.optionalString (!dontNpmInstall) ''
+            # NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
+            rm -f npm-shrinkwrap.json
+
             npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
           ''}
 
@@ -276,7 +289,7 @@ let
     in
     stdenv.lib.makeOverridable stdenv.mkDerivation {
       name = "node-shell-${name}-${version}";
-      
+
       buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
       buildCommand = ''
         mkdir -p $out/bin
@@ -287,7 +300,7 @@ let
         EOF
         chmod +x $out/bin/shell
       '';
-      
+
       # Provide the dependencies in a development shell through the NODE_PATH environment variable
       inherit nodeDependencies;
       shellHook = stdenv.lib.optionalString (dependencies != []) ''
diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix
index fbc6f5be5ca8..31870fdaf209 100644
--- a/pkgs/development/tools/build-managers/cmake/default.nix
+++ b/pkgs/development/tools/build-managers/cmake/default.nix
@@ -1,15 +1,15 @@
 { stdenv, fetchurl, pkgconfig
 , bzip2, curl, expat, libarchive, xz, zlib, libuv
-, useNcurses ? false, ncurses, useQt4 ? false, qt4
-, wantPS ? false, ps ? null
+# darwin attributes
+, ps
+, isBootstrap ? false
+, useSharedLibraries ? !stdenv.isCygwin
+, useNcurses ? false, ncurses
+, useQt4 ? false, qt4
 }:
 
 with stdenv.lib;
 
-assert wantPS -> (ps != null);
-assert stdenv ? cc;
-assert stdenv.cc ? libc;
-
 let
   os = stdenv.lib.optionalString;
   majorVersion = "3.7";
@@ -18,7 +18,7 @@ let
 in
 
 stdenv.mkDerivation rec {
-  name = "cmake-${os useNcurses "cursesUI-"}${os useQt4 "qt4UI-"}${version}";
+  name = "cmake-${os isBootstrap "boot-"}${os useNcurses "cursesUI-"}${os useQt4 "qt4UI-"}${version}";
 
   inherit majorVersion;
 
@@ -28,6 +28,11 @@ stdenv.mkDerivation rec {
     sha256 = "449a5bce64dbd4d5b9517ebd1a1248ed197add6ad27934478976fd5f1f9330e1";
   };
 
+  prePatch = optionalString (!useSharedLibraries) ''
+    substituteInPlace Utilities/cmlibarchive/CMakeLists.txt \
+      --replace '"-framework CoreServices"' '""'
+  '';
+
   # Don't search in non-Nix locations such as /usr, but do search in our libc.
   patches = [ ./search-path-3.2.patch ]
     ++ optional stdenv.isCygwin ./3.2.2-cygwin.patch;
@@ -38,39 +43,36 @@ stdenv.mkDerivation rec {
   setupHook = ./setup-hook.sh;
 
   buildInputs =
-    [ setupHook pkgconfig bzip2 curl expat libarchive xz zlib libuv ]
+    [ setupHook pkgconfig ]
+    ++ optionals useSharedLibraries [ bzip2 curl expat libarchive xz zlib libuv ]
     ++ optional useNcurses ncurses
     ++ optional useQt4 qt4;
 
-  propagatedBuildInputs = optional wantPS ps;
+  propagatedBuildInputs = optional stdenv.isDarwin ps;
 
-  preConfigure = with stdenv; ''
-      fixCmakeFiles .
-      substituteInPlace Modules/Platform/UnixPaths.cmake \
-        --subst-var-by libc_bin ${getBin cc.libc} \
-        --subst-var-by libc_dev ${getDev cc.libc} \
-        --subst-var-by libc_lib ${getLib cc.libc}
-      substituteInPlace Modules/FindCxxTest.cmake \
-        --replace "$""{PYTHON_EXECUTABLE}" ${stdenv.shell}
-      configureFlags="--parallel=''${NIX_BUILD_CORES:-1} $configureFlags"
-    '';
-  configureFlags =
-    [ "--docdir=share/doc/${name}"
-      "--no-system-jsoncpp"
-    ]
-    ++ optional (!stdenv.isCygwin) "--system-libs"
+  preConfigure = ''
+    fixCmakeFiles .
+    substituteInPlace Modules/Platform/UnixPaths.cmake \
+      --subst-var-by libc_bin ${getBin stdenv.cc.libc} \
+      --subst-var-by libc_dev ${getDev stdenv.cc.libc} \
+      --subst-var-by libc_lib ${getLib stdenv.cc.libc}
+    substituteInPlace Modules/FindCxxTest.cmake \
+      --replace "$""{PYTHON_EXECUTABLE}" ${stdenv.shell}
+    configureFlags="--parallel=''${NIX_BUILD_CORES:-1} $configureFlags"
+  '';
+
+  configureFlags = [ "--docdir=share/doc/${name}" ]
+    ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
     ++ optional useQt4 "--qt-gui"
-    ++ ["--"]
-    ++ optional (!useNcurses) "-DBUILD_CursesDialog=OFF";
+    ++ optionals (!useNcurses) [ "--" "-DBUILD_CursesDialog=OFF" ];
 
   dontUseCmakeConfigure = true;
-
   enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
     homepage = http://www.cmake.org/;
     description = "Cross-Platform Makefile Generator";
     platforms = if useQt4 then qt4.meta.platforms else platforms.all;
-    maintainers = with maintainers; [ urkud mornfall ttuegel ];
+    maintainers = with maintainers; [ urkud mornfall ttuegel lnl7 ];
   };
 }
diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix
index c129d4448a9c..dbdcb6ba8ef5 100644
--- a/pkgs/development/tools/build-managers/gradle/default.nix
+++ b/pkgs/development/tools/build-managers/gradle/default.nix
@@ -52,12 +52,12 @@ rec {
   };
 
   gradle_latest = gradleGen rec {
-    name = "gradle-3.2.1";
-    nativeVersion = "0.11";
+    name = "gradle-3.3";
+    nativeVersion = "0.12";
 
     src = fetchurl {
       url = "http://services.gradle.org/distributions/${name}-bin.zip";
-      sha256 = "1286wqycc7xnrkn6n37r5g19ajv6igqhavdh9pjxqmry9mjs6hwq";
+      sha256 = "14m2m5f5s2cpp6w0x3lkq6lyx5cd7jp0hldnrab0dkyqg31511n5";
     };
   };
 
diff --git a/pkgs/development/tools/build-managers/scons/default.nix b/pkgs/development/tools/build-managers/scons/default.nix
index 550a59a887e4..630dc4c751ee 100644
--- a/pkgs/development/tools/build-managers/scons/default.nix
+++ b/pkgs/development/tools/build-managers/scons/default.nix
@@ -2,13 +2,13 @@
 
 let
   name = "scons";
-  version = "2.5.0";
+  version = "2.5.1";
 in python2Packages.buildPythonApplication {
   name = "${name}-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/scons/${name}-${version}.tar.gz";
-    sha256 = "1sdcj8iapfzmlq7098yas40qwl6khsiwydbxv33sw81wy93nnagb";
+    sha256 = "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b";
   };
   # No tests
   doCheck = false;
diff --git a/pkgs/development/tools/misc/luarocks/default.nix b/pkgs/development/tools/misc/luarocks/default.nix
index 4da105f93035..03a686c125f0 100644
--- a/pkgs/development/tools/misc/luarocks/default.nix
+++ b/pkgs/development/tools/misc/luarocks/default.nix
@@ -3,11 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="luarocks";
-    version="2.4.0";
+    version="2.4.2";
     name="${baseName}-${version}";
-    hash="1hwpjj4nvy8m7hfmhf52vbhmlh7r3wfjjcc589yj8dnh528iqf24";
-    url="http://luarocks.org/releases/luarocks-2.4.0.tar.gz";
-    sha256="1hwpjj4nvy8m7hfmhf52vbhmlh7r3wfjjcc589yj8dnh528iqf24";
+    hash="1rfjfjgnafjxs1zrd1gy0ga5lw28sf5lrdmgzgh6bcp1hd2w67hf";
+    url="http://luarocks.org/releases/luarocks-2.4.2.tar.gz";
+    sha256="1rfjfjgnafjxs1zrd1gy0ga5lw28sf5lrdmgzgh6bcp1hd2w67hf";
   };
   buildInputs = [
     lua curl makeWrapper which unzip
diff --git a/pkgs/development/tools/slimerjs/default.nix b/pkgs/development/tools/slimerjs/default.nix
index ff06e5d4159a..cb6c4614a1a4 100644
--- a/pkgs/development/tools/slimerjs/default.nix
+++ b/pkgs/development/tools/slimerjs/default.nix
@@ -3,11 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="slimerjs";
-    version="0.10.1";
+    version="0.10.2";
     name="${baseName}-${version}";
-    hash="14xfhn9v3mn4m7hfa36750vp7qgmnc5yfrdkjymzm8g9fz39ddx2";
-    url="http://download.slimerjs.org/releases/0.10.1/slimerjs-0.10.1.zip";
-    sha256="14xfhn9v3mn4m7hfa36750vp7qgmnc5yfrdkjymzm8g9fz39ddx2";
+    hash="16pg12bvfqls707nsdqi3bl1c833kncsvnd0qiq5692lrh93x529";
+    url="http://download.slimerjs.org/releases/0.10.2/slimerjs-0.10.2.zip";
+    sha256="16pg12bvfqls707nsdqi3bl1c833kncsvnd0qiq5692lrh93x529";
   };
   buildInputs = [
     unzip zip
diff --git a/pkgs/development/tools/vultr/default.nix b/pkgs/development/tools/vultr/default.nix
new file mode 100644
index 000000000000..fe4b65846511
--- /dev/null
+++ b/pkgs/development/tools/vultr/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "vultr-${version}";
+  version = "1.12.0";
+  goPackagePath = "github.com/JamesClonk/vultr";
+
+  src = fetchFromGitHub {
+    owner = "JamesClonk";
+    repo = "vultr";
+    rev = "${version}";
+    sha256 = "0fzwzp0vhf3cgl9ij5zpdyn29w9rwwxghr50jjfbagpkfpy4g686";
+  };
+
+  meta = {
+    description = "A command line tool for Vultr services, a provider for cloud virtual private servers";
+    homepage = "https://github.com/JamesClonk/vultr";
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.zauberpony ];
+  };
+}
diff --git a/pkgs/games/sgt-puzzles/default.nix b/pkgs/games/sgt-puzzles/default.nix
index 0500a456269d..26278dd031cc 100644
--- a/pkgs/games/sgt-puzzles/default.nix
+++ b/pkgs/games/sgt-puzzles/default.nix
@@ -1,6 +1,6 @@
 {stdenv, gtk3, pkgconfig, libX11, perl, fetchurl, automake115x, autoconf}:
 let
-  version = "20160429.b31155b";
+  version = "20161228.7cae89f";
   buildInputs = [
     gtk3 pkgconfig libX11 perl automake115x autoconf
   ];
@@ -8,7 +8,7 @@ in
 stdenv.mkDerivation {
   src = fetchurl {
    url = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-${version}.tar.gz";
-   sha256 = "0y807srhf6571ijdwpa493qzsx161f0a1pmh2qi44f6ixfcrkgzi";
+   sha256 = "0kqy3gdgfjgaqbjl95pnljz44v91i79qphwdp91k0n5alswxwn76";
   };
   name = "sgt-puzzles-r" + version;
   inherit buildInputs;
diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix
index 5ad39a914f64..6a87ff395b37 100644
--- a/pkgs/misc/emulators/wine/sources.nix
+++ b/pkgs/misc/emulators/wine/sources.nix
@@ -6,9 +6,9 @@ let fetchurl = args@{url, sha256, ...}:
 in rec {
 
   stable = fetchurl rec {
-    version = "1.8.4";
+    version = "1.8.6";
     url = "https://dl.winehq.org/wine/source/1.8/wine-${version}.tar.bz2";
-    sha256 = "0yahh1n3s3y0bp1a1sr3zpna56749jdgr85hwmpq393pjx1i0pai";
+    sha256 = "1lq6770pkv3342ss2ih18s2hw6i1srbcfg3mljwalqrvxfb7hydi";
 
     ## see http://wiki.winehq.org/Gecko
     gecko32 = fetchurl rec {
@@ -30,9 +30,9 @@ in rec {
   };
 
   unstable = fetchurl rec {
-    version = "2.0-rc2";
+    version = "2.0-rc3";
     url = "https://dl.winehq.org/wine/source/2.0/wine-${version}.tar.bz2";
-    sha256 = "0pjkrvslfksx7m2w52pnd3dfxb82l082cz9dr57x58s9al2jpwb6";
+    sha256 = "0sq8li7p30h2a5bbpv27vxpzihr8h890qm78nq21fnh0zflg8x8y";
     inherit (stable) mono;
     gecko32 = fetchurl rec {
       version = "2.47";
@@ -48,15 +48,15 @@ in rec {
 
   staging = fetchFromGitHub rec {
     inherit (unstable) version;
-    sha256 = "1xx9bfirij12l278f5f7vpxxay1zacnrsaib6yfzrybm517ynfw3";
+    sha256 = "1nk8s54nrlws0d8wpyj1vv2z0l2jansn990xw73v15wzwc3j9p6l";
     owner = "wine-compholio";
     repo = "wine-staging";
     rev = "v${version}";
   };
 
   winetricks = fetchFromGitHub rec {
-    version = "20160724";
-    sha256 = "0nl8gnmsqwwrc8773q8py64kv3r5836xjxsnxjv91n4hhmvgyrzs";
+    version = "20170101";
+    sha256 = "0c2aam68x3nlvc6f4r6rnfw6y3a86644zb0qirwkmh3p04mpdl39";
     owner = "Winetricks";
     repo = "winetricks";
     rev = version;
diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix
index 41fb090710cb..202426e78726 100644
--- a/pkgs/os-specific/darwin/cctools/port.nix
+++ b/pkgs/os-specific/darwin/cctools/port.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, autoconf, automake, libtool_2
-, llvm, libcxx, libcxxabi, clang, openssl, libuuid
+, llvm, libcxx, libcxxabi, clang, libuuid
 , libobjc ? null
 }:
 
@@ -15,7 +15,7 @@ let
       sha256 = "0bzyabzr5dvbxglr74d0kbrk2ij5x7s5qcamqi1v546q1had1wz1";
     };
 
-    buildInputs = [ autoconf automake libtool_2 openssl libuuid ] ++
+    buildInputs = [ autoconf automake libtool_2 libuuid ] ++
       # Only need llvm and clang if the stdenv isn't already clang-based (TODO: just make a stdenv.cc.isClang)
       stdenv.lib.optionals (!stdenv.isDarwin) [ llvm clang ] ++
       stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ];
diff --git a/pkgs/os-specific/linux/autofs/default.nix b/pkgs/os-specific/linux/autofs/default.nix
index 4401eb24cb48..d2d2c4a3988a 100644
--- a/pkgs/os-specific/linux/autofs/default.nix
+++ b/pkgs/os-specific/linux/autofs/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchurl, flex, bison, linuxHeaders, libtirpc, utillinux, nfs-utils, e2fsprogs
-, libxml2 }:
+, libxml2, kerberos, kmod, openldap, sssd, cyrus_sasl, openssl }:
 
 let
   version = "5.1.2";
@@ -13,7 +13,9 @@ in stdenv.mkDerivation {
   };
 
   preConfigure = ''
-    configureFlags="--enable-force-shutdown --enable-ignore-busy --with-path=$PATH"
+    configureFlags="--enable-force-shutdown --enable-ignore-busy --with-path=$PATH --with-openldap=${openldap} --with-sasl=${cyrus_sasl}"
+    export sssldir="${sssd}/lib/sssd/modules"
+    export HAVE_SSS_AUTOFS=1
 
     export MOUNT=${lib.getBin utillinux}/bin/mount
     export MOUNT_NFS=${lib.getBin nfs-utils}/bin/mount.nfs
@@ -29,7 +31,8 @@ in stdenv.mkDerivation {
     #make install SUBDIRS="samples" # impure!
   '';
 
-  buildInputs = [ linuxHeaders libtirpc libxml2 ];
+  buildInputs = [ linuxHeaders libtirpc libxml2 kerberos kmod openldap sssd
+                  openssl cyrus_sasl ];
 
   nativeBuildInputs = [ flex bison ];
 
diff --git a/pkgs/os-specific/linux/busybox/busybox-in-store.patch b/pkgs/os-specific/linux/busybox/busybox-in-store.patch
index 3500f167a14a..d3111efbdc48 100644
--- a/pkgs/os-specific/linux/busybox/busybox-in-store.patch
+++ b/pkgs/os-specific/linux/busybox/busybox-in-store.patch
@@ -1,14 +1,14 @@
 Allow BusyBox to be invoked as "<something>-busybox". This is
 necessary when it's run from the Nix store as <hash>-busybox during
 stdenv bootstrap.
---- busybox-1.25.1-orig/libbb/appletlib.orig	2016-10-26 19:54:20.510957575 -0400
-+++ busybox-1.25.1/libbb/appletlib.c	2016-10-26 19:48:31.590862853 -0400
-@@ -884,7 +884,7 @@
- 	int applet;
- 
- # if ENABLE_BUSYBOX
+--- busybox-1.26.1-orig/libbb/appletlib.orig	2016-10-26 19:54:20.510957575 -0400
++++ busybox-1.26.1/libbb/appletlib.c	2016-10-26 19:48:31.590862853 -0400
+@@ -887,7 +887,7 @@
+ static NORETURN void run_applet_and_exit(const char *name, char **argv)
+ {
+ #  if ENABLE_BUSYBOX
 -	if (is_prefixed_with(name, "busybox"))
 +	if (strstr(name, "busybox") != 0)
  		exit(busybox_main(argv));
- # endif
- 	/* find_applet_by_name() search is more expensive, so goes second */
+ #  endif
+ #  if NUM_APPLETS > 0
diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix
index 6f86529a265e..b3502d269b09 100644
--- a/pkgs/os-specific/linux/busybox/default.nix
+++ b/pkgs/os-specific/linux/busybox/default.nix
@@ -26,11 +26,11 @@ let
 in
 
 stdenv.mkDerivation rec {
-  name = "busybox-1.25.1";
+  name = "busybox-1.26.1";
 
   src = fetchurl {
     url = "http://busybox.net/downloads/${name}.tar.bz2";
-    sha256 = "0bm0l8xdjdz3kdyajp8wg27yamsw7r2y88nnrxwvvz984c7pwri7";
+    sha256 = "1wl1yy82am53srhgpi1w04hs5hbqjljrrxwwfic35k1mza3y9fqg";
   };
 
   hardeningDisable = [ "format" ] ++ lib.optional enableStatic [ "fortify" ];
diff --git a/pkgs/os-specific/linux/eudev/default.nix b/pkgs/os-specific/linux/eudev/default.nix
index 8ab4da2da8cf..772e69ac390e 100644
--- a/pkgs/os-specific/linux/eudev/default.nix
+++ b/pkgs/os-specific/linux/eudev/default.nix
@@ -3,10 +3,10 @@ let
   s = # Generated upstream information
   rec {
     baseName="eudev";
-    version = "3.2";
+    version = "3.2.1";
     name="${baseName}-${version}";
     url="http://dev.gentoo.org/~blueness/eudev/eudev-${version}.tar.gz";
-    sha256 = "099w62ncq78nxpxizf910mx18hc8x4qvzw3azjd00fir89wmyjnq";
+    sha256 = "06gyyl90n85x8i7lfhns514y1kg1ians13l467admyzy3kjxkqsp";
   };
   buildInputs = [
     glib pkgconfig gperf utillinux
diff --git a/pkgs/os-specific/linux/firejail/default.nix b/pkgs/os-specific/linux/firejail/default.nix
index 30fdbadd87b1..6b3afc1d63cc 100644
--- a/pkgs/os-specific/linux/firejail/default.nix
+++ b/pkgs/os-specific/linux/firejail/default.nix
@@ -3,11 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="firejail";
-    version="0.9.42";
+    version="0.9.44.2";
     name="${baseName}-${version}";
-    hash="0iwv97c0ygxrgxg997618a7cq3hl1l3b0njx7bqzv11vjzpcwfsg";
-    url="mirror://sourceforge/project/firejail/firejail/firejail-0.9.42.tar.xz";
-    sha256="0iwv97c0ygxrgxg997618a7cq3hl1l3b0njx7bqzv11vjzpcwfsg";
+    hash="0lc8vq6lj0669q4vx08m3dzqjayhl0cmm7n3qi4k18ys8ccyzbf5";
+    url="https://kent.dl.sourceforge.net/project/firejail/firejail/firejail-0.9.44.2.tar.xz";
+    sha256="0lc8vq6lj0669q4vx08m3dzqjayhl0cmm7n3qi4k18ys8ccyzbf5";
   };
   buildInputs = [
     which
@@ -24,8 +24,6 @@ stdenv.mkDerivation {
   preConfigure = ''
     sed -e 's@/bin/bash@${stdenv.shell}@g' -i $( grep -lr /bin/bash .)
     sed -e "s@/bin/cp@$(which cp)@g" -i $( grep -lr /bin/cp .)
-    sed -e '/void fs_var_run(/achar *vrcs = get_link("/var/run/current-system")\;' -i ./src/firejail/fs_var.c
-    sed -e '/ \/run/iif(vrcs!=NULL){symlink(vrcs, "/var/run/current-system")\;free(vrcs)\;}' -i ./src/firejail/fs_var.c
   '';
 
   preBuild = ''
diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix
index 10bea69a3c48..b547240eaf2a 100644
--- a/pkgs/os-specific/linux/kernel/linux-testing.nix
+++ b/pkgs/os-specific/linux/kernel/linux-testing.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, perl, buildLinux, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "4.10-rc1";
-  modDirVersion = "4.10.0-rc1";
+  version = "4.10-rc2";
+  modDirVersion = "4.10.0-rc2";
   extraMeta.branch = "4.10";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/testing/linux-${version}.tar.xz";
-    sha256 = "1s7axcii6jzm77ivmy26llf4z6dprfp3sb1v35fchl9bkzaivaly";
+    sha256 = "1r3w6mqvmjnsmqrk73xsrqybdvs1czjw5xl1x2wsi2w9nifb47zq";
   };
 
   features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/ofp/default.nix b/pkgs/os-specific/linux/ofp/default.nix
new file mode 100644
index 000000000000..e083c0f04570
--- /dev/null
+++ b/pkgs/os-specific/linux/ofp/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook
+, openssl, libpcap, odp-dpdk, dpdk
+}:
+
+stdenv.mkDerivation rec {
+  name = "ofp-${version}";
+  version = "2.0.0";
+
+  src = fetchFromGitHub {
+    owner = "OpenFastPath";
+    repo = "ofp";
+    rev = "${version}";
+    sha256 = "05902593fycgkwzk5g7wzgk0k40nrrgybplkdka3rqnlj6aydhqf";
+  };
+
+  nativeBuildInputs = [ pkgconfig autoreconfHook ];
+  buildInputs = [ openssl libpcap odp-dpdk dpdk ];
+
+  dontDisableStatic = true;
+
+  postPatch = ''
+    substituteInPlace configure.ac --replace m4_esyscmd m4_esyscmd_s
+    substituteInPlace scripts/git_hash.sh --replace /bin/bash /bin/sh
+    echo ${version} > .scmversion
+  '';
+
+  configureFlags = [
+    "--with-odp=${odp-dpdk}"
+    "--with-odp-lib=odp-dpdk"
+    "--disable-shared"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "High performance TCP/IP stack";
+    homepage = http://www.openfastpath.org;
+    license = licenses.bsd3;
+    platforms =  [ "x86_64-linux" ];
+    maintainers = [ maintainers.abuibrahim ];
+  };
+}
diff --git a/pkgs/os-specific/linux/pktgen/default.nix b/pkgs/os-specific/linux/pktgen/default.nix
index 2aa4d26f913e..68237d70f519 100644
--- a/pkgs/os-specific/linux/pktgen/default.nix
+++ b/pkgs/os-specific/linux/pktgen/default.nix
@@ -24,6 +24,11 @@ stdenv.mkDerivation rec {
 
   NIX_CFLAGS_COMPILE = [ "-march=core2" ];
 
+  postPatch = ''
+    substituteInPlace lib/lua/src/luaconf.h --replace /usr/local $out
+    substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu
+  '';
+
   installPhase = ''
     install -d $out/bin
     install -m 0755 app/app/${RTE_TARGET}/app/pktgen $out/bin
diff --git a/pkgs/os-specific/linux/pommed-light/default.nix b/pkgs/os-specific/linux/pommed-light/default.nix
new file mode 100644
index 000000000000..a039984ff338
--- /dev/null
+++ b/pkgs/os-specific/linux/pommed-light/default.nix
@@ -0,0 +1,65 @@
+{
+  stdenv
+, fetchurl
+, pciutils
+, confuse
+, alsaLib
+, audiofile
+, pkgconfig
+, zlib
+, eject
+}:
+
+stdenv.mkDerivation rec {
+  pkgname = "pommed-light";
+  version = "1.50lw";
+  name = "${pkgname}-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/bytbox/${pkgname}/archive/v${version}.tar.gz";
+
+    sha256 = "1r2f28zqmyvzgymd0ng53hscbrq8vcqhxdnkq5dppjf9yrzn018b";
+  };
+
+  postPatch = ''
+    substituteInPlace pommed.conf.mactel --replace /usr $out
+    substituteInPlace pommed.conf.pmac --replace /usr $out
+    substituteInPlace pommed/beep.h --replace /usr $out
+    substituteInPlace pommed/cd_eject.c --replace /usr/bin/eject ${eject}/bin/eject
+  '';
+
+  buildInputs = [
+    pciutils
+    confuse
+    alsaLib
+    audiofile
+    pkgconfig
+    zlib
+    eject
+  ];
+
+  installPhase = ''
+    install -Dm755 pommed/pommed $out/bin/pommed
+    install -Dm644 pommed.conf.mactel $out/etc/pommed.conf.mactel
+    install -Dm644 pommed.conf.pmac $out/etc/pommed.conf.pmac
+
+    # Man page
+    install -Dm644 pommed.1 $out/share/man/man1/pommed.1
+
+    # Sounds
+    install -Dm644 pommed/data/goutte.wav $out/share/pommed/goutte.wav
+    install -Dm644 pommed/data/click.wav $out/share/pommed/click.wav
+  '';
+
+  meta = {
+    description = "A trimmed version of the pommed hotkey handler for MacBooks";
+    longDescription = ''
+      This is a stripped-down version of pommed with client, dbus, and
+      ambient light sensor support removed, optimized for use with dwm
+      and the like.
+    '';
+    homepage = https://github.com/bytbox/pommed-light;
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.gpl2;
+  };
+}
diff --git a/pkgs/os-specific/linux/sssd/default.nix b/pkgs/os-specific/linux/sssd/default.nix
new file mode 100644
index 000000000000..d50848af3dc3
--- /dev/null
+++ b/pkgs/os-specific/linux/sssd/default.nix
@@ -0,0 +1,87 @@
+{ stdenv, fetchurl, pkgs, lib, glibc, augeas, bind, c-ares,
+  cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, libnfsidmap, doxygen,
+  python, python3, pam, popt, talloc, tdb, tevent, pkgconfig, ldb, openldap,
+  pcre, kerberos, cifs_utils, glib, keyutils, dbus, fakeroot, libxslt, libxml2,
+  docbook_xml_xslt, ldap, systemd, nspr, check, cmocka, uid_wrapper,
+  nss_wrapper, docbook_xml_dtd_44, ncurses, Po4a, http-parser, jansson }:
+
+let
+  name = "sssd-${version}";
+  version = "1.14.2";
+
+  docbookFiles = "${pkgs.docbook_xml_xslt}/share/xml/docbook-xsl/catalog.xml:${pkgs.docbook_xml_dtd_44}/xml/dtd/docbook/catalog.xml";
+in
+stdenv.mkDerivation {
+  inherit name;
+  inherit version;
+
+  src = fetchurl {
+    url = "https://fedorahosted.org/released/sssd/${name}.tar.gz";
+    sha1 = "167b2216c536035175ff041d0449e0a874c68601";
+  };
+
+  preConfigure = ''
+    export SGML_CATALOG_FILES="${docbookFiles}"
+    export PYTHONPATH=${ldap}/lib/python2.7/site-packages
+    export PATH=$PATH:${pkgs.openldap}/libexec
+    export CPATH=${pkgs.libxml2.dev}/include/libxml2
+
+    configureFlagsArray=(
+      --prefix=$out
+      --sysconfdir=/etc
+      --localstatedir=/var
+      --enable-pammoddir=$out/lib/security
+      --with-os=fedora
+      --with-pid-path=/run
+      --with-python2-bindings
+      --with-python3-bindings
+      --with-syslog=journald
+      --without-selinux
+      --without-semanage
+      --with-xml-catalog-path=''${SGML_CATALOG_FILES%%:*}
+      --with-ldb-lib-dir=$out/modules/ldb
+      --with-nscd=${glibc.bin}/sbin/nscd
+    )
+  '';
+
+  enableParallelBuilding = true;
+  buildInputs = [ augeas bind c-ares cyrus_sasl ding-libs libnl libunistring nss
+                  samba libnfsidmap doxygen python python3 popt
+                  talloc tdb tevent pkgconfig ldb pam openldap pcre kerberos
+                  cifs_utils glib keyutils dbus fakeroot libxslt libxml2
+                  ldap systemd nspr check cmocka uid_wrapper
+                  nss_wrapper ncurses Po4a http-parser jansson ];
+
+  makeFlags = [
+    "SGML_CATALOG_FILES=${docbookFiles}"
+  ];
+
+  installFlags = [
+     "sysconfdir=$(out)/etc"
+     "localstatedir=$(out)/var"
+     "pidpath=$(out)/run"
+     "sss_statedir=$(out)/var/lib/sss"
+     "logpath=$(out)/var/log/sssd"
+     "pubconfpath=$(out)/var/lib/sss/pubconf"
+     "dbpath=$(out)/var/lib/sss/db"
+     "mcpath=$(out)/var/lib/sss/mc"
+     "pipepath=$(out)/var/lib/sss/pipes"
+     "gpocachepath=$(out)/var/lib/sss/gpo_cache"
+     "secdbpath=$(out)/var/lib/sss/secrets"
+     "initdir=$(out)/rc.d/init"
+  ];
+
+  postInstall = ''
+    rm -rf "$out"/run
+    rm -rf "$out"/rc.d
+    rm -f "$out"/modules/ldb/memberof.la
+    find "$out" -depth -type d -exec rmdir --ignore-fail-on-non-empty {} \;
+  '';
+
+  meta = with stdenv.lib; {
+    description = "System Security Services Daemon";
+    homepage = https://fedorahosted.org/sssd/;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.e-user ];
+  };
+}
diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix
index 1088e0befdfc..281ee101eac3 100644
--- a/pkgs/os-specific/linux/sysdig/default.nix
+++ b/pkgs/os-specific/linux/sysdig/default.nix
@@ -2,14 +2,14 @@
 let
   inherit (stdenv.lib) optional optionalString;
   baseName = "sysdig";
-  version = "0.12.0";
+  version = "0.13.0";
 in
 stdenv.mkDerivation {
   name = "${baseName}-${version}";
 
   src = fetchurl {
     url = "https://github.com/draios/sysdig/archive/${version}.tar.gz";
-    sha256 = "17nf2h5ajy333rwh91hzaw8zq2mnkb3lxy8fmbbs8qazgsvwz6c3";
+    sha256 = "0ghxj473v471nnry8h9accxpwwjp8nbzkgw8dniqld0ixx678pia";
   };
 
   buildInputs = [
diff --git a/pkgs/servers/http/nginx/mainline.nix b/pkgs/servers/http/nginx/mainline.nix
index c00cc3f4e5d1..0e688b0c0c46 100644
--- a/pkgs/servers/http/nginx/mainline.nix
+++ b/pkgs/servers/http/nginx/mainline.nix
@@ -1,6 +1,6 @@
 { callPackage, ... }@args:
 
 callPackage ./generic.nix (args // {
-  version = "1.11.7";
-  sha256 = "03ihv5v8qasifh4wlql0ggbqkyvak29g0h5fqzka69i15fsvwm8d";
+  version = "1.11.8";
+  sha256 = "0d3bcrgj2ykky2yk06y0ihv6832s30mqzcfwq8a560brbmqz7bjk";
 })
diff --git a/pkgs/servers/nosql/apache-jena/fuseki-binary.nix b/pkgs/servers/nosql/apache-jena/fuseki-binary.nix
index bc83d0cccab6..12543b336dda 100644
--- a/pkgs/servers/nosql/apache-jena/fuseki-binary.nix
+++ b/pkgs/servers/nosql/apache-jena/fuseki-binary.nix
@@ -3,10 +3,10 @@ let
   s = # Generated upstream information
   rec {
     baseName="apache-jena-fuseki";
-    version = "2.4.0";
+    version = "2.4.1";
     name="${baseName}-${version}";
     url="http://archive.apache.org/dist/jena/binaries/apache-jena-fuseki-${version}.tar.gz";
-    sha256 = "0jjrgvnc571wdkv722k0xc43n94w0rn1ci4ndxya9fvlag1rjhlb";
+    sha256 = "01yjpghgz637wwgnk5n9d7kchc3mmrbyrm8fs4rh2hkh66mq3ya4";
   };
   buildInputs = [
     makeWrapper
diff --git a/pkgs/tools/compression/lrzip/default.nix b/pkgs/tools/compression/lrzip/default.nix
index e3a01647afbd..083a71f6a756 100644
--- a/pkgs/tools/compression/lrzip/default.nix
+++ b/pkgs/tools/compression/lrzip/default.nix
@@ -1,12 +1,12 @@
 {stdenv, fetchurl, zlib, lzo, bzip2, nasm, perl}:
 
 stdenv.mkDerivation rec {
-  version = "0.630";
+  version = "0.631";
   name = "lrzip-${version}";
 
   src = fetchurl {
     url = "http://ck.kolivas.org/apps/lrzip/${name}.tar.bz2";
-    sha256 = "01ykxliqw4cavx9f2gawxfa9wf52cjy1qx28cnkrh6i3lfzzcq94";
+    sha256 = "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d";
   };
 
   buildInputs = [ zlib lzo bzip2 nasm perl ];
diff --git a/pkgs/tools/filesystems/glusterfs/default.nix b/pkgs/tools/filesystems/glusterfs/default.nix
index 32c87667ee36..745d968cce18 100644
--- a/pkgs/tools/filesystems/glusterfs/default.nix
+++ b/pkgs/tools/filesystems/glusterfs/default.nix
@@ -6,11 +6,11 @@ let
   s = # Generated upstream information 
   rec {
     baseName="glusterfs";
-    version="3.8.4";
+    version="3.9.0";
     name="${baseName}-${version}";
-    hash="0f715r6bf12b37s1l3259qzfbz8l2g3mdsnnh2lflagzazn6jnap";
-    url="http://download.gluster.org/pub/gluster/glusterfs/3.8/3.8.4/glusterfs-3.8.4.tar.gz";
-    sha256="0f715r6bf12b37s1l3259qzfbz8l2g3mdsnnh2lflagzazn6jnap";
+    hash="057vq4f93f1g9sh1sfbqhccsprxrbhwwm898322x25sb8mscc5xl";
+    url="http://download.gluster.org/pub/gluster/glusterfs/3.9/3.9.0/glusterfs-3.9.0.tar.gz";
+    sha256="057vq4f93f1g9sh1sfbqhccsprxrbhwwm898322x25sb8mscc5xl";
   };
   buildInputs = [
     fuse bison flex_2_5_35 openssl python2 ncurses readline
diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix
index 1162b338ed75..e815cded09a1 100644
--- a/pkgs/tools/graphics/graphviz/default.nix
+++ b/pkgs/tools/graphics/graphviz/default.nix
@@ -4,23 +4,17 @@
 }:
 
 stdenv.mkDerivation rec {
-  version = "2.38.0";
+  version = "2.40.1";
   name = "graphviz-${version}";
 
   src = fetchurl {
     url = "http://www.graphviz.org/pub/graphviz/ARCHIVE/${name}.tar.gz";
-    sha256 = "17l5czpvv5ilmg17frg0w4qwf89jzh2aglm9fgx0l0aakn6j7al1";
+    sha256 = "08d4ygkxz2f553bxj6087da56a23kx1khv0j8ycxa102vvx1hlna";
   };
 
   hardeningDisable = [ "fortify" ];
 
-  patches =
-    [ ./0001-vimdot-lookup-vim-in-PATH.patch
-
-      # NOTE: Once this patch is removed, flex can probably be removed from
-      # buildInputs.
-      ./cve-2014-9157.patch
-    ];
+  patches = [ ];
 
   buildInputs =
     [ pkgconfig libpng libjpeg expat yacc libtool fontconfig gd gts libdevil flex pango
@@ -33,11 +27,13 @@ stdenv.mkDerivation rec {
 
   configureFlags = stdenv.lib.optional (xorg == null) "--without-x";
 
-  postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
+  postPatch = (stdenv.lib.optionalString stdenv.isDarwin ''
     for foo in cmd/dot/Makefile.in cmd/edgepaint/Makefile.in \
                     cmd/mingle/Makefile.in plugin/gdiplus/Makefile.in; do
       substituteInPlace "$foo" --replace "-lstdc++" "-lc++"
     done
+  '') + ''
+      substituteInPlace "plugin/xlib/vimdot.sh" --replace "/usr/bin/vim" "\$(command -v vim)"
   '';
 
   preBuild = ''
diff --git a/pkgs/tools/misc/ding-libs/default.nix b/pkgs/tools/misc/ding-libs/default.nix
new file mode 100644
index 000000000000..547e3fb49eb7
--- /dev/null
+++ b/pkgs/tools/misc/ding-libs/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, glibc, doxygen, check }:
+
+let
+  name = "ding-libs";
+  version = "0.6.0";
+in stdenv.mkDerivation {
+  inherit name;
+  inherit version;
+
+  src = fetchurl {
+    url = "https://fedorahosted.org/released/${name}/${name}-${version}.tar.gz";
+    sha1 = "c8ec86cb93a26e013a13b12a7b0b3fbc1bca16c1";
+  };
+
+  enableParallelBuilding = true;
+  buildInputs = [ glibc doxygen check ];
+
+  buildFlags = "docs";
+  doCheck = true;
+
+  meta = {
+    description = "'D is not GLib' utility libraries";
+    homepage = https://fedorahosted.org/sssd/;
+    maintainers = with stdenv.lib.maintainers; [ e-user ];
+    license = [ stdenv.lib.licenses.gpl3 stdenv.lib.licenses.lgpl3 ];
+  };
+}
diff --git a/pkgs/tools/misc/kronometer/default.nix b/pkgs/tools/misc/kronometer/default.nix
index 5a3da3788d58..37399a1a4184 100644
--- a/pkgs/tools/misc/kronometer/default.nix
+++ b/pkgs/tools/misc/kronometer/default.nix
@@ -23,6 +23,7 @@ let
     propagatedBuildInputs = [ kconfig kinit ];
   };
 in
-kdeWrapper unwrapped {
+kdeWrapper {
+  inherit unwrapped;
   targets = [ "bin/kronometer" ];
 }
diff --git a/pkgs/tools/misc/libbitcoin/libbitcoin-client.nix b/pkgs/tools/misc/libbitcoin/libbitcoin-client.nix
new file mode 100644
index 000000000000..1f45626855f5
--- /dev/null
+++ b/pkgs/tools/misc/libbitcoin/libbitcoin-client.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib, fetchurl, pkgconfig, autoreconfHook
+, boost, libsodium, czmqpp, libbitcoin }:
+
+let
+  pname = "libbitcoin-client";
+  version = "2.2.0";
+
+in stdenv.mkDerivation {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/libbitcoin/libbitcoin-client/archive/v${version}.tar.gz";
+    sha256 = "1g79hl6jmf5dam7vq19h4dgdj7gcn19fa7q78vn573mg2rdyal53";
+  };
+
+  buildInputs = [ autoreconfHook pkgconfig ];
+
+  propagatedBuildInputs = [ libsodium czmqpp libbitcoin ];
+
+  configureFlags = [
+    "--with-boost=${boost.dev}"
+    "--with-boost-libdir=${boost.out}/lib"
+    "--with-bash-completiondir=$out/share/bash-completion/completions"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Bitcoin client query library";
+    homepage = https://github.com/libbitcoin/libbitcoin-client;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ chris-martin ];
+
+    # https://wiki.unsystem.net/en/index.php/Libbitcoin/License
+    # AGPL with an additional clause
+    license = licenses.agpl3;
+  };
+}
diff --git a/pkgs/tools/misc/libbitcoin/libbitcoin-explorer.nix b/pkgs/tools/misc/libbitcoin/libbitcoin-explorer.nix
new file mode 100644
index 000000000000..fbfa385fc7fc
--- /dev/null
+++ b/pkgs/tools/misc/libbitcoin/libbitcoin-explorer.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib, fetchurl, pkgconfig, autoreconfHook
+, boost, libbitcoin-client }:
+
+let
+  pname = "libbitcoin-explorer";
+  version = "2.2.0";
+
+in stdenv.mkDerivation {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/libbitcoin/libbitcoin-explorer/archive/v${version}.tar.gz";
+    sha256 = "00123vw7rxk0ypdfzk0xwk8q55ll31000mkjqdzl915krsbkbfvp";
+  };
+
+  buildInputs = [ autoreconfHook pkgconfig ];
+
+  propagatedBuildInputs = [ libbitcoin-client ];
+
+  configureFlags = [
+    "--with-boost=${boost.dev}"
+    "--with-boost-libdir=${boost.out}/lib"
+    "--with-bash-completiondir=$out/share/bash-completion/completions"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Bitcoin command line tool";
+    homepage = https://github.com/libbitcoin/libbitcoin-explorer;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ chris-martin ];
+
+    # https://wiki.unsystem.net/en/index.php/Libbitcoin/License
+    # AGPL with an additional clause
+    license = licenses.agpl3;
+  };
+}
diff --git a/pkgs/tools/misc/libbitcoin/libbitcoin.nix b/pkgs/tools/misc/libbitcoin/libbitcoin.nix
new file mode 100644
index 000000000000..61c462f7853f
--- /dev/null
+++ b/pkgs/tools/misc/libbitcoin/libbitcoin.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, fetchurl, pkgconfig, autoreconfHook
+, boost, libsodium, czmqpp, secp256k1 }:
+
+let
+  pname = "libbitcoin";
+  version = "2.11.0";
+
+in stdenv.mkDerivation {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/libbitcoin/libbitcoin/archive/v${version}.tar.gz";
+    sha256 = "1lpdjm13kgs4fbp579bwfvws8yf9mnr5dw3ph8zxg2gf110h85sy";
+  };
+
+  buildInputs = [ autoreconfHook pkgconfig ];
+
+  propagatedBuildInputs = [ secp256k1 ];
+
+  configureFlags = [
+    "--with-boost=${boost.dev}"
+    "--with-boost-libdir=${boost.out}/lib"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "C++ library for building bitcoin applications";
+    homepage = https://libbitcoin.org/;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ chris-martin ];
+
+    # https://wiki.unsystem.net/en/index.php/Libbitcoin/License
+    # AGPL with an additional clause
+    license = licenses.agpl3;
+  };
+}
diff --git a/pkgs/tools/misc/peruse/default.nix b/pkgs/tools/misc/peruse/default.nix
index 865c6b1e842a..b6727f4e63bd 100644
--- a/pkgs/tools/misc/peruse/default.nix
+++ b/pkgs/tools/misc/peruse/default.nix
@@ -37,6 +37,7 @@ let
 
   };
 
-in kdeWrapper unwrapped {
+in kdeWrapper {
+  inherit unwrapped;
   targets = [ "bin/peruse" ];
 }
diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix
index a1ed2d9657fb..2bca4b165fec 100644
--- a/pkgs/tools/misc/youtube-dl/default.nix
+++ b/pkgs/tools/misc/youtube-dl/default.nix
@@ -15,11 +15,11 @@ with stdenv.lib;
 buildPythonApplication rec {
 
   name = "youtube-dl-${version}";
-  version = "2016.12.20";
+  version = "2017.01.02";
 
   src = fetchurl {
     url = "https://yt-dl.org/downloads/${version}/${name}.tar.gz";
-    sha256 = "f80d47d5e2a236ea6c9d8b4636199aea01a041607ce7b544babedb0fe1ce59a5";
+    sha256 = "140de01ea879cdc50bc34240802d5c10231baf448d7a664e6efeb9d5efb74d5b";
   };
 
   buildInputs = [ makeWrapper zip ] ++ optional generateManPage pandoc;
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index 5dd523d6fa6b..9ed56ee1ec56 100644
--- a/pkgs/tools/networking/curl/default.nix
+++ b/pkgs/tools/networking/curl/default.nix
@@ -18,11 +18,11 @@ assert scpSupport -> libssh2 != null;
 assert c-aresSupport -> c-ares != null;
 
 stdenv.mkDerivation rec {
-  name = "curl-7.51.0";
+  name = "curl-7.52.1";
 
   src = fetchurl {
     url = "http://curl.haxx.se/download/${name}.tar.bz2";
-    sha256 = "1pldg1d8606p4q83k8fcp61kfcsbphln22mycw7h7r87i42410kz";
+    sha256 = "16rqhyzlpnivifin8n7l2fr9ihay9v2nw2drsniinb6bcykqaqfi";
   };
 
   outputs = [ "bin" "dev" "out" "man" "devdoc" ];
@@ -42,8 +42,6 @@ stdenv.mkDerivation rec {
     optional sslSupport openssl ++
     optional scpSupport libssh2;
 
-  patches = stdenv.lib.optional http2Support ./fix-http2-window-size.patch;
-
   # for the second line see http://curl.haxx.se/mail/tracker-2014-03/0087.html
   preConfigure = ''
     sed -e 's|/usr/bin|/no-such-path|g' -i.bak configure
diff --git a/pkgs/tools/networking/curl/fix-http2-window-size.patch b/pkgs/tools/networking/curl/fix-http2-window-size.patch
deleted file mode 100644
index 6fac3e1b42ac..000000000000
--- a/pkgs/tools/networking/curl/fix-http2-window-size.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From a4d888857ede39a8e2aa5f961048c6362d3a5377 Mon Sep 17 00:00:00 2001
-From: Jay Satiro <raysatiro@yahoo.com>
-Date: Wed, 16 Nov 2016 02:55:30 -0500
-Subject: [PATCH] http2: Use huge HTTP/2 windows
-
-- Improve performance by using a huge HTTP/2 window size.
-
-Bug: https://github.com/curl/curl/issues/1102
-Reported-by: afrind@users.noreply.github.com
-Assisted-by: Tatsuhiro Tsujikawa
----
- docs/TODO   |  8 --------
- lib/http2.c | 15 +++++++++++++--
- 2 files changed, 13 insertions(+), 10 deletions(-)
-
-diff --git a/docs/TODO b/docs/TODO
-index c3bc4eb..99c610f 100644
---- a/docs/TODO
-+++ b/docs/TODO
-@@ -63,7 +63,6 @@
-  5.1 Better persistency for HTTP 1.0
-  5.2 support FF3 sqlite cookie files
-  5.3 Rearrange request header order
-- 5.4 Use huge HTTP/2 windows
-  5.5 auth= in URLs
-  5.6 Refuse "downgrade" redirects
-  5.7 Brotli compression
-@@ -528,13 +527,6 @@ This is not detailed in any FTP specification.
-  headers use a default value so only headers that need to be moved have to be
-  specified.
- 
--5.4 Use huge HTTP/2 windows
--
-- We're currently using nghttp2's default window size which is terribly small
-- (64K). This becomes a bottle neck over high bandwidth networks. We should
-- instead make the window size to be very big (512MB?) as we really don't do
-- much flow control anyway.
--
- 5.5 auth= in URLs
- 
-  Add the ability to specify the preferred authentication mechanism to use by
-diff --git a/lib/http2.c b/lib/http2.c
-index 6720984..202ab1b 100644
---- a/lib/http2.c
-+++ b/lib/http2.c
-@@ -59,6 +59,8 @@
- #define nghttp2_session_callbacks_set_error_callback(x,y)
- #endif
- 
-+#define HTTP2_HUGE_WINDOW_SIZE (1 << 30)
-+
- /*
-  * Curl_http2_init_state() is called when the easy handle is created and
-  * allows for HTTP/2 specific init of state.
-@@ -965,7 +967,7 @@ static ssize_t data_source_read_callback(nghttp2_session *session,
-  */
- static nghttp2_settings_entry settings[] = {
-   { NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, 100 },
--  { NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, NGHTTP2_INITIAL_WINDOW_SIZE },
-+  { NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, HTTP2_HUGE_WINDOW_SIZE },
- };
- 
- #define H2_BUFSIZE 32768
-@@ -2031,7 +2033,8 @@ CURLcode Curl_http2_switched(struct connectdata *conn,
-   else {
-     /* stream ID is unknown at this point */
-     stream->stream_id = -1;
--    rv = nghttp2_submit_settings(httpc->h2, NGHTTP2_FLAG_NONE, NULL, 0);
-+    rv = nghttp2_submit_settings(httpc->h2, NGHTTP2_FLAG_NONE, settings,
-+                                 sizeof(settings) / sizeof(settings[0]));
-     if(rv != 0) {
-       failf(data, "nghttp2_submit_settings() failed: %s(%d)",
-             nghttp2_strerror(rv), rv);
-@@ -2039,6 +2042,14 @@ CURLcode Curl_http2_switched(struct connectdata *conn,
-     }
-   }
- 
-+  rv = nghttp2_session_set_local_window_size(httpc->h2, NGHTTP2_FLAG_NONE, 0,
-+                                             HTTP2_HUGE_WINDOW_SIZE);
-+  if(rv != 0) {
-+    failf(data, "nghttp2_session_set_local_window_size() failed: %s(%d)",
-+          nghttp2_strerror(rv), rv);
-+    return CURLE_HTTP2;
-+  }
-+
-   /* we are going to copy mem to httpc->inbuf.  This is required since
-      mem is part of buffer pointed by stream->mem, and callbacks
-      called by nghttp2_session_mem_recv() will write stream specific
diff --git a/pkgs/tools/networking/i2p/default.nix b/pkgs/tools/networking/i2p/default.nix
index fb2f43586946..d5b9ff665d4a 100644
--- a/pkgs/tools/networking/i2p/default.nix
+++ b/pkgs/tools/networking/i2p/default.nix
@@ -1,10 +1,10 @@
 { stdenv, procps, coreutils, fetchurl, jdk, jre, ant, gettext, which }:
 
 stdenv.mkDerivation rec {
-  name = "i2p-0.9.26";
+  name = "i2p-0.9.28";
   src = fetchurl {
     url = "https://github.com/i2p/i2p.i2p/archive/${name}.tar.gz";
-    sha256 = "0h672w69a5xzgcrls64bpss3ga9hgpnrq90dr5lb5912pwwq9pa1";
+    sha256 = "1xagyywnck2c5xalr7bc7cv5ikk4igf7avmc0n28nz9pkais1y1y";
   };
   buildInputs = [ jdk ant gettext which ];
   patches = [ ./i2p.patch ];
diff --git a/pkgs/tools/networking/i2p/i2p.patch b/pkgs/tools/networking/i2p/i2p.patch
index 2ae6446ed286..74031eb7aef7 100644
--- a/pkgs/tools/networking/i2p/i2p.patch
+++ b/pkgs/tools/networking/i2p/i2p.patch
@@ -1,6 +1,21 @@
+diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter
+index 365737d89..2ea14db3e 100644
+--- a/installer/resources/i2prouter
++++ b/installer/resources/i2prouter
+@@ -49,7 +49,7 @@ APP_LONG_NAME="I2P Service"
+ 
+ # gettext - we look for it in the path
+ # fallback to echo is below, we can't set it to echo here.
+-GETTEXT=$(which gettext > /dev/null 2>&1)
++GETTEXT=%gettext%
+ 
+ # Where to install the systemd service
+ SYSTEMD_SERVICE="/etc/systemd/system/${APP_NAME}.service"
+diff --git a/installer/resources/runplain.sh b/installer/resources/runplain.sh
+index eb4995dfe..0186cede3 100644
 --- a/installer/resources/runplain.sh
 +++ b/installer/resources/runplain.sh
-@@ -21,7 +21,7 @@
+@@ -25,7 +25,7 @@ CP=
  
  # Try using the Java binary that I2P was installed with.
  # If it's not found, try looking in the system PATH.
@@ -9,10 +24,10 @@
  
  if [ -z $JAVA ] || [ ! -x $JAVA ]; then
      echo "Error: Cannot find java." >&2
-@@ -40,15 +40,4 @@
+@@ -44,15 +44,4 @@ if [ $(uname -s) = "Darwin" ]; then
      export JAVA_TOOL_OPTIONS="-Djava.awt.headless=true"
  fi
- JAVAOPTS="-Djava.net.preferIPv4Stack=${PREFERv4} -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -DloggerFilenameOverride=logs/log-router-@.txt"
+ JAVAOPTS="${MAXMEMOPT} -Djava.net.preferIPv4Stack=${PREFERv4} -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -DloggerFilenameOverride=logs/log-router-@.txt"
 -(
 -    nohup ${JAVA} -cp \"${CP}\" ${JAVAOPTS} net.i2p.router.RouterLaunch > /dev/null 2>&1
 -) &
@@ -25,15 +40,4 @@
 -    echo "I2P failed to start." >&2
 -    exit 1
 -fi
-+${JAVA} -cp \"${CP}\" ${JAVAOPTS} net.i2p.router.RouterLaunch
---- a/installer/resources/i2prouter
-+++ b/installer/resources/i2prouter
-@@ -49,7 +49,7 @@
- 
- # gettext - we look for it in the path
- # fallback to echo is below, we can't set it to echo here.
--GETTEXT=$(which gettext > /dev/null 2>&1)
-+GETTEXT=%gettext%
- 
- # Where to install the systemd service
- SYSTEMD_SERVICE="/etc/systemd/system/${APP_NAME}.service"
++exec ${JAVA} -cp \"${CP}\" ${JAVAOPTS} net.i2p.router.RouterLaunch
diff --git a/pkgs/tools/networking/openvpn/default.nix b/pkgs/tools/networking/openvpn/default.nix
index 13e1c68befda..f609c90ad504 100644
--- a/pkgs/tools/networking/openvpn/default.nix
+++ b/pkgs/tools/networking/openvpn/default.nix
@@ -7,11 +7,12 @@ assert pkcs11Support -> (pkcs11helper != null);
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  name = "openvpn-2.3.12";
+  name = "openvpn-${version}";
+  version = "2.4.0";
 
   src = fetchurl {
-    url = "http://swupdate.openvpn.net/community/releases/${name}.tar.gz";
-    sha256 = "1zqwq19xg6yf90nv35yr8r0ljas5f42v4n9hjjmhlnzpan69plzm";
+    url = "http://swupdate.openvpn.net/community/releases/${name}.tar.xz";
+    sha256 = "0zpqnbhjaifdalyxwmvk5kcyd7cpxbcigbn7967nbsyvl54vl8vg";
   };
 
   patches = optional stdenv.isLinux ./systemd-notify.patch;
@@ -39,8 +40,10 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A robust and highly flexible tunneling application";
     homepage = http://openvpn.net/;
+    downloadPage = "https://openvpn.net/index.php/open-source/downloads.html";
     license = stdenv.lib.licenses.gpl2;
     maintainers = [ stdenv.lib.maintainers.viric ];
     platforms = stdenv.lib.platforms.unix;
+    updateWalker = true;
   };
 }
diff --git a/pkgs/tools/networking/openvpn/systemd-notify.patch b/pkgs/tools/networking/openvpn/systemd-notify.patch
index 9291f7a46642..c0ac8ae89d3c 100644
--- a/pkgs/tools/networking/openvpn/systemd-notify.patch
+++ b/pkgs/tools/networking/openvpn/systemd-notify.patch
@@ -10,13 +10,13 @@ diff -ru -x '*~' openvpn-2.3.1-orig/src/openvpn/init.c openvpn-2.3.1/src/openvpn
  static struct context *static_context; /* GLOBAL */
  
  /*
-@@ -1241,6 +1243,9 @@
- {
-   static const char message[] = "Initialization Sequence Completed";
+@@ -1375,6 +1375,9 @@
+     /* Reset the unsuccessful connection counter on complete initialisation */
+     c->options.unsuccessful_attempts = 0;
  
-+  /* Tell systemd we're ready. */
-+  sd_notify(0, "READY=1");
++    /* Tell systemd we're ready. */
++    sd_notify(0, "READY=1");
 +
-   /* If we delayed UID/GID downgrade or chroot, do it now */
-   do_uid_gid_chroot (c, true);
+     /* If we delayed UID/GID downgrade or chroot, do it now */
+     do_uid_gid_chroot (c, true);
  
diff --git a/pkgs/tools/networking/strongswan/default.nix b/pkgs/tools/networking/strongswan/default.nix
index 1791abf4a48b..7bcbb4fddb6b 100644
--- a/pkgs/tools/networking/strongswan/default.nix
+++ b/pkgs/tools/networking/strongswan/default.nix
@@ -37,8 +37,9 @@ stdenv.mkDerivation rec {
       "--enable-eap-mschapv2" "--enable-xauth-eap" "--enable-ext-auth"
       "--enable-forecast" "--enable-connmark" "--enable-acert"
       "--enable-pkcs11" "--enable-eap-sim-pcsc" "--enable-dnscert" "--enable-unbound"
-      "--enable-aesni" "--enable-af-alg" "--enable-rdrand" ]
-    ++ stdenv.lib.optional (stdenv.system == "i686-linux") "--enable-padlock" 
+      "--enable-af-alg" ]
+    ++ stdenv.lib.optional stdenv.isx86_64 [ "--enable-aesni" "--enable-rdrand" ]
+    ++ stdenv.lib.optional (stdenv.system == "i686-linux") "--enable-padlock"
     ++ stdenv.lib.optionals enableTNC [
          "--disable-gmp" "--disable-aes" "--disable-md5" "--disable-sha1" "--disable-sha2" "--disable-fips-prf"
          "--enable-curl" "--enable-openssl"
diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix
index 30c5fc6c4fdc..5bfb0b45c1ba 100644
--- a/pkgs/tools/package-management/nix/default.nix
+++ b/pkgs/tools/package-management/nix/default.nix
@@ -103,10 +103,10 @@ in rec {
   nix = nixStable;
 
   nixStable = common rec {
-    name = "nix-1.11.4";
+    name = "nix-1.11.5";
     src = fetchurl {
       url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz";
-      sha256 = "937779ed2efaa3dec210250635401980acb99a6fea6d7374fbaea78231b36d34";
+      sha256 = "272361d091c735b0e80627fa23fb7c600957472301dd7e54d237069452f3addb";
     };
   };
 
diff --git a/pkgs/tools/system/dd_rescue/default.nix b/pkgs/tools/system/dd_rescue/default.nix
index d98ceb84bc39..69cd8da4aefe 100644
--- a/pkgs/tools/system/dd_rescue/default.nix
+++ b/pkgs/tools/system/dd_rescue/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, autoconf }:
 
 stdenv.mkDerivation rec {
-  version = "1.99";
+  version = "1.99.5";
   name = "dd_rescue-${version}";
 
   src = fetchurl {
-    sha256 = "0gkbwssn134fjyyvjvylyvassw4fwv5mbis9gcb969xdc64dfhg1";
+    sha256 = "0db94piwcdyqhnlhgfs0bfp0gp2mqyrcr2l5nljapgni31qk4p8j";
     url="http://www.garloff.de/kurt/linux/ddrescue/${name}.tar.bz2";
   };
 
diff --git a/pkgs/tools/system/iops/default.nix b/pkgs/tools/system/iops/default.nix
index 243325168706..34a48bd30539 100644
--- a/pkgs/tools/system/iops/default.nix
+++ b/pkgs/tools/system/iops/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
     '';
     homepage = http://www.vanheusden.com/iops/;
     license = licenses.gpl2;
-    maintainers = with maintainers; davidak;
+    maintainers = with maintainers; [ davidak ];
     platforms = platforms.linux; # build problems on Darwin
   };
 }
diff --git a/pkgs/tools/system/ipmiutil/default.nix b/pkgs/tools/system/ipmiutil/default.nix
index 37f5131a0370..059a5d9e416c 100644
--- a/pkgs/tools/system/ipmiutil/default.nix
+++ b/pkgs/tools/system/ipmiutil/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   baseName = "ipmiutil";
-  version = "3.0.0";
+  version = "3.0.1";
   name = "${baseName}-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/project/${baseName}/${name}.tar.gz";
-    sha256 = "0r986mvh6q1f7369qry2vq4rqc6kc4kq957s2g5qsl8m1pyw2mvx";
+    sha256 = "179hvarw0mk3j1z4102q4692q4mx06y259llr891by0pri0bsb3n";
   };
 
   buildInputs = [ openssl ];
diff --git a/pkgs/tools/text/sgml/jade/default.nix b/pkgs/tools/text/sgml/jade/default.nix
new file mode 100644
index 000000000000..ffbf9784f80f
--- /dev/null
+++ b/pkgs/tools/text/sgml/jade/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, pkgs, gcc, gzip, gnum4 }:
+
+stdenv.mkDerivation (rec {
+  name = "jade";
+  version = "1.2.1";
+  debpatch = "47.3";
+
+  src = fetchurl {
+    url = "ftp://ftp.jclark.com/pub/${name}/${name}-${version}.tar.gz";
+    sha256 = "84e2f8a2a87aab44f86a46b71405d4f919b219e4c73e03a83ab6c746a674b187";
+  };
+
+  patchsrc =  fetchurl {
+    url = "http://ftp.debian.org/debian/pool/main/j/jade/jade_${version}-${debpatch}.diff.gz";
+    sha256 = "8e94486898e3503308805f856a65ba5b499a6f21994151270aa743de48305464";
+  };
+
+  patches = [ patchsrc ];
+
+  buildInputs = [ gcc gzip gnum4 ];
+
+  NIX_CFLAGS_COMPILE = [ "-Wno-deprecated" ];
+
+  preInstall = ''
+    install -d -m755 "$out"/lib
+  '';
+  
+  postInstall = ''
+    mv "$out/bin/sx" "$out/bin/sgml2xml"
+  '';
+
+  meta = {
+    description = "James Clark's DSSSL Engine";
+    license = "custom";
+    homepage = http://www.jclark.com/jade/;
+    maintainers = with stdenv.lib.maintainers; [ e-user ];
+  };
+})
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ac48186d58f7..2bdabdff4dd1 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1555,7 +1555,18 @@ in
 
   emscripten = callPackage ../development/compilers/emscripten { };
 
-  emscriptenfastcomp = callPackage ../development/compilers/emscripten-fastcomp { };
+  emscriptenfastcomp-unwrapped = callPackage ../development/compilers/emscripten-fastcomp { };
+  emscriptenfastcomp-wrapped = wrapCC emscriptenfastcomp-unwrapped;
+  emscriptenfastcomp = symlinkJoin {
+    name = "emscriptenfastcomp";
+    paths = [ emscriptenfastcomp-wrapped emscriptenfastcomp-unwrapped ];
+    preferLocalBuild = false;
+    allowSubstitutes = true;
+    postBuild = ''
+      # replace unwrapped clang-3.9 binary by wrapper
+      ln -sf $out/bin/clang $out/bin/clang-[0-9]*
+    '';
+  };
 
   emscriptenPackages = recurseIntoAttrs (callPackage ./emscripten-packages.nix { });
 
@@ -2309,6 +2320,8 @@ in
 
   jaaa = callPackage ../applications/audio/jaaa { };
 
+  jade = callPackage ../tools/text/sgml/jade { };
+
   jd-gui = callPackage_i686 ../tools/security/jd-gui { };
 
   jdiskreport = callPackage ../tools/misc/jdiskreport { };
@@ -3821,10 +3834,9 @@ in
 
   su-exec = callPackage ../tools/security/su-exec {};
 
-  subsurface =
-    qt55.callPackage ../applications/misc/subsurface {
-        libgit2 = pkgs.libgit2_0_23;
-    };
+  subsurface = qt55.callPackage ../applications/misc/subsurface {
+    libdivecomputer = libdivecomputer_ssrf;
+  };
 
   sudo = callPackage ../tools/security/sudo { };
 
@@ -4161,6 +4173,13 @@ in
     openssl = null;
   };
 
+  ding-libs = callPackage ../tools/misc/ding-libs { };
+
+  sssd = callPackage ../os-specific/linux/sssd {
+    inherit (perlPackages) Po4a;
+    inherit (python27Packages) ldap;
+  };
+
   vtun = callPackage ../tools/networking/vtun { };
 
   wakatime = callPackage ../tools/misc/wakatime { };
@@ -4673,6 +4692,7 @@ in
   drumstick = callPackage ../development/libraries/drumstick { };
 
   ecl = callPackage ../development/compilers/ecl { };
+  ecl_16_1_2 = callPackage ../development/compilers/ecl/16.1.2.nix { };
 
   eql = callPackage ../development/compilers/eql {};
 
@@ -4921,6 +4941,8 @@ in
     gmp = gmp4;
   };
 
+  gcl_2_6_13_pre = callPackage ../development/compilers/gcl/2.6.13-pre.nix { };
+
   gcc-arm-embedded-4_7 = callPackage_i686 ../development/compilers/gcc-arm-embedded {
     version = "4.7-2013q3-20130916";
     releaseType = "update";
@@ -5176,9 +5198,13 @@ in
     inherit (stdenvAdapters) overrideCC;
   };
 
-  llvmPackages_37 = callPackage ../development/compilers/llvm/3.7 {
+  llvmPackages_37 = callPackage ../development/compilers/llvm/3.7 ({
     inherit (stdenvAdapters) overrideCC;
-  };
+  } // stdenv.lib.optionalAttrs stdenv.isDarwin {
+    cmake = cmake.override { isBootstrap = true; useSharedLibraries = false; };
+    libxml2 = libxml2.override { pythonSupport = false; };
+    python2 = callPackage ../development/interpreters/python/cpython/2.7/boot.nix { inherit (darwin) CF configd; };
+  });
 
   llvmPackages_38 = callPackage ../development/compilers/llvm/3.8 {
     inherit (stdenvAdapters) overrideCC;
@@ -5279,12 +5305,17 @@ in
   };
 
   rust = rustStable;
-  rustcNightlyBin = lowPrio (callPackage ../development/compilers/rust/nightlyBin.nix {});
   rustStable = callPackage ../development/compilers/rust {};
   rustBeta = callPackage ../development/compilers/rust/beta.nix {};
   rustNightly = callPackage ../development/compilers/rust/nightly.nix {
     rustPlatform = recurseIntoAttrs (makeRustPlatform rustBeta);
   };
+  rustNightlyBin = callPackage ../development/compilers/rust/nightlyBin.nix {
+     buildRustPackage = callPackage ../build-support/rust {
+       rust = rustNightlyBin;
+       rustRegistry = callPackage ./rust-packages.nix { };
+     };
+  };
 
   cargo = rust.cargo;
   rustc = rust.rustc;
@@ -5312,6 +5343,8 @@ in
 
   sbclBootstrap = callPackage ../development/compilers/sbcl/bootstrap.nix {};
   sbcl = callPackage ../development/compilers/sbcl {};
+  # For Maxima
+  sbcl_1_3_12 = callPackage ../development/compilers/sbcl/1.3.12.nix { };
   # For StumpWM
   sbcl_1_2_5 = callPackage ../development/compilers/sbcl/1.2.5.nix {
     clisp = clisp;
@@ -5488,32 +5521,40 @@ in
   };
   erlangR18 = callPackage ../development/interpreters/erlang/R18.nix {
     inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
+    wxGTK = wxGTK30;
   };
   erlangR18_odbc = callPackage ../development/interpreters/erlang/R18.nix {
     inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
+    wxGTK = wxGTK30;
     odbcSupport = true;
   };
   erlangR18_javac = callPackage ../development/interpreters/erlang/R18.nix {
     inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
+    wxGTK = wxGTK30;
     javacSupport = true;
   };
   erlangR18_odbc_javac = callPackage ../development/interpreters/erlang/R18.nix {
     inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
+    wxGTK = wxGTK30;
     javacSupport = true; odbcSupport = true;
   };
   erlangR19 = callPackage ../development/interpreters/erlang/R19.nix {
     inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
+    wxGTK = wxGTK30;
   };
   erlangR19_odbc = callPackage ../development/interpreters/erlang/R19.nix {
     inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
+    wxGTK = wxGTK30;
     odbcSupport = true;
   };
   erlangR19_javac = callPackage ../development/interpreters/erlang/R19.nix {
     inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
-      javacSupport = true;
+    wxGTK = wxGTK30;
+    javacSupport = true;
   };
   erlangR19_odbc_javac = callPackage ../development/interpreters/erlang/R19.nix {
     inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
+    wxGTK = wxGTK30;
     javacSupport = true; odbcSupport = true;
   };
   erlang = erlangR18;
@@ -6095,7 +6136,6 @@ in
   };
 
   cmake = callPackage ../development/tools/build-managers/cmake {
-    wantPS = stdenv.isDarwin;
     inherit (darwin) ps;
   };
 
@@ -6638,6 +6678,8 @@ in
 
   visualvm = callPackage ../development/tools/java/visualvm { };
 
+  vultr = callPackage ../development/tools/vultr { };
+
   xc3sprog = callPackage ../development/tools/misc/xc3sprog { };
 
   xcbuild  = callPackage ../development/tools/xcbuild/wrapper.nix {
@@ -6969,6 +7011,7 @@ in
   eclib = callPackage ../development/libraries/eclib {};
 
   eigen = callPackage ../development/libraries/eigen {};
+  eigen3_3 = callPackage ../development/libraries/eigen/3.3.nix {};
 
   eigen2 = callPackage ../development/libraries/eigen/2.0.nix {};
 
@@ -7202,7 +7245,6 @@ in
   );
 
   libgit2_0_21 = callPackage ../development/libraries/git2/0.21.nix { };
-  libgit2_0_23 = callPackage ../development/libraries/git2/0.23.nix { };
 
   gle = callPackage ../development/libraries/gle { };
 
@@ -7843,6 +7885,8 @@ in
 
   libdivecomputer = callPackage ../development/libraries/libdivecomputer { };
 
+  libdivecomputer_ssrf = callPackage ../development/libraries/libdivecomputer/subsurface.nix { };
+
   libdivsufsort = callPackage ../development/libraries/libdivsufsort { };
 
   libdmtx = callPackage ../development/libraries/libdmtx { };
@@ -9646,7 +9690,7 @@ in
 
   wcslib = callPackage ../development/libraries/wcslib { };
 
-  webkitgtk = webkitgtk212x;
+  webkitgtk = webkitgtk214x;
 
   webkitgtk24x = callPackage ../development/libraries/webkitgtk/2.4.nix {
     harfbuzz = harfbuzz-icu;
@@ -11196,6 +11240,8 @@ in
 
     odp-dpdk = callPackage ../os-specific/linux/odp-dpdk { };
 
+    ofp = callPackage ../os-specific/linux/ofp { };
+
     e1000e = callPackage ../os-specific/linux/e1000e {};
 
     ixgbevf = callPackage ../os-specific/linux/ixgbevf {};
@@ -12336,6 +12382,14 @@ in
   bitcoin = altcoins.bitcoin;
   bitcoin-xt = altcoins.bitcoin-xt;
 
+  libbitcoin = callPackage ../tools/misc/libbitcoin/libbitcoin.nix {
+    secp256k1 = secp256k1.override { enableECDH = true; };
+  };
+
+  libbitcoin-client = callPackage ../tools/misc/libbitcoin/libbitcoin-client.nix { };
+
+  libbitcoin-explorer = callPackage ../tools/misc/libbitcoin/libbitcoin-explorer.nix { };
+
   go-ethereum = self.altcoins.go-ethereum;
   ethabi = self.altcoins.ethabi;
 
@@ -13595,7 +13649,7 @@ in
 
   imagemagickBig = callPackage ../applications/graphics/ImageMagick { };
 
-  imagemagick7_light = lowPrio (imagemagick.override {
+  imagemagick7_light = lowPrio (imagemagick7.override {
     bzip2 = null;
     zlib = null;
     libX11 = null;
@@ -13615,7 +13669,7 @@ in
     libwebp = null;
   });
 
-  imagemagick7 = lowPrio (imagemagickBig.override {
+  imagemagick7 = lowPrio (imagemagick7Big.override {
     ghostscript = null;
   });
 
@@ -14455,6 +14509,8 @@ in
 
   pommed = callPackage ../os-specific/linux/pommed {};
 
+  pommed_light = callPackage ../os-specific/linux/pommed-light {};
+
   pond = callPackage ../applications/networking/instant-messengers/pond { };
 
   ponymix = callPackage ../applications/audio/ponymix { };
@@ -15499,7 +15555,7 @@ in
   };
   xbmc-retroarch-advanced-launchers = kodi-retroarch-advanced-launchers;
 
-  xca = callPackage ../applications/misc/xca { };
+  xca = qt5.callPackage ../applications/misc/xca { };
 
   xcalib = callPackage ../tools/X11/xcalib { };
 
@@ -17062,8 +17118,14 @@ in
 
   geogebra = callPackage ../applications/science/math/geogebra { };
 
-  maxima = callPackage ../applications/science/math/maxima { ecl = null; };
-  maxima-ecl = callPackage ../applications/science/math/maxima { sbcl = null; };
+  maxima = callPackage ../applications/science/math/maxima {
+    sbcl = sbcl_1_3_12;
+    ecl = null;
+  };
+  maxima-ecl = callPackage ../applications/science/math/maxima {
+    ecl = ecl_16_1_2;
+    sbcl = null;
+  };
 
   wxmaxima = callPackage ../applications/science/math/wxmaxima { wxGTK = wxGTK30; };
 
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index f229fb8a35cf..5b14af145e9f 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -58,11 +58,6 @@ rec {
       inherit crossSystem;
       selfPkgs = packages.ghcHEAD;
     };
-    ghcNokinds = callPackage ../development/compilers/ghc/nokinds.nix rec {
-      bootPkgs = packages.ghc784;
-      inherit (bootPkgs) alex happy;
-    };
-
     ghcjs = packages.ghc7103.callPackage ../development/compilers/ghcjs {
       bootPkgs = packages.ghc7103;
     };
@@ -138,10 +133,6 @@ rec {
       ghc = compiler.ghcHEAD.crossCompiler;
       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { };
     };
-    ghcNokinds = callPackage ../development/haskell-modules {
-      ghc = compiler.ghcNokinds;
-      compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-nokinds.nix { };
-    };
     ghcjs = callPackage ../development/haskell-modules {
       ghc = compiler.ghcjs;
       compilerConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { };
diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix
index 4087edd21273..839db36ca7a4 100644
--- a/pkgs/top-level/lua-packages.nix
+++ b/pkgs/top-level/lua-packages.nix
@@ -382,18 +382,20 @@ let
 
   lgi = stdenv.mkDerivation rec {
     name = "lgi-${version}";
-    version = "0.7.2";
+    version = "0.9.1";
 
-    src = fetchzip {
-      url    = "https://github.com/pavouk/lgi/archive/${version}.tar.gz";
-      sha256 = "10i2ssfs01d49fdmmriqzxc8pshys4rixhx30wzd9p1m1q47a5pn";
+    src = fetchFromGitHub {
+      owner = "pavouk";
+      repo = "lgi";
+      rev = version;
+      sha256 = "09pbapjhyc3sn0jgx747shqr9286wqfzw02h43p4pk8fv2b766b9";
     };
 
     meta = with stdenv.lib; {
       description = "GObject-introspection based dynamic Lua binding to GObject based libraries";
       homepage    = https://github.com/pavouk/lgi;
       license     = "custom";
-      maintainers = with maintainers; [ lovek323 ];
+      maintainers = with maintainers; [ lovek323 rasendubi ];
       platforms   = platforms.unix;
     };
 
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 5bc0e81106b6..b8c5e6378703 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -10394,6 +10394,34 @@ let self = _self // overrides; _self = with self; {
     };
   };
 
+  Po4a = buildPerlPackage rec {
+    name = "po4a-0.47";
+    src = fetchurl {
+      url = "https://alioth.debian.org/frs/download.php/file/4142/po4a-0.47.tar.gz";
+      sha256 = "5010e1b7df1115cbd475f46587fc05fefc97301f9bba0c2f15106005ca017507";
+    };
+    propagatedBuildInputs = [ pkgs.docbook_xml_xslt TextWrapI18N LocaleGettext TermReadKey SGMLSpm ModuleBuild UnicodeLineBreak ModuleBuild ];
+    buildInputs = [ pkgs.gettext pkgs.libxslt pkgs.glibcLocales pkgs.docbook_xml_dtd_412 pkgs.docbook_sgml_dtd_41 pkgs.texlive.combined.scheme-basic pkgs.jade ];
+    LC_ALL="en_US.UTF-8";
+    SGML_CATALOG_FILES = "${pkgs.docbook_xml_dtd_412}/xml/dtd/docbook/catalog.xml";
+    preConfigure = ''
+      touch Makefile.PL
+      export PERL_MB_OPT="--install_base=$out --prefix=$out"
+      substituteInPlace Po4aBuilder.pm --replace "\$self->install_sets(\$self->installdirs)->{'bindoc'}" "'$out/share/man/man1'"
+    '';
+    buildPhase = "perl Build.PL --install_base=$out; ./Build build";
+    installPhase = "./Build install";
+    checkPhase = ''
+      export SGML_CATALOG_FILES=${pkgs.docbook_sgml_dtd_41}/sgml/dtd/docbook-4.1/docbook.cat
+      ./Build test
+    '';
+    meta = {
+      homepage = https://po4a.alioth.debian.org/;
+      description = "tools for helping translation of documentation";
+      license = with stdenv.lib.licenses; [ gpl2 ];
+    };
+  };
+
   PPI = buildPerlPackage {
     name = "PPI-1.220";
     src = fetchurl {
@@ -13722,6 +13750,22 @@ let self = _self // overrides; _self = with self; {
     };
   };
 
+  TextWrapI18N = buildPerlPackage {
+    name = "Text-WrapI18N-0.06";
+    src = fetchurl {
+      url = http://search.cpan.org/CPAN/authors/id/K/KU/KUBOTA/Text-WrapI18N-0.06.tar.gz;
+      sha256 = "4bd29a17f0c2c792d12c1005b3c276f2ab0fae39c00859ae1741d7941846a488";
+    };
+    propagatedBuildInputs = [ pkgs.glibc TextCharWidth ];
+    preConfigure = ''
+      substituteInPlace WrapI18N.pm --replace '/usr/bin/locale' '${pkgs.glibc}/bin/locale'
+    '';
+    meta = {
+      description = "Line wrapping module with support for multibyte, fullwidth, and combining characters and languages without whitespaces between words";
+      license = with stdenv.lib.licenses; [ artistic1 gpl2 ];
+    };
+  };
+
   TextWrapper = buildPerlPackage {
     name = "Text-Wrapper-1.05";
     src = fetchurl {