about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/editors/android-studio/default.nix6
-rw-r--r--pkgs/applications/editors/typora/default.nix9
-rw-r--r--pkgs/applications/graphics/ImageMagick/7.0.nix4
-rw-r--r--pkgs/applications/graphics/avocode/default.nix8
-rw-r--r--pkgs/applications/graphics/inkscape/default.nix4
-rw-r--r--pkgs/applications/misc/ape/apeclex.nix8
-rw-r--r--pkgs/applications/misc/ape/clex.nix25
-rw-r--r--pkgs/applications/misc/ape/default.nix45
-rw-r--r--pkgs/applications/misc/dunst/default.nix9
-rw-r--r--pkgs/applications/misc/gpsprune/default.nix19
-rw-r--r--pkgs/applications/misc/houdini/runtime.nix4
-rw-r--r--pkgs/applications/misc/pgmanage/default.nix7
-rw-r--r--pkgs/applications/misc/soapyhackrf/default.nix4
-rw-r--r--pkgs/applications/networking/cluster/kubernetes/default.nix19
-rw-r--r--pkgs/applications/networking/instant-messengers/franz/default.nix26
-rw-r--r--pkgs/applications/networking/mailreaders/astroid/default.nix16
-rw-r--r--pkgs/applications/science/electronics/gtkwave/default.nix4
-rw-r--r--pkgs/applications/science/math/nauty/default.nix4
-rw-r--r--pkgs/applications/science/math/ries/default.nix21
-rw-r--r--pkgs/build-support/rust/default-crate-overrides.nix8
-rw-r--r--pkgs/data/fonts/hack/default.nix4
-rw-r--r--pkgs/data/fonts/iosevka/bin.nix4
-rw-r--r--pkgs/data/fonts/iosevka/default.nix4
-rw-r--r--pkgs/desktops/enlightenment/enlightenment.nix41
-rw-r--r--pkgs/desktops/maxx/default.nix29
-rw-r--r--pkgs/development/compilers/gcc/5/default.nix4
-rw-r--r--pkgs/development/compilers/ghcjs-ng/8.2/git.json6
-rw-r--r--pkgs/development/compilers/ghcjs-ng/8.2/stage0.nix168
-rw-r--r--pkgs/development/compilers/ghcjs-ng/8.4/dep-overrides.nix7
-rw-r--r--pkgs/development/compilers/ghcjs-ng/8.4/git.json6
-rw-r--r--pkgs/development/compilers/ghcjs-ng/8.4/stage0.nix175
-rw-r--r--pkgs/development/compilers/ghcjs-ng/README.md20
-rw-r--r--pkgs/development/compilers/ghcjs-ng/common-overrides.nix8
-rw-r--r--pkgs/development/compilers/ghcjs-ng/configured-ghcjs-src.nix45
-rw-r--r--pkgs/development/compilers/ghcjs-ng/default.nix91
-rw-r--r--pkgs/development/compilers/ghcjs-ng/mk-stage0.nix25
-rw-r--r--pkgs/development/compilers/iasl/default.nix4
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix5
-rw-r--r--pkgs/development/haskell-modules/make-package-set.nix19
-rw-r--r--pkgs/development/interpreters/spidermonkey/52.nix4
-rw-r--r--pkgs/development/libraries/ace/default.nix4
-rw-r--r--pkgs/development/libraries/armadillo/default.nix4
-rw-r--r--pkgs/development/libraries/babl/default.nix4
-rw-r--r--pkgs/development/libraries/dyncall/default.nix20
-rw-r--r--pkgs/development/libraries/libu2f-host/default.nix4
-rw-r--r--pkgs/development/libraries/libyaml/default.nix2
-rw-r--r--pkgs/development/libraries/oracle-instantclient/default.nix11
-rw-r--r--pkgs/development/libraries/sqlite/sqlar.nix26
-rw-r--r--pkgs/development/mobile/androidenv/androidndk-pkgs.nix21
-rw-r--r--pkgs/development/mobile/androidenv/androidndk.nix63
-rw-r--r--pkgs/development/mobile/androidenv/default.nix41
-rw-r--r--pkgs/development/mobile/androidenv/make-standalone-toolchain_r10e.patch (renamed from pkgs/development/mobile/androidenv/make-standalone-toolchain.patch)0
-rw-r--r--pkgs/development/mobile/androidenv/make_standalone_toolchain.py_16b.patch119
-rw-r--r--pkgs/development/mobile/androidenv/make_standalone_toolchain.py_17.patch119
-rw-r--r--pkgs/development/node-packages/default-v6.nix1
-rw-r--r--pkgs/development/node-packages/default-v8.nix1
-rw-r--r--pkgs/development/python-modules/cx_oracle/0001-odpi-src-dpiOci.c-nixify-libclntsh.so-dlopen.patch27
-rw-r--r--pkgs/development/python-modules/cx_oracle/default.nix12
-rw-r--r--pkgs/development/python-modules/docker-pycreds/default.nix4
-rw-r--r--pkgs/development/python-modules/hiro/default.nix19
-rw-r--r--pkgs/development/python-modules/keyrings-alt/default.nix25
-rw-r--r--pkgs/development/python-modules/mail-parser/default.nix41
-rw-r--r--pkgs/development/python-modules/uranium/default.nix4
-rw-r--r--pkgs/development/tools/gllvm/default.nix4
-rw-r--r--pkgs/development/tools/haskell/multi-ghc-travis/default.nix4
-rw-r--r--pkgs/development/tools/java/jhiccup/default.nix4
-rw-r--r--pkgs/development/tools/jira_cli/default.nix32
-rw-r--r--pkgs/development/tools/wllvm/default.nix6
-rw-r--r--pkgs/development/tools/xqilla/default.nix4
-rw-r--r--pkgs/games/pacvim/default.nix23
-rw-r--r--pkgs/games/tcl2048/default.nix8
-rw-r--r--pkgs/misc/emulators/wine/base.nix16
-rw-r--r--pkgs/misc/emulators/wine/packages.nix2
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix10
-rw-r--r--pkgs/os-specific/linux/firejail/default.nix8
-rw-r--r--pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix4
-rw-r--r--pkgs/os-specific/linux/lsscsi/default.nix6
-rw-r--r--pkgs/os-specific/linux/pam_u2f/default.nix4
-rw-r--r--pkgs/os-specific/linux/usbutils/default.nix4
-rw-r--r--pkgs/os-specific/linux/wireguard/default.nix4
-rw-r--r--pkgs/servers/apache-kafka/default.nix9
-rw-r--r--pkgs/servers/dns/knot-dns/default.nix4
-rw-r--r--pkgs/servers/dns/nsd/default.nix4
-rw-r--r--pkgs/servers/http/lighttpd/default.nix11
-rw-r--r--pkgs/servers/http/openresty/default.nix4
-rw-r--r--pkgs/servers/mattermost/default.nix94
-rw-r--r--pkgs/servers/minio/default.nix4
-rw-r--r--pkgs/servers/monitoring/grafana/default.nix6
-rw-r--r--pkgs/servers/monitoring/prometheus/default.nix2
-rw-r--r--pkgs/servers/slimserver/default.nix11
-rw-r--r--pkgs/servers/xmpp/prosody/default.nix4
-rw-r--r--pkgs/shells/dash/default.nix4
-rw-r--r--pkgs/stdenv/cross/default.nix4
-rw-r--r--pkgs/tools/X11/xpra/default.nix4
-rw-r--r--pkgs/tools/admin/tigervnc/default.nix5
-rw-r--r--pkgs/tools/filesystems/disorderfs/default.nix8
-rw-r--r--pkgs/tools/filesystems/duperemove/default.nix4
-rw-r--r--pkgs/tools/misc/bashplotlib/default.nix23
-rw-r--r--pkgs/tools/misc/debianutils/default.nix4
-rw-r--r--pkgs/tools/misc/debootstrap/default.nix4
-rw-r--r--pkgs/tools/misc/mongodb-compass/default.nix86
-rw-r--r--pkgs/tools/misc/neofetch/default.nix4
-rw-r--r--pkgs/tools/misc/you-get/default.nix4
-rw-r--r--pkgs/tools/networking/babeld/default.nix4
-rw-r--r--pkgs/tools/networking/minio-client/default.nix4
-rw-r--r--pkgs/tools/networking/ntp/default.nix4
-rw-r--r--pkgs/tools/package-management/cargo-release/default.nix23
-rw-r--r--pkgs/tools/package-management/xbps/cert-paths.patch25
-rw-r--r--pkgs/tools/package-management/xbps/default.nix39
-rw-r--r--pkgs/tools/security/opensc/default.nix4
-rw-r--r--pkgs/top-level/all-packages.nix73
-rw-r--r--pkgs/top-level/haskell-packages.nix40
-rw-r--r--pkgs/top-level/perl-packages.nix7
-rw-r--r--pkgs/top-level/python-packages.nix5
-rw-r--r--pkgs/top-level/wine-packages.nix50
116 files changed, 1849 insertions, 374 deletions
diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix
index 328370c25016..ecc6e244a585 100644
--- a/pkgs/applications/editors/android-studio/default.nix
+++ b/pkgs/applications/editors/android-studio/default.nix
@@ -13,9 +13,9 @@ let
     sha256Hash = "1h9f4pkyqxkqxampi8v035czg5d4g6lp4bsrnq5mgpwhjwkr1whk";
   };
   latestVersion = {
-    version = "3.2.0.13"; # "Android Studio 3.2 Canary 14"
-    build = "181.4763614";
-    sha256Hash = "1rx3bip5a7v349whg26kxvj05qlvm7zwacfqnfzfmvvhzbh7xnyh";
+    version = "3.2.0.14"; # "Android Studio 3.2 Canary 15"
+    build = "181.4773949";
+    sha256Hash = "10lhy6sdvvh4a8kj8jyk4z9nzh67v8f5zpkwparvk3pb2s5mf3mk";
   };
 in rec {
   # Old alias
diff --git a/pkgs/applications/editors/typora/default.nix b/pkgs/applications/editors/typora/default.nix
index d687712fc08a..ed4aefd90bc5 100644
--- a/pkgs/applications/editors/typora/default.nix
+++ b/pkgs/applications/editors/typora/default.nix
@@ -1,20 +1,20 @@
-{ stdenv, fetchurl, dpkg, lib, glib, dbus, makeWrapper, gnome2, atk, cairo
+{ stdenv, fetchurl, dpkg, lib, glib, dbus, makeWrapper, gnome2, gtk3, atk, cairo
 , freetype, fontconfig, nspr, nss, xorg, alsaLib, cups, expat, udev }:
 
 stdenv.mkDerivation rec {
   name = "typora-${version}";
-  version = "0.9.47";
+  version = "0.9.48";
 
   src =
     if stdenv.system == "x86_64-linux" then
       fetchurl {
         url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
-        sha256 = "431741948f5a2faba04984c495bea56b4a800c6dbb7e21e24ad3124fb8ffcbc9";
+        sha256 = "36a7c5f855306bcbe3364d12aca94c2f6d013a013e59b46f89df81496ec11800";
       }
     else
       fetchurl {
         url = "https://www.typora.io/linux/typora_${version}_i386.deb";
-        sha256 = "a95c8c1e296d8587a4dc6182af3b24253c3c2abc991badb7c758cd6d1bf5b1b6";
+        sha256 = "7197c526918a791b15b701846f9f2f1747a5b8ceac77c4cba691ee6d74d07d1d";
       }
     ;
 
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
       gnome2.gdk_pixbuf
       gnome2.pango
       expat
+      gtk3
       atk
       nspr
       nss
diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix
index 65a3238ef571..1a9bb44cabb6 100644
--- a/pkgs/applications/graphics/ImageMagick/7.0.nix
+++ b/pkgs/applications/graphics/ImageMagick/7.0.nix
@@ -14,8 +14,8 @@ let
     else throw "ImageMagick is not supported on this platform.";
 
   cfg = {
-    version = "7.0.7-29";
-    sha256 = "0jfpfydz50zxs776knz6w2f5g0l4nhivp9g1fz4cf5clgjcpa3z6";
+    version = "7.0.7-32";
+    sha256 = "1i3rvq0f4lq1las4g12ipfs6h5vyngwh5fllvynpci2lh32gd48j";
     patches = [];
   };
 in
diff --git a/pkgs/applications/graphics/avocode/default.nix b/pkgs/applications/graphics/avocode/default.nix
index 7bcbc8f2e400..c1e2da20e548 100644
--- a/pkgs/applications/graphics/avocode/default.nix
+++ b/pkgs/applications/graphics/avocode/default.nix
@@ -5,11 +5,11 @@
 
 stdenv.mkDerivation rec {
   name = "avocode-${version}";
-  version = "2.26.0";
+  version = "2.26.1";
 
   src = fetchurl {
     url = "https://media.avocode.com/download/avocode-app/${version}/avocode-${version}-linux.zip";
-    sha256 = "11d3nlshyzh5aqf5vsvnjwhr9qn8a2kd848x0ylv91y9p9njgsl5";
+    sha256 = "0npwwz5m4klswc32fs82icpqqfx9v4786sksiwykj75dsznyv3x8";
   };
 
   libPath = stdenv.lib.makeLibraryPath (with xorg; with gnome2; [
@@ -81,9 +81,9 @@ stdenv.mkDerivation rec {
   '';
 
   postFixup = ''
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/avocode
     for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
-      patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/avocode
-        patchelf --set-rpath ${libPath}:$out/ $file
+      patchelf --set-rpath ${libPath}:$out/ $file
     done
   '';
 
diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix
index 5978612fdf33..de4849e21620 100644
--- a/pkgs/applications/graphics/inkscape/default.nix
+++ b/pkgs/applications/graphics/inkscape/default.nix
@@ -51,7 +51,9 @@ stdenv.mkDerivation rec {
     libvisio libcdr libexif potrace python2Env icu
   ];
 
-  enableParallelBuilding = true;
+  # To avoid non-deterministic build failure using make.
+  # When switching back to cmake turn parallel back on, see #40046.
+  enableParallelBuilding = false;
 
   preConfigure = ''
     intltoolize -f
diff --git a/pkgs/applications/misc/ape/apeclex.nix b/pkgs/applications/misc/ape/apeclex.nix
new file mode 100644
index 000000000000..710ddfec9942
--- /dev/null
+++ b/pkgs/applications/misc/ape/apeclex.nix
@@ -0,0 +1,8 @@
+{ stdenv, attemptoClex, callPackage }:
+
+callPackage ./. {
+  pname = "ape-clex";
+  lexicon = "${attemptoClex}/clex_lexicon.pl";
+  description = "Parser for Attempto Controlled English (ACE) with a large lexicon (~100,000 entries)";
+  license = with stdenv.lib; [ licenses.lgpl3 licenses.gpl3 ];
+}
diff --git a/pkgs/applications/misc/ape/clex.nix b/pkgs/applications/misc/ape/clex.nix
new file mode 100644
index 000000000000..37d140e19ba3
--- /dev/null
+++ b/pkgs/applications/misc/ape/clex.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "attempto-clex-${version}";
+  version = "5133afe";
+
+  src = fetchFromGitHub {
+     owner = "Attempto";
+     repo = "Clex";
+     rev = version;
+     sha256 = "0p9s64g1jic213bwm6347jqckszgnni9szrrz31qjgaf32kf7nkp";
+  };
+
+  installPhase = ''
+    mkdir -p $out
+    cp clex_lexicon.pl $out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Large lexicon for APE (~100,000 entries)";
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ yrashk ];
+  };
+}
diff --git a/pkgs/applications/misc/ape/default.nix b/pkgs/applications/misc/ape/default.nix
new file mode 100644
index 000000000000..e78ba2df9993
--- /dev/null
+++ b/pkgs/applications/misc/ape/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, swiProlog, makeWrapper,
+  fetchFromGitHub,
+  lexicon ? "lexicon/clex_lexicon.pl",
+  pname ? "ape",
+  description ? "Parser for Attempto Controlled English (ACE)",
+  license ? with stdenv.lib; licenses.lgpl3
+  }:
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  version = "6.7-131003";
+
+  buildInputs = [ swiProlog makeWrapper ];
+
+  src = fetchFromGitHub {
+     owner = "Attempto";
+     repo = "APE";
+     rev = version;
+     sha256 = "0cw47qjg4896kw3vps6rfs02asvscsqvcfdiwgfmqb3hvykb1sdx";
+  };
+
+  patchPhase = ''
+    # We move the file first to avoid "same file" error in the default case
+    cp ${lexicon} new_lexicon.pl
+    rm lexicon/clex_lexicon.pl
+    cp new_lexicon.pl lexicon/clex_lexicon.pl
+  '';
+
+  buildPhase = ''
+    make build
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ape.exe $out
+    makeWrapper $out/ape.exe $out/bin/ape --add-flags ace
+  '';
+
+  meta = with stdenv.lib; {
+    description = description;
+    license = license;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ yrashk ];
+  };
+}
diff --git a/pkgs/applications/misc/dunst/default.nix b/pkgs/applications/misc/dunst/default.nix
index 75640b2c54ec..1a809307cc12 100644
--- a/pkgs/applications/misc/dunst/default.nix
+++ b/pkgs/applications/misc/dunst/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub
+{ stdenv, fetchFromGitHub, makeWrapper
 , pkgconfig, which, perl, libXrandr
 , cairo, dbus, systemd, gdk_pixbuf, glib, libX11, libXScrnSaver
 , libXinerama, libnotify, libxdg_basedir, pango, xproto, librsvg
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
     sha256 = "1kqlshaflp306yrjjmc28pghi1y5p24vdx4bxf8i4n9khdawb514";
   };
 
-  nativeBuildInputs = [ perl pkgconfig which systemd ];
+  nativeBuildInputs = [ perl pkgconfig which systemd makeWrapper ];
 
   buildInputs = [
     cairo dbus gdk_pixbuf glib libX11 libXScrnSaver
@@ -31,6 +31,11 @@ stdenv.mkDerivation rec {
     "SERVICEDIR_SYSTEMD=$(out)/lib/systemd/user"
   ];
 
+  postInstall = ''
+    wrapProgram $out/bin/dunst \
+      --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
+  '';
+
   meta = with stdenv.lib; {
     description = "Lightweight and customizable notification daemon";
     homepage = https://dunst-project.org/;
diff --git a/pkgs/applications/misc/gpsprune/default.nix b/pkgs/applications/misc/gpsprune/default.nix
index a51ec8c1b044..b6391d06eb92 100644
--- a/pkgs/applications/misc/gpsprune/default.nix
+++ b/pkgs/applications/misc/gpsprune/default.nix
@@ -1,16 +1,15 @@
-{ fetchurl, stdenv, makeDesktopItem, unzip, bash, jre8 }:
+{ fetchurl, stdenv, makeDesktopItem, makeWrapper, unzip, bash, jre8 }:
 
 stdenv.mkDerivation rec {
   name = "gpsprune-${version}";
-  version = "18.6";
+  version = "19";
 
   src = fetchurl {
     url = "http://activityworkshop.net/software/gpsprune/gpsprune_${version}.jar";
-    sha256 = "1ii9pkj24jcwzs225nyi17ks07dfc5x3940hpqrsb5xzxy2vkw7q";
+    sha256 = "0n08fg55zgpfg1f6lq0n3ngi0n8af1r0rhmbnpik5mjng4m9g3x5";
   };
 
-  phases = [ "installPhase" ];
-
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [ jre8 ];
 
   desktopItem = makeDesktopItem {
@@ -23,15 +22,11 @@ stdenv.mkDerivation rec {
     categories = "Education;Geoscience;";
   };
 
-  installPhase = ''
+  buildCommand = ''
     mkdir -p $out/bin $out/share/java
     cp -v $src $out/share/java/gpsprune.jar
-    cat > $out/bin/gpsprune <<EOF
-    #!${bash}/bin/bash
-    exec ${jre8}/bin/java -jar $out/share/java/gpsprune.jar "\$@"
-    EOF
-    chmod 755 $out/bin/gpsprune
-
+    makeWrapper ${jre8}/bin/java $out/bin/gpsprune \
+      --add-flags "-jar $out/share/java/gpsprune.jar"
     mkdir -p $out/share/applications
     cp $desktopItem/share/applications"/"* $out/share/applications
     mkdir -p $out/share/pixmaps
diff --git a/pkgs/applications/misc/houdini/runtime.nix b/pkgs/applications/misc/houdini/runtime.nix
index 7477e5c0af2a..b92012a29ddb 100644
--- a/pkgs/applications/misc/houdini/runtime.nix
+++ b/pkgs/applications/misc/houdini/runtime.nix
@@ -1,11 +1,11 @@
-{ stdenv, requireFile, zlib, libpng, libSM, libICE, fontconfig, xorg, libGLU, alsaLib, dbus, xkeyboardconfig, bc }:
+{ stdenv, requireFile, zlib, libpng, libSM, libICE, fontconfig, xorg, libGLU, libGL, alsaLib, dbus, xkeyboardconfig, bc }:
 
 let
   ld_library_path = builtins.concatStringsSep ":" [
     "${stdenv.cc.cc.lib}/lib64"
-    "/run/opengl-driver/lib"
     (stdenv.lib.makeLibraryPath [
       libGLU
+      libGL
       xorg.libXmu
       xorg.libXi
       xorg.libXext
diff --git a/pkgs/applications/misc/pgmanage/default.nix b/pkgs/applications/misc/pgmanage/default.nix
index 7da71df7814c..d08b183d9d00 100644
--- a/pkgs/applications/misc/pgmanage/default.nix
+++ b/pkgs/applications/misc/pgmanage/default.nix
@@ -24,9 +24,10 @@ stdenv.mkDerivation rec {
   meta = with stdenv.lib; {
     description = "A fast replacement for PGAdmin";
     longDescription = ''
-      At the heart of Postage is a modern, fast, event-based C-binary, built in
-      the style of NGINX and Node.js. This heart makes Postage as fast as any
-      PostgreSQL interface can hope to be.
+      At the heart of pgManage is a modern, fast, event-based C-binary, built in
+      the style of NGINX and Node.js. This heart makes pgManage as fast as any
+      PostgreSQL interface can hope to be. (Note: pgManage replaces Postage,
+      which is no longer maintained.)
     '';
     homepage = https://github.com/pgManage/pgManage;
     license = licenses.postgresql;
diff --git a/pkgs/applications/misc/soapyhackrf/default.nix b/pkgs/applications/misc/soapyhackrf/default.nix
index f5543af9c60b..2c5dd058ced3 100644
--- a/pkgs/applications/misc/soapyhackrf/default.nix
+++ b/pkgs/applications/misc/soapyhackrf/default.nix
@@ -3,7 +3,7 @@
 } :
 
 let
-  version = "0.3.2";
+  version = "0.3.3";
 
 in stdenv.mkDerivation {
   name = "soapyhackrf-${version}";
@@ -12,7 +12,7 @@ in stdenv.mkDerivation {
     owner = "pothosware";
     repo = "SoapyHackRF";
     rev = "soapy-hackrf-${version}";
-    sha256 = "1sgx2nk8yrzfwisjfs9mw0xwc47bckzi17p42s2pbv7zcxzpb66p";
+    sha256 = "1awn89z462500gb3fjb7x61b1znkjri9n1d39bqfip1qk4s11pxc";
   };
 
   nativeBuildInputs = [ cmake pkgconfig ];
diff --git a/pkgs/applications/networking/cluster/kubernetes/default.nix b/pkgs/applications/networking/cluster/kubernetes/default.nix
index 1a7ba3cf93df..e1023afc7aba 100644
--- a/pkgs/applications/networking/cluster/kubernetes/default.nix
+++ b/pkgs/applications/networking/cluster/kubernetes/default.nix
@@ -16,13 +16,13 @@ with lib;
 
 stdenv.mkDerivation rec {
   name = "kubernetes-${version}";
-  version = "1.9.1";
+  version = "1.9.7";
 
   src = fetchFromGitHub {
     owner = "kubernetes";
     repo = "kubernetes";
     rev = "v${version}";
-    sha256 = "1dmq2g138h7fsswmq4l47b44gsl9anmm3ywqyi7y48f1rkvc11mk";
+    sha256 = "1dykh48c6bvypg51mlxjdyrggpjq597mjj83xgj1pfadsy6pp9bh";
   };
 
   # go > 1.10 should be fixed by https://github.com/kubernetes/kubernetes/pull/60373
@@ -30,21 +30,6 @@ stdenv.mkDerivation rec {
 
   outputs = ["out" "man" "pause"];
 
-  patches = [
-    # patch is from https://github.com/kubernetes/kubernetes/pull/58207
-    (fetchpatch {
-      url = "https://github.com/kubernetes/kubernetes/commit/a990b04dc8a7d8408a71eee40db93621cf2b6d1b.patch";
-      sha256 = "0piqilc5c9frikl74hamkffawwg1mvdwfxqvjnmk6wdma43dbb7w";
-    })
-    (fetchpatch {
-      # https://github.com/kubernetes/kubernetes/pull/60978
-      # Fixes critical kube-proxy failure on iptables-restore >= 1.6.2 and
-      # non-critical failures on prior versions.
-      url = "https://github.com/kubernetes/kubernetes/commit/34ce573e9992ecdbc06dff1b4e3d0e9baa8353dd.patch";
-      sha256 = "1sd9qgc28zr6fkk0441f89bw8kq2kadys0qs7bgivy9cmcpw5x5p";
-    })
-  ];
-
   postPatch = ''
     substituteInPlace "hack/lib/golang.sh" --replace "_cgo" ""
     substituteInPlace "hack/generate-docs.sh" --replace "make" "make SHELL=${stdenv.shell}"
diff --git a/pkgs/applications/networking/instant-messengers/franz/default.nix b/pkgs/applications/networking/instant-messengers/franz/default.nix
index 95e01e586ec2..75df17bd5b01 100644
--- a/pkgs/applications/networking/instant-messengers/franz/default.nix
+++ b/pkgs/applications/networking/instant-messengers/franz/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeDesktopItem, makeWrapper
+{ stdenv, fetchurl, makeDesktopItem, makeWrapper, autoPatchelfHook
 , xorg, gtk2, atk, glib, pango, gdk_pixbuf, cairo, freetype, fontconfig
 , gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
 
@@ -8,17 +8,6 @@ let
 
   version = "4.0.4";
 
-  runtimeDeps = [
-    udev libnotify
-  ];
-  deps = (with xorg; [
-    libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes
-    libXrender libX11 libXtst libXScrnSaver
-  ]) ++ [
-    gtk2 atk glib pango gdk_pixbuf cairo freetype fontconfig dbus
-    gnome2.GConf nss nspr alsaLib cups expat stdenv.cc.cc
-  ] ++ runtimeDeps;
-
   desktopItem = makeDesktopItem rec {
     name = "Franz";
     exec = name;
@@ -39,16 +28,21 @@ in stdenv.mkDerivation rec {
   # don't remove runtime deps
   dontPatchELF = true;
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
+  buildInputs = (with xorg; [
+    libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes
+    libXrender libX11 libXtst libXScrnSaver
+  ]) ++ [
+    gtk2 atk glib pango gdk_pixbuf cairo freetype fontconfig dbus
+    gnome2.GConf nss nspr alsaLib cups expat stdenv.cc.cc
+  ];
+  runtimeDependencies = [ udev.lib libnotify ];
 
   unpackPhase = ''
     tar xzf $src
   '';
 
   installPhase = ''
-    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" Franz
-    patchelf --set-rpath "$out/opt/franz:${stdenv.lib.makeLibraryPath deps}" Franz
-
     mkdir -p $out/bin $out/opt/franz
     cp -r * $out/opt/franz
     ln -s $out/opt/franz/Franz $out/bin
diff --git a/pkgs/applications/networking/mailreaders/astroid/default.nix b/pkgs/applications/networking/mailreaders/astroid/default.nix
index 610b16dab5bc..9a348fc03f7a 100644
--- a/pkgs/applications/networking/mailreaders/astroid/default.nix
+++ b/pkgs/applications/networking/mailreaders/astroid/default.nix
@@ -1,24 +1,22 @@
-{ stdenv, fetchFromGitHub, scons, pkgconfig, gnome3, gmime3, webkitgtk24x-gtk3
-, libsass, notmuch, boost, wrapGAppsHook }:
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, gnome3, gmime3, webkitgtk24x-gtk3
+, libsass, notmuch, boost, wrapGAppsHook, glib-networking }:
 
 stdenv.mkDerivation rec {
   name = "astroid-${version}";
-  version = "0.10.2";
+  version = "0.11.1";
 
   src = fetchFromGitHub {
     owner = "astroidmail";
     repo = "astroid";
     rev = "v${version}";
-    sha256 = "0y1i40xbjjvnylqpdkvj0m9fl6f5k9zk1z4pqg3vhj8x1ys8am1c";
+    sha256 = "1z48rvlzwi7bq7j55rnb0gg1a4k486yj910z2cxz1p46lxk332j1";
   };
 
-  nativeBuildInputs = [ scons pkgconfig wrapGAppsHook ];
+  nativeBuildInputs = [ cmake pkgconfig wrapGAppsHook ];
 
   buildInputs = [ gnome3.gtkmm gmime3 webkitgtk24x-gtk3 libsass gnome3.libpeas
-                  notmuch boost gnome3.gsettings-desktop-schemas ];
-
-  buildPhase = "scons --propagate-environment --prefix=$out build";
-  installPhase = "scons --propagate-environment --prefix=$out install";
+                  notmuch boost gnome3.gsettings-desktop-schemas
+                  glib-networking ];
 
   meta = with stdenv.lib; {
     homepage = https://astroidmail.github.io/;
diff --git a/pkgs/applications/science/electronics/gtkwave/default.nix b/pkgs/applications/science/electronics/gtkwave/default.nix
index 671c53365aba..4ca489c40b3f 100644
--- a/pkgs/applications/science/electronics/gtkwave/default.nix
+++ b/pkgs/applications/science/electronics/gtkwave/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "gtkwave-${version}";
-  version = "3.3.89";
+  version = "3.3.90";
 
   src = fetchurl {
     url    = "mirror://sourceforge/gtkwave/${name}.tar.gz";
-    sha256 = "1j7byy0kmapa66dp17gjvs4pa4gckjccljydixswdknpxs5ma45g";
+    sha256 = "1q1fi0nqja9d8xj24h7ykvnpms6zqgn24jmyj1mxn48qig301c6m";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/applications/science/math/nauty/default.nix b/pkgs/applications/science/math/nauty/default.nix
index 36ac84ece25f..d7b4707420be 100644
--- a/pkgs/applications/science/math/nauty/default.nix
+++ b/pkgs/applications/science/math/nauty/default.nix
@@ -1,10 +1,10 @@
 {stdenv, fetchurl}:
 stdenv.mkDerivation rec {
   name = "nauty-${version}";
-  version = "26r7";
+  version = "26r10";
   src = fetchurl {
     url = "http://pallini.di.uniroma1.it/nauty${version}.tar.gz";
-    sha256 = "1indcc1im7s5x89x0xn4699izw1wwars1aanpmf8jibnw66n9dcp";
+    sha256 = "16pdklh066z6mx424wkisr88fz9divn2caj7ggs03wy3y848spq6";
   };
   buildInputs = [];
   installPhase = ''
diff --git a/pkgs/applications/science/math/ries/default.nix b/pkgs/applications/science/math/ries/default.nix
new file mode 100644
index 000000000000..4b237a01a3e5
--- /dev/null
+++ b/pkgs/applications/science/math/ries/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchzip }:
+stdenv.mkDerivation {
+  name = "ries-2018-04-11";
+
+  # upstream does not provide a stable link
+  src = fetchzip {
+    url = "https://salsa.debian.org/debian/ries/-/archive/debian/2018.04.11-1/ries-debian-2018.04.11-1.zip";
+    sha256 = "1h2wvd4k7f0l0i1vm9niz453xdbcs3nxccmri50qyrzzzc1b0842";
+  };
+
+  makeFlags = "PREFIX=$(out)";
+
+  meta = with stdenv.lib; {
+    homepage = https://mrob.com/pub/ries/;
+    description = "Tool to produce a list of equations that approximately solve to a given number";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ symphorien ];
+    license = licenses.gpl3Plus;
+  };
+}
+
diff --git a/pkgs/build-support/rust/default-crate-overrides.nix b/pkgs/build-support/rust/default-crate-overrides.nix
index 488fcb943721..971c4d0f5e22 100644
--- a/pkgs/build-support/rust/default-crate-overrides.nix
+++ b/pkgs/build-support/rust/default-crate-overrides.nix
@@ -3,7 +3,7 @@
   libsodium, postgresql, ... }:
 
 let
-  inherit (darwin.apple_sdk.frameworks) CoreFoundation;
+  inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
 in
 {
   cargo = attrs: {
@@ -19,7 +19,8 @@ in
     crateBin = [ { name = "cargo-vendor"; path = "src/main.rs"; } ];
   };
   curl-sys = attrs: {
-    buildInputs = [ pkgconfig curl ];
+    buildInputs = [ pkgconfig zlib ];
+    propagatedBuiltInputs = [ curl ];
   };
   libgit2-sys = attrs: {
     LIBGIT2_SYS_USE_PKG_CONFIG = true;
@@ -69,4 +70,7 @@ in
   pq-sys = attr: {
     buildInputs = [ pkgconfig postgresql ];
   };
+  security-framework-sys = attr: {
+    propagatedBuildInputs = [ Security ];
+  };
 }
diff --git a/pkgs/data/fonts/hack/default.nix b/pkgs/data/fonts/hack/default.nix
index eb7943265397..e77fcc3c3a3e 100644
--- a/pkgs/data/fonts/hack/default.nix
+++ b/pkgs/data/fonts/hack/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchzip }:
 
 let
-  version = "3.002";
+  version = "3.003";
 in fetchzip rec {
   name = "hack-font-${version}";
 
@@ -12,7 +12,7 @@ in fetchzip rec {
     unzip -j $downloadedFile \*.ttf -d $out/share/fonts/hack
   '';
 
-  sha256 = "11f3hl4nvxq6pvsmwr1c1r5wrxhrp7ixr5bshrz2dmqn7l8bxa63";
+  sha256 = "1l6ih6v7dqali5c7zh6z2xnbf9h2wz0ag6fdgszmqd5lnhw39v6s";
 
   meta = with stdenv.lib; {
     description = "A typeface designed for source code";
diff --git a/pkgs/data/fonts/iosevka/bin.nix b/pkgs/data/fonts/iosevka/bin.nix
index 1571f8e573de..95093f4eefc5 100644
--- a/pkgs/data/fonts/iosevka/bin.nix
+++ b/pkgs/data/fonts/iosevka/bin.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchzip }:
 
 let
-  version = "1.14.0";
+  version = "1.14.3";
 in fetchzip rec {
   name = "iosevka-bin-${version}";
 
@@ -12,7 +12,7 @@ in fetchzip rec {
     unzip -j $downloadedFile \*.ttc -d $out/share/fonts/iosevka
   '';
 
-  sha256 = "03zgh5dfx58sxrprhqi8cyc18sh05k84yc262bn81vavl6lm14ns";
+  sha256 = "0qc5i6ijr25d2jwi5r4bcvbaw74y1p05a5fvlwss3l9rhmmxsfpl";
 
   meta = with stdenv.lib; {
     homepage = https://be5invis.github.io/Iosevka/;
diff --git a/pkgs/data/fonts/iosevka/default.nix b/pkgs/data/fonts/iosevka/default.nix
index 657eb80c5392..4fc47793661b 100644
--- a/pkgs/data/fonts/iosevka/default.nix
+++ b/pkgs/data/fonts/iosevka/default.nix
@@ -26,13 +26,13 @@ in
 let pname = if set != null then "iosevka-${set}" else "iosevka"; in
 
 let
-  version = "1.14.2";
+  version = "1.14.3";
   name = "${pname}-${version}";
   src = fetchFromGitHub {
     owner = "be5invis";
     repo ="Iosevka";
     rev = "v${version}";
-    sha256 = "18vh5rjffqgiliyfia40lh7cygz6fv3rwgq28fxl26i9sc95qsqd";
+    sha256 = "0ba8hwxi88bp2jb9xfhk95nnlv8ykl74cv62xr4ybzm3b8ahpwqf";
   };
 in
 
diff --git a/pkgs/desktops/enlightenment/enlightenment.nix b/pkgs/desktops/enlightenment/enlightenment.nix
index b0fd5f3db2b2..dc538625bf09 100644
--- a/pkgs/desktops/enlightenment/enlightenment.nix
+++ b/pkgs/desktops/enlightenment/enlightenment.nix
@@ -35,15 +35,44 @@ stdenv.mkDerivation rec {
     gdbm
     pcre
     mesa_noglu
+    xkeyboard_config
   ] ++
     stdenv.lib.optionals stdenv.isLinux [ libcap ];
 
-  # Instead of setting owner to root and permissions to setuid/setgid
-  # (which is not allowed for files in /nix/store) of some
-  # enlightenment programs, the file $out/e-wrappers.nix is created,
-  # containing the needed configuration for that purpose. It can be
-  # used in the enlightenment module.
-  patches = [ ./enlightenment.suid-exes.patch ];
+  patches = [
+    # Some programs installed by enlightenment (to set the cpu frequency,
+    # for instance) need root ownership and setuid/setgid permissions, which
+    # are not allowed for files in /nix/store. Instead of allowing the
+    # installer to try to do this, the file $out/e-wrappers.nix is created,
+    # containing the needed configuration for wrapping those programs. It
+    # can be used in the enlightenment module. The idea is:
+    # 
+    #  1) rename the original binary adding the extension .orig
+    #  2) wrap the renamed binary at /run/wrappers/bin/
+    #  3) create a new symbolic link using the original binary name (in the
+    #     original directory where enlightenment wants it) pointing to the
+    #     wrapper
+
+    ./enlightenment.suid-exes.patch
+  ];
+
+  postPatch = ''
+    # In order to get the available keyboard layouts Enlightenment looks for
+    # the file xorg.lst, that should be provided by xkeyboard-config (when
+    # configured with option --with-xkb-rules-symlink=xorg). Currently
+    # xkeyboard-config is not configured with this option in
+    # NixOS. Therefore it is needed to add base.lst (which xorg.lst would be
+    # a symbolic link to) explicitly as an alternative.
+
+    sed "/#ifdef XKB_BASE/a XKB_BASE \"\/rules\/base.lst\"," \
+      -i src/modules/wizard/page_011.c src/modules/xkbswitch/e_mod_parse.c
+
+    # edge_cc is a binary provided by efl and cannot be found at the directory
+    # given by e_prefix_bin_get(), which is $out/bin
+
+    substituteInPlace src/bin/e_import_config_dialog.c \
+      --replace "e_prefix_bin_get()" "\"${efl}/bin\""
+  '';
 
   mesonFlags = [ "-Dsystemdunitdir=lib/systemd/user" ];
 
diff --git a/pkgs/desktops/maxx/default.nix b/pkgs/desktops/maxx/default.nix
index 69d16c9b20a1..10fa745d9787 100644
--- a/pkgs/desktops/maxx/default.nix
+++ b/pkgs/desktops/maxx/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchurl, makeWrapper, libredirect, gcc-unwrapped, bash, gtk-engine-murrine, gtk_engines, librsvg
+{ stdenv, fetchurl, makeWrapper, autoPatchelfHook
+, libredirect, gcc-unwrapped, bash, gtk-engine-murrine, gtk_engines, librsvg
 
 , libX11, libXext, libXi, libXau, libXrender, libXft, libXmu, libSM, libXcomposite, libXfixes, libXpm
 , libXinerama, libXdamage, libICE, libXtst, libXaw, fontconfig, pango, cairo, glib, libxml2, atk, gtk2
@@ -9,11 +10,6 @@
 let
   version = "Indy-1.1.0";
 
-  deps = [
-    stdenv.cc.cc libX11 libXext libXi libXau libXrender libXft libXmu libSM libXcomposite libXfixes libXpm
-    libXinerama libXdamage libICE libXtst libXaw fontconfig pango cairo glib libxml2 atk gtk2
-    gdk_pixbuf libGL ncurses
-  ];
   runtime_deps = [
     xclock xsettingsd
   ];
@@ -31,7 +27,12 @@ in stdenv.mkDerivation {
     })
   ];
 
-  nativeBuildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
+  buildInputs = [
+    stdenv.cc.cc libX11 libXext libXi libXau libXrender libXft libXmu libSM libXcomposite libXfixes libXpm
+    libXinerama libXdamage libICE libXtst libXaw fontconfig pango cairo glib libxml2 atk gtk2
+    gdk_pixbuf libGL ncurses
+  ];
 
   buildPhase = ''
     while IFS= read -r -d ''$'\0' i; do
@@ -58,15 +59,11 @@ in stdenv.mkDerivation {
       --prefix PATH : ${stdenv.lib.makeBinPath runtime_deps}
 
     while IFS= read -r -d ''$'\0' i; do
-      if isELF "$i"; then
-        bin=`patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i"; echo $?`
-        patchelf --set-rpath "$maxx/lib64:$maxx/OpenMotif-2.1.32/lib64:$maxx/OpenMotif-2.3.1/lib64:${stdenv.lib.makeLibraryPath deps}" "$i"
-        if [ "$bin" -eq 0 ]; then
-          wrapProgram "$i" \
-            --set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
-            --set NIX_REDIRECTS /opt/MaXX=$maxx \
-            --prefix PATH : $maxx/sbin
-        fi
+      if isExecutable "$i"; then
+        wrapProgram "$i" \
+          --set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
+          --set NIX_REDIRECTS /opt/MaXX=$maxx \
+          --prefix PATH : $maxx/sbin
       fi
     done < <(find "$maxx" -type f -print0)
 
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix
index 443f3a7cf0b2..8c1170213f82 100644
--- a/pkgs/development/compilers/gcc/5/default.nix
+++ b/pkgs/development/compilers/gcc/5/default.nix
@@ -62,10 +62,6 @@ let version = "5.5.0";
       ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
       ++ optional noSysDirs ../no-sys-dirs.patch
       ++ optional langFortran ../gfortran-driving.patch
-
-      # This could be applied unconditionally but I don't want to cause a full
-      # Linux rebuild.
-      ++ optional stdenv.cc.isClang ./libcxx38-and-above.patch
       ++ optional stdenv.hostPlatform.isMusl (fetchpatch {
         url = https://raw.githubusercontent.com/richfelker/musl-cross-make/e84b1bd1fc12a3def33111ca6df522cd6e5ec361/patches/gcc-5.3.0/0001-musl.diff;
         sha256 = "0pppbf8myi2kjhm3z3479ihn1cm60kycfv60gj8yy1bs0pl1qcfm";
diff --git a/pkgs/development/compilers/ghcjs-ng/8.2/git.json b/pkgs/development/compilers/ghcjs-ng/8.2/git.json
new file mode 100644
index 000000000000..efe7794a103e
--- /dev/null
+++ b/pkgs/development/compilers/ghcjs-ng/8.2/git.json
@@ -0,0 +1,6 @@
+{
+  "url": "https://github.com/ghcjs/ghcjs",
+  "rev": "0cff73c3ee13b464adba90f308b77751c75b9f26",
+  "sha256": "1shg34zi6ryaihar62qdkkalv8dsrsqbv58jzkhk9in38sdfkjxv",
+  "fetchSubmodules": true
+}
diff --git a/pkgs/development/compilers/ghcjs-ng/8.2/stage0.nix b/pkgs/development/compilers/ghcjs-ng/8.2/stage0.nix
new file mode 100644
index 000000000000..0680ff156e14
--- /dev/null
+++ b/pkgs/development/compilers/ghcjs-ng/8.2/stage0.nix
@@ -0,0 +1,168 @@
+{ callPackage, configuredSrc }:
+
+{
+
+  ghcjs = callPackage
+    ({ mkDerivation, aeson, array, attoparsec, base, base16-bytestring
+    , base64-bytestring, binary, bytestring, Cabal, containers
+    , cryptohash, data-default, deepseq, directory, executable-path
+    , filepath, ghc-api-ghcjs, ghc-boot, ghc-paths, ghci-ghcjs
+    , ghcjs-th, haddock-api-ghcjs, hashable, haskell-src-exts
+    , haskell-src-meta, http-types, HUnit, lens, lifted-base, mtl
+    , network, optparse-applicative, parallel, parsec, process, random
+    , regex-posix, safe, shelly, split, stdenv, stringsearch, syb
+    , system-fileio, system-filepath, tar, template-haskell
+    , template-haskell-ghcjs, terminfo, test-framework
+    , test-framework-hunit, text, time, transformers
+    , transformers-compat, unix, unix-compat, unordered-containers
+    , vector, wai, wai-app-static, wai-extra, wai-websockets, warp
+    , webdriver, websockets, wl-pprint-text, yaml
+    }:
+    mkDerivation {
+      pname = "ghcjs";
+      version = "8.2.0.1";
+      src = configuredSrc + /.;
+      isLibrary = true;
+      isExecutable = true;
+      enableSeparateDataOutput = true;
+      setupHaskellDepends = [
+        base Cabal containers directory filepath process template-haskell
+        transformers
+      ];
+      libraryHaskellDepends = [
+        aeson array attoparsec base base16-bytestring base64-bytestring
+        binary bytestring Cabal containers cryptohash data-default deepseq
+        directory filepath ghc-api-ghcjs ghc-boot ghc-paths ghci-ghcjs
+        ghcjs-th hashable haskell-src-exts haskell-src-meta lens mtl
+        optparse-applicative parallel parsec process regex-posix safe split
+        stringsearch syb template-haskell template-haskell-ghcjs text time
+        transformers unordered-containers vector wl-pprint-text yaml
+      ];
+      executableHaskellDepends = [
+        aeson base binary bytestring Cabal containers directory
+        executable-path filepath ghc-api-ghcjs ghc-boot haddock-api-ghcjs
+        lens mtl optparse-applicative process shelly system-fileio
+        system-filepath tar terminfo text time transformers
+        transformers-compat unix unix-compat unordered-containers vector
+        yaml
+      ];
+      testHaskellDepends = [
+        aeson base bytestring data-default deepseq directory http-types
+        HUnit lens lifted-base network optparse-applicative process random
+        shelly system-fileio system-filepath test-framework
+        test-framework-hunit text time transformers unordered-containers
+        wai wai-app-static wai-extra wai-websockets warp webdriver
+        websockets yaml
+      ];
+      description = "Haskell to JavaScript compiler";
+      license = stdenv.lib.licenses.mit;
+    }) {};
+
+  ghc-api-ghcjs = callPackage
+    ({ mkDerivation, array, base, binary, bytestring, containers
+    , deepseq, directory, filepath, ghc-boot, ghc-boot-th, ghci-ghcjs
+    , hoopl, hpc, process, stdenv, template-haskell-ghcjs, terminfo
+    , time, transformers, unix
+    }:
+    mkDerivation {
+      pname = "ghc-api-ghcjs";
+      version = "8.2.2";
+      src = configuredSrc + /lib/ghc-api-ghcjs;
+      libraryHaskellDepends = [
+        array base binary bytestring containers deepseq directory filepath
+        ghc-boot ghc-boot-th ghci-ghcjs hoopl hpc process
+        template-haskell-ghcjs terminfo time transformers unix
+      ];
+      homepage = "http://www.haskell.org/ghc/";
+      description = "The GHC API (customized for GHCJS)";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  ghci-ghcjs = callPackage
+    ({ mkDerivation, array, base, binary, bytestring, containers
+    , deepseq, filepath, ghc-boot, ghc-boot-th, stdenv
+    , template-haskell-ghcjs, transformers, unix
+    }:
+    mkDerivation {
+      pname = "ghci-ghcjs";
+      version = "8.2.2";
+      src = configuredSrc + /lib/ghci-ghcjs;
+      libraryHaskellDepends = [
+        array base binary bytestring containers deepseq filepath ghc-boot
+        ghc-boot-th template-haskell-ghcjs transformers unix
+      ];
+      description = "The library supporting GHC's interactive interpreter (customized for GHCJS)";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  ghcjs-th = callPackage
+    ({ mkDerivation, base, binary, bytestring, containers, ghc-prim
+    , ghci-ghcjs, stdenv, template-haskell-ghcjs
+    }:
+    mkDerivation {
+      pname = "ghcjs-th";
+      version = "0.1.0.0";
+      src = configuredSrc + /lib/ghcjs-th;
+      libraryHaskellDepends = [
+        base binary bytestring containers ghc-prim ghci-ghcjs
+        template-haskell-ghcjs
+      ];
+      homepage = "http://github.com/ghcjs";
+      license = stdenv.lib.licenses.mit;
+    }) {};
+
+  haddock-api-ghcjs = callPackage
+    ({ mkDerivation, array, base, bytestring, Cabal, containers, deepseq
+    , directory, filepath, ghc-api-ghcjs, ghc-boot, ghc-paths
+    , haddock-library-ghcjs, hspec, hspec-discover, QuickCheck, stdenv
+    , transformers, xhtml
+    }:
+    mkDerivation {
+      pname = "haddock-api-ghcjs";
+      version = "2.18.1";
+      src = configuredSrc + /lib/haddock-api-ghcjs;
+      enableSeparateDataOutput = true;
+      libraryHaskellDepends = [
+        array base bytestring Cabal containers deepseq directory filepath
+        ghc-api-ghcjs ghc-boot ghc-paths haddock-library-ghcjs transformers
+        xhtml
+      ];
+      testHaskellDepends = [
+        base containers ghc-api-ghcjs hspec QuickCheck
+      ];
+      testToolDepends = [ hspec-discover ];
+      homepage = "http://www.haskell.org/haddock/";
+      description = "A documentation-generation tool for Haskell libraries (customized for GHCJS)";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  haddock-library-ghcjs = callPackage
+    ({ mkDerivation, base, base-compat, bytestring, deepseq, hspec
+    , hspec-discover, QuickCheck, stdenv, transformers
+    }:
+    mkDerivation {
+      pname = "haddock-library-ghcjs";
+      version = "1.4.4";
+      src = configuredSrc + /lib/haddock-library-ghcjs;
+      libraryHaskellDepends = [ base bytestring deepseq transformers ];
+      testHaskellDepends = [
+        base base-compat bytestring deepseq hspec QuickCheck transformers
+      ];
+      testToolDepends = [ hspec-discover ];
+      homepage = "http://www.haskell.org/haddock/";
+      description = "Library exposing some functionality of Haddock";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  template-haskell-ghcjs = callPackage
+    ({ mkDerivation, base, ghc-boot-th, pretty, stdenv }:
+    mkDerivation {
+      pname = "template-haskell-ghcjs";
+      version = "2.12.0.0";
+      src = configuredSrc + /lib/template-haskell-ghcjs;
+      libraryHaskellDepends = [ base ghc-boot-th pretty ];
+      description = "Support library for Template Haskell (customized for GHCJS)";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+}
diff --git a/pkgs/development/compilers/ghcjs-ng/8.4/dep-overrides.nix b/pkgs/development/compilers/ghcjs-ng/8.4/dep-overrides.nix
new file mode 100644
index 000000000000..2d0ed55c6cd1
--- /dev/null
+++ b/pkgs/development/compilers/ghcjs-ng/8.4/dep-overrides.nix
@@ -0,0 +1,7 @@
+{ haskellLib }:
+
+let inherit (haskellLib) dontCheck doJailbreak;
+in self: super: {
+  haddock-library-ghcjs = dontCheck super.haddock-library-ghcjs;
+  haddock-api-ghcjs = doJailbreak super.haddock-api-ghcjs;
+}
diff --git a/pkgs/development/compilers/ghcjs-ng/8.4/git.json b/pkgs/development/compilers/ghcjs-ng/8.4/git.json
new file mode 100644
index 000000000000..b27c75bfe713
--- /dev/null
+++ b/pkgs/development/compilers/ghcjs-ng/8.4/git.json
@@ -0,0 +1,6 @@
+{
+  "url": "https://github.com/ghcjs/ghcjs",
+  "rev": "d20da90a4819faad1c6309a06363b34edac0374c",
+  "sha256": "0jmxgfm1zwg6xscjcaycfam7zss8ik4ql4ii5lpryh4h6cdhvkbr",
+  "fetchSubmodules": true
+}
diff --git a/pkgs/development/compilers/ghcjs-ng/8.4/stage0.nix b/pkgs/development/compilers/ghcjs-ng/8.4/stage0.nix
new file mode 100644
index 000000000000..051b0a19b5b5
--- /dev/null
+++ b/pkgs/development/compilers/ghcjs-ng/8.4/stage0.nix
@@ -0,0 +1,175 @@
+{ callPackage, configuredSrc }:
+
+{
+
+  ghcjs = callPackage
+    ({ mkDerivation, aeson, array, attoparsec, base, base16-bytestring
+    , base64-bytestring, binary, bytestring, Cabal, containers
+    , cryptohash, data-default, deepseq, directory, executable-path
+    , filepath, ghc-api-ghcjs, ghc-boot, ghc-paths, ghci-ghcjs
+    , ghcjs-th, haddock-api-ghcjs, hashable, haskell-src-exts
+    , haskell-src-meta, http-types, HUnit, lens, lifted-base, mtl
+    , network, optparse-applicative, parallel, parsec, process, random
+    , regex-posix, safe, shelly, split, stdenv, stringsearch, syb
+    , system-fileio, system-filepath, tar, template-haskell
+    , template-haskell-ghcjs, terminfo, test-framework
+    , test-framework-hunit, text, time, transformers
+    , transformers-compat, unix, unix-compat, unordered-containers
+    , vector, wai, wai-app-static, wai-extra, wai-websockets, warp
+    , webdriver, websockets, wl-pprint-text, yaml
+    }:
+    mkDerivation {
+      pname = "ghcjs";
+      version = "8.4.0.1";
+      src = configuredSrc + /.;
+      isLibrary = true;
+      isExecutable = true;
+      enableSeparateDataOutput = true;
+      setupHaskellDepends = [
+        base Cabal containers directory filepath process template-haskell
+        transformers
+      ];
+      libraryHaskellDepends = [
+        aeson array attoparsec base base16-bytestring base64-bytestring
+        binary bytestring Cabal containers cryptohash data-default deepseq
+        directory filepath ghc-api-ghcjs ghc-boot ghc-paths ghci-ghcjs
+        ghcjs-th hashable haskell-src-exts haskell-src-meta lens mtl
+        optparse-applicative parallel parsec process regex-posix safe split
+        stringsearch syb template-haskell template-haskell-ghcjs text time
+        transformers unordered-containers vector wl-pprint-text yaml
+      ];
+      executableHaskellDepends = [
+        aeson base binary bytestring Cabal containers directory
+        executable-path filepath ghc-api-ghcjs ghc-boot haddock-api-ghcjs
+        lens mtl optparse-applicative process shelly system-fileio
+        system-filepath tar terminfo text time transformers
+        transformers-compat unix unix-compat unordered-containers vector
+        yaml
+      ];
+      testHaskellDepends = [
+        aeson base bytestring data-default deepseq directory http-types
+        HUnit lens lifted-base network optparse-applicative process random
+        shelly system-fileio system-filepath test-framework
+        test-framework-hunit text time transformers unordered-containers
+        wai wai-app-static wai-extra wai-websockets warp webdriver
+        websockets yaml
+      ];
+      description = "Haskell to JavaScript compiler";
+      license = stdenv.lib.licenses.mit;
+    }) {};
+
+  ghc-api-ghcjs = callPackage
+    ({ mkDerivation, array, base, binary, bytestring, containers
+    , deepseq, directory, filepath, ghc-boot, ghc-boot-th, ghci-ghcjs
+    , hpc, process, stdenv, template-haskell-ghcjs, terminfo, time
+    , transformers, unix
+    }:
+    mkDerivation {
+      pname = "ghc-api-ghcjs";
+      version = "8.4.0";
+      src = configuredSrc + /lib/ghc-api-ghcjs;
+      libraryHaskellDepends = [
+        array base binary bytestring containers deepseq directory filepath
+        ghc-boot ghc-boot-th ghci-ghcjs hpc process template-haskell-ghcjs
+        terminfo time transformers unix
+      ];
+      homepage = "http://www.haskell.org/ghc/";
+      description = "The GHC API (customized for GHCJS)";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  ghci-ghcjs = callPackage
+    ({ mkDerivation, array, base, binary, bytestring, containers
+    , deepseq, filepath, ghc-boot, ghc-boot-th, stdenv
+    , template-haskell-ghcjs, transformers, unix
+    }:
+    mkDerivation {
+      pname = "ghci-ghcjs";
+      version = "8.4.0";
+      src = configuredSrc + /lib/ghci-ghcjs;
+      libraryHaskellDepends = [
+        array base binary bytestring containers deepseq filepath ghc-boot
+        ghc-boot-th template-haskell-ghcjs transformers unix
+      ];
+      description = "The library supporting GHC's interactive interpreter (customized for GHCJS)";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  ghcjs-th = callPackage
+    ({ mkDerivation, base, binary, bytestring, containers, ghc-prim
+    , ghci-ghcjs, stdenv, template-haskell-ghcjs
+    }:
+    mkDerivation {
+      pname = "ghcjs-th";
+      version = "0.1.0.0";
+      src = configuredSrc + /lib/ghcjs-th;
+      libraryHaskellDepends = [
+        base binary bytestring containers ghc-prim ghci-ghcjs
+        template-haskell-ghcjs
+      ];
+      homepage = "http://github.com/ghcjs";
+      license = stdenv.lib.licenses.mit;
+    }) {};
+
+  haddock-api-ghcjs = callPackage
+    ({ mkDerivation, array, base, bytestring, Cabal, containers, deepseq
+    , directory, filepath, ghc-api-ghcjs, ghc-boot, ghc-paths
+    , haddock-library-ghcjs, hspec, hspec-discover, QuickCheck, stdenv
+    , transformers, xhtml
+    }:
+    mkDerivation {
+      pname = "haddock-api-ghcjs";
+      version = "2.20.0";
+      src = configuredSrc + /lib/haddock-api-ghcjs;
+      enableSeparateDataOutput = true;
+      libraryHaskellDepends = [
+        array base bytestring Cabal containers deepseq directory filepath
+        ghc-api-ghcjs ghc-boot ghc-paths haddock-library-ghcjs transformers
+        xhtml
+      ];
+      testHaskellDepends = [
+        array base bytestring Cabal containers deepseq directory filepath
+        ghc-api-ghcjs ghc-boot ghc-paths haddock-library-ghcjs hspec
+        QuickCheck transformers xhtml
+      ];
+      testToolDepends = [ hspec-discover ];
+      homepage = "http://www.haskell.org/haddock/";
+      description = "A documentation-generation tool for Haskell libraries";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  haddock-library-ghcjs = callPackage
+    ({ mkDerivation, base, base-compat, bytestring, containers, deepseq
+    , directory, filepath, haddock-library, hspec, hspec-discover
+    , optparse-applicative, QuickCheck, stdenv, transformers, tree-diff
+    }:
+    mkDerivation {
+      pname = "haddock-library-ghcjs";
+      version = "1.6.0";
+      src = configuredSrc + /lib/haddock-library-ghcjs;
+      libraryHaskellDepends = [
+        base bytestring containers deepseq transformers
+      ];
+      testHaskellDepends = [
+        base base-compat bytestring containers deepseq directory filepath
+        haddock-library hspec optparse-applicative QuickCheck transformers
+        tree-diff
+      ];
+      testToolDepends = [ hspec-discover ];
+      homepage = "http://www.haskell.org/haddock/";
+      description = "Library exposing some functionality of Haddock";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  template-haskell-ghcjs = callPackage
+    ({ mkDerivation, base, ghc-boot-th, pretty, stdenv }:
+    mkDerivation {
+      pname = "template-haskell-ghcjs";
+      version = "2.13.0.0";
+      src = configuredSrc + /lib/template-haskell-ghcjs;
+      libraryHaskellDepends = [ base ghc-boot-th pretty ];
+      description = "Support library for Template Haskell (customized for GHCJS)";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+}
diff --git a/pkgs/development/compilers/ghcjs-ng/README.md b/pkgs/development/compilers/ghcjs-ng/README.md
new file mode 100644
index 000000000000..3e1598c83b05
--- /dev/null
+++ b/pkgs/development/compilers/ghcjs-ng/README.md
@@ -0,0 +1,20 @@
+New build system for GHCJS 8.2
+---
+
+`ghcjs-8.2` reworked the build system, and now comes with its own
+small package set of dependencies. This involves autogenerating
+several sources and cabal files, based on a GHC
+checkout. `callCabal2nix` is off limits, since we don't like "import
+from derivation" in nixpkgs. So there is a derivation that builds the
+nix expression that should be checked in whenever GHCJS is updated.
+
+Updating
+---
+
+```
+$ nix-prefetch-git https://github.com/ghcjs/ghcjs --rev refs/heads/ghc-8.2 \
+  | jq '{ url, rev, fetchSubmodules, sha256 }' \
+  > 8.2/git.json
+$ cat $(nix-build ../../../.. -A haskell.compiler.ghcjs82.genStage0 --no-out-link) > 8.2/stage0.nix
+```
+
diff --git a/pkgs/development/compilers/ghcjs-ng/common-overrides.nix b/pkgs/development/compilers/ghcjs-ng/common-overrides.nix
new file mode 100644
index 000000000000..a88e2c48d03e
--- /dev/null
+++ b/pkgs/development/compilers/ghcjs-ng/common-overrides.nix
@@ -0,0 +1,8 @@
+{ haskellLib, alex, happy }:
+
+let inherit (haskellLib) addBuildTools appendConfigureFlag dontHaddock doJailbreak;
+in self: super: {
+  ghc-api-ghcjs = addBuildTools super.ghc-api-ghcjs [alex happy];
+  ghcjs = dontHaddock (appendConfigureFlag (doJailbreak super.ghcjs) "-fno-wrapper-install");
+  haddock-library-ghcjs = dontHaddock super.haddock-library-ghcjs;
+}
diff --git a/pkgs/development/compilers/ghcjs-ng/configured-ghcjs-src.nix b/pkgs/development/compilers/ghcjs-ng/configured-ghcjs-src.nix
new file mode 100644
index 000000000000..e8c24b21134c
--- /dev/null
+++ b/pkgs/development/compilers/ghcjs-ng/configured-ghcjs-src.nix
@@ -0,0 +1,45 @@
+{ perl
+, autoconf
+, automake
+, python3
+, gcc
+, cabal-install
+, gmp
+, runCommand
+
+, ghc
+, happy
+, alex
+
+, ghcjsSrc
+}:
+
+runCommand "configured-ghcjs-src" {
+  buildInputs = [
+    perl
+    autoconf
+    automake
+    python3
+    gcc
+    ghc
+    happy
+    alex
+    cabal-install
+  ];
+  inherit ghcjsSrc;
+} ''
+  export HOME=$(pwd)
+  cp -r "$ghcjsSrc" "$out"
+  chmod -R +w "$out"
+  cd "$out"
+
+  # TODO: Find a better way to avoid impure version numbers
+  sed -i 's/RELEASE=NO/RELEASE=YES/' ghc/configure.ac
+
+  # TODO: How to actually fix this?
+  # Seems to work fine and produce the right files.
+  touch ghc/includes/ghcautoconf.h
+
+  patchShebangs .
+  ./utils/makePackages.sh copy
+''
diff --git a/pkgs/development/compilers/ghcjs-ng/default.nix b/pkgs/development/compilers/ghcjs-ng/default.nix
new file mode 100644
index 000000000000..035687a64f3a
--- /dev/null
+++ b/pkgs/development/compilers/ghcjs-ng/default.nix
@@ -0,0 +1,91 @@
+{ stdenv
+, callPackage
+, fetchgit
+, ghcjsSrcJson ? null
+, ghcjsSrc ? fetchgit (builtins.fromJSON (builtins.readFile ghcjsSrcJson))
+, bootPkgs
+, alex
+, happy
+, stage0
+, haskellLib
+, cabal-install
+, nodejs
+, makeWrapper
+, xorg
+, gmp
+, pkgconfig
+, lib
+, ghcjsDepOverrides ? (_:_:{})
+}:
+
+let
+  passthru = {
+    configuredSrc = callPackage ./configured-ghcjs-src.nix {
+      inherit ghcjsSrc alex happy;
+      inherit (bootPkgs) ghc;
+    };
+    genStage0 = callPackage ./mk-stage0.nix { inherit (passthru) configuredSrc; };
+    bootPkgs = bootPkgs.extend (lib.foldr lib.composeExtensions (_:_:{}) [
+      (self: _: import stage0 {
+        inherit (passthru) configuredSrc;
+        inherit (self) callPackage;
+      })
+
+      (callPackage ./common-overrides.nix { inherit haskellLib alex happy; })
+      ghcjsDepOverrides
+    ]);
+
+    targetPrefix = "";
+    inherit bootGhcjs;
+    inherit (bootGhcjs) version;
+    isGhcjs = true;
+
+    # Relics of the old GHCJS build system
+    stage1Packages = [];
+    mkStage2 = _: {};
+  };
+
+  bootGhcjs = haskellLib.justStaticExecutables passthru.bootPkgs.ghcjs;
+  libexec =
+    if builtins.compareVersions bootGhcjs.version "8.3" <= 0
+      then "${bootGhcjs}/bin"
+      else "${bootGhcjs}/libexec/${stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}";
+
+in stdenv.mkDerivation {
+    name = "ghcjs";
+    src = passthru.configuredSrc;
+    nativeBuildInputs = [
+      bootGhcjs
+      passthru.bootPkgs.ghc
+      cabal-install
+      nodejs
+      makeWrapper
+      xorg.lndir
+      gmp
+      pkgconfig
+    ];
+    phases = ["unpackPhase" "buildPhase"];
+    buildPhase = ''
+      export HOME=$TMP
+      cd lib/boot
+
+      mkdir -p $out/bin
+      mkdir -p $out/libexec
+      lndir ${libexec} $out/bin
+
+      wrapProgram $out/bin/ghcjs --add-flags "-B$out/libexec"
+      wrapProgram $out/bin/haddock-ghcjs --add-flags "-B$out/libexec"
+      wrapProgram $out/bin/ghcjs-pkg --add-flags "--global-package-db=$out/libexec/package.conf.d"
+
+      env PATH=$out/bin:$PATH $out/bin/ghcjs-boot -j1 --with-ghcjs-bin $out/bin
+    '';
+
+    # We hard code -j1 as a temporary workaround for
+    # https://github.com/ghcjs/ghcjs/issues/654
+    # enableParallelBuilding = true;
+
+    inherit passthru;
+
+    meta.platforms = passthru.bootPkgs.ghc.meta.platforms;
+  }
+
diff --git a/pkgs/development/compilers/ghcjs-ng/mk-stage0.nix b/pkgs/development/compilers/ghcjs-ng/mk-stage0.nix
new file mode 100644
index 000000000000..f45ebb4511d6
--- /dev/null
+++ b/pkgs/development/compilers/ghcjs-ng/mk-stage0.nix
@@ -0,0 +1,25 @@
+{ configuredSrc
+, runCommand
+, cabal2nix
+, yq
+}:
+
+runCommand "stage0.nix" {
+  buildInputs = [cabal2nix yq];
+} ''
+  (
+    printf '{ callPackage, configuredSrc }:\n\n{\n\n'
+    yq '.packages | .[]' ${configuredSrc}/stack.yaml -r | sed 's|^\.$|./.|' | sed 's|^\.||' | while read f; do
+      printf '  %s = callPackage\n' \
+        "$(find ${configuredSrc}/$f -name "*.cabal" -maxdepth 1 \
+          | xargs basename \
+          | sed 's/.cabal$//')"
+      printf '(%s) {};' \
+        "$(cabal2nix ${configuredSrc}/$f \
+          | sed 's|${configuredSrc}/|configuredSrc + |g')" \
+        | sed 's/^/    /'
+      printf '\n\n'
+    done
+    printf '}\n'
+  ) > $out
+''
diff --git a/pkgs/development/compilers/iasl/default.nix b/pkgs/development/compilers/iasl/default.nix
index 22f80ae559f7..6cf4c85fb200 100644
--- a/pkgs/development/compilers/iasl/default.nix
+++ b/pkgs/development/compilers/iasl/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "iasl-${version}";
-  version = "20180313";
+  version = "20180508";
 
   src = fetchurl {
     url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz";
-    sha256 = "05ab2xfv9wqwbzjaa9xqgrvvan87rxv29hw48h1gcckpc5smp2wm";
+    sha256 = "1n7lqmv77kg28drahvxzybwl9v4hzwi8i7xkpgliclfcp5ff909b";
   };
 
   NIX_CFLAGS_COMPILE = "-O3";
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
index 70624d1ed6a8..12fd59748307 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
@@ -105,6 +105,9 @@ self: super: {
   ## hspec-discover ==2.4.8
   hspec-discover = super.hspec-discover_2_5_0;
 
+  # https://github.com/jcristovao/enclosed-exceptions/issues/12
+  enclosed-exceptions = dontCheck super.enclosed-exceptions;
+
   ## On Hackage:
 
   ## Upstreamed, awaiting a Hackage release
@@ -450,7 +453,7 @@ self: super: {
   matrix = self.matrix_0_3_6_1;
   pandoc = self.pandoc_2_2;
   pandoc-types = self.pandoc-types_1_17_4_2;
-  wl-pprint-text = self.wl-pprint-text_1_1_1_1;
+  wl-pprint-text = self.wl-pprint-text_1_2_0_0;
   base-compat = self.base-compat_0_10_1;
 
   # https://github.com/xmonad/xmonad/issues/155
diff --git a/pkgs/development/haskell-modules/make-package-set.nix b/pkgs/development/haskell-modules/make-package-set.nix
index bde4f85f6784..bbc3d856ff2d 100644
--- a/pkgs/development/haskell-modules/make-package-set.nix
+++ b/pkgs/development/haskell-modules/make-package-set.nix
@@ -176,6 +176,7 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
     #   , source-overrides : Defaulted (Either Path VersionNumber)
     #   , overrides : Defaulted (HaskellPackageOverrideSet)
     #   , modifier : Defaulted
+    #   , returnShellEnv : Defaulted
     #   } -> NixShellAwareDerivation
     # Given a path to a haskell package directory whose cabal file is
     # named the same as the directory name, an optional set of
@@ -183,11 +184,19 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
     # function, an optional set of arbitrary overrides, and an optional
     # haskell package modifier,  return a derivation appropriate
     # for nix-build or nix-shell to build that package.
-    developPackage = { root, source-overrides ? {}, overrides ? self: super: {}, modifier ? drv: drv }:
-      let name = builtins.baseNameOf root;
-          drv =
-            (extensible-self.extend (pkgs.lib.composeExtensions (self.packageSourceOverrides source-overrides) overrides)).callCabal2nix name root {};
-      in if pkgs.lib.inNixShell then (modifier drv).env else modifier drv;
+    developPackage =
+      { root
+      , source-overrides ? {}
+      , overrides ? self: super: {}
+      , modifier ? drv: drv
+      , returnShellEnv ? pkgs.lib.inNixShell }:
+      let drv =
+        (extensible-self.extend
+           (pkgs.lib.composeExtensions
+              (self.packageSourceOverrides source-overrides)
+              overrides))
+        .callCabal2nix (builtins.baseNameOf root) root {};
+      in if returnShellEnv then (modifier drv).env else modifier drv;
 
     ghcWithPackages = selectFrom: withPackages (selectFrom self);
 
diff --git a/pkgs/development/interpreters/spidermonkey/52.nix b/pkgs/development/interpreters/spidermonkey/52.nix
index 35dcff95029d..4657a51e48f9 100644
--- a/pkgs/development/interpreters/spidermonkey/52.nix
+++ b/pkgs/development/interpreters/spidermonkey/52.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, fetchpatch, autoconf213, pkgconfig, perl, python2, zip, which, readline, icu, zlib, nspr }:
 
 let
-  version = "52.7.4";
+  version = "52.8.0";
 in stdenv.mkDerivation rec {
   name = "spidermonkey-${version}";
 
   src = fetchurl {
     url = "mirror://mozilla/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz";
-    sha256 = "0dn3hbc95qhvcgzbibhy17xwn5m0340f64bq5byvx22c2rf40xwz";
+    sha256 = "11v2wwgrb92z08dv9cvk5x2dj3xj25qxzbjqjgiq6mz91bzd9gms";
   };
 
   buildInputs = [ readline icu zlib nspr ];
diff --git a/pkgs/development/libraries/ace/default.nix b/pkgs/development/libraries/ace/default.nix
index d61315f7db85..e428b9a8c785 100644
--- a/pkgs/development/libraries/ace/default.nix
+++ b/pkgs/development/libraries/ace/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "ace-${version}";
-  version = "6.4.7";
+  version = "6.4.8";
 
   src = fetchurl {
     url = "http://download.dre.vanderbilt.edu/previous_versions/ACE-${version}.tar.bz2";
-    sha256 = "1zbncdxkkwnx4aphy0apnp7xn4aspxvq2h9bbjh33dpsy0j81afd";
+    sha256 = "190cyfs2najph2yycyj8abzddwa8s4wx8lx38iv237plwfl2308g";
   };
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/armadillo/default.nix b/pkgs/development/libraries/armadillo/default.nix
index 4c98bbc182c8..abf251f97f97 100644
--- a/pkgs/development/libraries/armadillo/default.nix
+++ b/pkgs/development/libraries/armadillo/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, cmake, openblasCompat, superlu, hdf5 }:
 
 stdenv.mkDerivation rec {
-  version = "8.500.0";
+  version = "8.500.1";
   name = "armadillo-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/arma/armadillo-${version}.tar.xz";
-    sha256 = "1wdvii5sncq3d8dh272s1n79mpcwzz437lyyfwy7gm7vbks6j77m";
+    sha256 = "0bm1g93yr79i74382pq1almakpyf42yipiqkqy742jyzwbxhxr5c";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/babl/default.nix b/pkgs/development/libraries/babl/default.nix
index 285f4dea802a..ac9056d1e033 100644
--- a/pkgs/development/libraries/babl/default.nix
+++ b/pkgs/development/libraries/babl/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "babl-0.1.46";
+  name = "babl-0.1.48";
 
   src = fetchurl {
     url = "http://ftp.gtk.org/pub/babl/0.1/${name}.tar.bz2";
-    sha256 = "0nwyhvfca6m35wjcccvwca7fcihzgdfyc012qi703y5d3cxl1hmv";
+    sha256 = "0596flzqzdlq4y6lsg34szh1ffgyccghp8y1k9h4d3jwymfd16xy";
   };
 
   doCheck = true;
diff --git a/pkgs/development/libraries/dyncall/default.nix b/pkgs/development/libraries/dyncall/default.nix
index b60f61299f32..704f5c51c9c9 100644
--- a/pkgs/development/libraries/dyncall/default.nix
+++ b/pkgs/development/libraries/dyncall/default.nix
@@ -10,12 +10,26 @@ stdenv.mkDerivation rec {
     sha256 = "d1b6d9753d67dcd4d9ea0708ed4a3018fb5bfc1eca5f37537fba2bc4f90748f2";
   };
 
-  doCheck = true;
-  checkTarget = "run-tests";
+  # XXX: broken tests, failures masked, lets avoid crashing a bunch for now :)
+  doCheck = false;
+
+  # install bits not automatically installed
+  postInstall = ''
+    # install cmake modules to make using dyncall easier
+    # This is essentially what -DINSTALL_CMAKE_MODULES=ON if using cmake build
+    # We don't use the cmake-based build since it installs different set of headers
+    # (mostly fewer headers, but installs dyncall_alloc_wx.h "instead" dyncall_alloc.h)
+    # and we'd have to patch the cmake module installation to not use CMAKE_ROOT anyway :).
+    install -D -t $out/lib/cmake ./buildsys/cmake/Modules/Find*.cmake
+
+    # manpages are nice, install them
+    # doing this is in the project's "ToDo", so check this when updating!
+    install -D -t $out/share/man/man3 ./*/*.3
+  '';
 
   meta = with stdenv.lib; {
     description = "Highly dynamic multi-platform foreign function call interface library";
-    homepage = http://dyncall.org;
+    homepage = http://www.dyncall.org;
     license = licenses.isc;
     maintainers = with maintainers; [ dtzWill ];
   };
diff --git a/pkgs/development/libraries/libu2f-host/default.nix b/pkgs/development/libraries/libu2f-host/default.nix
index 2def14b1c10e..675ca1cd220b 100644
--- a/pkgs/development/libraries/libu2f-host/default.nix
+++ b/pkgs/development/libraries/libu2f-host/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, json_c, hidapi }:
 
 stdenv.mkDerivation rec {
-  name = "libu2f-host-1.1.5";
+  name = "libu2f-host-1.1.6";
 
   src = fetchurl {
     url = "https://developers.yubico.com/libu2f-host/Releases/${name}.tar.xz";
-    sha256 = "159slvjfq4bqslx5amjkk90xnkiv3x0yzvbi54pl2vnzbr1p2azk";
+    sha256 = "19xxwwqfzg3njfpxvhlyxd05wjwsdw3m4lpn7gk31cna6agbp82d";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/libraries/libyaml/default.nix b/pkgs/development/libraries/libyaml/default.nix
index e441d1e6b615..20053190e3bc 100644
--- a/pkgs/development/libraries/libyaml/default.nix
+++ b/pkgs/development/libraries/libyaml/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
     homepage = http://pyyaml.org/;
     description = "A YAML 1.1 parser and emitter written in C";
     license = licenses.mit;
-    platforms = platforms.unix;
+    platforms = platforms.all;
     maintainers = with maintainers; [ wkennington ];
   };
 }
diff --git a/pkgs/development/libraries/oracle-instantclient/default.nix b/pkgs/development/libraries/oracle-instantclient/default.nix
index 1c629c137796..6ed3e584fa34 100644
--- a/pkgs/development/libraries/oracle-instantclient/default.nix
+++ b/pkgs/development/libraries/oracle-instantclient/default.nix
@@ -1,6 +1,4 @@
-{ stdenv, requireFile, libelf, gcc, glibc, patchelf, unzip, rpmextract, libaio
-, odbcSupport ? false, unixODBC
-}:
+{ stdenv, requireFile, glibc, patchelf, rpmextract, libaio, makeWrapper, odbcSupport ? false, unixODBC }:
 
 assert odbcSupport -> unixODBC != null;
 
@@ -34,9 +32,11 @@ in stdenv.mkDerivation rec {
   srcSqlplus = (requireSource version "1" "sqlplus" "303e82820a10f78e401e2b07d4eebf98b25029454d79f06c46e5f9a302ce5552");
   srcOdbc = optionalString odbcSupport (requireSource version "2" "odbc" "e870c84d2d4be6f77c0760083b82b7ffbb15a4bf5c93c4e6c84f36d6ed4dfdf1");
 
-  buildInputs = [ glibc patchelf rpmextract ] ++
+  buildInputs = [ glibc ] ++
     optional odbcSupport unixODBC;
 
+  nativeBuildInputs = [ rpmextract patchelf makeWrapper ];
+
   buildCommand = ''
     mkdir -p "${name}"
     cd "${name}"
@@ -66,10 +66,11 @@ in stdenv.mkDerivation rec {
                $lib
     done
 
-    for exe in $out/bin/sqlplus; do
+    for exe in $out/bin/{adrci,genezi,sqlplus}; do
       patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
                --force-rpath --set-rpath "$out/lib:${libaio}/lib" \
                $exe
+      wrapProgram $exe --prefix LD_LIBRARY_PATH ":" $out/lib
     done
   '';
 
diff --git a/pkgs/development/libraries/sqlite/sqlar.nix b/pkgs/development/libraries/sqlite/sqlar.nix
new file mode 100644
index 000000000000..734d68ca3d49
--- /dev/null
+++ b/pkgs/development/libraries/sqlite/sqlar.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, fuse, zlib }:
+
+stdenv.mkDerivation rec {
+  name = "sqlar-${version}";
+  version = "2018-01-07";
+
+  src = fetchurl {
+    url = "https://www.sqlite.org/sqlar/tarball/4824e73896/sqlar-src-4824e73896.tar.gz";
+    sha256 = "09pikkbp93gqypn3da9zi0dzc47jyypkwc9vnmfzhmw7kpyv8nm9";
+  };
+
+  buildInputs = [ fuse zlib ];
+
+  buildFlags = [ "sqlar" "sqlarfs" ];
+
+  installPhase = ''
+    install -D -t $out/bin sqlar sqlarfs
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://sqlite.org/sqlar;
+    description = "SQLite Archive utilities";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ dtzWill ];
+  };
+}
diff --git a/pkgs/development/mobile/androidenv/androidndk-pkgs.nix b/pkgs/development/mobile/androidenv/androidndk-pkgs.nix
index 663a1f1ee8f4..1323466ea865 100644
--- a/pkgs/development/mobile/androidenv/androidndk-pkgs.nix
+++ b/pkgs/development/mobile/androidenv/androidndk-pkgs.nix
@@ -98,10 +98,19 @@ rec {
   # We use androidndk from the previous stage, else we waste time or get cycles
   # cross-compiling packages to wrap incorrectly wrap binaries we don't include
   # anyways.
-  libraries = {
-    name = "bionic-prebuilt";
-    type = "derivation";
-    outPath = "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/";
-    drvPath = throw "fake derivation, build ${buildAndroidndk} to use";
-  };
+  libraries =
+    let
+      includePath = if buildAndroidndk.version == "10e" then
+          "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/include/"
+        else
+          "${buildAndroidndk}/libexec/${buildAndroidndk.name}/sysroot/usr/include";
+      libPath = "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/lib/";
+    in
+    runCommand "bionic-prebuilt" {} ''
+      mkdir -p $out
+      cp -r ${includePath} $out/include
+      chmod +w $out/include
+      ${lib.optionalString (lib.versionOlder buildAndroidndk.version "10e") "ln -s $out/include/${targetInfo.triple}/asm $out/include/asm"}
+      ln -s ${libPath} $out/lib
+    '';
 }
diff --git a/pkgs/development/mobile/androidenv/androidndk.nix b/pkgs/development/mobile/androidenv/androidndk.nix
index 2fe4005532d4..78e278be2376 100644
--- a/pkgs/development/mobile/androidenv/androidndk.nix
+++ b/pkgs/development/mobile/androidenv/androidndk.nix
@@ -1,21 +1,16 @@
 { stdenv, fetchurl, zlib, ncurses, p7zip, lib, makeWrapper
 , coreutils, file, findutils, gawk, gnugrep, gnused, jdk, which
-, platformTools
+, platformTools, python3, version, sha256
 }:
 
 stdenv.mkDerivation rec {
-  name = "android-ndk-r10e";
+  name = "android-ndk-r${version}";
+  inherit version;
 
-  src = if stdenv.system == "i686-linux"
-    then fetchurl {
-      url = "http://dl.google.com/android/ndk/${name}-linux-x86.bin";
-      sha256 = "1xbxra5v3bm6cmxyx8yyya5r93jh5m064aibgwd396xdm8jpvc4j";
-    }
-    else if stdenv.system == "x86_64-linux" then fetchurl {
-      url = "http://dl.google.com/android/ndk/${name}-linux-x86_64.bin";
-      sha256 = "0nhxixd0mq4ib176ya0hclnlbmhm8f2lab6i611kiwbzyqinfb8h";
-    }
-    else throw "platform ${stdenv.system} not supported!";
+  src = if stdenv.system == "x86_64-linux" then fetchurl {
+      url = "https://dl.google.com/android/repository/${name}-linux-x86_64.zip";
+      inherit sha256;
+    } else throw "platform ${stdenv.system} not supported!";
 
   phases = "buildPhase";
 
@@ -33,8 +28,7 @@ stdenv.mkDerivation rec {
     runtime_paths = (lib.makeBinPath [
       coreutils file findutils
       gawk gnugrep gnused
-      jdk
-      which
+      jdk python3 which
     ]) + ":${platformTools}/platform-tools";
   in ''
     set -x
@@ -44,9 +38,22 @@ stdenv.mkDerivation rec {
 
     # so that it doesn't fail because of read-only permissions set
     cd -
-    patch -p1 \
-        --no-backup-if-mismatch \
-        -d $out/libexec/${name} < ${ ./make-standalone-toolchain.patch }
+    ${if (version == "10e") then
+        ''
+          patch -p1 \
+            --no-backup-if-mismatch \
+            -d $out/libexec/${name} < ${ ./make-standalone-toolchain_r10e.patch }
+        ''
+      else
+        ''
+          patchShebangs ${pkg_path}/build/tools/make-standalone-toolchain.sh
+
+          patch -p1 \
+            --no-backup-if-mismatch \
+            -d $out/libexec/${name} < ${ ./. + builtins.toPath ("/make_standalone_toolchain.py_" + "${version}" + ".patch") }
+          wrapProgram ${pkg_path}/build/tools/make_standalone_toolchain.py --prefix PATH : "${runtime_paths}"
+        ''
+    }
     cd ${pkg_path}
 
     find $out \( \
@@ -55,29 +62,31 @@ stdenv.mkDerivation rec {
         \) -exec patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-*so.? \
                           --set-rpath ${stdenv.lib.makeLibraryPath [ zlib.out ncurses ]} {} \;
     # fix ineffective PROGDIR / MYNDKDIR determination
-    for i in ndk-build ndk-gdb ndk-gdb-py
+    for i in ndk-build ${lib.optionalString (version == "10e") "ndk-gdb ndk-gdb-py"}
     do
         sed -i -e ${sed_script_1} $i
     done
-    sed -i -e ${sed_script_2} ndk-which
-    # a bash script
-    patchShebangs ndk-which
+    ${lib.optionalString (version == "10e") ''
+      sed -i -e ${sed_script_2} ndk-which
+      # a bash script
+      patchShebangs ndk-which
+    ''}
     # wrap
-    for i in ndk-build ndk-gdb ndk-gdb-py ndk-which
+    for i in ndk-build ${lib.optionalString (version == "10e") "ndk-gdb ndk-gdb-py ndk-which"}
     do
         wrapProgram "$(pwd)/$i" --prefix PATH : "${runtime_paths}"
     done
     # make some executables available in PATH
     mkdir -pv ${bin_path}
     for i in \
-        ndk-build ndk-depends ndk-gdb ndk-gdb-py ndk-gdb.py ndk-stack ndk-which
+        ndk-build ${lib.optionalString (version == "10e") "ndk-depends ndk-gdb ndk-gdb-py ndk-gdb.py ndk-stack ndk-which"}
     do
         ln -sf ${pkg_path}/$i ${bin_path}/$i
     done
   '';
 
-    meta = {
-        platforms = stdenv.lib.platforms.linux;
-        hydraPlatforms = [];
-    };
+  meta = {
+    platforms = stdenv.lib.platforms.linux;
+    hydraPlatforms = [];
+  };
 }
diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix
index b77cc68fa0e8..3978ae1aeb7b 100644
--- a/pkgs/development/mobile/androidenv/default.nix
+++ b/pkgs/development/mobile/androidenv/default.nix
@@ -215,13 +215,37 @@ rec {
     useInstantApps = true;
   };
 
+  androidndk_10e = import ./androidndk.nix {
+    inherit (buildPackages)
+      p7zip makeWrapper;
+    inherit (pkgs)
+      stdenv fetchurl zlib ncurses lib python3
+      coreutils file findutils gawk gnugrep gnused jdk which;
+    inherit platformTools;
+    version = "10e";
+    sha256 = "032j3sgk93bjbkny84i17ph61dhjmsax9ddqng1zbi2p7dgl0pzf";
+  };
+
+  androidndk_16b = import ./androidndk.nix {
+    inherit (buildPackages)
+      p7zip makeWrapper;
+    inherit (pkgs)
+      stdenv fetchurl zlib ncurses lib python3
+      coreutils file findutils gawk gnugrep gnused jdk which;
+    inherit platformTools;
+    version = "16b";
+    sha256 = "00frcnvpcsngv00p6l2vxj4cwi2mwcm9lnjvm3zv4wrp6pss9pmw";
+  };
+
   androidndk = import ./androidndk.nix {
     inherit (buildPackages)
       p7zip makeWrapper;
     inherit (pkgs)
-      stdenv fetchurl zlib ncurses lib
+      stdenv fetchurl zlib ncurses lib python3
       coreutils file findutils gawk gnugrep gnused jdk which;
     inherit platformTools;
+    version = "17";
+    sha256 = "1jj3zy958zsidywqd5nwdyrnr72rf9zhippkl8rbqxfy8wxq2gds";
   };
 
   androidndk_r8e = import ./androidndk_r8e.nix {
@@ -257,4 +281,19 @@ rec {
     inherit androidndk;
     targetAndroidndkPkgs = targetPackages.androidenv.androidndkPkgs;
   };
+
+  androidndkPkgs_10e = import ./androidndk-pkgs.nix {
+    inherit (buildPackages)
+      makeWrapper;
+    inherit (pkgs)
+      lib hostPlatform targetPlatform
+      runCommand wrapBintoolsWith wrapCCWith;
+    # buildPackages.foo rather than buildPackages.buildPackages.foo would work,
+    # but for splicing messing up on infinite recursion for the variants we
+    # *dont't* use. Using this workaround, but also making a test to ensure
+    # these two really are the same.
+    buildAndroidndk = buildPackages.buildPackages.androidenv.androidndk_10e;
+    androidndk = androidndk_10e;
+    targetAndroidndkPkgs = targetPackages.androidenv.androidndkPkgs_10e;
+  };
 }
diff --git a/pkgs/development/mobile/androidenv/make-standalone-toolchain.patch b/pkgs/development/mobile/androidenv/make-standalone-toolchain_r10e.patch
index 5eeadbbd12da..5eeadbbd12da 100644
--- a/pkgs/development/mobile/androidenv/make-standalone-toolchain.patch
+++ b/pkgs/development/mobile/androidenv/make-standalone-toolchain_r10e.patch
diff --git a/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_16b.patch b/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_16b.patch
new file mode 100644
index 000000000000..70b1f7e7f4a5
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_16b.patch
@@ -0,0 +1,119 @@
+diff --git a/build/tools/make_standalone_toolchain.py b/build/tools/make_standalone_toolchain.py
+index a6ae8448..2739912e 100755
+--- a/build/tools/make_standalone_toolchain.py
++++ b/build/tools/make_standalone_toolchain.py
+@@ -398,7 +398,9 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
+                      sysroot_path, stl, host_tag):
+     """Create a standalone toolchain."""
+     copy_directory_contents(gcc_path, install_path)
++    os.system('chmod -R +w "{}"'.format(install_path))
+     copy_directory_contents(clang_path, install_path)
++    os.system('chmod -R +w "{}"'.format(install_path))
+     triple = get_triple(arch)
+     make_clang_scripts(
+         install_path, triple, api, host_tag.startswith('windows'))
+@@ -406,23 +408,28 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
+     sysroot = os.path.join(NDK_DIR, 'sysroot')
+     install_sysroot = os.path.join(install_path, 'sysroot')
+     shutil.copytree(sysroot, install_sysroot)
++    os.system('chmod -R +w "{}"'.format(install_path))
+ 
+     arch_headers = os.path.join(sysroot, 'usr/include', triple)
+     copy_directory_contents(
+         arch_headers, os.path.join(install_sysroot, 'usr/include'))
++    os.system('chmod -R +w "{}"'.format(install_path))
+ 
+     lib_path = os.path.join(sysroot_path, 'usr/lib')
+     lib_install = os.path.join(install_sysroot, 'usr/lib')
+     if os.path.exists(lib_path):
+         shutil.copytree(lib_path, lib_install)
++        os.system('chmod -R +w "{}"'.format(install_path))
+ 
+     lib64_path = os.path.join(sysroot_path, 'usr/lib64')
+     lib64_install = os.path.join(install_sysroot, 'usr/lib64')
+     if os.path.exists(lib64_path):
+         shutil.copytree(lib64_path, lib64_install)
++        os.system('chmod -R +w "{}"'.format(install_path))
+ 
+     prebuilt_path = os.path.join(NDK_DIR, 'prebuilt', host_tag)
+     copy_directory_contents(prebuilt_path, install_path)
++    os.system('chmod -R +w "{}"'.format(install_path))
+ 
+     toolchain_lib_dir = os.path.join(gcc_path, 'lib/gcc', triple)
+     dirs = os.listdir(toolchain_lib_dir)
+@@ -444,29 +451,37 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
+     if stl == 'gnustl':
+         gnustl_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/gnu-libstdc++/4.9')
+         shutil.copytree(os.path.join(gnustl_dir, 'include'), cxx_headers)
++        os.system('chmod -R +w "{}"'.format(install_path))
+ 
+         for abi in get_abis(arch):
+             copy_gnustl_abi_headers(gnustl_dir, install_path, gcc_ver, triple,
+                                     abi)
++            os.system('chmod -R +w "{}"'.format(install_path))
+             copy_gnustl_libs(gnustl_dir, install_path, triple, abi)
++            os.system('chmod -R +w "{}"'.format(install_path))
+             if arch == 'arm':
+                 copy_gnustl_abi_headers(gnustl_dir, install_path, gcc_ver,
+                                         triple, abi, thumb=True)
++                os.system('chmod -R +w "{}"'.format(install_path))
+                 copy_gnustl_libs(gnustl_dir, install_path, triple, abi,
+                                  thumb=True)
++                os.system('chmod -R +w "{}"'.format(install_path))
+     elif stl == 'libc++':
+         libcxx_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/llvm-libc++')
+         libcxxabi_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/llvm-libc++abi')
+         support_dir = os.path.join(NDK_DIR, 'sources/android/support')
+         copy_directory_contents(os.path.join(libcxx_dir, 'include'),
+                                 cxx_headers)
++        os.system('chmod -R +w "{}"'.format(install_path))
+         copy_directory_contents(os.path.join(support_dir, 'include'),
+                                 support_headers)
++        os.system('chmod -R +w "{}"'.format(install_path))
+ 
+         # I have no idea why we need this, but the old one does it too.
+         copy_directory_contents(
+             os.path.join(libcxxabi_dir, 'include'),
+             os.path.join(install_path, 'include/llvm-libc++abi/include'))
++        os.system('chmod -R +w "{}"'.format(install_path))
+ 
+         headers = [
+             'cxxabi.h',
+@@ -482,21 +497,25 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
+             dest_libdir = get_dest_libdir(install_path, triple, abi)
+             include_libunwind = arch == 'arm'
+             copy_libcxx_libs(src_libdir, dest_libdir, include_libunwind)
++            os.system('chmod -R +w "{}"'.format(install_path))
+             if arch == 'arm':
+                 thumb_libdir = os.path.join(dest_libdir, 'thumb')
+                 copy_libcxx_libs(src_libdir, thumb_libdir, include_libunwind)
++                os.system('chmod -R +w "{}"'.format(install_path))
+     elif stl == 'stlport':
+         stlport_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/stlport')
+         gabixx_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/gabi++')
+ 
+         copy_directory_contents(
+             os.path.join(stlport_dir, 'stlport'), cxx_headers)
++        os.system('chmod -R +w "{}"'.format(install_path))
+ 
+         # Same as for libc++. Not sure why we have this extra directory, but
+         # keep the cruft for diff.
+         copy_directory_contents(
+             os.path.join(gabixx_dir, 'include'),
+             os.path.join(install_path, 'include/gabi++/include'))
++        os.system('chmod -R +w "{}"'.format(install_path))
+ 
+         headers = [
+             'cxxabi.h',
+@@ -512,9 +531,11 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
+ 
+         for abi in get_abis(arch):
+             copy_stlport_libs(stlport_dir, install_path, triple, abi)
++            os.system('chmod -R +w "{}"'.format(install_path))
+             if arch == 'arm':
+                 copy_stlport_libs(stlport_dir, install_path, triple, abi,
+                                   thumb=True)
++                os.system('chmod -R +w "{}"'.format(install_path))
+     else:
+         raise ValueError(stl)
+ 
diff --git a/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_17.patch b/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_17.patch
new file mode 100644
index 000000000000..88ce69be3e8c
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_17.patch
@@ -0,0 +1,119 @@
+diff --git a/build/tools/make_standalone_toolchain.py b/build/tools/make_standalone_toolchain.py
+index daba3351..424b7fef 100755
+--- a/build/tools/make_standalone_toolchain.py
++++ b/build/tools/make_standalone_toolchain.py
+@@ -421,7 +421,9 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
+                      platforms_path, stl, host_tag):
+     """Create a standalone toolchain."""
+     copy_directory_contents(gcc_path, install_path)
++    os.system('chmod -R +w "{}"'.format(install_path))
+     copy_directory_contents(clang_path, install_path)
++    os.system('chmod -R +w "{}"'.format(install_path))
+     triple = get_triple(arch)
+     make_clang_scripts(
+         install_path, triple, api, host_tag.startswith('windows'))
+@@ -432,9 +434,11 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
+     install_headers = os.path.join(install_sysroot, 'usr/include')
+     os.makedirs(os.path.dirname(install_headers))
+     shutil.copytree(headers, install_headers)
++    os.system('chmod -R +w "{}"'.format(install_path))
+ 
+     arch_headers = os.path.join(sysroot, 'usr/include', triple)
+     copy_directory_contents(arch_headers, os.path.join(install_headers))
++    os.system('chmod -R +w "{}"'.format(install_path))
+ 
+     for lib_suffix in ('', '64'):
+         lib_path = os.path.join(platforms_path, 'usr/lib{}'.format(lib_suffix))
+@@ -442,20 +446,24 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
+             install_sysroot, 'usr/lib{}'.format(lib_suffix))
+         if os.path.exists(lib_path):
+             shutil.copytree(lib_path, lib_install)
++            os.system('chmod -R +w "{}"'.format(install_path))
+ 
+     static_lib_path = os.path.join(sysroot, 'usr/lib', triple)
+     static_lib_install = os.path.join(install_sysroot, 'usr/lib')
+     if arch == 'x86_64':
+         static_lib_install += '64'
+     copy_directory_contents(static_lib_path, static_lib_install)
++    os.system('chmod -R +w "{}"'.format(install_path))
+ 
+     prebuilt_path = os.path.join(NDK_DIR, 'prebuilt', host_tag)
+     copy_directory_contents(prebuilt_path, install_path)
++    os.system('chmod -R +w "{}"'.format(install_path))
+ 
+     gdbserver_path = os.path.join(
+         NDK_DIR, 'prebuilt', 'android-' + arch, 'gdbserver')
+     gdbserver_install = os.path.join(install_path, 'share', 'gdbserver')
+     shutil.copytree(gdbserver_path, gdbserver_install)
++    os.system('chmod -R +w "{}"'.format(install_path))
+ 
+     toolchain_lib_dir = os.path.join(gcc_path, 'lib/gcc', triple)
+     dirs = os.listdir(toolchain_lib_dir)
+@@ -481,26 +489,33 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
+         for abi in get_abis(arch):
+             copy_gnustl_abi_headers(gnustl_dir, install_path, gcc_ver, triple,
+                                     abi)
++            os.system('chmod -R +w "{}"'.format(install_path))
+             copy_gnustl_libs(gnustl_dir, install_path, triple, abi)
++            os.system('chmod -R +w "{}"'.format(install_path))
+             if arch == 'arm':
+                 copy_gnustl_abi_headers(gnustl_dir, install_path, gcc_ver,
+                                         triple, abi, thumb=True)
++                os.system('chmod -R +w "{}"'.format(install_path))
+                 copy_gnustl_libs(gnustl_dir, install_path, triple, abi,
+                                  thumb=True)
++                os.system('chmod -R +w "{}"'.format(install_path))
+     elif stl == 'libc++':
+         libcxx_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/llvm-libc++')
+         libcxxabi_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/llvm-libc++abi')
+         copy_directory_contents(os.path.join(libcxx_dir, 'include'),
+                                 cxx_headers)
++        os.system('chmod -R +w "{}"'.format(install_path))
+         if api < 21:
+             support_dir = os.path.join(NDK_DIR, 'sources/android/support')
+             copy_directory_contents(os.path.join(support_dir, 'include'),
+                                     support_headers)
++            os.system('chmod -R +w "{}"'.format(install_path))
+ 
+         # I have no idea why we need this, but the old one does it too.
+         copy_directory_contents(
+             os.path.join(libcxxabi_dir, 'include'),
+             os.path.join(install_path, 'include/llvm-libc++abi/include'))
++        os.system('chmod -R +w "{}"'.format(install_path))
+ 
+         headers = [
+             'cxxabi.h',
+@@ -515,21 +530,25 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
+             src_libdir = get_src_libdir(libcxx_dir, abi)
+             dest_libdir = get_dest_libdir(install_path, triple, abi)
+             copy_libcxx_libs(src_libdir, dest_libdir, abi, api)
++            os.system('chmod -R +w "{}"'.format(install_path))
+             if arch == 'arm':
+                 thumb_libdir = os.path.join(dest_libdir, 'thumb')
+                 copy_libcxx_libs(src_libdir, thumb_libdir, abi, api)
++                os.system('chmod -R +w "{}"'.format(install_path))
+     elif stl == 'stlport':
+         stlport_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/stlport')
+         gabixx_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/gabi++')
+ 
+         copy_directory_contents(
+             os.path.join(stlport_dir, 'stlport'), cxx_headers)
++        os.system('chmod -R +w "{}"'.format(install_path))
+ 
+         # Same as for libc++. Not sure why we have this extra directory, but
+         # keep the cruft for diff.
+         copy_directory_contents(
+             os.path.join(gabixx_dir, 'include'),
+             os.path.join(install_path, 'include/gabi++/include'))
++        os.system('chmod -R +w "{}"'.format(install_path))
+ 
+         headers = [
+             'cxxabi.h',
+@@ -548,6 +567,7 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
+             if arch == 'arm':
+                 copy_stlport_libs(stlport_dir, install_path, triple, abi,
+                                   thumb=True)
++                os.system('chmod -R +w "{}"'.format(install_path))
+     else:
+         raise ValueError(stl)
+ 
diff --git a/pkgs/development/node-packages/default-v6.nix b/pkgs/development/node-packages/default-v6.nix
index 2be09eb16324..97f759ef0cbe 100644
--- a/pkgs/development/node-packages/default-v6.nix
+++ b/pkgs/development/node-packages/default-v6.nix
@@ -59,6 +59,7 @@ nodePackages // {
 
   ios-deploy = nodePackages.ios-deploy.override (oldAttrs: {
     preRebuild = ''
+      LD=$CC
       tmp=$(mktemp -d)
       ln -s /usr/bin/xcodebuild $tmp
       export PATH="$PATH:$tmp"
diff --git a/pkgs/development/node-packages/default-v8.nix b/pkgs/development/node-packages/default-v8.nix
index ed0477a639a7..701648da2280 100644
--- a/pkgs/development/node-packages/default-v8.nix
+++ b/pkgs/development/node-packages/default-v8.nix
@@ -59,6 +59,7 @@ nodePackages // {
 
   ios-deploy = nodePackages.ios-deploy.override (oldAttrs: {
     preRebuild = ''
+      LD=$CC
       tmp=$(mktemp -d)
       ln -s /usr/bin/xcodebuild $tmp
       export PATH="$PATH:$tmp"
diff --git a/pkgs/development/python-modules/cx_oracle/0001-odpi-src-dpiOci.c-nixify-libclntsh.so-dlopen.patch b/pkgs/development/python-modules/cx_oracle/0001-odpi-src-dpiOci.c-nixify-libclntsh.so-dlopen.patch
new file mode 100644
index 000000000000..a2de7b248531
--- /dev/null
+++ b/pkgs/development/python-modules/cx_oracle/0001-odpi-src-dpiOci.c-nixify-libclntsh.so-dlopen.patch
@@ -0,0 +1,27 @@
+From 355b9d812efdfbd041e14b365258b69c81689981 Mon Sep 17 00:00:00 2001
+From: Florian Klink <flokli@flokli.de>
+Date: Thu, 17 May 2018 18:37:40 +0200
+Subject: [PATCH] odpi/src/dpiOci.c: nixify libclntsh.so dlopen
+
+---
+ odpi/src/dpiOci.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/odpi/src/dpiOci.c b/odpi/src/dpiOci.c
+index 76b9867..22c2987 100644
+--- a/odpi/src/dpiOci.c
++++ b/odpi/src/dpiOci.c
+@@ -1575,6 +1575,10 @@ static int dpiOci__loadLib(dpiError *error)
+             }
+         }
+     }
++    if(!dpiOciLibHandle) {
++        dpiOciLibHandle = dlopen("@libclntsh@", RTLD_LAZY);
++    }
++
+ #endif
+ 
+     if (!dpiOciLibHandle) {
+-- 
+2.16.3
+
diff --git a/pkgs/development/python-modules/cx_oracle/default.nix b/pkgs/development/python-modules/cx_oracle/default.nix
index f2e10caad726..717faf1128f0 100644
--- a/pkgs/development/python-modules/cx_oracle/default.nix
+++ b/pkgs/development/python-modules/cx_oracle/default.nix
@@ -2,7 +2,7 @@
 
 buildPythonPackage rec {
   pname = "cx_Oracle";
-  version = "6.2.1";
+  version = "6.3.1";
 
   buildInputs = [
     oracle-instantclient
@@ -10,10 +10,16 @@ buildPythonPackage rec {
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "01970bc843b3c699a7fd98af19e0401fe69abfbd2acdf464e0bf2ae06ea372b9";
+    sha256 = "0200j6jh80rpgzxmvgcxmkshaj4zadq32g2i97nlwiq3f7q374l7";
   };
 
-  # Check need an Oracle database to run  
+  patches = [ ./0001-odpi-src-dpiOci.c-nixify-libclntsh.so-dlopen.patch ];
+
+  postPatch = ''
+    substituteInPlace odpi/src/dpiOci.c --replace @libclntsh@ "${oracle-instantclient}/lib/libclntsh.so";
+  '';
+
+  # Check need an Oracle database to run
   doCheck = false;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/python-modules/docker-pycreds/default.nix b/pkgs/development/python-modules/docker-pycreds/default.nix
index 9cc510bf9af3..dd20400ea4f4 100644
--- a/pkgs/development/python-modules/docker-pycreds/default.nix
+++ b/pkgs/development/python-modules/docker-pycreds/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "docker-pycreds";
-  version = "0.2.2";
+  version = "0.2.3";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "c7ab85de2894baff6ee8f15160cbbfa2fd3a04e56f0372c5793d24060687b299";
+    sha256 = "e3732a03610a00461a716997670c7010bf1c214a3edc440f7d6a2a3a830ecd9d";
   };
 
   # require docker-credential-helpers binaries
diff --git a/pkgs/development/python-modules/hiro/default.nix b/pkgs/development/python-modules/hiro/default.nix
new file mode 100644
index 000000000000..0289c008e7e8
--- /dev/null
+++ b/pkgs/development/python-modules/hiro/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, buildPythonPackage, fetchPypi, six, mock }:
+buildPythonPackage rec {
+  pname = "hiro";
+  version = "0.1.4";
+  src = fetchPypi {
+    inherit pname version;
+
+    sha256 = "1340lhg7k522bqpz5iakl51qb47mjw804mfwwzm77i7qcm5cwiz8";
+  };
+
+  propagatedBuildInputs = [ six mock ];
+
+  meta = with stdenv.lib; {
+    description = "Time manipulation utilities for Python";
+    homepage = http://hiro.readthedocs.io/en/latest/;
+    license = licenses.mit;
+    maintainers = with maintainers; [ nyarly ];
+  };
+}
diff --git a/pkgs/development/python-modules/keyrings-alt/default.nix b/pkgs/development/python-modules/keyrings-alt/default.nix
new file mode 100644
index 000000000000..140d4297cda5
--- /dev/null
+++ b/pkgs/development/python-modules/keyrings-alt/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, buildPythonPackage, fetchPypi, six
+, pytest, unittest2, mock, keyring
+}:
+
+buildPythonPackage rec {
+  pname = "keyrings.alt";
+  version = "2.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "5cb9b6cdb5ce5e8216533e342d3e1b418ddd210466834061966d7dc1a4736f2d";
+  };
+  propagatedBuildInputs = [ six ];
+
+  # Fails with "ImportError: cannot import name mock"
+  doCheck = false;
+  checkInputs = [ pytest unittest2 mock keyring ];
+
+  meta = with stdenv.lib; {
+    license = licenses.mit;
+    description = "Alternate keyring implementations";
+    homepage = https://github.com/jaraco/keyrings.alt;
+    maintainers = with maintainers; [ nyarly ];
+  };
+}
diff --git a/pkgs/development/python-modules/mail-parser/default.nix b/pkgs/development/python-modules/mail-parser/default.nix
new file mode 100644
index 000000000000..e05dc3f2861f
--- /dev/null
+++ b/pkgs/development/python-modules/mail-parser/default.nix
@@ -0,0 +1,41 @@
+{ lib, buildPythonPackage, python, pythonOlder, glibcLocales, fetchFromGitHub, ipaddress, six, simplejson }:
+
+buildPythonPackage rec {
+  pname = "mail-parser";
+  version = "3.3.1";
+
+  # no tests in PyPI tarball
+  src = fetchFromGitHub {
+    owner = "SpamScope";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1b1v61zwgdx2xjzds3hp6bv53yq424hhlrhf445n4faj1l0c4lkg";
+  };
+
+  LC_ALL = "en_US.utf-8";
+
+  # ipaddress is part of the standard library of Python 3.3+
+  prePatch = lib.optionalString (!pythonOlder "3.3") ''
+    substituteInPlace requirements.txt \
+      --replace "ipaddress" ""
+  '';
+
+  nativeBuildInputs = [ glibcLocales ];
+  propagatedBuildInputs = [ simplejson six ] ++ lib.optional (pythonOlder "3.3") ipaddress;
+
+  # Taken from .travis.yml
+  checkPhase = ''
+    ${python.interpreter} tests/test_main.py
+    ${python.interpreter} -m mailparser -v
+    ${python.interpreter} -m mailparser -h
+    ${python.interpreter} -m mailparser -f tests/mails/mail_malformed_3 -j
+    cat tests/mails/mail_malformed_3 | ${python.interpreter} -m mailparser -k -j
+  '';
+
+  meta = with lib; {
+    description = "A mail parser for python 2 and 3";
+    homepage = https://github.com/SpamScope/mail-parser;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ psyanticy ];
+  };
+}
diff --git a/pkgs/development/python-modules/uranium/default.nix b/pkgs/development/python-modules/uranium/default.nix
index 774799f3b4d8..0917c5ab6eef 100644
--- a/pkgs/development/python-modules/uranium/default.nix
+++ b/pkgs/development/python-modules/uranium/default.nix
@@ -5,7 +5,7 @@ then throw "Uranium not supported for interpreter ${python.executable}"
 else
 
 stdenv.mkDerivation rec {
-  version = "3.2.1";
+  version = "3.3.0";
   pname = "uranium";
   name = "${pname}-${version}";
 
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     owner = "Ultimaker";
     repo = "Uranium";
     rev = version;
-    sha256 = "1p05iw1x3rvb51p6hj57yq6nsjawjba3pyyr4jx924iq96vcc3fz";
+    sha256 = "1rg0l2blndnbdfcgkjc2r29cnjdm009rz8lnc225ilh9d7w1srbb";
   };
 
   buildInputs = [ python gettext ];
diff --git a/pkgs/development/tools/gllvm/default.nix b/pkgs/development/tools/gllvm/default.nix
index 470ba291825a..6cf36e44dd1c 100644
--- a/pkgs/development/tools/gllvm/default.nix
+++ b/pkgs/development/tools/gllvm/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "gllvm-${version}";
-  version = "1.2.0";
+  version = "1.2.1";
 
   goPackagePath = "github.com/SRI-CSL/gllvm";
 
@@ -10,7 +10,7 @@ buildGoPackage rec {
     owner = "SRI-CSL";
     repo = "gllvm";
     rev = "v${version}";
-    sha256 = "0779828kzw9ihdnw5r3h2fzzd8ml8cskyf5hmaqqksinjb7bm3is";
+    sha256 = "1rbvn7qhzb7xxqv0wrkwxq4sm657vsl6q7nwrfq2zwb21573811z";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/tools/haskell/multi-ghc-travis/default.nix b/pkgs/development/tools/haskell/multi-ghc-travis/default.nix
index 454bb5d58817..2ba1d64675a6 100644
--- a/pkgs/development/tools/haskell/multi-ghc-travis/default.nix
+++ b/pkgs/development/tools/haskell/multi-ghc-travis/default.nix
@@ -8,8 +8,8 @@ mkDerivation {
   src = fetchFromGitHub {
     owner = "haskell-CI";
     repo = "haskell-ci";
-    rev = "105005cde6bde903e477e5b9724d02bdea06bae4";
-    sha256 = "1l76782aa29mi88a2brvkyi6k0v33rpihxlskx99mak06bjrmnhh";
+    rev = "b65ea5b35c59d1e7d0f89ff4e21840dc0e2ec3a0";
+    sha256 = "0qgsll772x24nnkarj30mplmvvwzz5vn5aadn5xzkcn77g5jiqmg";
   };
   isLibrary = true;
   isExecutable = true;
diff --git a/pkgs/development/tools/java/jhiccup/default.nix b/pkgs/development/tools/java/jhiccup/default.nix
index 03aa841dc7b2..39b573023376 100644
--- a/pkgs/development/tools/java/jhiccup/default.nix
+++ b/pkgs/development/tools/java/jhiccup/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "jhiccup-${version}";
-  version = "2.0.8";
+  version = "2.0.9";
 
   src = fetchzip {
     url    = "https://www.azul.com/files/jHiccup-${version}-dist.zip";
-    sha256 = "1q4wd5ywisgh0f4ic7iglxai0gc8mnl1pkjw1hm1xdij8j5i488g";
+    sha256 = "1y089kzj191j3vclkma4vi1w66pw4jqrnm5z0qw264wqcn0hnq11";
   };
 
   configurePhase = ":";
diff --git a/pkgs/development/tools/jira_cli/default.nix b/pkgs/development/tools/jira_cli/default.nix
new file mode 100644
index 000000000000..37b76c50e902
--- /dev/null
+++ b/pkgs/development/tools/jira_cli/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, libffi, openssl, pythonPackages }:
+let
+  inherit (pythonPackages) fetchPypi buildPythonApplication vcrpy mock hiro;
+in
+  buildPythonApplication rec {
+    pname = "jira-cli";
+    version = "2.2";
+    src = fetchPypi {
+      inherit pname version;
+      sha256 = "314118d5d851394ebf910122fd7ce871f63581393968c71456441eb56be3b112";
+    };
+
+    postPatch = ''
+      substituteInPlace requirements/main.txt --replace "argparse" ""
+    '';
+
+    # Tests rely on VCR cassettes being written during tests. R/O nix store prevents this.
+    doCheck = false;
+    checkInputs = with pythonPackages; [ vcrpy mock hiro ];
+    buildInputs = [ libffi openssl ];
+    propagatedBuildInputs = with pythonPackages; [
+      argparse ordereddict requests six suds-jurko termcolor keyring
+      jira  keyrings-alt
+    ];
+
+    meta = with stdenv.lib; {
+      description = "A command line interface to Jira";
+      homepage = http://github.com/alisaifee/jira-cli;
+      maintainers = with maintainers; [ nyarly ];
+      license = licenses.mit;
+    };
+  }
diff --git a/pkgs/development/tools/wllvm/default.nix b/pkgs/development/tools/wllvm/default.nix
index 399a8e66860b..8fa7574f3110 100644
--- a/pkgs/development/tools/wllvm/default.nix
+++ b/pkgs/development/tools/wllvm/default.nix
@@ -1,20 +1,20 @@
 { stdenv, python3Packages }:
 
 python3Packages.buildPythonApplication rec {
-  version = "1.2.0";
+  version = "1.2.1";
   pname = "wllvm";
   name = "${pname}-${version}";
 
   src = python3Packages.fetchPypi {
     inherit pname version;
-    sha256 = "1hriyv5gfkcxjqk71l3030qfy3scsjr3mp12hkxfknh65inlqs5z";
+    sha256 = "1yr0gijhgbxx1sl5a8dygr3a8g5wfkh9rk4v789r2aplvcbanv5a";
   };
 
   meta = with stdenv.lib; {
     homepage = https://github.com/travitch/whole-program-llvm;
     description = "A wrapper script to build whole-program LLVM bitcode files";
     license = licenses.mit;
-    maintainers = with maintainers; [ mic92 ];
+    maintainers = with maintainers; [ mic92 dtzWill ];
     platforms = platforms.all;
   };
 }
diff --git a/pkgs/development/tools/xqilla/default.nix b/pkgs/development/tools/xqilla/default.nix
index 77bf313e83dc..c163c4cbcf69 100644
--- a/pkgs/development/tools/xqilla/default.nix
+++ b/pkgs/development/tools/xqilla/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name    = "xqilla-${version}";
-  version = "2.3.3";
+  version = "2.3.4";
 
   src = fetchurl {
     url    = "mirror://sourceforge/xqilla/XQilla-${version}.tar.gz";
-    sha256 = "1mjgcyar3qyizpnb0h9lxaj6p9yq4vj09qd8qan1bwv6z6sbjxlg";
+    sha256 = "0m9z7diw7pdyb4qycbqyr2x55s13v8310xsi7yz0inpw27q4vzdd";
   };
 
   configureFlags = [ "--with-xerces=${xercesc}" ];
diff --git a/pkgs/games/pacvim/default.nix b/pkgs/games/pacvim/default.nix
new file mode 100644
index 000000000000..59e7c874d141
--- /dev/null
+++ b/pkgs/games/pacvim/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, ncurses }:
+
+stdenv.mkDerivation rec {
+  name = "pacvim-${version}";
+  version = "2018-05-16";
+  src = fetchFromGitHub {
+    owner = "jmoon018";
+    repo = "PacVim";
+    rev = "ca7c8833c22c5fe97974ba5247ef1fcc00cedb8e";
+    sha256 = "1kq6j7xmsl5qfl1246lyglkb2rs9mnb2rhsdrp18965dpbj2mhx2";
+  };
+
+  buildInputs = [ ncurses ];
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/jmoon018/PacVim";
+    description = "PacVim is a game that teaches you vim commands.";
+    maintainers = with maintainers; [ infinisil ];
+    license = licenses.lgpl3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/games/tcl2048/default.nix b/pkgs/games/tcl2048/default.nix
index d1517a2ec619..48fa0a3b5181 100644
--- a/pkgs/games/tcl2048/default.nix
+++ b/pkgs/games/tcl2048/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, tcl, tcllib }:
 
 stdenv.mkDerivation {
-  name = "tcl2048-0.3.1";
+  name = "tcl2048-0.4.0";
 
   src = fetchurl {
-    url = https://raw.githubusercontent.com/dbohdan/2048-tcl/v0.3.1/2048.tcl;
-    sha256 = "44e325328784c4e91cecc0a9cc00e32d733da713adf2fad1c081542f38af3361";
+    url = https://raw.githubusercontent.com/dbohdan/2048.tcl/v0.4.0/2048.tcl;
+    sha256 = "53f5503efd7f029b2614b0f9b1e3aac6c0342735a3c9b811d74a5135fee3e89e";
   };
 
   phases = "installPhase";
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
   '';
 
   meta = {
-    homepage = https://github.com/dbohdan/2048-tcl;
+    homepage = https://github.com/dbohdan/2048.tcl;
     description = "The game of 2048 implemented in Tcl";
     license = stdenv.lib.licenses.mit;
     platforms = stdenv.lib.platforms.all;
diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix
index e06460994150..0ff6f3f041e2 100644
--- a/pkgs/misc/emulators/wine/base.nix
+++ b/pkgs/misc/emulators/wine/base.nix
@@ -6,8 +6,6 @@
   buildScript ? null, configureFlags ? ""
 }:
 
-assert stdenv.cc.cc.isGNU or false;
-
 with import ./util.nix { inherit lib; };
 
 stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
@@ -54,9 +52,14 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
   ++ lib.optionals xmlSupport    [ pkgs.libxml2 pkgs.libxslt ]
   ++ lib.optionals tlsSupport    [ pkgs.openssl pkgs.gnutls ]
   ++ lib.optionals openglSupport [ pkgs.libGLU_combined pkgs.mesa_noglu.osmesa pkgs.libdrm ]
-  ++ (with pkgs.xorg; [
-    libX11  libXi libXcursor libXrandr libXrender libXxf86vm libXcomposite libXext
-  ])));
+  ++ lib.optionals stdenv.isDarwin (with pkgs.buildPackages.darwin.apple_sdk.frameworks; [
+     CoreServices Foundation ForceFeedback AppKit OpenGL IOKit DiskArbitration Security
+     ApplicationServices AudioToolbox CoreAudio AudioUnit CoreMIDI OpenAL OpenCL Cocoa Carbon
+  ])
+  ++ lib.optionals stdenv.isLinux  (with pkgs.xorg; [
+     libXi libXcursor libXrandr libXrender libXxf86vm libXcomposite libXext
+  ])
+  ++ [ pkgs.xorg.libX11 ]));
 
   # Wine locates a lot of libraries dynamically through dlopen().  Add
   # them to the RPATH so that the user doesn't have to set them in
@@ -105,7 +108,8 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
 
   # https://bugs.winehq.org/show_bug.cgi?id=43530
   # https://github.com/NixOS/nixpkgs/issues/31989
-  hardeningDisable = [ "bindnow" ];
+  hardeningDisable = [ "bindnow" ]
+    ++ lib.optional (stdenv.hostPlatform.isDarwin) "fortify";
 
   passthru = { inherit pkgArches; };
   meta = {
diff --git a/pkgs/misc/emulators/wine/packages.nix b/pkgs/misc/emulators/wine/packages.nix
index a786babc79de..d2305aa37ba6 100644
--- a/pkgs/misc/emulators/wine/packages.nix
+++ b/pkgs/misc/emulators/wine/packages.nix
@@ -20,7 +20,7 @@ in with src; {
     geckos = [ gecko64 ];
     monos =  [ mono ];
     configureFlags = [ "--enable-win64" ];
-    platforms = [ "x86_64-linux" ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
   };
   wineWow = callPackage ./base.nix {
     name = "wine-wow-${version}";
diff --git a/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
index d9b3dfb74049..3cee697366bb 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
@@ -1,14 +1,18 @@
 { stdenv, appleDerivation }:
 
 appleDerivation {
-  preConfigure = "cd libiconv";
+  preConfigure = "cd libiconv"
+    + stdenv.lib.optionalString stdenv.hostPlatform.isiOS ''
+
+      sed -i 's/darwin\*/ios\*/g' configure libcharset/configure
+    '';
 
   postInstall = ''
     mv $out/lib/libiconv.dylib $out/lib/libiconv-nocharset.dylib
-    install_name_tool -id $out/lib/libiconv-nocharset.dylib $out/lib/libiconv-nocharset.dylib
+    ${stdenv.cc.bintools.targetPrefix}install_name_tool -id $out/lib/libiconv-nocharset.dylib $out/lib/libiconv-nocharset.dylib
 
     # re-export one useless symbol; ld will reject a dylib that only reexports other dylibs
-    echo 'void dont_use_this(){}' | clang -dynamiclib -x c - -current_version 2.4.0 \
+    echo 'void dont_use_this(){}' | ${stdenv.cc.bintools.targetPrefix}clang -dynamiclib -x c - -current_version 2.4.0 \
       -compatibility_version 7.0.0 -current_version 7.0.0 -o $out/lib/libiconv.dylib \
       -Wl,-reexport_library -Wl,$out/lib/libiconv-nocharset.dylib \
       -Wl,-reexport_library -Wl,$out/lib/libcharset.dylib
diff --git a/pkgs/os-specific/linux/firejail/default.nix b/pkgs/os-specific/linux/firejail/default.nix
index 1c7ebce9f877..9f2374e75a88 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.52";
+    version="0.9.54";
     name="${baseName}-${version}";
-    hash="0w8l8z4j7iph8fp7rchhnfsrik3f00f9v5xr191fp38fphzcj56s";
-    url="https://vorboss.dl.sourceforge.net/project/firejail/firejail/firejail-0.9.52.tar.xz";
-    sha256="0w8l8z4j7iph8fp7rchhnfsrik3f00f9v5xr191fp38fphzcj56s";
+    hash="0mkpqlhi1vxiwd1pmlsk02vpydy1gj61k1gi3zlz6qw84xa6i6ff";
+    url="https://vorboss.dl.sourceforge.net/project/firejail/firejail/firejail-0.9.54.tar.xz";
+    sha256="0mkpqlhi1vxiwd1pmlsk02vpydy1gj61k1gi3zlz6qw84xa6i6ff";
   };
   buildInputs = [
     which
diff --git a/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix b/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix
index a1c93e565905..8054ba0be6ac 100644
--- a/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix
+++ b/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix
@@ -3,9 +3,9 @@
 with stdenv.lib;
 
 let
-  version = "4.14.39";
+  version = "4.14.41";
   revision = "a";
-  sha256 = "19nx537a8kbbyp5d67anrqfw8i8hliw3yb1gyrf70isl3fqifjaa";
+  sha256 = "16jwv1drs6xlwghzn8ps7v8x5xja61b5y6747c86g17idfaac1k3";
 
   # modVersion needs to be x.y.z, will automatically add .0 if needed
   modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));
diff --git a/pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix b/pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix
index 9d4b729060ae..5c65f2064b42 100644
--- a/pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix
+++ b/pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix
@@ -3,9 +3,9 @@
 with stdenv.lib;
 
 let
-  version = "4.16.7";
+  version = "4.16.9";
   revision = "a";
-  sha256 = "1kdy3sqrn161hm5avhk3nd75p07a21ja0rzar3ybibh1bl2mc6zq";
+  sha256 = "1g1924whb79cflh4wcqpyq9d7nfxdsvsjh2mv5ps85fsg2109kpl";
 
   # modVersion needs to be x.y.z, will automatically add .0 if needed
   modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));
diff --git a/pkgs/os-specific/linux/lsscsi/default.nix b/pkgs/os-specific/linux/lsscsi/default.nix
index 084a7e7c9a3b..d250d658282f 100644
--- a/pkgs/os-specific/linux/lsscsi/default.nix
+++ b/pkgs/os-specific/linux/lsscsi/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation {
-  name = "lsscsi-0.28";
+  name = "lsscsi-0.29";
 
   src = fetchurl {
-    url = "http://sg.danny.cz/scsi/lsscsi-0.28.tgz";
-    sha256 = "0l6xz8545lnfd9f4z974ar1pbzfdkr6c8r56zjrcaazl3ad00p82";
+    url = "http://sg.danny.cz/scsi/lsscsi-0.29.tgz";
+    sha256 = "0538fjgxky03yn7mzyslkyi2af3yy5llsnjjcgjx73x08wd6hv5n";
   };
 
   preConfigure = ''
diff --git a/pkgs/os-specific/linux/pam_u2f/default.nix b/pkgs/os-specific/linux/pam_u2f/default.nix
index 5cc235c3104a..58e3f79d42b2 100644
--- a/pkgs/os-specific/linux/pam_u2f/default.nix
+++ b/pkgs/os-specific/linux/pam_u2f/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name    = "pam_u2f-${version}";
-  version = "1.0.6";
+  version = "1.0.7";
 
   src     = fetchurl {
     url = "https://developers.yubico.com/pam-u2f/Releases/${name}.tar.gz";
-    sha256 = "0fpdb49596zywnbx1cfcx1k83rbs1ylhi1cnn25pq9d3b92hj50h";
+    sha256 = "1kz7d3vr5dag1d5zq14kcp887p5d0q079dy1sqyl8ndi567asjh3";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/os-specific/linux/usbutils/default.nix b/pkgs/os-specific/linux/usbutils/default.nix
index 31e4a3dd26f6..adb2a0ee2fb1 100644
--- a/pkgs/os-specific/linux/usbutils/default.nix
+++ b/pkgs/os-specific/linux/usbutils/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, libusb1, hwdata }:
 
 stdenv.mkDerivation rec {
-  name = "usbutils-009";
+  name = "usbutils-010";
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/usb/usbutils/${name}.tar.xz";
-    sha256 = "0q3iavmak2bs9xw486w4xfbjl0hbzii93ssgpr95mxmm9kjz1gwb";
+    sha256 = "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/os-specific/linux/wireguard/default.nix b/pkgs/os-specific/linux/wireguard/default.nix
index 6e3e444240ac..c5daaabd5be8 100644
--- a/pkgs/os-specific/linux/wireguard/default.nix
+++ b/pkgs/os-specific/linux/wireguard/default.nix
@@ -6,11 +6,11 @@ assert kernel != null -> stdenv.lib.versionAtLeast kernel.version "3.10";
 let
   name = "wireguard-${version}";
 
-  version = "0.0.20180420";
+  version = "0.0.20180514";
 
   src = fetchurl {
     url    = "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${version}.tar.xz";
-    sha256 = "05nsn5pkzvkfsc8z0mm4fdb1znklpmb00v608j8gxlz8z6nd535m";
+    sha256 = "1nk6yj1gdmpar99zzw39n1v795m6fxsrilg37d02jm780rgbd5g8";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/servers/apache-kafka/default.nix b/pkgs/servers/apache-kafka/default.nix
index 152e60455746..fe67bdd0282c 100644
--- a/pkgs/servers/apache-kafka/default.nix
+++ b/pkgs/servers/apache-kafka/default.nix
@@ -19,9 +19,14 @@ let
       sha256 = "1wj639h95aq5n132fq1rbyzqh5rsa4mlhbg3c5mszqglnzdz4xn7";
     };
     "1.0" = {
-      kafkaVersion = "1.0.0";
+      kafkaVersion = "1.0.1";
       scalaVersion = "2.12";
-      sha256 = "1cs4nmp39m99gqjpy5klsffqksc0h9pz514jkq99qb95a83x1cfm";
+      sha256 = "1fxn6i0kanwksj1dhcnlni0cn542k50wdg8jkwhfmf4qq8yfl90m";
+    };
+    "1.1" = {
+      kafkaVersion = "1.1.0";
+      scalaVersion = "2.12";
+      sha256 = "04idhsr6pbkb0xkx38faxv2pn5nkjcflz6wl4s3ka82h1fbq74j9";
     };
   };
 in
diff --git a/pkgs/servers/dns/knot-dns/default.nix b/pkgs/servers/dns/knot-dns/default.nix
index 88fa07009f83..5fe7a8608c59 100644
--- a/pkgs/servers/dns/knot-dns/default.nix
+++ b/pkgs/servers/dns/knot-dns/default.nix
@@ -7,11 +7,11 @@ let inherit (stdenv.lib) optional optionals; in
 # Note: ATM only the libraries have been tested in nixpkgs.
 stdenv.mkDerivation rec {
   name = "knot-dns-${version}";
-  version = "2.6.6";
+  version = "2.6.7";
 
   src = fetchurl {
     url = "http://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz";
-    sha256 = "02h8qdkja4kic3br79svws6r2pq1ijz945238v99d998d2jxh6ci";
+    sha256 = "1c2a004b05c161f7b36d5eeccebd9d4cdf60aa09930a7cc766514e468ca92243";
   };
 
   outputs = [ "bin" "out" "dev" ];
diff --git a/pkgs/servers/dns/nsd/default.nix b/pkgs/servers/dns/nsd/default.nix
index b4bd6175f3e7..c1c0d4e425c2 100644
--- a/pkgs/servers/dns/nsd/default.nix
+++ b/pkgs/servers/dns/nsd/default.nix
@@ -15,11 +15,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "nsd-4.1.20";
+  name = "nsd-4.1.21";
 
   src = fetchurl {
     url = "http://www.nlnetlabs.nl/downloads/nsd/${name}.tar.gz";
-    sha256 = "04zph9zli3a0zx1sfphwbxx6f8whdxcjai6w0k7a565vgcfzd5wa";
+    sha256 = "1gfjdgb5nc0nrbpdm36ngxml302khl2lnwkykl3q45byl0sbjn3q";
   };
 
   prePatch = ''
diff --git a/pkgs/servers/http/lighttpd/default.nix b/pkgs/servers/http/lighttpd/default.nix
index 7bf1b1ffa646..31b3449d5f64 100644
--- a/pkgs/servers/http/lighttpd/default.nix
+++ b/pkgs/servers/http/lighttpd/default.nix
@@ -2,11 +2,14 @@
 , openssl, enableMagnet ? false, lua5_1 ? null
 , enableMysql ? false, mysql ? null
 , enableLdap ? false, openldap ? null
+, enableWebDAV ? true, sqlite ? null, libuuid ? null
 }:
 
 assert enableMagnet -> lua5_1 != null;
 assert enableMysql -> mysql != null;
 assert enableLdap -> openldap != null;
+assert enableWebDAV -> sqlite != null;
+assert enableWebDAV -> libuuid != null;
 
 stdenv.mkDerivation rec {
   name = "lighttpd-1.4.49";
@@ -20,12 +23,16 @@ stdenv.mkDerivation rec {
   buildInputs = [ pcre libxml2 zlib attr bzip2 which file openssl ]
              ++ stdenv.lib.optional enableMagnet lua5_1
              ++ stdenv.lib.optional enableMysql mysql.connector-c
-             ++ stdenv.lib.optional enableLdap openldap;
+             ++ stdenv.lib.optional enableLdap openldap
+             ++ stdenv.lib.optional enableWebDAV sqlite
+             ++ stdenv.lib.optional enableWebDAV libuuid;
 
   configureFlags = [ "--with-openssl" ]
                 ++ stdenv.lib.optional enableMagnet "--with-lua"
                 ++ stdenv.lib.optional enableMysql "--with-mysql"
-                ++ stdenv.lib.optional enableLdap "--with-ldap";
+                ++ stdenv.lib.optional enableLdap "--with-ldap"
+                ++ stdenv.lib.optional enableWebDAV "--with-webdav-props"
+                ++ stdenv.lib.optional enableWebDAV "--with-webdav-locks";
 
   preConfigure = ''
     sed -i "s:/usr/bin/file:${file}/bin/file:g" configure
diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix
index 093f5f0e5027..252e1a97dfdb 100644
--- a/pkgs/servers/http/openresty/default.nix
+++ b/pkgs/servers/http/openresty/default.nix
@@ -5,11 +5,11 @@ with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "openresty-${version}";
-  version = "1.13.6.1";
+  version = "1.13.6.2";
 
   src = fetchurl {
     url = "http://openresty.org/download/openresty-${version}.tar.gz";
-    sha256 = "0sv93nw1j597mdpnibmgaa3nnghdk0z6k27vavm8w2c1z9n6w96i";
+    sha256 = "0hi9zw4344a4i636g3nbnnlm8qbnq37f50irhd1xncih4xc1jvll";
   };
 
   buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip postgresql ];
diff --git a/pkgs/servers/mattermost/default.nix b/pkgs/servers/mattermost/default.nix
index 936e457eb336..9943c0b9ab03 100644
--- a/pkgs/servers/mattermost/default.nix
+++ b/pkgs/servers/mattermost/default.nix
@@ -1,49 +1,61 @@
-{ stdenv, fetchurl, fetchFromGitHub, buildGoPackage }:
+{ stdenv, fetchurl, fetchFromGitHub, buildGoPackage, buildEnv }:
 
 let
-  version = "4.8.0";
-  goPackagePath = "github.com/mattermost/mattermost-server";
-  buildFlags = "-ldflags \"-X '${goPackagePath}/model.BuildNumber=nixpkgs-${version}'\"";
-in
+  version = "4.10.0";
 
-buildGoPackage rec {
-  name = "mattermost-${version}";
+  mattermost-server = buildGoPackage rec {
+    name = "mattermost-server-${version}";
 
-  src = fetchFromGitHub {
-    owner = "mattermost";
-    repo = "mattermost-server";
-    rev = "v${version}";
-    sha256 = "16yf4p0n3klgh0zw2ikbahj9cy1wcxbwg86pld0yz63cfvfz5ns4";
-  };
+    src = fetchFromGitHub {
+      owner = "mattermost";
+      repo = "mattermost-server";
+      rev = "v${version}";
+      sha256 = "02isw8qapp35pgriy4w1ar1ppvgc5a10j550hjbc1mylnhzkg1jf";
+    };
+
+    goPackagePath = "github.com/mattermost/mattermost-server";
+
+    buildFlagsArray = ''
+      -ldflags=
+        -X ${goPackagePath}/model.BuildNumber=nixpkgs-${version}
+    '';
+
+    postInstall = ''
+      ln -s $bin/bin/mattermost-server $bin/bin/platform
+      ln -s $bin/bin/mattermost-server $bin/bin/mattermost-platform
+    '';
 
-  webApp = fetchurl {
-    url = "https://releases.mattermost.com/${version}/mattermost-team-${version}-linux-amd64.tar.gz";
-    sha256 = "0ykp9apsv2514bircgay0xi0jigiai65cnb8q77v1qxjzdyx8s75";
   };
 
-  inherit goPackagePath;
-
-  buildPhase = ''
-    runHook preBuild
-    cd go/src/${goPackagePath}/cmd/platform
-    go install ${buildFlags}
-    runHook postBuild
-  '';
-
-  preInstall = ''
-    mkdir -p $bin
-    tar --strip 1 -C $bin -xf $webApp
-  '';
-
-  postInstall = ''
-    ln -s $bin/bin/platform $bin/bin/mattermost-platform
-  '';
-
-  meta = with stdenv.lib; {
-    description = "Open-source, self-hosted Slack-alternative";
-    homepage = https://www.mattermost.org;
-    license = with licenses; [ agpl3 asl20 ];
-    maintainers = with maintainers; [ fpletz ryantm ];
-    platforms = platforms.unix;
+  mattermost-webapp = stdenv.mkDerivation {
+    name = "mattermost-webapp-${version}";
+
+    src = fetchurl {
+      url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
+      sha256 = "0pfj2dxl4qrv4w6yj0385nw0fa4flcg95kkahs0arwhan5bgifl5";
+    };
+
+    installPhase = ''
+      mkdir -p $out
+      tar --strip 1 --directory $out -xf $src \
+        mattermost/client \
+        mattermost/i18n \
+        mattermost/fonts \
+        mattermost/templates \
+        mattermost/config
+    '';
   };
-}
+
+in
+  buildEnv {
+    name = "mattermost-${version}";
+    paths = [ mattermost-server mattermost-webapp ];
+
+    meta = with stdenv.lib; {
+      description = "Open-source, self-hosted Slack-alternative";
+      homepage = https://www.mattermost.org;
+      license = with licenses; [ agpl3 asl20 ];
+      maintainers = with maintainers; [ fpletz ryantm ];
+      platforms = platforms.unix;
+    };
+  }
diff --git a/pkgs/servers/minio/default.nix b/pkgs/servers/minio/default.nix
index 786a188bbfd8..7f590461d9de 100644
--- a/pkgs/servers/minio/default.nix
+++ b/pkgs/servers/minio/default.nix
@@ -3,13 +3,13 @@
 buildGoPackage rec {
   name = "minio-${version}";
 
-  version = "2018-03-30T00-38-44Z";
+  version = "2018-05-11T00-29-24Z";
 
   src = fetchFromGitHub {
     owner = "minio";
     repo = "minio";
     rev = "RELEASE.${version}";
-    sha256 = "17vam9ifi632yfxakanxi2660wqgqrhrhhzywrgh2jmzljippf80";
+    sha256 = "01jw1djfs0jbhsx9pmx3kj31mfhrw45lr1i4lwkmh8k7fxn8w13x";
   };
 
   goPackagePath = "github.com/minio/minio";
diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix
index f9fb4efa04be..646401ce02f9 100644
--- a/pkgs/servers/monitoring/grafana/default.nix
+++ b/pkgs/servers/monitoring/grafana/default.nix
@@ -1,7 +1,7 @@
 { lib, buildGoPackage, fetchurl, fetchFromGitHub, phantomjs2 }:
 
 buildGoPackage rec {
-  version = "5.1.2";
+  version = "5.1.3";
   name = "grafana-${version}";
   goPackagePath = "github.com/grafana/grafana";
 
@@ -9,12 +9,12 @@ buildGoPackage rec {
     rev = "v${version}";
     owner = "grafana";
     repo = "grafana";
-    sha256 = "0iw0mr6m99z6vy9mz9fdhmn4fxi359n3ns71bm5a71np8lf4qs36";
+    sha256 = "09q4xrh4j02b8nrkskndahs039rhmcs8hrcgvnnpg36qqyvs1x0g";
   };
 
   srcStatic = fetchurl {
     url = "https://grafana-releases.s3.amazonaws.com/release/grafana-${version}.linux-x64.tar.gz";
-    sha256 = "18bqmvyfjkvkrdbxa989aa6c7ri3b4wdb7ai543hiaz00s9mnpzm";
+    sha256 = "131dxpjnzhsjh6c0fp48jhxf5piy6wh287pfm2s7pm4ywq9m0q46";
   };
 
   preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace";
diff --git a/pkgs/servers/monitoring/prometheus/default.nix b/pkgs/servers/monitoring/prometheus/default.nix
index 3287bc6f2583..b71d9b8e58b8 100644
--- a/pkgs/servers/monitoring/prometheus/default.nix
+++ b/pkgs/servers/monitoring/prometheus/default.nix
@@ -19,7 +19,7 @@ let
 
         doCheck = true;
 
-        buildFlagsArray = let t = "${goPackagePath}/version"; in ''
+        buildFlagsArray = let t = "${goPackagePath}/vendor/github.com/prometheus/common/version"; in ''
           -ldflags=
              -X ${t}.Version=${version}
              -X ${t}.Revision=unknown
diff --git a/pkgs/servers/slimserver/default.nix b/pkgs/servers/slimserver/default.nix
index 18dbed4d1f30..f79e53b64cf4 100644
--- a/pkgs/servers/slimserver/default.nix
+++ b/pkgs/servers/slimserver/default.nix
@@ -1,15 +1,20 @@
 { stdenv, buildPerlPackage, fetchurl
-, perl, perlPackages }:
+, perl, perlPackages, fetchpatch }:
 
 buildPerlPackage rec {
   name = "slimserver-${version}";
-  version = "7.9.0";
+  version = "7.9.1";
 
   src = fetchurl {
     url = "https://github.com/Logitech/slimserver/archive/${version}.tar.gz";
-    sha256 = "07rhqipg7m28x0nqdd83nyzi88dp9cf8rr2pamdyrfcwyp1h1b44";
+    sha256 = "0szp5zkmx2b5lncsijf97asjnl73fyijkbgbwkl1i7p8qnqrb4mp";
   };
 
+  patches = [ (fetchpatch {
+    url = "https://github.com/Logitech/slimserver/pull/204.patch";
+    sha256 = "0n1c8nsbvqkmwj5ivkcxh1wkqqm1lwymmfz9i47ih6ifj06hkpxk";
+  } ) ];
+
   buildInputs = [
     perl
     perlPackages.AnyEvent
diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix
index 2d0e1a529dac..6f092dd80cde 100644
--- a/pkgs/servers/xmpp/prosody/default.nix
+++ b/pkgs/servers/xmpp/prosody/default.nix
@@ -25,12 +25,12 @@ let
 in
 
 stdenv.mkDerivation rec {
-  version = "0.10.0";
+  version = "0.10.1";
   name = "prosody-${version}";
 
   src = fetchurl {
     url = "http://prosody.im/downloads/source/${name}.tar.gz";
-    sha256 = "1644jy5dk46vahmh6nna36s79k8k668sbi3qamjb4q3c4m3y853l";
+    sha256 = "1kmmpkkgymg1r8r0k8j83pgmiskg1phl8hmpzjrnvlvsfnrnjplr";
   };
 
   communityModules = fetchhg {
diff --git a/pkgs/shells/dash/default.nix b/pkgs/shells/dash/default.nix
index 5f26801ca6d3..c852e1feb33b 100644
--- a/pkgs/shells/dash/default.nix
+++ b/pkgs/shells/dash/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "dash-0.5.10";
+  name = "dash-0.5.10.1";
 
   src = fetchurl {
     url = "http://gondor.apana.org.au/~herbert/dash/files/${name}.tar.gz";
-    sha256 = "1arimvc9zcghhb3nin9z3yr5706vxfri4a9r3j9j9d0n676f0w5d";
+    sha256 = "1bl4brz5vy07lrss54glp4vfca3q8d73hyc87sqdk99f76z95b6s";
   };
 
   hardeningDisable = [ "format" ];
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix
index 973be9831861..41b5fd99504d 100644
--- a/pkgs/stdenv/cross/default.nix
+++ b/pkgs/stdenv/cross/default.nix
@@ -41,7 +41,9 @@ in lib.init bootStages ++ [
       targetPlatform = crossSystem;
       cc = if crossSystem.useiOSPrebuilt or false
              then buildPackages.darwin.iosSdkPkgs.clang
-           else if crossSystem.useAndroidPrebuilt
+           else if (crossSystem.useAndroidPrebuilt && crossSystem.is32bit)
+             then buildPackages.androidenv.androidndkPkgs_10e.gcc
+           else if (crossSystem.useAndroidPrebuilt && crossSystem.is64bit)
              then buildPackages.androidenv.androidndkPkgs.gcc
            else buildPackages.gcc;
     };
diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix
index 9bc13b3260da..f8174a03cacf 100644
--- a/pkgs/tools/X11/xpra/default.nix
+++ b/pkgs/tools/X11/xpra/default.nix
@@ -12,11 +12,11 @@ let
   inherit (python2Packages) python cython buildPythonApplication;
 in buildPythonApplication rec {
   name = "xpra-${version}";
-  version = "2.2.6";
+  version = "2.3";
 
   src = fetchurl {
     url = "http://xpra.org/src/${name}.tar.xz";
-    sha256 = "1zyynghhzjbgnmzcibm17wpj9f7jy31d7dr373li8cwg2yl2swyz";
+    sha256 = "0kq0ambpy8r7m3wxdp79cgxgnl9yfmr19lv88f617gnv0sp0aarp";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/tools/admin/tigervnc/default.nix b/pkgs/tools/admin/tigervnc/default.nix
index 3818f361cb53..69f6e056b734 100644
--- a/pkgs/tools/admin/tigervnc/default.nix
+++ b/pkgs/tools/admin/tigervnc/default.nix
@@ -5,7 +5,8 @@
 , cmake, gettext, libtool
 , glproto, libGLU
 , gnutls, pam, nettle
-, xterm, openssh }:
+, xterm, openssh
+, makeWrapper}:
 
 with stdenv.lib;
 
@@ -87,7 +88,7 @@ stdenv.mkDerivation rec {
     glproto libGLU
   ] ++ xorgserver.buildInputs;
 
-  nativeBuildInputs = with xorg; [ cmake zlib gettext libtool utilmacros fontutil ]
+  nativeBuildInputs = with xorg; [ cmake zlib gettext libtool utilmacros fontutil makeWrapper ]
     ++ xorg.xorgserver.nativeBuildInputs;
 
   propagatedBuildInputs = xorg.xorgserver.propagatedBuildInputs;
diff --git a/pkgs/tools/filesystems/disorderfs/default.nix b/pkgs/tools/filesystems/disorderfs/default.nix
index 0551198cded3..0bde9b0b26e1 100644
--- a/pkgs/tools/filesystems/disorderfs/default.nix
+++ b/pkgs/tools/filesystems/disorderfs/default.nix
@@ -2,17 +2,19 @@
 
 stdenv.mkDerivation rec {
   name = "disorderfs-${version}";
-  version = "0.5.2";
+  version = "0.5.3";
 
   src = fetchurl {
-    url = "http://http.debian.net/debian/pool/main/d/disorderfs/disorderfs_${version}.orig.tar.bz2";
-    sha256 = "0jdadb1ppd5qrnngpjv14az32gwslag2wwv1k8rs29iqlfy38cjf";
+    url = "http://http.debian.net/debian/pool/main/d/disorderfs/disorderfs_${version}.orig.tar.gz";
+    sha256 = "1zx6248cwfcci5555sk9iwl9lz6x8kzc9qgiq4jv04zjiapivdnq";
   };
 
   nativeBuildInputs = [ pkgconfig asciidoc ];
 
   buildInputs = [ fuse attr ];
 
+  sourceRoot = ".";
+
   installFlags = [ "PREFIX=$(out)" ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/filesystems/duperemove/default.nix b/pkgs/tools/filesystems/duperemove/default.nix
index 613ab7bab1ee..4e71d910a5d6 100644
--- a/pkgs/tools/filesystems/duperemove/default.nix
+++ b/pkgs/tools/filesystems/duperemove/default.nix
@@ -3,13 +3,13 @@
 
 stdenv.mkDerivation rec {
   name = "duperemove-${version}";
-  version = "0.10";
+  version = "0.11";
 
   src = fetchFromGitHub {
     owner = "markfasheh";
     repo = "duperemove";
     rev = "v${version}";
-    sha256 = "1fll0xjg1p3pabgjiddild4ragk9spbdmdzrkq0hv5pxb1qrv7lp";
+    sha256 = "09bwpsvnppl9bm2l5pym5673x04ah3hddb0xip61gdq8ws3ri5yj";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/tools/misc/bashplotlib/default.nix b/pkgs/tools/misc/bashplotlib/default.nix
new file mode 100644
index 000000000000..2757f5f3e215
--- /dev/null
+++ b/pkgs/tools/misc/bashplotlib/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, pythonPackages, fetchFromGitHub }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "bashplotlib-${version}";
+  version = "2017-10-11";
+
+  src = fetchFromGitHub {
+    owner = "glamp";
+    repo = "bashplotlib";
+    rev = "fdc52be2c1fed13753692eced328143ab1db6f3d";
+    sha256 = "1ycql6j65zywyav2n3c0x1i5cm9w6glzqc3v0cgdvv1bdg4wi0gf";
+  };
+
+  # No tests
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/glamp/bashplotlib;
+    description = "Plotting in the terminal";
+    maintainers = with maintainers; [ dtzWill ];
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/tools/misc/debianutils/default.nix b/pkgs/tools/misc/debianutils/default.nix
index d93cc479a803..bec0cbbd2b9b 100644
--- a/pkgs/tools/misc/debianutils/default.nix
+++ b/pkgs/tools/misc/debianutils/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  version = "4.8.4";
+  version = "4.8.6";
   name = "debianutils-${version}";
 
   src = fetchurl {
     url = "mirror://debian/pool/main/d/debianutils/debianutils_${version}.tar.xz";
-    sha256 = "1chypq3dbkgvl16lgzdvqvlr7cdm3814nqmp8ch8j7x6mscsnqf0";
+    sha256 = "0wrz8ak4896f5i8wirijr9hdvc43xzxpg2gjs0snmpys8iqh82fv";
   };
 
   meta = {
diff --git a/pkgs/tools/misc/debootstrap/default.nix b/pkgs/tools/misc/debootstrap/default.nix
index 7b143183bc0c..0ed883bf342b 100644
--- a/pkgs/tools/misc/debootstrap/default.nix
+++ b/pkgs/tools/misc/debootstrap/default.nix
@@ -4,13 +4,13 @@
 # There is also cdebootstrap now. Is that easier to maintain?
 stdenv.mkDerivation rec {
   name = "debootstrap-${version}";
-  version = "1.0.97";
+  version = "1.0.98";
 
   src = fetchurl {
     # git clone git://git.debian.org/d-i/debootstrap.git
     # I'd like to use the source. However it's lacking the lanny script ? (still true?)
     url = "mirror://debian/pool/main/d/debootstrap/debootstrap_${version}.tar.gz";
-    sha256 = "1w2wdiazfykjkwainxfk72rccqsh1l1i90h93phsvayv0gsbxrnk";
+    sha256 = "07wfvjhzc5schhpn1dkvhwbi115yn4f1q99g0g39m79bbyxm50d8";
   };
 
   buildInputs = [ dpkg gettext gawk perl ];
diff --git a/pkgs/tools/misc/mongodb-compass/default.nix b/pkgs/tools/misc/mongodb-compass/default.nix
new file mode 100644
index 000000000000..f8475ee2e0e0
--- /dev/null
+++ b/pkgs/tools/misc/mongodb-compass/default.nix
@@ -0,0 +1,86 @@
+{ stdenv, fetchurl, dpkg
+, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib
+, gnome2, libnotify, libxcb, nspr, nss, systemd, xorg }:
+
+let
+
+  version = "1.13.1";
+
+  rpath = stdenv.lib.makeLibraryPath [
+    alsaLib
+    atk
+    cairo
+    cups
+    curl
+    dbus
+    expat
+    fontconfig
+    freetype
+    glib
+    gnome2.GConf
+    gnome2.gdk_pixbuf
+    gnome2.gtk
+    gnome2.pango
+    libnotify
+    libxcb
+    nspr
+    nss
+    stdenv.cc.cc
+    systemd
+
+    xorg.libxkbfile
+    xorg.libX11
+    xorg.libXcomposite
+    xorg.libXcursor
+    xorg.libXdamage
+    xorg.libXext
+    xorg.libXfixes
+    xorg.libXi
+    xorg.libXrandr
+    xorg.libXrender
+    xorg.libXtst
+    xorg.libXScrnSaver
+  ] + ":${stdenv.cc.cc.lib}/lib64";
+
+  src =
+    if stdenv.system == "x86_64-linux" then
+      fetchurl {
+        url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb";
+        sha256 = "0x23jshnr0rafm5sn2vhq2y2gryg8mksahzyv5fszblgaxay234p";
+      }
+    else
+      throw "MongoDB compass is not supported on ${stdenv.system}";
+
+in stdenv.mkDerivation {
+  name = "mongodb-compass-${version}";
+
+  inherit src;
+
+  buildInputs = [ dpkg ];
+  unpackPhase = "true";
+
+  buildCommand = ''
+    IFS=$'\n'
+    dpkg -x $src $out
+    cp -av $out/usr/* $out
+    rm -rf $out/share/lintian
+    #The node_modules are bringing in non-linux files/dependencies
+    find $out -name "*.app" -exec rm -rf {} \; || true
+    find $out -name "*.dll" -delete
+    find $out -name "*.exe" -delete
+    # Otherwise it looks "suspicious"
+    chmod -R g-w $out
+    for file in `find $out -type f -perm /0111 -o -name \*.so\*`; do
+      echo "Manipulating file: $file"
+      patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
+      patchelf --set-rpath ${rpath}:$out/share/mongodb-compass "$file" || true
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "The GUI for MongoDB";
+    homepage = https://www.mongodb.com/products/compass;
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/tools/misc/neofetch/default.nix b/pkgs/tools/misc/neofetch/default.nix
index 097eb2408f85..cece77b8d3e6 100644
--- a/pkgs/tools/misc/neofetch/default.nix
+++ b/pkgs/tools/misc/neofetch/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   name = "neofetch-${version}";
-  version = "3.4.0";
+  version = "4.0.0";
   src = fetchFromGitHub {
     owner = "dylanaraps";
     repo = "neofetch";
     rev = version;
-    sha256 = "10h4f7n6bllbq459nm9wppvk65n81zzv556njfqplzw3mpdrbiyx";
+    sha256 = "1ijg6fmrqjgn87899q8cpbir93hqrq4070wzm62s9nmggdgzx6mn";
   };
 
   dontBuild = true;
diff --git a/pkgs/tools/misc/you-get/default.nix b/pkgs/tools/misc/you-get/default.nix
index f0a8eda00285..bfce454473ad 100644
--- a/pkgs/tools/misc/you-get/default.nix
+++ b/pkgs/tools/misc/you-get/default.nix
@@ -2,7 +2,7 @@
 
 buildPythonApplication rec {
   pname = "you-get";
-  version = "0.4.1060";
+  version = "0.4.1077";
 
   # Tests aren't packaged, but they all hit the real network so
   # probably aren't suitable for a build environment anyway.
@@ -10,7 +10,7 @@ buildPythonApplication rec {
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1c4drn6khqrjvyzzsiaracnpcvahbiya6v5p18h2lyl7xia8gk51";
+    sha256 = "1qf4n1zgbr533a0qbxp8548f25jwqdwfl42gi5dyfhm4f1y1jk1a";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/networking/babeld/default.nix b/pkgs/tools/networking/babeld/default.nix
index 801863fb95a1..9c8f8d31c0cc 100644
--- a/pkgs/tools/networking/babeld/default.nix
+++ b/pkgs/tools/networking/babeld/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "babeld-1.8.1";
+  name = "babeld-1.8.2";
 
   src = fetchurl {
     url = "http://www.pps.univ-paris-diderot.fr/~jch/software/files/${name}.tar.gz";
-    sha256 = "1gq6q1zly40ngs9wl3qa3yjvyb6zbqck82fp3n6w2bi9ymrrq94w";
+    sha256 = "1p751zb7h75f8w7jz37432dj610f432jnj37lxhmav9q6aqyrv87";
   };
 
   preBuild = ''
diff --git a/pkgs/tools/networking/minio-client/default.nix b/pkgs/tools/networking/minio-client/default.nix
index bfe7dfc2dc0d..c1b2b18b3f48 100644
--- a/pkgs/tools/networking/minio-client/default.nix
+++ b/pkgs/tools/networking/minio-client/default.nix
@@ -3,13 +3,13 @@
 buildGoPackage rec {
   name = "minio-client-${version}";
 
-  version = "2018-03-25T01-22-22Z";
+  version = "2018-04-28T00-08-20Z";
 
   src = fetchFromGitHub {
     owner = "minio";
     repo = "mc";
     rev = "RELEASE.${version}";
-    sha256 = "1x71va37jaqsi99d0i0mccybrs9kjgmpfsm0dchmc58mmhyagh3k";
+    sha256 = "03c9ahphkpsy6z9i9z50jcsgj5ba6gba2sw2nz22b1ynqiz3ds37";
   };
 
   goPackagePath = "github.com/minio/mc";
diff --git a/pkgs/tools/networking/ntp/default.nix b/pkgs/tools/networking/ntp/default.nix
index 29f8e1ae2570..1178f5f0107e 100644
--- a/pkgs/tools/networking/ntp/default.nix
+++ b/pkgs/tools/networking/ntp/default.nix
@@ -8,11 +8,11 @@ let
 in
 
 stdenv.mkDerivation rec {
-  name = "ntp-4.2.8p10";
+  name = "ntp-4.2.8p11";
 
   src = fetchurl {
     url = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${name}.tar.gz";
-    sha256 = "17xrk7gxrl3hgg0i73n8qm53knyh01lf0f3l1zx9x6r1cip3dlnx";
+    sha256 = "13i7rp1va29ffjdk08fvsfl6n47zzwsp147zhgb550k8agvkjjpi";
   };
 
   # The hardcoded list of allowed system calls for seccomp is
diff --git a/pkgs/tools/package-management/cargo-release/default.nix b/pkgs/tools/package-management/cargo-release/default.nix
new file mode 100644
index 000000000000..562f92121d66
--- /dev/null
+++ b/pkgs/tools/package-management/cargo-release/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, rustPlatform, fetchFromGitHub }:
+
+rustPlatform.buildRustPackage rec {
+  name = "cargo-release-${version}";
+  version = "0.10.0";
+
+  src = fetchFromGitHub {
+    owner = "sunng87";
+    repo = "cargo-release";
+    rev = "${version}";
+    sha256 = "1wp7x6nmmhi019iyvyva26k14f4fsxrh424s2pgrr09nqlrfjbz0";
+  };
+
+  cargoSha256 = "0qxwkp6w7ir3hs0r587k3jmh69afc7j411bsy6k8hlm8g9clgby5";
+
+  meta = with stdenv.lib; {
+    description = ''Cargo subcommand "release": everything about releasing a rust crate'';
+    homepage = https://github.com/sunng87/cargo-release;
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ gerschtli ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/package-management/xbps/cert-paths.patch b/pkgs/tools/package-management/xbps/cert-paths.patch
new file mode 100644
index 000000000000..569161d9f2e4
--- /dev/null
+++ b/pkgs/tools/package-management/xbps/cert-paths.patch
@@ -0,0 +1,25 @@
+From d13a550dbc8876c35b912fe3e0eadd45b278be27 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Fri, 18 May 2018 09:51:48 -0500
+Subject: [PATCH] add certificate path fallbacks
+
+---
+ lib/fetch/common.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/fetch/common.c b/lib/fetch/common.c
+index 94fb2651..79b50115 100644
+--- a/lib/fetch/common.c
++++ b/lib/fetch/common.c
+@@ -1012,6 +1012,8 @@ fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose)
+ 
+ 	if (getenv("SSL_NO_VERIFY_PEER") == NULL) {
+ 		ca_cert_file = getenv("SSL_CA_CERT_FILE");
++		ca_cert_file = ca_cert_file ? ca_cert_file : getenv("NIX_SSL_CERT_FILE");
++		ca_cert_file = ca_cert_file ? ca_cert_file : "/etc/ssl/certs/ca-certificates.crt";
+ 		ca_cert_path = getenv("SSL_CA_CERT_PATH") != NULL ?
+ 		    getenv("SSL_CA_CERT_PATH") : X509_get_default_cert_dir();
+ 		if (verbose) {
+-- 
+2.17.0
+
diff --git a/pkgs/tools/package-management/xbps/default.nix b/pkgs/tools/package-management/xbps/default.nix
new file mode 100644
index 000000000000..dbcd9dafbef6
--- /dev/null
+++ b/pkgs/tools/package-management/xbps/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchFromGitHub, pkgconfig, which, zlib, openssl, libarchive }:
+
+stdenv.mkDerivation rec {
+  name = "xbps-${version}";
+  version = "0.52";
+
+  src = fetchFromGitHub {
+    owner = "voidlinux";
+    repo = "xbps";
+    rev = version;
+    sha256 = "1sf6iy9l3dijsczsngzbhksshfm1374g2rrdasc04l6gz35l2cdp";
+  };
+
+  nativeBuildInputs = [ pkgconfig which ];
+
+  buildInputs = [ zlib openssl libarchive ];
+
+  patches = [ ./cert-paths.patch ];
+
+  postPatch = ''
+    # fix unprefixed ranlib (needed on cross)
+    substituteInPlace lib/Makefile \
+      --replace 'SILENT}ranlib ' 'SILENT}$(RANLIB) '
+
+    # Don't try to install keys to /var/db/xbps, put in $out/share for now
+    substituteInPlace data/Makefile \
+      --replace '$(DESTDIR)/$(DBDIR)' '$(DESTDIR)/$(SHAREDIR)'
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/voidlinux/xbps;
+    description = "The X Binary Package System";
+    platforms = platforms.linux; # known to not work on Darwin, at least
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ dtzWill ];
+  };
+}
diff --git a/pkgs/tools/security/opensc/default.nix b/pkgs/tools/security/opensc/default.nix
index e727180fa3f0..819c01a0893f 100644
--- a/pkgs/tools/security/opensc/default.nix
+++ b/pkgs/tools/security/opensc/default.nix
@@ -6,13 +6,13 @@
 
 stdenv.mkDerivation rec {
   name = "opensc-${version}";
-  version = "0.17.0";
+  version = "0.18.0";
 
   src = fetchFromGitHub {
     owner = "OpenSC";
     repo = "OpenSC";
     rev = version;
-    sha256 = "1mgcf698zhpqzamd52547scdws7mhdva377kc3chpr455n0mw8g0";
+    sha256 = "1shwx1rkmnygk2dp0q8pbvnxcg96bn570vch9yq34gs42ryskihf";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 658a466815df..70aa68971aa2 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -784,6 +784,8 @@ with pkgs;
 
   basex = callPackage ../tools/text/xml/basex { };
 
+  bashplotlib = callPackage ../tools/misc/bashplotlib { };
+
   babeld = callPackage ../tools/networking/babeld { };
 
   badvpn = callPackage ../tools/networking/badvpn {};
@@ -1443,6 +1445,8 @@ with pkgs;
 
   mcrypt = callPackage ../tools/misc/mcrypt { };
 
+  mongodb-compass = callPackage ../tools/misc/mongodb-compass { };
+  
   mongodb-tools = callPackage ../tools/misc/mongodb-tools { };
 
   mozlz4a = callPackage ../tools/compression/mozlz4a {
@@ -3160,6 +3164,8 @@ with pkgs;
   jing = self.jing-trang;
   jing-trang = callPackage ../tools/text/xml/jing-trang { };
 
+  jira-cli = callPackage ../development/tools/jira_cli { };
+ 
   jl = haskellPackages.callPackage ../development/tools/jl { };
 
   jmespath = callPackage ../development/tools/jmespath { };
@@ -6892,6 +6898,7 @@ with pkgs;
     });
 
   cargo-edit = callPackage ../tools/package-management/cargo-edit { };
+  cargo-release = callPackage ../tools/package-management/cargo-release { };
 
   cargo-fuzz = callPackage ../development/tools/rust/cargo-fuzz { };
 
@@ -7564,11 +7571,12 @@ with pkgs;
 
   apacheAnt_1_9 = callPackage ../development/tools/build-managers/apache-ant/1.9.nix { };
 
-  apacheKafka = apacheKafka_1_0;
+  apacheKafka = apacheKafka_1_1;
   apacheKafka_0_9 = callPackage ../servers/apache-kafka { majorVersion = "0.9"; };
   apacheKafka_0_10 = callPackage ../servers/apache-kafka { majorVersion = "0.10"; };
   apacheKafka_0_11 = callPackage ../servers/apache-kafka { majorVersion = "0.11"; };
   apacheKafka_1_0 = callPackage ../servers/apache-kafka { majorVersion = "1.0"; };
+  apacheKafka_1_1 = callPackage ../servers/apache-kafka { majorVersion = "1.1"; };
 
   kt = callPackage ../tools/misc/kt {};
 
@@ -10811,7 +10819,7 @@ with pkgs;
   ncurses6 = callPackage ../development/libraries/ncurses {
     abiVersion = "6";
   };
-  ncurses = ncurses6;
+  ncurses = if hostPlatform.useiOSPrebuilt then null else ncurses6;
 
   neardal = callPackage ../development/libraries/neardal { };
 
@@ -11647,6 +11655,8 @@ with pkgs;
 
   sqlite3_analyzer = lowPrio (callPackage ../development/libraries/sqlite/sqlite3_analyzer.nix { });
 
+  sqlar = callPackage ../development/libraries/sqlite/sqlar.nix { };
+
   sqlite-interactive = appendToName "interactive" (sqlite.override { interactive = true; }).bin;
 
   sqlite-jdbc = callPackage ../servers/sql/sqlite/jdbc { };
@@ -17691,6 +17701,8 @@ with pkgs;
 
   ricochet = libsForQt5.callPackage ../applications/networking/instant-messengers/ricochet { };
 
+  ries = callPackage ../applications/science/math/ries { };
+
   ripser = callPackage ../applications/science/math/ripser { };
 
   rkt = callPackage ../applications/virtualization/rkt { };
@@ -19358,6 +19370,8 @@ with pkgs;
 
   orthorobot = callPackage ../games/orthorobot { love = love_0_7; };
 
+  pacvim = callPackage ../games/pacvim { };
+
   performous = callPackage ../games/performous { };
 
   pingus = callPackage ../games/pingus {};
@@ -21209,54 +21223,7 @@ with pkgs;
     pythonPackages = python3Packages;
   };
 
-  winePackages = rec {
-    minimal = callPackage ../misc/emulators/wine {
-      wineRelease = config.wine.release or "stable";
-      wineBuild = config.wine.build or "wine32";
-    };
-
-    base = minimal.override {
-      pngSupport = true;
-      jpegSupport = true;
-      tiffSupport = true;
-      gettextSupport = true;
-      fontconfigSupport = true;
-      alsaSupport = true;
-      openglSupport = true;
-      vulkanSupport = stdenv.isLinux;
-      tlsSupport = true;
-      cupsSupport = true;
-      dbusSupport = true;
-      cairoSupport = true;
-      cursesSupport = true;
-      saneSupport = true;
-      pulseaudioSupport = config.pulseaudio or stdenv.isLinux;
-      udevSupport = true;
-      xineramaSupport = true;
-      xmlSupport = true;
-    };
-
-    full = base.override {
-      gtkSupport = true;
-      gstreamerSupport = true;
-      colorManagementSupport = true;
-      mpg123Support = true;
-      openalSupport = true;
-      openclSupport = true;
-      odbcSupport = true;
-      netapiSupport = true;
-      vaSupport = true;
-      pcapSupport = true;
-      v4lSupport = true;
-      gsmSupport = true;
-      gphoto2Support = true;
-      ldapSupport = true;
-    };
-
-    stable = base.override { wineRelease = "stable"; };
-    unstable = base.override { wineRelease = "unstable"; };
-    staging = base.override { wineRelease = "staging"; };
-  };
+  winePackages = recurseIntoAttrs (callPackage ./wine-packages.nix { });
 
   wine = winePackages.full;
 
@@ -21294,6 +21261,8 @@ with pkgs;
 
   xboxdrv = callPackage ../misc/drivers/xboxdrv { };
 
+  xbps = callPackage ../tools/package-management/xbps { };
+
   xcftools = callPackage ../tools/graphics/xcftools { };
 
   xhyve = callPackage ../applications/virtualization/xhyve {
@@ -21494,6 +21463,10 @@ with pkgs;
 
   teseq = callPackage ../applications/misc/teseq {  };
 
+  ape = callPackage ../applications/misc/ape { };
+  attemptoClex = callPackage ../applications/misc/ape/clex.nix { };
+  apeClex = callPackage ../applications/misc/ape/apeclex.nix { };
+
   # Unix tools
   unixtools = recurseIntoAttrs (callPackages ./unix-tools.nix { });
   inherit (unixtools) hexdump ps logger eject umount
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 8a395fbec186..2e6bd5ebb853 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -10,7 +10,10 @@ let
     "ghc821Binary"
     "ghcCross"
     "ghcjs"
-    "ghcjsHEAD"
+    "ghcjs710"
+    "ghcjs80"
+    "ghcjs82"
+    "ghcjs84"
     "integer-simple"
   ];
 
@@ -76,14 +79,28 @@ in rec {
       buildLlvmPackages = buildPackages.llvmPackages_5;
       llvmPackages = pkgs.llvmPackages_5;
     };
-    ghcjs = packages.ghc7103.callPackage ../development/compilers/ghcjs {
+    ghcjs = compiler.ghcjs82;
+    ghcjs710 = packages.ghc7103.callPackage ../development/compilers/ghcjs {
       bootPkgs = packages.ghc7103;
       inherit (pkgs) cabal-install;
     };
-    ghcjsHEAD = packages.ghc802.callPackage ../development/compilers/ghcjs/head.nix {
+    ghcjs80 = packages.ghc802.callPackage ../development/compilers/ghcjs/head.nix {
       bootPkgs = packages.ghc802;
       inherit (pkgs) cabal-install;
     };
+    ghcjs82 = callPackage ../development/compilers/ghcjs-ng rec {
+      bootPkgs = packages.ghc822;
+      inherit (bootPkgs) alex happy;
+      ghcjsSrcJson = ../development/compilers/ghcjs-ng/8.2/git.json;
+      stage0 = ../development/compilers/ghcjs-ng/8.2/stage0.nix;
+    };
+    ghcjs84 = callPackage ../development/compilers/ghcjs-ng rec {
+      bootPkgs = packages.ghc842;
+      inherit (bootPkgs) alex happy;
+      ghcjsSrcJson = ../development/compilers/ghcjs-ng/8.4/git.json;
+      stage0 = ../development/compilers/ghcjs-ng/8.4/stage0.nix;
+      ghcjsDepOverrides = callPackage ../development/compilers/ghcjs-ng/8.4/dep-overrides.nix {};
+    };
 
     # The integer-simple attribute set contains all the GHC compilers
     # build with integer-simple instead of integer-gmp.
@@ -139,18 +156,31 @@ in rec {
       ghc = bh.compiler.ghcHEAD;
       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { };
     };
-    ghcjs = callPackage ../development/haskell-modules rec {
+    ghcjs = packages.ghcjs82;
+    ghcjs710 = callPackage ../development/haskell-modules rec {
       buildHaskellPackages = ghc.bootPkgs;
       ghc = bh.compiler.ghcjs;
       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { };
       packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { };
     };
-    ghcjsHEAD = callPackage ../development/haskell-modules rec {
+    ghcjs80 = callPackage ../development/haskell-modules rec {
       buildHaskellPackages = ghc.bootPkgs;
       ghc = bh.compiler.ghcjsHEAD;
       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.0.x.nix { };
       packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { };
     };
+    ghcjs82 = callPackage ../development/haskell-modules rec {
+      buildHaskellPackages = ghc.bootPkgs;
+      ghc = bh.compiler.ghcjs82;
+      compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.2.x.nix { };
+      packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { };
+    };
+    ghcjs84 = callPackage ../development/haskell-modules rec {
+      buildHaskellPackages = ghc.bootPkgs;
+      ghc = bh.compiler.ghcjs84;
+      compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.4.x.nix { };
+      packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { };
+    };
 
     # The integer-simple attribute set contains package sets for all the GHC compilers
     # using integer-simple instead of integer-gmp.
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 9a23eff2e7ff..8956f9806684 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -365,14 +365,13 @@ let self = _self // overrides; _self = with self; {
   };
 
   AppSt = buildPerlPackage rec {
-    name = "App-St-1.1.2";
+    name = "App-St-1.1.4";
     src = fetchurl {
-      url = https://github.com/nferraz/st/archive/v1.1.2.tar.gz;
-      sha256 = "1j1iwcxl16m4x5kl1vcv0linb93r55ndh3jm0w6qf459jl4x38s6";
+      url = https://github.com/nferraz/st/archive/v1.1.4.tar.gz;
+      sha256 = "1f4bqm4jiazcxgzzja1i48671za96621k0s3ln87cdacgvv1can0";
     };
     postInstall =
       ''
-        sed -e "1 s|\(.*\)|\1 -I $out/lib/perl5/site_perl|" -i $out/bin/st
         ($out/bin/st --help || true) | grep Usage
       '';
     meta = {
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index c1b1b2f6266c..ca5cfb677a2e 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -277,6 +277,8 @@ in {
 
   logster = callPackage ../development/python-modules/logster { };
 
+  mail-parser = callPackage ../development/python-modules/mail-parser {  };
+
   mpi4py = callPackage ../development/python-modules/mpi4py {
     mpi = pkgs.openmpi;
   };
@@ -2949,6 +2951,8 @@ in {
 
   };
 
+  hiro = callPackage ../development/python-modules/hiro {};
+
   hglib = callPackage ../development/python-modules/hglib {};
 
   humanize = buildPythonPackage rec {
@@ -5027,6 +5031,7 @@ in {
     };
   };
 
+  keyrings-alt = callPackage ../development/python-modules/keyrings-alt {};
 
   SPARQLWrapper = buildPythonPackage rec {
     name = "SPARQLWrapper-${version}";
diff --git a/pkgs/top-level/wine-packages.nix b/pkgs/top-level/wine-packages.nix
new file mode 100644
index 000000000000..109f01362555
--- /dev/null
+++ b/pkgs/top-level/wine-packages.nix
@@ -0,0 +1,50 @@
+{ stdenv, config, callPackage }:
+
+rec {
+  minimal = callPackage ../misc/emulators/wine {
+    wineRelease = config.wine.release or "stable";
+    wineBuild = config.wine.build or "wine32";
+  };
+
+  base = minimal.override {
+    pngSupport = true;
+    jpegSupport = true;
+    tiffSupport = true;
+    gettextSupport = true;
+    fontconfigSupport = true;
+    alsaSupport = true;
+    openglSupport = true;
+    vulkanSupport = stdenv.isLinux;
+    tlsSupport = true;
+    cupsSupport = true;
+    dbusSupport = true;
+    cairoSupport = true;
+    cursesSupport = true;
+    saneSupport = true;
+    pulseaudioSupport = config.pulseaudio or stdenv.isLinux;
+    udevSupport = true;
+    xineramaSupport = true;
+    xmlSupport = true;
+  };
+
+  full = base.override {
+    gtkSupport = true;
+    gstreamerSupport = true;
+    colorManagementSupport = true;
+    mpg123Support = true;
+    openalSupport = true;
+    openclSupport = true;
+    odbcSupport = true;
+    netapiSupport = true;
+    vaSupport = true;
+    pcapSupport = true;
+    v4lSupport = true;
+    gsmSupport = true;
+    gphoto2Support = true;
+    ldapSupport = true;
+  };
+
+  stable = base.override { wineRelease = "stable"; };
+  unstable = base.override { wineRelease = "unstable"; };
+  staging = base.override { wineRelease = "staging"; };
+}