about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/audio/ams-lv2/default.nix10
-rw-r--r--pkgs/applications/editors/emacs-modes/melpa-packages.nix47
-rw-r--r--pkgs/applications/editors/vim/configurable.nix9
-rw-r--r--pkgs/applications/networking/browsers/jumanji/default.nix31
-rw-r--r--pkgs/applications/science/chemistry/gwyddion/default.nix4
-rw-r--r--pkgs/applications/science/math/ripser/default.nix2
-rw-r--r--pkgs/applications/science/math/sage/default.nix16
-rw-r--r--pkgs/applications/science/math/sage/patches/pari-no-threads.patch18
-rw-r--r--pkgs/applications/science/math/sage/sage-src.nix11
-rw-r--r--pkgs/applications/video/shotcut/default.nix14
-rw-r--r--pkgs/data/fonts/tex-gyre/default.nix8
-rw-r--r--pkgs/desktops/mate/mate-screensaver/default.nix4
-rw-r--r--pkgs/development/compilers/compcert/default.nix13
-rw-r--r--pkgs/development/idris-modules/default.nix2
-rw-r--r--pkgs/development/idris-modules/quantities.nix22
-rw-r--r--pkgs/development/interpreters/duktape/default.nix4
-rw-r--r--pkgs/development/libraries/agda/agda-stdlib/default.nix4
-rw-r--r--pkgs/development/libraries/cddlib/default.nix54
-rw-r--r--pkgs/development/libraries/exiv2/default.nix45
-rw-r--r--pkgs/development/libraries/keybinder/default.nix8
-rw-r--r--pkgs/development/libraries/libvirt/default.nix6
-rw-r--r--pkgs/development/libraries/mpich/default.nix (renamed from pkgs/development/libraries/mpich2/default.nix)14
-rw-r--r--pkgs/development/libraries/openssl/default.nix3
-rw-r--r--pkgs/development/libraries/openssl/revert-relaxed-quoting.patch37
-rw-r--r--pkgs/development/libraries/oracle-instantclient/default.nix3
-rw-r--r--pkgs/development/libraries/prototypejs/default.nix23
-rw-r--r--pkgs/development/libraries/science/math/libbraiding/default.nix34
-rw-r--r--pkgs/development/libraries/science/math/libhomfly/default.nix35
-rw-r--r--pkgs/development/python-modules/asana/default.nix11
-rw-r--r--pkgs/development/python-modules/asgiref/default.nix8
-rw-r--r--pkgs/development/python-modules/fire/default.nix47
-rw-r--r--pkgs/development/python-modules/libvirt/default.nix4
-rw-r--r--pkgs/development/python-modules/python-language-server/default.nix45
-rw-r--r--pkgs/games/ezquake/default.nix4
-rw-r--r--pkgs/misc/tmux-plugins/default.nix68
-rw-r--r--pkgs/misc/urbit/default.nix37
-rw-r--r--pkgs/os-specific/linux/bluez/default.nix6
-rw-r--r--pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix11
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.14.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.17.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.4.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.9.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix21
-rw-r--r--pkgs/os-specific/linux/kernel/linux-testing.nix6
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix11
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix18
-rw-r--r--pkgs/servers/home-assistant/default.nix10
-rw-r--r--pkgs/servers/home-assistant/frontend.nix4
-rw-r--r--pkgs/servers/http/nginx/modules.nix46
-rw-r--r--pkgs/servers/matterbridge/default.nix4
-rw-r--r--pkgs/servers/mpd/default.nix4
-rw-r--r--pkgs/servers/sql/mariadb/default.nix4
-rw-r--r--pkgs/servers/xmpp/ejabberd/default.nix11
-rw-r--r--pkgs/shells/zsh/antibody/default.nix6
-rw-r--r--pkgs/tools/archivers/sharutils/default.nix10
-rw-r--r--pkgs/tools/backup/ddar/default.nix6
-rw-r--r--pkgs/tools/backup/duply/default.nix4
-rw-r--r--pkgs/tools/bluetooth/blueman/default.nix3
-rw-r--r--pkgs/tools/filesystems/bcachefs-tools/Makefile.patch13
-rw-r--r--pkgs/tools/filesystems/bcachefs-tools/default.nix21
-rw-r--r--pkgs/tools/filesystems/squashfuse/default.nix4
-rw-r--r--pkgs/tools/networking/haproxy/default.nix3
-rw-r--r--pkgs/tools/package-management/appimagekit/default.nix112
-rw-r--r--pkgs/tools/package-management/appimagekit/nix.patch174
-rw-r--r--pkgs/tools/security/b2sum/default.nix28
-rw-r--r--pkgs/tools/system/logrotate/default.nix11
-rw-r--r--pkgs/tools/system/nvtop/default.nix30
-rw-r--r--pkgs/tools/typesetting/biber/default.nix23
-rw-r--r--pkgs/top-level/aliases.nix1
-rw-r--r--pkgs/top-level/all-packages.nix44
-rw-r--r--pkgs/top-level/perl-packages.nix4
-rw-r--r--pkgs/top-level/php-packages.nix7
-rw-r--r--pkgs/top-level/python-packages.nix2
73 files changed, 991 insertions, 392 deletions
diff --git a/pkgs/applications/audio/ams-lv2/default.nix b/pkgs/applications/audio/ams-lv2/default.nix
index bc72c3e13144e..7858631f7973f 100644
--- a/pkgs/applications/audio/ams-lv2/default.nix
+++ b/pkgs/applications/audio/ams-lv2/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cairo, fftw, gtkmm2, lv2, lvtk, pkgconfig, python }:
+{ stdenv, fetchFromGitHub, cairo, fftw, gtkmm2, lv2, lvtk, pkgconfig, python3 }:
 
 stdenv.mkDerivation  rec {
   name = "ams-lv2-${version}";
@@ -12,13 +12,13 @@ stdenv.mkDerivation  rec {
   };
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ cairo fftw gtkmm2 lv2 lvtk python ];
+  buildInputs = [ cairo fftw gtkmm2 lv2 lvtk ];
 
-  configurePhase = "python waf configure --prefix=$out";
+  configurePhase = "${python3.interpreter} waf configure --prefix=$out";
 
-  buildPhase = "python waf";
+  buildPhase = "${python3.interpreter} waf";
 
-  installPhase = "python waf install";
+  installPhase = "${python3.interpreter} waf install";
 
   meta = with stdenv.lib; {
     description = "An LV2 port of the internal modules found in Alsa Modular Synth";
diff --git a/pkgs/applications/editors/emacs-modes/melpa-packages.nix b/pkgs/applications/editors/emacs-modes/melpa-packages.nix
index 56b17a865df82..a420c54255656 100644
--- a/pkgs/applications/editors/emacs-modes/melpa-packages.nix
+++ b/pkgs/applications/editors/emacs-modes/melpa-packages.nix
@@ -52,19 +52,9 @@ self:
       # part of a larger package
       caml = dontConfigure super.caml;
 
-      # part of a larger package
-      # upstream issue: missing package version
-      cmake-mode = markBroken (dontConfigure super.cmake-mode);
-
       # Expects bash to be at /bin/bash
       company-rtags = markBroken super.company-rtags;
 
-      # upstream issue: missing file header
-      connection = markBroken super.connection;
-
-      # upstream issue: missing file header
-      dictionary = markBroken super.dictionary;
-
       easy-kill-extras = super.easy-kill-extras.override {
         inherit (self.melpaPackages) easy-kill;
       };
@@ -79,6 +69,17 @@ self:
         inherit (self.melpaPackages) ess ctable popup;
       };
 
+      evil-magit = super.evil-magit.overrideAttrs (attrs: {
+        # searches for Git at build time
+        nativeBuildInputs =
+          (attrs.nativeBuildInputs or []) ++ [ external.git ];
+      });
+
+      # missing dependencies
+      evil-search-highlight-persist = super.evil-search-highlight-persist.overrideAttrs (attrs: {
+        packageRequires = with self; [ evil highlight ];
+      });
+
       # missing OCaml
       flycheck-ocaml = markBroken super.flycheck-ocaml;
 
@@ -108,6 +109,11 @@ self:
       # upstream issue: missing file header
       initsplit = super.initsplit;
 
+      # tries to write a log file to $HOME
+      insert-shebang = super.insert-shebang.overrideAttrs (attrs: {
+        HOME = "/tmp";
+      });
+
       # Expects bash to be at /bin/bash
       ivy-rtags = markBroken super.ivy-rtags;
 
@@ -115,9 +121,6 @@ self:
       jsfmt = markBroken super.jsfmt;
 
       # upstream issue: missing file header
-      link = markBroken super.link;
-
-      # upstream issue: missing file header
       maxframe = markBroken super.maxframe;
 
       magit =
@@ -131,6 +134,18 @@ self:
             (attrs.nativeBuildInputs or []) ++ [ external.git ];
         });
 
+      magit-annex = super.magit-annex.overrideAttrs (attrs: {
+        # searches for Git at build time
+        nativeBuildInputs =
+          (attrs.nativeBuildInputs or []) ++ [ external.git ];
+      });
+
+      magit-gitflow = super.magit-gitflow.overrideAttrs (attrs: {
+        # searches for Git at build time
+        nativeBuildInputs =
+          (attrs.nativeBuildInputs or []) ++ [ external.git ];
+      });
+
       # missing OCaml
       merlin = markBroken super.merlin;
 
@@ -154,8 +169,10 @@ self:
             (attrs.nativeBuildInputs or []) ++ [ external.git ];
          }));
 
-      # upstream issue: truncated file
-      powershell = markBroken super.powershell;
+      # tries to write to $HOME
+      php-auto-yasnippets = super.php-auto-yasnippets.overrideAttrs (attrs: {
+        HOME = "/tmp";
+      });
 
       # upstream issue: mismatched filename
       processing-snippets = markBroken super.processing-snippets;
diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix
index 7a700e0956b82..36450237b5a9e 100644
--- a/pkgs/applications/editors/vim/configurable.nix
+++ b/pkgs/applications/editors/vim/configurable.nix
@@ -73,15 +73,6 @@ in stdenv.mkDerivation rec {
 
   src = builtins.getAttr source {
     "default" = common.src; # latest release
-
-    "vim-nox" =
-      {
-        # vim nox branch: client-server without X by uing sockets
-        # REGION AUTO UPDATE: { name="vim-nox"; type="hg"; url="https://code.google.com/r/yukihironakadaira-vim-cmdsrv-nox/"; branch="cmdsrv-nox"; }
-        src = (fetchurl { url = "http://mawercer.de/~nix/repos/vim-nox-hg-2082fc3.tar.bz2"; sha256 = "293164ca1df752b7f975fd3b44766f5a1db752de6c7385753f083499651bd13a"; });
-        name = "vim-nox-hg-2082fc3";
-        # END
-      }.src;
   };
 
   patches = [ ./cflags-prune.diff ] ++ stdenv.lib.optional ftNixSupport ./ft-nix-support.patch;
diff --git a/pkgs/applications/networking/browsers/jumanji/default.nix b/pkgs/applications/networking/browsers/jumanji/default.nix
deleted file mode 100644
index 26a7e883c60ca..0000000000000
--- a/pkgs/applications/networking/browsers/jumanji/default.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ stdenv, fetchgit, pkgconfig, girara, gtk, webkitgtk, glib-networking, makeWrapper
-, gsettings-desktop-schemas }:
-
-stdenv.mkDerivation rec {
-  name = "jumanji-${version}";
-  version = "20150107";
-
-  src = fetchgit {
-    url = https://git.pwmt.org/pwmt/jumanji.git;
-    rev = "f8e04e5b5a9fec47d49ca63a096e5d35be281151";
-    sha256 = "1dsbyz489fx7dp07i29q1rjkl7nhrfscc8ks8an2rdyhx3457asg";
-  };
-
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ girara gtk webkitgtk makeWrapper gsettings-desktop-schemas ];
-
-  makeFlags = [ "PREFIX=$(out)" ];
-
-  preFixup=''
-    wrapProgram "$out/bin/jumanji" \
-     --prefix GIO_EXTRA_MODULES : "${glib-networking.out}/lib/gio/modules" \
-     --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
-  '';
-
-  meta = with stdenv.lib; {
-    description = "Minimal web browser";
-    homepage = https://pwmt.org/projects/jumanji/;
-    platforms = platforms.all;
-    maintainers = [ maintainers.koral ];
-  };
-}
diff --git a/pkgs/applications/science/chemistry/gwyddion/default.nix b/pkgs/applications/science/chemistry/gwyddion/default.nix
index 4f028e0053af6..6ea6be52fce4f 100644
--- a/pkgs/applications/science/chemistry/gwyddion/default.nix
+++ b/pkgs/applications/science/chemistry/gwyddion/default.nix
@@ -2,11 +2,11 @@
 
 with stdenv.lib;
 
+let version = "2.48"; in
 stdenv.mkDerivation {
   name = "gwyddion-${version}";
-  version = "2.48";
   src = fetchurl {
-    url = "http://sourceforge.net/projects/gwyddion/files/gwyddion/2.48/gwyddion-2.48.tar.xz";
+    url = "http://sourceforge.net/projects/gwyddion/files/gwyddion/${version}/gwyddion-${version}.tar.xz";
     sha256 = "119iw58ac2wn4cas6js8m7r1n4gmmkga6b1y711xzcyjp9hshgwx";
   };
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/applications/science/math/ripser/default.nix b/pkgs/applications/science/math/ripser/default.nix
index 651ad8a2c0f84..21948a279d073 100644
--- a/pkgs/applications/science/math/ripser/default.nix
+++ b/pkgs/applications/science/math/ripser/default.nix
@@ -13,10 +13,10 @@ assert useGoogleHashmap -> sparsehash != null;
 
 let
   inherit (stdenv.lib) optional;
+  version = "1.0";
 in
 stdenv.mkDerivation {
   name = "ripser-${version}";
-  version = "1.0";
 
   src = fetchFromGitHub {
     owner = "Ripser";
diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix
index 712c5fe86224a..7e62f0cf75ee6 100644
--- a/pkgs/applications/science/math/sage/default.nix
+++ b/pkgs/applications/science/math/sage/default.nix
@@ -8,10 +8,6 @@ let
   # https://trac.sagemath.org/ticket/15980 for tracking of python3 support
   python = nixpkgs.python2.override {
     packageOverrides = self: super: {
-      cypari2 = super.cypari2.override { inherit pari; };
-
-      cysignals = super.cysignals.override { inherit pari; };
-
       # python packages that appear unmaintained and were not accepted into the nixpkgs
       # tree because of that. These packages are only dependencies of the more-or-less
       # deprecated sagenb. However sagenb is still a default dependency and the doctests
@@ -24,7 +20,7 @@ let
       pybrial = self.callPackage ./pybrial.nix {};
 
       sagelib = self.callPackage ./sagelib.nix {
-        inherit flint ecl pari eclib arb;
+        inherit flint ecl arb;
         inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
         linbox = nixpkgs.linbox.override { withSage = true; };
       };
@@ -38,19 +34,19 @@ let
       };
 
       env-locations = self.callPackage ./env-locations.nix {
-        inherit pari_data ecl pari;
+        inherit pari_data ecl;
         inherit singular;
         three = nodePackages_8_x.three;
         mathjax = nodePackages_8_x.mathjax;
       };
 
       sage-env = self.callPackage ./sage-env.nix {
-        inherit sage-src python rWrapper openblas-cblas-pc ecl singular eclib pari palp flint pynac pythonEnv;
+        inherit sage-src python rWrapper openblas-cblas-pc ecl singular palp flint pynac pythonEnv;
         pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
       };
 
       sage-with-env = self.callPackage ./sage-with-env.nix {
-        inherit pari eclib pythonEnv;
+        inherit pythonEnv;
         inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
         pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
         three = nodePackages_8_x.three;
@@ -113,8 +109,6 @@ let
   # *not* to confuse with the python package "pynac"
   pynac = nixpkgs.pynac.override { inherit singular flint; };
 
-  eclib = nixpkgs.eclib.override { inherit pari; };
-
   # With openblas (64 bit), the tests fail the same way as when sage is build with
   # openblas instead of openblasCompat. Apparently other packages somehow use flints
   # blas when it is available. Alternative would be to override flint to use
@@ -144,8 +138,6 @@ let
 
   # https://trac.sagemath.org/ticket/22191
   ecl = nixpkgs.ecl_16_1_2;
-
-  pari = nixpkgs.pari.override { withThread = false; };
 in
   python.pkgs.sage-wrapper // {
     doc = python.pkgs.sagedoc;
diff --git a/pkgs/applications/science/math/sage/patches/pari-no-threads.patch b/pkgs/applications/science/math/sage/patches/pari-no-threads.patch
new file mode 100644
index 0000000000000..13b47dbdd31be
--- /dev/null
+++ b/pkgs/applications/science/math/sage/patches/pari-no-threads.patch
@@ -0,0 +1,18 @@
+diff --git a/src/sage/libs/pari/__init__.py b/src/sage/libs/pari/__init__.py
+index e451766474..77eda66097 100644
+--- a/src/sage/libs/pari/__init__.py
++++ b/src/sage/libs/pari/__init__.py
+@@ -205,6 +205,13 @@ def _get_pari_instance():
+     # messages in Sage.
+     P.default("debugmem", 0)
+ 
++    # Make sure pari doesn't use threads, regardless of how it was compiled.
++    # Threads cause some doctest failures (memory issues). Those could probably
++    # be solved without disabling threads. But that would require figuring out
++    # some sensible values for `threadsizemax`. See
++    # https://pari.math.u-bordeaux.fr/dochtml/html/GP_defaults.html
++    P.default("nbthreads", 1)
++
+     return P
+ 
+ pari = _get_pari_instance()
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index e027dccf0fc79..1144057b188d5 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -56,6 +56,10 @@ stdenv.mkDerivation rec {
     # https://trac.sagemath.org/ticket/25345
     # (upstream patch doesn't apply on 8.2 source)
     ./patches/dochtml-optional.patch
+
+    # work with pari with threads enabled at compile time (disable them at runtime)
+    # https://trac.sagemath.org/ticket/26002
+    ./patches/pari-no-threads.patch
   ];
 
   packageUpgradePatches = [
@@ -118,6 +122,13 @@ stdenv.mkDerivation rec {
       url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa";
       sha256 = "0p5wnvbx65i7cp0bjyaqgp4rly8xgnk12pqwaq3dqby0j2bk6ijb";
     })
+
+    # cddlib 0.94i -> 0.94j
+    (fetchpatch {
+      name = "cddlib-0.94j.patch";
+      url = "https://git.sagemath.org/sage.git/patch/?id=2ab1546b3e21d1d0ab3b4fcd58576848b3a2d888";
+      sha256 = "1c5gnasq7y9xxj762bn79bis0zi8d9bgg7jzlf64ifixsrc5cymb";
+    })
   ];
 
   patches = nixPatches ++ packageUpgradePatches ++ [
diff --git a/pkgs/applications/video/shotcut/default.nix b/pkgs/applications/video/shotcut/default.nix
index 0df5d42ee0ea8..950cd27937cc5 100644
--- a/pkgs/applications/video/shotcut/default.nix
+++ b/pkgs/applications/video/shotcut/default.nix
@@ -1,20 +1,20 @@
 { stdenv, fetchFromGitHub, SDL2, frei0r, gettext, mlt, jack1, pkgconfig, qtbase
 , qtmultimedia, qtwebkit, qtx11extras, qtwebsockets, qtquickcontrols
 , qtgraphicaleffects, libmlt
-, qmake, makeWrapper, fetchpatch, qttools }:
+, qmake, makeWrapper, qttools }:
 
 assert stdenv.lib.versionAtLeast libmlt.version "6.8.0";
 assert stdenv.lib.versionAtLeast mlt.version "6.8.0";
 
 stdenv.mkDerivation rec {
   name = "shotcut-${version}";
-  version = "18.06.02";
+  version = "18.08";
 
   src = fetchFromGitHub {
     owner = "mltframework";
     repo = "shotcut";
     rev = "v${version}";
-    sha256 = "1pqpgsb8ix1akq326chf46vvl5h02dwmdskskf2n6impygsy4x7v";
+    sha256 = "1p2s4avm3bl5ippmgfzkkbb2w0xs4vhk2wbcd22g7bh1zq9w190n";
   };
 
   enableParallelBuilding = true;
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   ];
 
   NIX_CFLAGS_COMPILE = "-I${libmlt}/include/mlt++ -I${libmlt}/include/mlt";
-  qmakeFlags = [ "QMAKE_LRELEASE=${stdenv.lib.getDev qttools}/bin/lrelease" ];
+  qmakeFlags = [ "QMAKE_LRELEASE=${stdenv.lib.getDev qttools}/bin/lrelease" "SHOTCUT_VERSION=${version}" ];
 
   prePatch = ''
     sed 's_shotcutPath, "qmelt"_"${mlt}/bin/melt"_' -i src/jobs/meltjob.cpp
@@ -35,12 +35,6 @@ stdenv.mkDerivation rec {
     sed "s_/usr/bin/nice_''${NICE}_" -i src/jobs/meltjob.cpp src/jobs/ffmpegjob.cpp
   '';
 
-  patches = [ (fetchpatch {
-    url = https://github.com/mltframework/shotcut/commit/f304b7403cc7beb57b1610afd9c5c8173749e80b.patch;
-    name = "qt511.patch";
-    sha256 = "1ynvyjchcb33a33x4w1ddnah2gyzmnm125ailgg6xy60lqsnsmp9";
-    } ) ];
-
   postInstall = ''
     mkdir -p $out/share/shotcut
     cp -r src/qml $out/share/shotcut/
diff --git a/pkgs/data/fonts/tex-gyre/default.nix b/pkgs/data/fonts/tex-gyre/default.nix
index a801886350df1..3229e58506d9a 100644
--- a/pkgs/data/fonts/tex-gyre/default.nix
+++ b/pkgs/data/fonts/tex-gyre/default.nix
@@ -34,56 +34,48 @@ let
   };
 in stdenv.lib.mapAttrs mkVariant {
   adventor = {
-    displayName = "Adventor";
     version = "2_501";
     sha256 = "0qjg3x0adfppyx3x33cm07ww9i9sl88xaq07m7wfip8rmyp567fn";
     outputHash = "117h6f02m1r54b4f1a98q5kkjchl5pv9ibm1jla6xrzhk2pchb27";
     abbreviation = "qag";
   };
   bonum = {
-    displayName = "Bonum";
     version = "2.004";
     sha256 = "0qbrs98knx4h0b297c5n3vav4mkal1a95ai2dzmdc10pghfzl8vv";
     outputHash = "0bid8gzwz50ylmm8jyqf9s4nfvy6cp1x34wbyrh4gyk1ki6hf3z1";
     abbreviation = "qbk";
   };
   chorus = {
-    displayName = "Chorus";
     version = "2.003";
     sha256 = "1b0zak27fzmapwbf2jasvsd95vhnqyc92n985d1lc1ivwja1zgfa";
     outputHash = "0fqifd45c1ys6y98b66lmldfbv7wjb2414fs9swicv4n7xvl3cp1";
     abbreviation = "qzc";
   };
   cursor = {
-    displayName = "Cursor";
     version = "2.004";
     sha256 = "0ck3jm33bk2xsxp5d2irzd3j24zb49f0gnjvd1nikg1ivk8w85ng";
     outputHash = "0i76835xqlkrnlx303mx63m0f4899j056c2ag2fl6p9qk8s4rskp";
     abbreviation = "qcr";
   };
   heros = {
-    displayName = "Heros";
     version = "2.004";
     sha256 = "1fj2srxxf6ap913y5yd3dn4jzg828j7381gifs39nm5lnzmgw78y";
     outputHash = "16y76ab46fxm9k8wfmwx4w0cl96yrmjywz587lyr08s0agp1v3kf";
     abbreviation = "qhv";
   };
   pagella = {
-    displayName = "Pagella";
     version ="2_501";
     sha256 = "1kccaxs3vk93la2pz4nv05hx1x3diyla49cz4l33zifdcp2zgg9d";
     outputHash = "1nnjsgplimh29502pkd19rvfg93x31svxxmx4x7h51njrx1j8qa8";
     abbreviation = "qpl";
   };
   schola = {
-    displayName = "Schola";
     version = "2.005";
     sha256 = "05z3gk4mm0sa7wwjcv31j2xlzqhwhcncpamn0kn9y0221cdknyp8";
     outputHash = "1yqq1ngcylhldrh1v35l439k72szq9m4gx6g0wh235fk65chb2bm";
     abbreviation = "qcs";
   };
   termes = {
-    displayName = "Termes";
     version = "2.004";
     sha256 = "1aq3yqbgkc3z20dkcqyhicsyq0afbgg4l397z96sd8a16jyz2x8k";
     outputHash = "1igw821m601h8937pix6yish4d8fxmz3h4j9hripf41bxsiafzzg";
diff --git a/pkgs/desktops/mate/mate-screensaver/default.nix b/pkgs/desktops/mate/mate-screensaver/default.nix
index 3289ff5081b5d..25d90c753dc38 100644
--- a/pkgs/desktops/mate/mate-screensaver/default.nix
+++ b/pkgs/desktops/mate/mate-screensaver/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "mate-screensaver-${version}";
-  version = "1.20.1";
+  version = "1.21.0";
 
   src = fetchurl {
     url = "http://pub.mate-desktop.org/releases/${mate.getRelease version}/${name}.tar.xz";
-    sha256 = "1mcr2915wymwjy55m2z0l6b9dszabbv0my0xxsa1fb8xkr4hk4qh";
+    sha256 = "1asfw2x0ha830ilkw97bjdqm2gnjbpb6dd7lb6h43aix7g3lgm7f";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/compilers/compcert/default.nix b/pkgs/development/compilers/compcert/default.nix
index 51392e23d8cf2..631179c483bcd 100644
--- a/pkgs/development/compilers/compcert/default.nix
+++ b/pkgs/development/compilers/compcert/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl
+{ stdenv, lib, fetchurl, fetchpatch
 , coq, ocamlPackages
 , tools ? stdenv.cc
 }:
@@ -7,11 +7,11 @@ assert lib.versionAtLeast ocamlPackages.ocaml.version "4.02";
 
 stdenv.mkDerivation rec {
   name    = "compcert-${version}";
-  version = "3.2";
+  version = "3.3";
 
   src = fetchurl {
     url    = "http://compcert.inria.fr/release/${name}.tgz";
-    sha256 = "11q4121s0rxva63njjwya7syfx9w0p4hzr6avh8s57vfbrcakc93";
+    sha256 = "16xrqcwak1v1fk5ndx6jf1yvxv3adsr7p7z34gfm2mpggxnq0xwn";
   };
 
   buildInputs = [ coq ]
@@ -19,9 +19,10 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  postPatch = ''
-    sed -i -e 's/8\.6\.1|8\.7\.0|8\.7\.1)/8.6.1|8.7.0|8.7.1|8.7.2)/' configure
-  '';
+  patches = [ (fetchpatch {
+    url = "https://github.com/AbsInt/CompCert/commit/679ecfeaa24c0615fa1999e9582bf2af6a9f35e7.patch";
+   sha256 = "04yrn6dp57aw6lmlr4yssjlx9cxix0mlmaw7gfhwyz5bzqc2za1a";
+  })];
 
   configurePhase = ''
     substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
diff --git a/pkgs/development/idris-modules/default.nix b/pkgs/development/idris-modules/default.nix
index 25f8dba00b02f..0368c00d12380 100644
--- a/pkgs/development/idris-modules/default.nix
+++ b/pkgs/development/idris-modules/default.nix
@@ -153,6 +153,8 @@
 
     protobuf = callPackage ./protobuf.nix {};
 
+    quantities = callPackage ./quantities.nix {};
+
     rationals = callPackage ./rationals.nix {};
 
     recursion_schemes = callPackage ./recursion_schemes.nix {};
diff --git a/pkgs/development/idris-modules/quantities.nix b/pkgs/development/idris-modules/quantities.nix
new file mode 100644
index 0000000000000..63cc2184504b6
--- /dev/null
+++ b/pkgs/development/idris-modules/quantities.nix
@@ -0,0 +1,22 @@
+{ build-idris-package
+, fetchFromGitHub
+, lib
+}:
+build-idris-package  {
+  name = "quantities";
+  version = "2018-04-17";
+
+  src = fetchFromGitHub {
+    owner = "timjb";
+    repo = "quantities";
+    rev = "76bb872bd89122043083351993140ae26eb91ead";
+    sha256 = "0fv12kdi9089b4kkr6inhqvs2s8x62nv5vqj76wzk8hy0lrzylzj";
+  };
+
+  meta = {
+    description = "Type-safe physical computations and unit conversions in Idris";
+    homepage = https://github.com/timjb/quantities;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ imuli ];
+  };
+}
diff --git a/pkgs/development/interpreters/duktape/default.nix b/pkgs/development/interpreters/duktape/default.nix
index 46550c8351088..2178f859007f3 100644
--- a/pkgs/development/interpreters/duktape/default.nix
+++ b/pkgs/development/interpreters/duktape/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   name = "duktape-${version}";
-  version = "2.2.1";
+  version = "2.3.0";
   src = fetchurl {
     url = "http://duktape.org/duktape-${version}.tar.xz";
-    sha256 = "1wp7mpkhizknq72ivdbkzps4radi1daqzjcjp1i54c2k4pnjxgis";
+    sha256 = "1s5g8lg0dga6x3rcq328a6hsd2sk2vzwq9zfmskjh5h6n8x2yvpd";
   };
 
   buildPhase = ''
diff --git a/pkgs/development/libraries/agda/agda-stdlib/default.nix b/pkgs/development/libraries/agda/agda-stdlib/default.nix
index 331039ec329fa..bd4270e8b9358 100644
--- a/pkgs/development/libraries/agda/agda-stdlib/default.nix
+++ b/pkgs/development/libraries/agda/agda-stdlib/default.nix
@@ -1,14 +1,14 @@
 { stdenv, agda, fetchFromGitHub, ghcWithPackages }:
 
 agda.mkDerivation (self: rec {
-  version = "0.15";
+  version = "0.16";
   name = "agda-stdlib-${version}";
 
   src = fetchFromGitHub {
     repo = "agda-stdlib";
     owner = "agda";
     rev = "v${version}";
-    sha256 = "0c2vfib4fmljy98c3s3s7jmpjlqxvsbv7wf6qxr38kamwzbryrjj";
+    sha256 = "0kqfx6742vbyyr8glqm5bkvj0z0y0dkaajlw10p3pzidrc17767r";
   };
 
   nativeBuildInputs = [ (ghcWithPackages (self : [ self.filemanip ])) ];
diff --git a/pkgs/development/libraries/cddlib/default.nix b/pkgs/development/libraries/cddlib/default.nix
index ee56b50e1da56..058ee893c37a4 100644
--- a/pkgs/development/libraries/cddlib/default.nix
+++ b/pkgs/development/libraries/cddlib/default.nix
@@ -1,55 +1,33 @@
 { stdenv
-, fetchurl
-, fetchpatch
+, fetchFromGitHub
 , gmp
 , autoreconfHook
+, texlive
 }:
 
 stdenv.mkDerivation rec {
   name = "cddlib-${version}";
-  version = "0.94i";
-  src = let
-    fileVersion = stdenv.lib.replaceStrings ["."] [""] version;
-  in fetchurl {
-    # Might switch to github in the future, see
-    # https://trac.sagemath.org/ticket/21952#comment:20
-    urls = [
-      "http://archive.ubuntu.com/ubuntu/pool/universe/c/cddlib/cddlib_${fileVersion}.orig.tar.gz"
-      "ftp://ftp.math.ethz.ch/users/fukudak/cdd/cddlib-${fileVersion}.tar.gz"
-    ];
-    sha256 = "00zdgiqb91vx6gd2103h3ijij0llspsxc6zz3iw2bll39fvkl4xq";
+  version = "0.94j";
+  src = fetchFromGitHub {
+    owner = "cddlib";
+    repo = "cddlib";
+    rev = "${version}";
+    sha256 = "1z03ljy3rrr0qq5gq54vynnif6fn0xhn05g90nnv0dpyc3ps8lzp";
   };
   buildInputs = [gmp];
   nativeBuildInputs = [
     autoreconfHook
+    texlive.combined.scheme-small # for building the documentation
   ];
-  # compute reduced H and V representation of polytope
-  # this patch is included by most distributions (Debian, Conda, ArchLinux, SageMath)
-  # proposed upstream (no answer yet): https://github.com/cddlib/cddlib/pull/3
-  both_reps_c = (fetchurl {
-    name = "cdd_both_reps.c";
-    url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-libs/cddlib/files/cdd_both_reps.c?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d";
-    sha256 = "0r9yc5bgiz8i72c6vsn2y2mjk5581iw94gji9v7lg16kzzgrk9x0";
-  });
-  preAutoreconf = ''
-    # Required by sage.geometry.polyhedron
-    cp ${both_reps_c} src/cdd_both_reps.c
-    cp ${both_reps_c} src-gmp/cdd_both_reps.c
-  '';
-  patches = [
-    # add the cdd_both_reps binary
-    (fetchpatch {
-      name = "add-cdd_both_reps-binary.patch";
-      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-libs/cddlib/files/cddlib-094h-add-cdd_both_reps-binary.patch?id=78e3a61a68c916450aa4e5ceecd20041583af901";
-      sha256 = "162ni2fr7dpbdkz0b5nizxq7qr5k1i1d75g0smiylpzfb0hb761a";
-    })
-  ];
-  meta = {
+  # No actual checks yet (2018-05-05), but maybe one day.
+  # Requested here: https://github.com/cddlib/cddlib/issues/25
+  doCheck = true;
+  meta = with stdenv.lib; {
     inherit version;
     description = ''An implementation of the Double Description Method for generating all vertices of a convex polyhedron'';
-    license = stdenv.lib.licenses.gpl2Plus ;
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [raskin timokau];
+    platforms = platforms.linux;
     homepage = https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html;
   };
 }
diff --git a/pkgs/development/libraries/exiv2/default.nix b/pkgs/development/libraries/exiv2/default.nix
index 7f5f190351791..f573a275aaab7 100644
--- a/pkgs/development/libraries/exiv2/default.nix
+++ b/pkgs/development/libraries/exiv2/default.nix
@@ -1,11 +1,15 @@
-{ stdenv, fetchurl, fetchpatch, zlib, expat, gettext }:
+{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, zlib, expat, gettext
+, autoconf }:
 
 stdenv.mkDerivation rec {
-  name = "exiv2-0.26";
+  name = "exiv2-0.26.2018.06.09";
 
-  src = fetchurl {
-    url = "http://www.exiv2.org/builds/${name}-trunk.tar.gz";
-    sha256 = "1yza317qxd8yshvqnay164imm0ks7cvij8y8j86p1gqi1153qpn7";
+    #url = "http://www.exiv2.org/builds/${name}-trunk.tar.gz";
+  src = fetchFromGitHub rec {
+    owner = "exiv2";
+    repo  = "exiv2";
+    rev = "4aa57ad";
+    sha256 = "1kblpxbi4wlb0l57xmr7g23zn9adjmfswhs6kcwmd7skwi2yivcd";
   };
 
   patches = [
@@ -16,25 +20,36 @@ stdenv.mkDerivation rec {
           + "/sha512/${sha512}/${patchname}";
       sha512 = "3f9242dbd4bfa9dcdf8c9820243b13dc14990373a800c4ebb6cf7eac5653cfef"
              + "e6f2c47a94fbee4ed24f0d8c2842729d721f6100a2b215e0f663c89bfefe9e32";
-     })
-     (fetchpatch {
-       # many CVEs - see https://github.com/Exiv2/exiv2/pull/120
-       url = "https://patch-diff.githubusercontent.com/raw/Exiv2/exiv2/pull/120.patch";
-       sha256 = "1szl22xmh12hibzaqf2zi8zl377x841m52x4jm5lziw6j8g81sj8";
-       excludes = [ "test/bugfixes-test.sh" ];
-     })
+    })
+    # Two backports from master, submitted as https://github.com/Exiv2/exiv2/pull/398
+    (fetchpatch {
+      name = "CVE-2018-12264.diff";
+      url = "https://github.com/vcunat/exiv2/commit/fd18e853.diff";
+      sha256 = "0y7ahh45lpaiazjnfllndfaa5pyixh6z4kcn2ywp7qy4ra7qpwdr";
+    })
+    (fetchpatch {
+      name = "CVE-2018-12265.diff";
+      url = "https://github.com/vcunat/exiv2/commit/9ed1671bd4.diff";
+      sha256 = "1cn446pfcgsh1bn9vxikkkcy1cqq7ghz2w291h1094ydqg6w7q6w";
+    })
   ];
 
   postPatch = "patchShebangs ./src/svn_version.sh";
 
+  preConfigure = "make config"; # needed because not using tarball
+
   outputs = [ "out" "dev" ];
 
-  nativeBuildInputs = [ gettext ];
+  nativeBuildInputs = [
+    gettext
+    autoconf # needed because not using tarball
+  ];
   propagatedBuildInputs = [ zlib expat ];
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://www.exiv2.org/;
     description = "A library and command-line utility to manage image metadata";
-    platforms = stdenv.lib.platforms.all;
+    platforms = platforms.all;
+    license = licenses.gpl2;
   };
 }
diff --git a/pkgs/development/libraries/keybinder/default.nix b/pkgs/development/libraries/keybinder/default.nix
index 5110908e0f272..20ab104874dc5 100644
--- a/pkgs/development/libraries/keybinder/default.nix
+++ b/pkgs/development/libraries/keybinder/default.nix
@@ -1,9 +1,9 @@
 { stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, gnome3
-, gtk-doc, gtk2, python2Packages, lua, libX11, libXext, libXrender, gobjectIntrospection
+, gtk-doc, gtk2, python2Packages, lua, gobjectIntrospection
 }:
 
 let
-  inherit (python2Packages) python pygobject3 pygtk;
+  inherit (python2Packages) python pygtk;
 in stdenv.mkDerivation rec {
   name = "keybinder-${version}";
   version = "0.3.0";
@@ -16,8 +16,8 @@ in stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [
-    autoconf automake libtool gnome3.gnome-common gtk-doc gnome3.gtk3
-    python pygobject3 pygtk lua libX11 libXext libXrender gobjectIntrospection gtk2
+    autoconf automake libtool gnome3.gnome-common gtk-doc gtk2
+    python pygtk lua gobjectIntrospection
   ];
 
   preConfigure = ''
diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix
index 02c13e413e33d..e584af775d2bb 100644
--- a/pkgs/development/libraries/libvirt/default.nix
+++ b/pkgs/development/libraries/libvirt/default.nix
@@ -16,19 +16,19 @@ let
   buildFromTarball = stdenv.isDarwin;
 in stdenv.mkDerivation rec {
   name = "libvirt-${version}";
-  version = "4.5.0";
+  version = "4.6.0";
 
   src =
     if buildFromTarball then
       fetchurl {
         url = "http://libvirt.org/sources/${name}.tar.xz";
-        sha256 = "02dbfyi80im37gdsxglb4fja78q63b8ahmgdc5kh8lx51kf5xsg7";
+        sha256 = "0rj0azi766g0xdxydvkq9nj95hhsiwqgclzzmyxvk2axhb8nrb5l";
       }
     else
       fetchgit {
         url = git://libvirt.org/libvirt.git;
         rev = "v${version}";
-        sha256 = "0ija9a02znajsa2pbxamrmz87zwpmba9s29vdzzqqqw5c1rdpcr6";
+        sha256 = "1lv1s93k056wylrlc7j4q45zir9z4qshzcl454spy2wb8cdn3h4s";
         fetchSubmodules = true;
       };
 
diff --git a/pkgs/development/libraries/mpich2/default.nix b/pkgs/development/libraries/mpich/default.nix
index b5a36c184ff74..87d24854255ae 100644
--- a/pkgs/development/libraries/mpich2/default.nix
+++ b/pkgs/development/libraries/mpich/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, perl, gfortran
-, slurm, openssh, hwloc
+,  openssh, hwloc
 } :
 
 stdenv.mkDerivation  rec {
@@ -16,7 +16,9 @@ stdenv.mkDerivation  rec {
     "--enable-sharedlib"
   ];
 
-  buildInputs = [ perl gfortran slurm openssh hwloc ];
+  enableParallelBuilding = true;
+
+  buildInputs = [ perl gfortran openssh hwloc ];
 
   doCheck = true;
 
@@ -26,8 +28,12 @@ stdenv.mkDerivation  rec {
       echo "fix rpath: $entry"
       patchelf --set-rpath "$out/lib" $entry
     done
-  '';
 
+    # Ensure the default compilers are the ones mpich was built with
+    sed -i 's:CC="gcc":CC=${stdenv.cc}/bin/gcc:' $out/bin/mpicc
+    sed -i 's:CXX="g++":CXX=${stdenv.cc}/bin/g++:' $out/bin/mpicxx
+    sed -i 's:FC="gfortran":FC=${gfortran}/bin/gfortran:' $out/bin/mpifort
+  '';
 
   meta = with stdenv.lib; {
     description = "Implementation of the Message Passing Interface (MPI) standard";
@@ -43,6 +49,6 @@ stdenv.mkDerivation  rec {
       fullName = "MPICH license (permissive)";
     };
     maintainers = [ maintainers.markuskowa ];
-    platforms = platforms.unix;
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix
index 4df0e08e6a721..35538b99060e4 100644
--- a/pkgs/development/libraries/openssl/default.nix
+++ b/pkgs/development/libraries/openssl/default.nix
@@ -126,6 +126,9 @@ in {
   openssl_1_1_0 = common {
     version = "1.1.0h";
     sha256 = "05x509lccqjscgyi935z809pwfm708islypwhmjnb6cyvrn64daq";
+    patches = [
+      ./revert-relaxed-quoting.patch
+    ];
   };
 
 }
diff --git a/pkgs/development/libraries/openssl/revert-relaxed-quoting.patch b/pkgs/development/libraries/openssl/revert-relaxed-quoting.patch
new file mode 100644
index 0000000000000..ebe7c0ef26ce2
--- /dev/null
+++ b/pkgs/development/libraries/openssl/revert-relaxed-quoting.patch
@@ -0,0 +1,37 @@
+From 7ee2a43069913fb7c444c656048996ea92cc465e Mon Sep 17 00:00:00 2001
+From: Richard Levitte <levitte@openssl.org>
+Date: Wed, 28 Mar 2018 14:46:27 +0200
+Subject: [PATCH] Revert "util/dofile.pl: only quote stuff that actually needs
+ quoting"
+
+This wasn't a good solution, too many things depend on the quotes being
+there consistently.
+
+This reverts commit 49cd47eaababc8c57871b929080fc1357e2ad7b8.
+
+Fixes #5772
+
+Reviewed-by: Rich Salz <rsalz@openssl.org>
+(Merged from https://github.com/openssl/openssl/pull/5773)
+
+(cherry picked from commit 00701e5ea84861b74d9d624f21a6b3fcb12e8acd)
+---
+ util/dofile.pl | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/util/dofile.pl b/util/dofile.pl
+index fc72989b0fd..a932941cd5a 100644
+--- a/util/dofile.pl
++++ b/util/dofile.pl
+@@ -99,9 +99,9 @@ package main;
+ # This adds quotes (") around the given string, and escapes any $, @, \,
+ # " and ' by prepending a \ to them.
+ sub quotify1 {
+-    my $s = my $orig = shift @_;
++    my $s = shift @_;
+     $s =~ s/([\$\@\\"'])/\\$1/g;
+-    $s ne $orig || $s =~ /\s/ ? '"'.$s.'"' : $s;
++    '"'.$s.'"';
+ }
+ 
+ # quotify_l LIST
diff --git a/pkgs/development/libraries/oracle-instantclient/default.nix b/pkgs/development/libraries/oracle-instantclient/default.nix
index 56f0cc084d144..a4196e0dc9f0b 100644
--- a/pkgs/development/libraries/oracle-instantclient/default.nix
+++ b/pkgs/development/libraries/oracle-instantclient/default.nix
@@ -52,6 +52,9 @@ in stdenv.mkDerivation rec {
     install -Dm644 *.jar $out/share/java
     install -Dm644 sdk/include/* $out/include
     install -Dm644 sdk/demo/* $out/share/${name}/demo
+
+    # PECL::oci8 will not build without this
+    ln -s $out/lib/libclntsh.so.12.1 $out/lib/libclntsh.so
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/libraries/prototypejs/default.nix b/pkgs/development/libraries/prototypejs/default.nix
new file mode 100644
index 0000000000000..a56b14384e5bb
--- /dev/null
+++ b/pkgs/development/libraries/prototypejs/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, ... }:
+let
+  version = "1.7.3.0";
+in fetchurl {
+  name = "prototype-${version}.js";
+  url = "https://ajax.googleapis.com/ajax/libs/prototype/${version}/prototype.js";
+  sha256 = "0q43vvrsb22h4jvavs1gk3v4ps61yx9k85b5n6q9mxivhmxprg26";
+
+  meta = with stdenv.lib; {
+    description = "A foundation for ambitious web user interfaces";
+    longDescription = ''
+      Prototype takes the complexity out of client-side web
+      programming. Built to solve real-world problems, it adds
+      useful extensions to the browser scripting environment
+      and provides elegant APIs around the clumsy interfaces
+      of Ajax and the Document Object Model.
+    '';
+    homepage = http://prototypejs.org/;
+    downloadPage = http://prototypejs.org/download/;
+    license = licenses.mit;
+    maintainers = with maintainers; [ das_j ];
+  };
+}
diff --git a/pkgs/development/libraries/science/math/libbraiding/default.nix b/pkgs/development/libraries/science/math/libbraiding/default.nix
new file mode 100644
index 0000000000000..be650f3c3ce89
--- /dev/null
+++ b/pkgs/development/libraries/science/math/libbraiding/default.nix
@@ -0,0 +1,34 @@
+{ stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.0";
+  name = "libbraiding-${version}";
+
+  src = fetchFromGitHub {
+    owner = "miguelmarco";
+    repo = "libbraiding";
+    rev = version;
+    sha256 = "0l68rikfr7k2l547gb3pp3g8cj5zzxwipm79xrb5r8ffj466ydxg";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  # no tests included for now (2018-08-05), but can't hurt to activate
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/miguelmarco/libbraiding/;
+    description = "C++ library for computations on braid groups";
+    longDescription = ''
+      A library to compute several properties of braids, including centralizer and conjugacy check.
+    '';
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ timokau ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/science/math/libhomfly/default.nix b/pkgs/development/libraries/science/math/libhomfly/default.nix
new file mode 100644
index 0000000000000..e96ee475d7d24
--- /dev/null
+++ b/pkgs/development/libraries/science/math/libhomfly/default.nix
@@ -0,0 +1,35 @@
+{ stdenv
+, fetchFromGitHub
+, autoreconfHook
+, boehmgc
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.02r5";
+  name = "llibhomfly-${version}";
+
+  src = fetchFromGitHub {
+    owner = "miguelmarco";
+    repo = "libhomfly";
+    rev = version;
+    sha256 = "1szv8iwlhvmy3saigi15xz8vgch92p2lbsm6440v5s8vxj455bvd";
+  };
+
+  buildInputs = [
+    boehmgc
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/miguelmarco/libhomfly/;
+    description = "Library to compute the homfly polynomial of knots and links";
+    license = licenses.unlicense;
+    maintainers = with maintainers; [ timokau ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/python-modules/asana/default.nix b/pkgs/development/python-modules/asana/default.nix
index 2fbe4932bedac..19140925595b6 100644
--- a/pkgs/development/python-modules/asana/default.nix
+++ b/pkgs/development/python-modules/asana/default.nix
@@ -4,22 +4,21 @@
 
 buildPythonPackage rec {
   pname = "asana";
-  version = "0.7.0";
+  version = "0.7.1";
 
   src = fetchFromGitHub {
     owner = "asana";
     repo = "python-asana";
     rev = "v${version}";
-    sha256 = "0786y3wxqxxhsb0kkpx4bfzif3dhvv3dmm6vnq58iyj94862kpxf";
+    sha256 = "0vmpy4j1n54gkkg0l8bhw0xf4yby5kqzxnsv07cjc2w38snj5vy1";
   };
 
   checkInputs = [ pytest responses ];
   propagatedBuildInputs = [ requests requests_oauthlib six ];
 
-  patchPhase = ''
-    echo > requirements.txt
-    sed -i "s/requests~=2.9.1/requests >=2.9.1/" setup.py
-    sed -i "s/requests_oauthlib~=0.6.1/requests_oauthlib >=0.6.1/" setup.py
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "requests_oauthlib >= 0.8.0, == 0.8.*" "requests_oauthlib>=0.8.0<2.0"
   '';
 
   checkPhase = ''
diff --git a/pkgs/development/python-modules/asgiref/default.nix b/pkgs/development/python-modules/asgiref/default.nix
index a556cd3c87f24..155ddf8c9f8b0 100644
--- a/pkgs/development/python-modules/asgiref/default.nix
+++ b/pkgs/development/python-modules/asgiref/default.nix
@@ -1,14 +1,16 @@
-{ stdenv, buildPythonPackage, fetchFromGitHub, async-timeout, pytest, pytest-asyncio }:
+{ stdenv, buildPythonPackage, pythonOlder, fetchFromGitHub, async-timeout, pytest, pytest-asyncio }:
 buildPythonPackage rec {
-  version = "2.2.0";
+  version = "2.3.2";
   pname = "asgiref";
 
+  disabled = pythonOlder "3.5";
+
   # PyPI tarball doesn't include tests directory
   src = fetchFromGitHub {
     owner = "django";
     repo = pname;
     rev = version;
-    sha256 = "0jsdkgwzswm1jbfm6d100yfvfzpic8v6ysydcnn798bbpwclj8ip";
+    sha256 = "1ljymmcscyp3bz33kjbhf99k04fbama87vg4069gbgj6lnxjpzav";
   };
 
   propagatedBuildInputs = [ async-timeout ];
diff --git a/pkgs/development/python-modules/fire/default.nix b/pkgs/development/python-modules/fire/default.nix
new file mode 100644
index 0000000000000..70538407f2ee6
--- /dev/null
+++ b/pkgs/development/python-modules/fire/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, buildPythonPackage, fetchFromGitHub, six, hypothesis, mock
+, python-Levenshtein, pytest }:
+
+buildPythonPackage rec {
+  pname = "fire";
+  version = "0.1.3";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "python-fire";
+    rev = "v${version}";
+    sha256 = "0kdcmzr3sgzjsw5fmvdylgrn8akqjbs433jbgqzp498njl9cc6qx";
+  };
+
+  propagatedBuildInputs = [ six ];
+
+  checkInputs = [ hypothesis mock python-Levenshtein pytest ];
+
+  checkPhase = ''
+    py.test
+  '';
+
+
+  meta = with stdenv.lib; {
+    description = "A library for automatically generating command line interfaces";
+    longDescription = ''
+      Python Fire is a library for automatically generating command line
+      interfaces (CLIs) from absolutely any Python object.
+
+      * Python Fire is a simple way to create a CLI in Python.
+
+      * Python Fire is a helpful tool for developing and debugging
+        Python code.
+
+      * Python Fire helps with exploring existing code or turning other
+        people's code into a CLI.
+
+      * Python Fire makes transitioning between Bash and Python easier.
+
+      * Python Fire makes using a Python REPL easier by setting up the
+        REPL with the modules and variables you'll need already imported
+        and created.
+    '';
+    license = licenses.asl20;
+    maintainers = with maintainers; [ leenaars ];
+  };
+}
diff --git a/pkgs/development/python-modules/libvirt/default.nix b/pkgs/development/python-modules/libvirt/default.nix
index 26b42020fc340..71e9adf11d2dd 100644
--- a/pkgs/development/python-modules/libvirt/default.nix
+++ b/pkgs/development/python-modules/libvirt/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "libvirt";
-  version = "4.5.0";
+  version = "4.6.0";
 
   src = assert version == libvirt.version; fetchgit {
     url = git://libvirt.org/libvirt-python.git;
     rev = "v${version}";
-    sha256 = "0w2rzkxv7jsq4670m0j5c6p4hpyi0r0ja6wd3wdvixcwc6hhx407";
+    sha256 = "0yrgibd5c9wy82ak8g9ykar6fma1wf7xzmmc47657lzm70m5av68";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/python-modules/python-language-server/default.nix b/pkgs/development/python-modules/python-language-server/default.nix
index c2df1f85325c7..800c9eba2abba 100644
--- a/pkgs/development/python-modules/python-language-server/default.nix
+++ b/pkgs/development/python-modules/python-language-server/default.nix
@@ -1,45 +1,60 @@
-{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27
+{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27
 , configparser, futures, future, jedi, pluggy
 , pytest, mock, pytestcov, coverage
-# The following packages are optional and
-# can be overwritten with null as your liking.
-# This also requires to disable tests.
-, rope ? null
+, # Allow building a limited set of providers, e.g. ["pycodestyle"].
+  providers ? ["*"]
+  # The following packages are optional and
+  # can be overwritten with null as your liking.
+, autopep8 ? null
 , mccabe ? null
-, pyflakes ? null
 , pycodestyle ? null
-, autopep8 ? null
-, yapf ? null
 , pydocstyle ? null
+, pyflakes ? null
+, rope ? null
+, yapf ? null
 }:
 
+let
+  withProvider = p: builtins.elem "*" providers || builtins.elem p providers;
+in
+
 buildPythonPackage rec {
   pname = "python-language-server";
-  version = "0.18.0";
+  version = "0.19.0";
 
   src = fetchFromGitHub {
     owner = "palantir";
     repo = "python-language-server";
     rev = version;
-    sha256 = "0ig34bc0qm6gdj8xakmm3877lmf8ms7qg0xj8hay9gpgf8cz894s";
+    sha256 = "0glnhnjmsnnh1vs73n9dglknfkhcgp03nkjbpz0phh1jlqrkrwm6";
   };
 
+  # The tests require all the providers, disable otherwise.
+  doCheck = providers == ["*"];
+
   checkInputs = [
     pytest mock pytestcov coverage
     # rope is technically a dependency, but we don't add it by default since we
     # already have jedi, which is the preferred option
     rope
   ];
+
   checkPhase = ''
     HOME=$TEMPDIR pytest
   '';
 
-  propagatedBuildInputs = [
-    jedi pluggy mccabe pyflakes pycodestyle yapf pydocstyle future autopep8
-  ] ++ lib.optional (isPy27) [ configparser ]
-    ++ lib.optional (pythonOlder "3.2") [ futures ];
+  propagatedBuildInputs = [ jedi pluggy future ]
+    ++ stdenv.lib.optional (withProvider "autopep8") autopep8
+    ++ stdenv.lib.optional (withProvider "mccabe") mccabe
+    ++ stdenv.lib.optional (withProvider "pycodestyle") pycodestyle
+    ++ stdenv.lib.optional (withProvider "pydocstyle") pydocstyle
+    ++ stdenv.lib.optional (withProvider "pyflakes") pyflakes
+    ++ stdenv.lib.optional (withProvider "rope") rope
+    ++ stdenv.lib.optional (withProvider "yapf") yapf
+    ++ stdenv.lib.optional isPy27 configparser
+    ++ stdenv.lib.optional (pythonOlder "3.2") futures;
 
-  meta = with lib; {
+  meta = with stdenv.lib; {
     homepage = https://github.com/palantir/python-language-server;
     description = "An implementation of the Language Server Protocol for Python";
     license = licenses.mit;
diff --git a/pkgs/games/ezquake/default.nix b/pkgs/games/ezquake/default.nix
index ff39d1b996500..14885e7a3b2b3 100644
--- a/pkgs/games/ezquake/default.nix
+++ b/pkgs/games/ezquake/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchFromGitHub, curl, expat
 , jansson, libpng, libjpeg, libGLU_combined, libXxf86vm, pcre
-, pkgconfig, SDL2, vimNox }:
+, pkgconfig, SDL2, vim }:
 
 stdenv.mkDerivation rec {
   name = pname + "-" + version;
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [
-    expat curl jansson libpng libjpeg libGLU_combined libXxf86vm pcre SDL2 vimNox
+    expat curl jansson libpng libjpeg libGLU_combined libXxf86vm pcre SDL2 vim
   ];
 
   installPhase = with stdenv.lib; let
diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix
index b29565d01ecb8..fb95b667d864f 100644
--- a/pkgs/misc/tmux-plugins/default.nix
+++ b/pkgs/misc/tmux-plugins/default.nix
@@ -3,18 +3,19 @@
 let
   rtpPath = "share/tmux-plugins";
 
-  addRtp = path: pluginName: attrs: derivation:
-    derivation // { rtp = "${derivation}/${path}/${builtins.replaceStrings ["-"] ["_"] pluginName}.tmux"; } // {
-      overrideAttrs = f: buildTmuxPlugin (attrs // f attrs);
+  addRtp = path: rtpFilePath: attrs: derivation:
+    derivation // { rtp = "${derivation}/${path}/${rtpFilePath}"; } // {
+      overrideAttrs = f: mkDerivation (attrs // f attrs);
     };
 
-  buildTmuxPlugin = a@{
+  mkDerivation = a@{
     pluginName,
+    rtpFilePath ? (builtins.replaceStrings ["-"] ["_"] pluginName) + ".tmux",
     namePrefix ? "tmuxplugin-",
     src,
     unpackPhase ? "",
-    configurePhase ? "",
-    buildPhase ? "",
+    configurePhase ? ":",
+    buildPhase ? ":",
     addonInfo ? null,
     preInstall ? "",
     postInstall ? "",
@@ -22,7 +23,7 @@ let
     dependencies ? [],
     ...
   }:
-    addRtp "${rtpPath}/${path}" pluginName a (stdenv.mkDerivation (a // {
+    addRtp "${rtpPath}/${path}" rtpFilePath a (stdenv.mkDerivation (a // {
       name = namePrefix + pluginName;
 
       inherit pluginName unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
@@ -43,14 +44,11 @@ let
       dependencies = [ pkgs.bash ] ++ dependencies;
     }));
 
-  buildTmuxPluginFrom2Nix = a: buildTmuxPlugin ({
-    buildPhase = ":";
-    configurePhase =":";
-  } // a);
-
 in rec {
 
-  battery = buildTmuxPluginFrom2Nix {
+  inherit mkDerivation;
+
+  battery = mkDerivation {
     pluginName = "battery";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-battery";
@@ -59,7 +57,7 @@ in rec {
     };
   };
 
-  continuum = buildTmuxPluginFrom2Nix {
+  continuum = mkDerivation {
     pluginName = "continuum";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-continuum";
@@ -69,7 +67,7 @@ in rec {
     dependencies = [ resurrect ];
   };
 
-  copycat = buildTmuxPluginFrom2Nix {
+  copycat = mkDerivation {
     pluginName = "copycat";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-copycat";
@@ -78,7 +76,7 @@ in rec {
     };
   };
 
-  cpu = buildTmuxPluginFrom2Nix {
+  cpu = mkDerivation {
     pluginName = "cpu";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-cpu";
@@ -87,7 +85,7 @@ in rec {
     };
   };
 
-  fpp = buildTmuxPluginFrom2Nix {
+  fpp = mkDerivation {
     pluginName = "fpp";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-fpp";
@@ -100,7 +98,17 @@ in rec {
     dependencies = [ pkgs.fpp ];
   };
 
-  logging = buildTmuxPluginFrom2Nix {
+  fzf-tmux-url = mkDerivation {
+    pluginName = "fzf-tmux-url";
+    rtpFilePath = "fzf-url.tmux";
+    src = fetchgit {
+      url = "https://github.com/wfxr/tmux-fzf-url";
+      rev = "ecd518eec1067234598c01e655b048ff9d06ef2f";
+      sha256 = "0png8hdv91y2nivq5vdii2192mb2qcrkwwn69lzxrdnbfa27qrgv";
+    };
+  };
+
+  logging = mkDerivation {
     pluginName = "logging";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-logging";
@@ -109,7 +117,7 @@ in rec {
     };
   };
 
-  net-speed = buildTmuxPluginFrom2Nix {
+  net-speed = mkDerivation {
     pluginName = "net-speed";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-net-speed";
@@ -118,7 +126,7 @@ in rec {
     };
   };
 
-  maildir-counter = buildTmuxPluginFrom2Nix {
+  maildir-counter = mkDerivation {
     pluginName = "maildir-counter";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-maildir-counter";
@@ -127,7 +135,7 @@ in rec {
     };
   };
 
-  online-status = buildTmuxPluginFrom2Nix {
+  online-status = mkDerivation {
     pluginName = "online-status";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-online-status";
@@ -136,7 +144,7 @@ in rec {
     };
   };
 
-  open = buildTmuxPluginFrom2Nix {
+  open = mkDerivation {
     pluginName = "open";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-open";
@@ -145,7 +153,7 @@ in rec {
     };
   };
 
-  pain-control = buildTmuxPluginFrom2Nix {
+  pain-control = mkDerivation {
     pluginName = "pain-control";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-pain-control";
@@ -154,7 +162,7 @@ in rec {
     };
   };
 
-  prefix-highlight = buildTmuxPluginFrom2Nix {
+  prefix-highlight = mkDerivation {
     pluginName = "prefix-highlight";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-prefix-highlight";
@@ -163,7 +171,7 @@ in rec {
     };
   };
 
-  resurrect = buildTmuxPluginFrom2Nix {
+  resurrect = mkDerivation {
     pluginName = "resurrect";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-resurrect";
@@ -172,7 +180,7 @@ in rec {
     };
   };
 
-  sensible = buildTmuxPluginFrom2Nix {
+  sensible = mkDerivation {
     pluginName = "sensible";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-sensible";
@@ -181,7 +189,7 @@ in rec {
     };
   };
 
-  sessionist = buildTmuxPluginFrom2Nix {
+  sessionist = mkDerivation {
     pluginName = "sessionist";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-sessionist";
@@ -190,7 +198,7 @@ in rec {
     };
   };
 
-  sidebar = buildTmuxPluginFrom2Nix {
+  sidebar = mkDerivation {
     pluginName = "sidebar";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-sidebar";
@@ -199,7 +207,7 @@ in rec {
     };
   };
 
-  urlview = buildTmuxPluginFrom2Nix {
+  urlview = mkDerivation {
     pluginName = "urlview";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-urlview";
@@ -212,7 +220,7 @@ in rec {
     dependencies = [ pkgs.urlview ];
   };
 
-  yank = buildTmuxPluginFrom2Nix {
+  yank = mkDerivation {
     pluginName = "yank";
     src = fetchgit {
       url = "https://github.com/tmux-plugins/tmux-yank";
diff --git a/pkgs/misc/urbit/default.nix b/pkgs/misc/urbit/default.nix
index df13c15562ddd..e356e83436dd3 100644
--- a/pkgs/misc/urbit/default.nix
+++ b/pkgs/misc/urbit/default.nix
@@ -1,39 +1,24 @@
-{ stdenv, fetchFromGitHub, gcc, gmp, libsigsegv, openssl, automake, autoconf, ragel,
-  cmake, re2c, libtool, ncurses, perl, zlib, python2, curl }:
+{ stdenv, fetchFromGitHub, curl, git, gmp, libsigsegv, meson, ncurses, ninja
+, openssl, pkgconfig, re2c, zlib
+}:
 
 stdenv.mkDerivation rec {
   name = "urbit-${version}";
-  version = "0.4.5";
+  version = "0.6.0";
 
   src = fetchFromGitHub {
     owner = "urbit";
     repo = "urbit";
-    rev = "v${version}";
-    sha256 = "1zgxgqbz74nsgfyrvsnjj6xxpb64mrnby7bb5qy733sy04gmzgik";
+    rev = "urbit-${version}";
+    sha256 = "158mz6c6y5z1b6piid8hvrl5mcqh8q1ny185gz51jayia51azmgs";
+    fetchSubmodules = true;
   };
 
-  buildInputs = with stdenv.lib; [
-    gcc gmp libsigsegv openssl automake autoconf ragel cmake re2c libtool
-    ncurses perl zlib python2 curl
-  ];
+  nativeBuildInputs = [ pkgconfig ninja meson ];
+  buildInputs = [ curl git gmp libsigsegv ncurses openssl re2c zlib ];
 
-  # uses 'readdir_r' deprecated by glibc 2.24
-  NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
-
-  configurePhase = ''
-    :
-  '';
-
-  buildPhase = ''
-    sed -i 's/-lcurses/-lncurses/' Makefile
-    mkdir -p $out
-    cp -r . $out/
-    cd $out
-    make
-  '';
-
-  installPhase = ''
-    :
+  postPatch = ''
+    patchShebangs .
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/os-specific/linux/bluez/default.nix b/pkgs/os-specific/linux/bluez/default.nix
index b095096caa767..3882a74258699 100644
--- a/pkgs/os-specific/linux/bluez/default.nix
+++ b/pkgs/os-specific/linux/bluez/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, dbus, glib, alsaLib,
-  pythonPackages, readline, udev, libical,
+  python3, readline, udev, libical,
   systemd, enableWiimote ? false, enableMidi ? false }:
 
 stdenv.mkDerivation rec {
@@ -10,12 +10,12 @@ stdenv.mkDerivation rec {
     sha256 = "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z";
   };
 
-  pythonPath = with pythonPackages; [
+  pythonPath = with python3.pkgs; [
     dbus-python pygobject2 pygobject3 recursivePthLoader
   ];
 
   buildInputs = [
-    dbus glib alsaLib pythonPackages.python pythonPackages.wrapPython
+    dbus glib alsaLib python3 python3.pkgs.wrapPython
     readline udev libical
   ];
 
diff --git a/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix b/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix
index 0918279cc9a9c..eb5b0bd294c87 100644
--- a/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix
+++ b/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, dpkg }:
 
 stdenv.mkDerivation rec {
   name = "raspberrypi-wireless-firmware-${version}";
@@ -20,11 +20,12 @@ stdenv.mkDerivation rec {
   # Firmware blobs do not need fixing and should not be modified
   dontFixup = true;
 
+
   # Unpack the debian package
+  nativeBuildInputs = [ dpkg ];
   unpackCmd = ''
     if ! [[ "$curSrc" =~ \.deb$ ]]; then return 1; fi
-    ar -xf "$curSrc"
-    tar -xf data.tar.xz
+    dpkg -x "$curSrc" .
   '';
 
   installPhase = ''
@@ -39,6 +40,10 @@ stdenv.mkDerivation rec {
     cp broadcom/*.hcd "$out/lib/firmware/brcm"
   '';
 
+  outputHashMode = "recursive";
+  outputHashAlgo = "sha256";
+  outputHash = "1gwzasl5w5nc0awqv3w2081ns63wd1yds0xh0dg95dc6brnqhhf8";
+
   meta = with stdenv.lib; {
     description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3 and Zero W";
     homepage = https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/;
diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix
index d8040fbf3bf33..9c9957d219306 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.14.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.14.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "4.14.60";
+  version = "4.14.61";
 
   # modDirVersion needs to be x.y.z, will automatically add .0 if needed
   modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "15djfcl4m388vm3wkfa6yx0sglyp8zh04s7m7xa1ybmsiwjl7qbc";
+    sha256 = "1s3h3js073h4ww2dryip91d2lvmgv439ly2vya9x7rvilwhwa3hd";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.17.nix b/pkgs/os-specific/linux/kernel/linux-4.17.nix
index 6004577fad68a..b98cf98904e56 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.17.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.17.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "4.17.12";
+  version = "4.17.13";
 
   # modDirVersion needs to be x.y.z, will automatically add .0 if needed
   modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "18xmkj1bmfrmvx6p8cl5l7pyv0zk5y3mxhyfnlzqwkxnvkjf5660";
+    sha256 = "0x1zas3jwvhjkifh20cwpd2g0glgr8m7h8lqng7awrd116xkw2w2";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix
index 8bb2d53da9e04..60a4d5a76ed9c 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix
@@ -1,11 +1,11 @@
 { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.4.145";
+  version = "4.4.146";
   extraMeta.branch = "4.4";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1max0d1b1y1ndrfprrcyb7c9y12pkx2whxzlr70qypcb5jz0v7ff";
+    sha256 = "1xbxw6yvbjam0xj8j44h730dpf5v94pcf9j7iivcmasgjp61120z";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix
index 231e24be91169..1863aadf8f1cd 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.9.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix
@@ -1,11 +1,11 @@
 { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.9.117";
+  version = "4.9.118";
   extraMeta.branch = "4.9";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1c3r0a4fchg358zff2ww8kw789kah3bhr750p9qlsy65d8rflcl2";
+    sha256 = "0myx79rmxgjbr87r815vybmbg6iqgd3nycildrpwsh301kj8kxvx";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
index 1366a11b573cf..1fb9866f4e957 100644
--- a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
+++ b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
@@ -1,22 +1,21 @@
 { stdenv, buildPackages, hostPlatform, fetchgit, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.15.2018.04.14";
-  modDirVersion = "4.15.0";
-  extraMeta.branch = "master";
-  extraMeta.maintainers = [ stdenv.lib.maintainers.davidak stdenv.lib.maintainers.chiiruno ];
+  version = "4.16.2018.08.03";
+  modDirVersion = "4.16.0";
 
   src = fetchgit {
     url = "https://evilpiepirate.org/git/bcachefs.git";
-    rev = "3b7c824e9330a640312fce1b04537c684c1d602c";
-    sha256 = "1l5ib28qkhrxggn6zj9b2839543anbxk2ip75yizgzlv9vr5m4pk";
+    rev = "e7a00a52b57336c04d1043c6fa0a67a7c8301cfb";
+    sha256 = "1a0kvpazvvh0rfb9hkyr4zw55ndh060j95fvhf2aaaj9qyc7p7wp";
   };
 
-  extraConfig = ''
-    BCACHEFS_FS m
-  '';
+  extraConfig = "BCACHEFS_FS m";
 
-  # Should the testing kernels ever be built on Hydra?
-  extraMeta.hydraPlatforms = [];
+  extraMeta = {
+    branch = "master";
+    hydraPlatforms = []; # Should the testing kernels ever be built on Hydra?
+    maintainers = with stdenv.lib.maintainers; [ davidak chiiruno ];
+  };
 
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix
index ec4d9c29dbc75..ec3baaf1e0a47 100644
--- a/pkgs/os-specific/linux/kernel/linux-testing.nix
+++ b/pkgs/os-specific/linux/kernel/linux-testing.nix
@@ -1,13 +1,13 @@
 { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.18-rc7";
-  modDirVersion = "4.18.0-rc7";
+  version = "4.18-rc8";
+  modDirVersion = "4.18.0-rc8";
   extraMeta.branch = "4.18";
 
   src = fetchurl {
     url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
-    sha256 = "005kk7rxawkka60y31a5aiqrq3w6i1k27b5n2lcq63agjcxh54rq";
+    sha256 = "0rqyqms63c15iwcwy40yqd9fvlvh3ah09gddv0wf45z9dqp7id1m";
   };
 
   # Should the testing kernels ever be built on Hydra?
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 1a365046f5f35..143671428c418 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -48,17 +48,6 @@ rec {
     };
   };
 
-  # https://patchwork.kernel.org/patch/9626797/
-  # Should be included in 4.17, so this patch can be dropped when 4.16 becomes obsolete.
-  bcm2835_mmal_v4l2_camera_driver = rec {
-    name = "bcm2835_mmal_v4l2_camera_driver";
-    patch = fetchpatch {
-      name = name + ".patch";
-      url = https://patchwork.kernel.org/patch/9626797/raw/;
-      sha256 = "0iwb0yxsf95zv4qxkvlvhqfmzx0rk13g9clvxsharvwkb4w5lwa0";
-    };
-  };
-
   # https://github.com/NixOS/nixpkgs/issues/42755
   xen-netfront_fix_mismatched_rtnl_unlock = rec {
     name = "xen-netfront_fix_mismatched_rtnl_unlock";
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 5f41dbbdfa191..30b16ea3bde6b 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -2,7 +2,7 @@
 # Do not edit!
 
 {
-  version = "0.74.2";
+  version = "0.75.2";
   components = {
     "abode" = ps: with ps; [  ];
     "ads" = ps: with ps; [  ];
@@ -47,6 +47,7 @@
     "august" = ps: with ps; [  ];
     "auth" = ps: with ps; [ aiohttp-cors ];
     "auth.indieauth" = ps: with ps; [  ];
+    "auth.login_flow" = ps: with ps; [  ];
     "automation" = ps: with ps; [  ];
     "automation.event" = ps: with ps; [  ];
     "automation.homeassistant" = ps: with ps; [  ];
@@ -128,6 +129,7 @@
     "binary_sensor.skybell" = ps: with ps; [  ];
     "binary_sensor.sleepiq" = ps: with ps; [  ];
     "binary_sensor.spc" = ps: with ps; [  ];
+    "binary_sensor.tahoma" = ps: with ps; [  ];
     "binary_sensor.tapsaff" = ps: with ps; [  ];
     "binary_sensor.tcp" = ps: with ps; [  ];
     "binary_sensor.tellduslive" = ps: with ps; [  ];
@@ -225,10 +227,12 @@
     "climate.proliphix" = ps: with ps; [  ];
     "climate.radiotherm" = ps: with ps; [  ];
     "climate.sensibo" = ps: with ps; [  ];
+    "climate.spider" = ps: with ps; [  ];
     "climate.tado" = ps: with ps; [  ];
     "climate.tesla" = ps: with ps; [  ];
     "climate.toon" = ps: with ps; [  ];
     "climate.touchline" = ps: with ps; [  ];
+    "climate.tuya" = ps: with ps; [  ];
     "climate.venstar" = ps: with ps; [  ];
     "climate.vera" = ps: with ps; [  ];
     "climate.wink" = ps: with ps; [  ];
@@ -259,6 +263,8 @@
     "counter" = ps: with ps; [  ];
     "cover" = ps: with ps; [  ];
     "cover.abode" = ps: with ps; [  ];
+    "cover.aladdin_connect" = ps: with ps; [  ];
+    "cover.brunt" = ps: with ps; [  ];
     "cover.command_line" = ps: with ps; [  ];
     "cover.demo" = ps: with ps; [  ];
     "cover.garadget" = ps: with ps; [  ];
@@ -282,6 +288,7 @@
     "cover.tellduslive" = ps: with ps; [  ];
     "cover.tellstick" = ps: with ps; [  ];
     "cover.template" = ps: with ps; [  ];
+    "cover.tuya" = ps: with ps; [  ];
     "cover.velbus" = ps: with ps; [  ];
     "cover.vera" = ps: with ps; [  ];
     "cover.wink" = ps: with ps; [  ];
@@ -375,6 +382,7 @@
     "fan.isy994" = ps: with ps; [  ];
     "fan.mqtt" = ps: with ps; [ paho-mqtt ];
     "fan.template" = ps: with ps; [  ];
+    "fan.tuya" = ps: with ps; [  ];
     "fan.velbus" = ps: with ps; [  ];
     "fan.wink" = ps: with ps; [  ];
     "fan.xiaomi_miio" = ps: with ps; [ construct ];
@@ -482,6 +490,7 @@
     "light.enocean" = ps: with ps; [  ];
     "light.eufy" = ps: with ps; [  ];
     "light.flux_led" = ps: with ps; [  ];
+    "light.futurenow" = ps: with ps; [  ];
     "light.greenwave" = ps: with ps; [  ];
     "light.group" = ps: with ps; [  ];
     "light.hive" = ps: with ps; [  ];
@@ -518,6 +527,7 @@
     "light.rpi_gpio_pwm" = ps: with ps; [  ];
     "light.scsgate" = ps: with ps; [  ];
     "light.sensehat" = ps: with ps; [  ];
+    "light.sisyphus" = ps: with ps; [  ];
     "light.skybell" = ps: with ps; [  ];
     "light.tellduslive" = ps: with ps; [  ];
     "light.tellstick" = ps: with ps; [  ];
@@ -620,6 +630,7 @@
     "media_player.russound_rio" = ps: with ps; [  ];
     "media_player.russound_rnet" = ps: with ps; [  ];
     "media_player.samsungtv" = ps: with ps; [ wakeonlan ];
+    "media_player.sisyphus" = ps: with ps; [  ];
     "media_player.snapcast" = ps: with ps; [  ];
     "media_player.songpal" = ps: with ps; [  ];
     "media_player.sonos" = ps: with ps; [ soco ];
@@ -770,6 +781,7 @@
     "scene.litejet" = ps: with ps; [  ];
     "scene.lutron_caseta" = ps: with ps; [  ];
     "scene.tahoma" = ps: with ps; [  ];
+    "scene.tuya" = ps: with ps; [  ];
     "scene.velux" = ps: with ps; [  ];
     "scene.vera" = ps: with ps; [  ];
     "scene.wink" = ps: with ps; [  ];
@@ -896,6 +908,7 @@
     "sensor.loopenergy" = ps: with ps; [  ];
     "sensor.luftdaten" = ps: with ps; [ luftdaten ];
     "sensor.lyft" = ps: with ps; [  ];
+    "sensor.magicseaweed" = ps: with ps; [  ];
     "sensor.melissa" = ps: with ps; [  ];
     "sensor.metoffice" = ps: with ps; [  ];
     "sensor.mfi" = ps: with ps; [  ];
@@ -1048,6 +1061,7 @@
     "shell_command" = ps: with ps; [  ];
     "shiftr" = ps: with ps; [ paho-mqtt ];
     "shopping_list" = ps: with ps; [ aiohttp-cors ];
+    "sisyphus" = ps: with ps; [  ];
     "skybell" = ps: with ps; [  ];
     "sleepiq" = ps: with ps; [  ];
     "smappee" = ps: with ps; [  ];
@@ -1055,6 +1069,7 @@
     "sonos" = ps: with ps; [ soco ];
     "spaceapi" = ps: with ps; [ aiohttp-cors ];
     "spc" = ps: with ps; [ websockets ];
+    "spider" = ps: with ps; [  ];
     "splunk" = ps: with ps; [  ];
     "statsd" = ps: with ps; [ statsd ];
     "sun" = ps: with ps; [  ];
@@ -1128,6 +1143,7 @@
     "switch.skybell" = ps: with ps; [  ];
     "switch.smappee" = ps: with ps; [  ];
     "switch.snmp" = ps: with ps; [ pysnmp ];
+    "switch.spider" = ps: with ps; [  ];
     "switch.tahoma" = ps: with ps; [  ];
     "switch.tellduslive" = ps: with ps; [  ];
     "switch.tellstick" = ps: with ps; [  ];
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix
index 700f8ed78627b..5446398aa8b0b 100644
--- a/pkgs/servers/home-assistant/default.nix
+++ b/pkgs/servers/home-assistant/default.nix
@@ -1,4 +1,4 @@
-{ lib, fetchFromGitHub, python3
+{ lib, fetchFromGitHub, fetchpatch, python3
 
 # Look up dependencies of specified components in component-packages.nix
 , extraComponents ? []
@@ -29,10 +29,10 @@ let
         };
       });
       voluptuous = super.voluptuous.overridePythonAttrs (oldAttrs: rec {
-        version = "0.11.1";
+        version = "0.11.5";
         src = oldAttrs.src.override {
           inherit version;
-          sha256 = "af7315c9fa99e0bfd195a21106c82c81619b42f0bd9b6e287b797c6b6b6a9918";
+          sha256 = "567a56286ef82a9d7ae0628c5842f65f516abcb496e74f3f59f1d7b28df314ef";
         };
       });
       attrs = super.attrs.overridePythonAttrs (oldAttrs: rec {
@@ -74,7 +74,7 @@ let
   extraBuildInputs = extraPackages py.pkgs;
 
   # Don't forget to run parse-requirements.py after updating
-  hassVersion = "0.74.2";
+  hassVersion = "0.75.2";
 
 in with py.pkgs; buildPythonApplication rec {
   pname = "homeassistant";
@@ -89,7 +89,7 @@ in with py.pkgs; buildPythonApplication rec {
     owner = "home-assistant";
     repo = "home-assistant";
     rev = version;
-    sha256 = "02wdvkcl4zjw009a5ylblk5blpf5rhlvch8vsg4cx07sj9xgjzmw";
+    sha256 = "1ib76wz3f6jfi7a0w2v561g8vf5w4p2b2d79667api6ynvbw2l9d";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix
index 4a4201b673302..864a91683eea5 100644
--- a/pkgs/servers/home-assistant/frontend.nix
+++ b/pkgs/servers/home-assistant/frontend.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "home-assistant-frontend";
-  version = "20180720.0";
+  version = "20180804.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "4a9d570cfc1d6b0e4b914897197d6772d48aa38b10202a648e79c5fb2a6a0293";
+    sha256 = "50a9e74efe2b56fbc34fba07205829e0ea77315183e85c235d177cabff3b62ee";
   };
 
   propagatedBuildInputs = [ user-agents ];
diff --git a/pkgs/servers/http/nginx/modules.nix b/pkgs/servers/http/nginx/modules.nix
index 9f2cd319f0e72..0501bcc9e58b9 100644
--- a/pkgs/servers/http/nginx/modules.nix
+++ b/pkgs/servers/http/nginx/modules.nix
@@ -94,6 +94,16 @@
     '';
   };
 
+  lua-upstream = {
+    src = fetchFromGitHub {
+      owner = "openresty";
+      repo = "lua-upstream-nginx-module";
+      rev = "v0.07";
+      sha256 = "1gqccg8airli3i9103zv1zfwbjm27h235qjabfbfqk503rjamkpk";
+    };
+    inputs = [ pkgs.luajit ];
+  };
+
   modsecurity = {
     src = "${pkgs.modsecurity_standalone.nginx}/nginx/modsecurity";
     inputs = [ pkgs.curl pkgs.apr pkgs.aprutil pkgs.apacheHttpd pkgs.yajl ];
@@ -215,6 +225,33 @@
     };
   };
 
+  stream-sts = {
+    src = fetchFromGitHub {
+      owner = "vozlt";
+      repo = "nginx-module-stream-sts";
+      rev = "v0.1.1";
+      sha256 = "1jdj1kik6l3rl9nyx61xkqk7hmqbncy0rrqjz3dmjqsz92y8zaya";
+    };
+  };
+
+  sts = {
+    src = fetchFromGitHub {
+      owner = "vozlt";
+      repo = "nginx-module-sts";
+      rev = "v0.1.1";
+      sha256 = "0nvb29641x1i7mdbydcny4qwlvdpws38xscxirajd2x7nnfdflrk";
+    };
+  };
+
+  sysguard = {
+    src = fetchFromGitHub {
+      owner = "vozlt";
+      repo = "nginx-module-sysguard";
+      rev = "e512897f5aba4f79ccaeeebb51138f1704a58608";
+      sha256 = "19c6w6wscbq9phnx7vzbdf4ay6p2ys0g7kp2rmc9d4fb53phrhfx";
+    };
+  };
+
   upstream-check = {
     src = fetchFromGitHub {
       owner = "yaoweibin";
@@ -234,6 +271,15 @@
     inputs = [ pkgs.msgpuck.dev pkgs.yajl ];
   };
 
+  url = {
+    src = fetchFromGitHub {
+      owner = "vozlt";
+      repo = "nginx-module-url";
+      rev = "9299816ca6bc395625c3683fbd2aa7b916bfe91e";
+      sha256 = "0mk1gjmfnry6hgdsnlavww9bn7223idw50jlkhh5k00q5509w4ip";
+    };
+  };
+
   vts = {
     src = fetchFromGitHub {
       owner = "vozlt";
diff --git a/pkgs/servers/matterbridge/default.nix b/pkgs/servers/matterbridge/default.nix
index 14662ff6cc258..9e5a9ffe780d1 100644
--- a/pkgs/servers/matterbridge/default.nix
+++ b/pkgs/servers/matterbridge/default.nix
@@ -2,13 +2,13 @@
 
 buildGoPackage rec {
   name = "matterbridge-${version}";
-  version = "1.7.1";
+  version = "1.11.0";
 
   goPackagePath = "github.com/42wim/matterbridge";
 
   src = fetchurl {
     url = "https://github.com/42wim/matterbridge/archive/v${version}.tar.gz";
-    sha256 = "0ajc7xswmwhc2xn937sv3b76s8hblfn9x9rj5825hi3d3s8zqq88";
+    sha256 = "1fjpgdaq4mfgf36gzk3hhmlbpfn44b7xll2rdpy69y460jrjfg6k";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix
index 6ca3384711193..82c159ebc82a2 100644
--- a/pkgs/servers/mpd/default.nix
+++ b/pkgs/servers/mpd/default.nix
@@ -27,7 +27,7 @@
 , opusSupport ? true, libopus
 , soundcloudSupport ? true, yajl
 , nfsSupport ? true, libnfs
-, smbSupport ? true, smbclient
+, smbSupport ? true, samba
 }:
 
 assert avahiSupport -> avahi != null && dbus != null;
@@ -85,7 +85,7 @@ in stdenv.mkDerivation rec {
     ++ opt opusSupport libopus
     ++ opt soundcloudSupport yajl
     ++ opt (!stdenv.isDarwin && nfsSupport) libnfs
-    ++ opt (!stdenv.isDarwin && smbSupport) smbclient;
+    ++ opt (!stdenv.isDarwin && smbSupport) samba;
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
 
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix
index 7c1b6cc8702c2..121e42f7a978c 100644
--- a/pkgs/servers/sql/mariadb/default.nix
+++ b/pkgs/servers/sql/mariadb/default.nix
@@ -22,14 +22,14 @@ galeraLibs = buildEnv {
 };
 
 common = rec { # attributes common to both builds
-  version = "10.3.8";
+  version = "10.2.16";
 
   src = fetchurl {
     urls = [
       "https://downloads.mariadb.org/f/mariadb-${version}/source/mariadb-${version}.tar.gz"
       "https://downloads.mariadb.com/MariaDB/mariadb-${version}/source/mariadb-${version}.tar.gz"
     ];
-    sha256 = "1f0syfrv0my7sm8cbpic00ldy90psimy8yvm0ld82bfi2isw3gih";
+    sha256 = "1i2dwpp96ywjk147qqpcad8vqcy4rxmfbv2cb8ww3sffpa9yx0n1";
     name   = "mariadb-${version}.tar.gz";
   };
 
diff --git a/pkgs/servers/xmpp/ejabberd/default.nix b/pkgs/servers/xmpp/ejabberd/default.nix
index 6a0bedeab260e..1436af024cd79 100644
--- a/pkgs/servers/xmpp/ejabberd/default.nix
+++ b/pkgs/servers/xmpp/ejabberd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, writeScriptBin, lib, fetchurl, git, cacert
+{ stdenv, writeScriptBin, makeWrapper, lib, fetchurl, git, cacert, libpng, libjpeg, libwebp
 , erlang, openssl, expat, libyaml, bash, gnused, gnugrep, coreutils, utillinux, procps, gd
 , flock
 , withMysql ? false
@@ -24,17 +24,17 @@ let
   ctlpath = lib.makeBinPath [ bash gnused gnugrep coreutils utillinux procps ];
 
 in stdenv.mkDerivation rec {
-  version = "18.01";
+  version = "18.06";
   name = "ejabberd-${version}";
 
   src = fetchurl {
     url = "https://www.process-one.net/downloads/ejabberd/${version}/${name}.tgz";
-    sha256 = "01i2n8mlgw293jdf4172f9q8ca8m35vysjws791p7nynpfdb4cn6";
+    sha256 = "1c4h6qrckihm8v4vm52h31j5dxg7247vk374rwz41idfb25vx7dc";
   };
 
   nativeBuildInputs = [ fakegit ];
 
-  buildInputs = [ erlang openssl expat libyaml gd ]
+  buildInputs = [ erlang openssl expat libyaml gd makeWrapper ]
     ++ lib.optional withSqlite sqlite
     ++ lib.optional withPam pam
     ++ lib.optional withZlib zlib
@@ -75,7 +75,7 @@ in stdenv.mkDerivation rec {
 
     outputHashMode = "recursive";
     outputHashAlgo = "sha256";
-    outputHash = "1v3h0c7kfifb6wsfxyv5j1wc7rlxbb7r0pgd4s340wiyxnllzzhk";
+    outputHash = "1bk3yd10cq6vlgmh2qawl82m29yi5zcbsdlz17xyy76sg2ka622a";
   };
 
   configureFlags =
@@ -106,6 +106,7 @@ in stdenv.mkDerivation rec {
       -e 's,\(^ *JOT=\).*,\1,' \
       -e 's,\(^ *CONNLOCKDIR=\).*,\1/var/lock/ejabberdctl,' \
       $out/sbin/ejabberdctl
+    wrapProgram $out/lib/eimp-*/priv/bin/eimp --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ libpng libjpeg libwebp ]}"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/shells/zsh/antibody/default.nix b/pkgs/shells/zsh/antibody/default.nix
index 98ca9ce8f999b..60304531bfbe4 100644
--- a/pkgs/shells/zsh/antibody/default.nix
+++ b/pkgs/shells/zsh/antibody/default.nix
@@ -2,16 +2,16 @@
 
 buildGoPackage rec {
   name = "antibody-${version}";
-  version = "3.5.1";
+  version = "3.6.1";
   rev = "v${version}";
-  
+
   goPackagePath = "github.com/getantibody/antibody";
 
   src = fetchFromGitHub {
     inherit rev;
     owner  = "getantibody";
     repo   = "antibody";
-    sha256 = "0bqq59vnnm80jiqlhn7wfyzj96nkv8k9zp8i4sgcj8gvk1zq2lbc";
+    sha256 = "1xlaf3440hs1ffa23ja0fc185sj0rxjv0808ib8li3rq2qfkd0k8";
   };
 
   goDeps = ./deps.nix;
diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix
index 907ac58d15fed..292c0be20e57e 100644
--- a/pkgs/tools/archivers/sharutils/default.nix
+++ b/pkgs/tools/archivers/sharutils/default.nix
@@ -19,7 +19,15 @@ stdenv.mkDerivation rec {
   # remaps /etc/passwd to a trivial file, but we can't do that on Darwin so I do this
   # instead. In this case, I pass in the very imaginative "submitter" as the submitter name
 
-  patchPhase = let
+  patches = [
+    # CVE-2018-1000097
+    (fetchurl {
+      url = "https://sources.debian.org/data/main/s/sharutils/1:4.15.2-2+deb9u1/debian/patches/01-fix-heap-buffer-overflow-cve-2018-1000097.patch";
+      sha256 = "19g0sxc8g79aj5gd5idz5409311253jf2q8wqkasf0handdvsbxx";
+    })
+  ];
+
+  postPatch = let
       # This evaluates to a string containing:
       #
       #     substituteInPlace tests/shar-2 --replace '${SHAR}' '${SHAR} -s submitter'
diff --git a/pkgs/tools/backup/ddar/default.nix b/pkgs/tools/backup/ddar/default.nix
index ce65ef4eb80b3..3855152880e23 100644
--- a/pkgs/tools/backup/ddar/default.nix
+++ b/pkgs/tools/backup/ddar/default.nix
@@ -1,6 +1,6 @@
-{ lib, buildPythonApplication, fetchFromGitHub, protobuf, roundup }:
+{ lib, python2, fetchFromGitHub, roundup }:
 
-buildPythonApplication rec {
+python2.pkgs.buildPythonApplication rec {
   pname = "ddar";
   version = "1.0";
 
@@ -23,7 +23,7 @@ buildPythonApplication rec {
     make -f Makefile.prep synctus/ddar_pb2.py
   '';
 
-  propagatedBuildInputs = [ protobuf ];
+  propagatedBuildInputs = with python2.pkgs; [ protobuf ];
 
   checkInputs = [ roundup ];
 
diff --git a/pkgs/tools/backup/duply/default.nix b/pkgs/tools/backup/duply/default.nix
index e8d3a2e185eea..cc4785740a4e1 100644
--- a/pkgs/tools/backup/duply/default.nix
+++ b/pkgs/tools/backup/duply/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, coreutils, python, duplicity, gawk, gnupg1, bash
+{ stdenv, fetchurl, coreutils, python2, duplicity, gawk, gnupg1, bash
 , gnugrep, txt2man, makeWrapper, which
 }:
 
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
     mkdir -p "$out/share/man/man1"
     install -vD duply "$out/bin"
     wrapProgram "$out/bin/duply" --set PATH \
-        ${stdenv.lib.makeBinPath [ coreutils python duplicity gawk gnupg1 bash gnugrep txt2man which ]}
+        ${stdenv.lib.makeBinPath [ coreutils python2 duplicity gawk gnupg1 bash gnugrep txt2man which ]}
     "$out/bin/duply" txt2man > "$out/share/man/man1/duply.1"
   '';
 
diff --git a/pkgs/tools/bluetooth/blueman/default.nix b/pkgs/tools/bluetooth/blueman/default.nix
index da562fde16038..29c9a21465c72 100644
--- a/pkgs/tools/bluetooth/blueman/default.nix
+++ b/pkgs/tools/bluetooth/blueman/default.nix
@@ -1,9 +1,10 @@
-{ stdenv, lib, fetchurl, intltool, pkgconfig, pythonPackages, bluez, gtk3
+{ stdenv, lib, fetchurl, intltool, pkgconfig, python3Packages, bluez, gtk3
 , obex_data_server, xdg_utils, libnotify, dnsmasq, dhcp
 , hicolor-icon-theme, librsvg, wrapGAppsHook, gobjectIntrospection
 , withPulseAudio ? true, libpulseaudio }:
 
 let
+  pythonPackages = python3Packages;
   binPath = lib.makeBinPath [ xdg_utils dnsmasq dhcp ];
 
 in stdenv.mkDerivation rec {
diff --git a/pkgs/tools/filesystems/bcachefs-tools/Makefile.patch b/pkgs/tools/filesystems/bcachefs-tools/Makefile.patch
deleted file mode 100644
index 812f9954cf207..0000000000000
--- a/pkgs/tools/filesystems/bcachefs-tools/Makefile.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Makefile b/Makefile
-index af7a206..553ac70 100644
---- a/Makefile
-+++ b/Makefile
-@@ -47,7 +47,7 @@ ifeq ($(PREFIX),/usr)
- 	INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools
- else
- 	ROOT_SBINDIR=$(PREFIX)/sbin
--	INITRAMFS_DIR=/etc/initramfs-tools
-+	INITRAMFS_DIR=$(PREFIX)/etc/initramfs-tools
- endif
- 
- .PHONY: all
diff --git a/pkgs/tools/filesystems/bcachefs-tools/default.nix b/pkgs/tools/filesystems/bcachefs-tools/default.nix
index 1fafe7412d87b..b919d58087566 100644
--- a/pkgs/tools/filesystems/bcachefs-tools/default.nix
+++ b/pkgs/tools/filesystems/bcachefs-tools/default.nix
@@ -1,27 +1,30 @@
-{ stdenv, fetchgit, pkgconfig, attr, libuuid, libscrypt, libsodium
-, keyutils, liburcu, zlib, libaio, zstd }:
+{ stdenv, fetchgit, pkgconfig, attr, libuuid, libscrypt, libsodium, keyutils
+, liburcu, zlib, libaio, zstd, lz4 }:
 
 stdenv.mkDerivation rec {
-  name = "bcachefs-tools-unstable-2018-04-10";
+  name = "bcachefs-tools-unstable-2018-07-21";
 
   src = fetchgit {
     url = "https://evilpiepirate.org/git/bcachefs-tools.git";
-    rev = "c598d91dcb0c7e95abdacb2711898ae14ab52ca1";
-    sha256 = "1mglw6p1145nryn8babkg2hj778kqa0vrzjbdp9kxjlyb3fksmff";
+    rev = "cecf7e05e151499a3e96dc05f97f37c14162e94b";
+    sha256 = "18vmyrjwza1iv0apkykbqsnnic5lrqlwfsrj85pgrpwzii36i8i0";
   };
 
   enableParallelBuilding = true;
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ attr libuuid libscrypt libsodium keyutils liburcu zlib libaio zstd ];
-  patches = [ ./Makefile.patch ];
-
+  buildInputs = [ attr libuuid libscrypt libsodium keyutils liburcu zlib libaio zstd lz4 ];
   installFlags = [ "PREFIX=$(out)" ];
+  
+  preInstall = ''
+    sed -i \
+      "s,INITRAMFS_DIR=/etc/initramfs-tools,INITRAMFS_DIR=$out/etc/initramfs-tools,g" Makefile
+  '';
 
   meta = with stdenv.lib; {
     description = "Tool for managing bcachefs filesystems";
     homepage = https://bcachefs.org/;
     license = licenses.gpl2;
-    maintainers = with maintainers; [ davidak chiiruno];
+    maintainers = with maintainers; [ davidak chiiruno ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/tools/filesystems/squashfuse/default.nix b/pkgs/tools/filesystems/squashfuse/default.nix
index b3d8d70f0e291..d7d917d5e9fb9 100644
--- a/pkgs/tools/filesystems/squashfuse/default.nix
+++ b/pkgs/tools/filesystems/squashfuse/default.nix
@@ -6,7 +6,7 @@ with stdenv.lib;
 stdenv.mkDerivation rec {
 
   pname = "squashfuse";
-  version = "unstable-2018-02-20";
+  version = "0.1.103";
   name = "${pname}-${version}";
 
   meta = {
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "vasi";
     repo  = "${pname}";
-    rev = "3f4a93f373796e88f7eee3a0c005ef60cb395d30";
+    rev = "540204955134eee44201d50132a5f66a246bcfaf";
     sha256 = "07jv4qjjz9ky3mw3p5prgs19g1bna9dcd7jjdz8083s1wyipdgcq";
   };
 
diff --git a/pkgs/tools/networking/haproxy/default.nix b/pkgs/tools/networking/haproxy/default.nix
index aa19fdb04de90..8f72976d7dced 100644
--- a/pkgs/tools/networking/haproxy/default.nix
+++ b/pkgs/tools/networking/haproxy/default.nix
@@ -39,7 +39,8 @@ stdenv.mkDerivation rec {
     "USE_LUA=yes"
     "LUA_LIB=${lua5_3}/lib"
     "LUA_INC=${lua5_3}/include"
-  ] ++ stdenv.lib.optional stdenv.isDarwin "CC=cc";
+  ] ++ stdenv.lib.optional stdenv.isDarwin "CC=cc"
+    ++ stdenv.lib.optional stdenv.isLinux "USE_GETADDRINFO=1";
 
   meta = {
     description = "Reliable, high performance TCP/HTTP load balancer";
diff --git a/pkgs/tools/package-management/appimagekit/default.nix b/pkgs/tools/package-management/appimagekit/default.nix
new file mode 100644
index 0000000000000..2c389c144b1ef
--- /dev/null
+++ b/pkgs/tools/package-management/appimagekit/default.nix
@@ -0,0 +1,112 @@
+{ stdenv, fetchFromGitHub
+, pkgconfig, cmake, autoconf, automake, libtool
+, wget, xxd, desktop-file-utils
+, glib, zlib, cairo, openssl, fuse, xz, squashfuse, inotify-tools, libarchive
+, squashfsTools
+, gtest
+}:
+
+let
+
+  appimagekit_src = fetchFromGitHub {
+    owner = "AppImage";
+    repo = "AppImageKit";
+    rev = "b0859501df61cde198b54a317c03b41dbafc98b1";
+    sha256 = "0qqg79jw9w9rs8c2w3lla4kz62ihafrf7jm370pp1dl8y2i81jzg";
+  };
+
+  # squashfuse adapted to nix from cmake experession in "${appimagekit_src}/cmake/dependencies.cmake"
+  appimagekit_squashfuse = squashfuse.overrideAttrs (attrs: rec {
+    name = "squashfuse-${version}";
+    version = "20161009";
+
+    src = fetchFromGitHub {
+      owner = "vasi";
+      repo  = "squashfuse";
+      rev   = "1f980303b89c779eabfd0a0fdd36d6a7a311bf92";
+      sha256 = "0lrw9ff8k15l34wjwyllw3i35hl0cms97jj2hpnr2q8ipgxpb5q5";
+    };
+
+    patches = [
+      "${appimagekit_src}/squashfuse.patch"
+      "${appimagekit_src}/squashfuse_dlopen.patch"
+    ];
+
+    postPatch = ''
+      cp -v ${appimagekit_src}/squashfuse_dlopen.[hc] .
+    '';
+
+    preConfigure = ''
+      sed -i "/PKG_CHECK_MODULES.*/,/,:./d" configure
+      sed -i "s/typedef off_t sqfs_off_t/typedef int64_t sqfs_off_t/g" common.h
+    '';
+
+    configureFlags = [
+      "--disable-demo" "--disable-high-level" "--without-lzo" "--without-lz4"
+    ];
+
+    postConfigure = ''
+      sed -i "s|XZ_LIBS = -llzma |XZ_LIBS = -Bstatic -llzma/|g" Makefile
+    '';
+
+    # only static libs and header files
+    installPhase = ''
+      mkdir -p $out/lib $out/include
+      cp -v ./.libs/*.a $out/lib
+      cp -v ./*.h $out/include
+    '';
+  });
+
+in stdenv.mkDerivation rec {
+  name = "appimagekit-20180727";
+
+  src = appimagekit_src;
+
+  patches = [ ./nix.patch ];
+
+  nativeBuildInputs = [
+    pkgconfig cmake autoconf automake libtool wget xxd
+    desktop-file-utils
+  ];
+
+  buildInputs = [
+    glib zlib cairo openssl fuse
+    xz inotify-tools libarchive
+    squashfsTools
+  ];
+
+  preConfigure = ''
+    export HOME=$(pwd)
+  '';
+
+  cmakeFlags = [
+    "-DUSE_SYSTEM_XZ=ON"
+    "-DUSE_SYSTEM_SQUASHFUSE=ON"
+    "-DSQUASHFUSE=${appimagekit_squashfuse}"
+    "-DUSE_SYSTEM_INOTIFY_TOOLS=ON"
+    "-DUSE_SYSTEM_LIBARCHIVE=ON"
+    "-DUSE_SYSTEM_GTEST=ON"
+    "-DUSE_SYSTEM_MKSQUASHFS=ON"
+    "-DBUILD_TESTING=${if doCheck then "ON" else "OFF"}"
+  ];
+
+  checkInputs = [ gtest ];
+  doCheck = false; # fails 1 out of 4 tests, I'm too lazy to debug why
+
+  # for debugging
+  passthru = {
+    squashfuse = appimagekit_squashfuse;
+  };
+
+  meta = with stdenv.lib; {
+    description = "A tool to package desktop applications as AppImages";
+    longDescription = ''
+      AppImageKit is an implementation of the AppImage format that
+      provides tools such as appimagetool and appimaged for handling
+      AppImages.
+    '';
+    license = licenses.mit;
+    homepage = src.meta.homepage;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/tools/package-management/appimagekit/nix.patch b/pkgs/tools/package-management/appimagekit/nix.patch
new file mode 100644
index 0000000000000..9725cef5ba7de
--- /dev/null
+++ b/pkgs/tools/package-management/appimagekit/nix.patch
@@ -0,0 +1,174 @@
+diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake
+index ea133a3..916606c 100644
+--- a/cmake/dependencies.cmake
++++ b/cmake/dependencies.cmake
+@@ -224,21 +224,23 @@ if(NOT USE_SYSTEM_XZ)
+         LIBRARY_DIRS <INSTALL_DIR>/lib/
+         LIBRARIES "<INSTALL_DIR>/lib/liblzma.a"
+         INCLUDE_DIRS "<SOURCE_DIR>/src/liblzma/api/"
+     )
+ else()
+     message(STATUS "Using system xz")
+ 
+     import_pkgconfig_target(TARGET_NAME xz PKGCONFIG_TARGET liblzma STATIC)
+ endif()
+ 
++set(USE_SYSTEM_SQUASHFUSE OFF CACHE BOOL "Use system squashfuse instead of building our own")
+ 
++if(NOT USE_SYSTEM_SQUASHFUSE)
+ # as distros don't provide suitable squashfuse and squashfs-tools, those dependencies are bundled in, can, and should
+ # be used from this repository
+ # TODO: implement out-of-source builds for squashfuse, as for the other dependencies
+ configure_file(
+     ${CMAKE_CURRENT_SOURCE_DIR}/src/patch-squashfuse.sh.in
+     ${CMAKE_CURRENT_BINARY_DIR}/patch-squashfuse.sh
+     @ONLY
+ )
+ 
+ ExternalProject_Add(squashfuse-EXTERNAL
+@@ -259,20 +261,34 @@ ExternalProject_Add(squashfuse-EXTERNAL
+     BUILD_IN_SOURCE ON
+     INSTALL_COMMAND ${MAKE} install
+ )
+ 
+ import_external_project(
+     TARGET_NAME squashfuse
+     EXT_PROJECT_NAME squashfuse-EXTERNAL
+     LIBRARIES "<SOURCE_DIR>/.libs/libsquashfuse.a;<SOURCE_DIR>/.libs/libsquashfuse_ll.a;<SOURCE_DIR>/.libs/libfuseprivate.a"
+     INCLUDE_DIRS "<SOURCE_DIR>"
+ )
++else()
++    message(STATUS "Using system squashfsfuse from ${SQUASHFUSE}")
++
++    add_library(squashfuse INTERFACE IMPORTED GLOBAL)
++
++    set(squashfuse_INCLUDE_DIRS "${SQUASHFUSE}/include")
++    set(squashfuse_LIBRARIES "${SQUASHFUSE}/lib/libsquashfuse.a;${SQUASHFUSE}/lib/libsquashfuse_ll.a;${SQUASHFUSE}/lib/libfuseprivate.a")
++
++    set_property(
++      TARGET squashfuse
++      PROPERTY INTERFACE_LINK_LIBRARIES ${squashfuse_LIBRARIES}
++    )
++    include_directories(${squashfuse_INCLUDE_DIRS})
++endif()
+ 
+ 
+ set(USE_SYSTEM_INOTIFY_TOOLS OFF CACHE BOOL "Use system libinotifytools instead of building our own")
+ 
+ if(NOT USE_SYSTEM_INOTIFY_TOOLS)
+     message(STATUS "Downloading and building inotify-tools")
+ 
+     # TODO: build out of source
+     ExternalProject_Add(inotify-tools-EXTERNAL
+         URL https://github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz
+@@ -345,20 +361,23 @@ if(NOT USE_SYSTEM_GTEST)
+             INCLUDE_DIRS "<INSTALL_DIR>/include/"
+         )
+     else()
+         message(STATUS "Using system GTest")
+ 
+         import_find_pkg_target(gtest GTest GTEST)
+     endif()
+ endif()
+ 
+ 
++set(USE_SYSTEM_MKSQUASHFS OFF CACHE BOOL "Use system mksquashfs instead of downloading and building our own")
++
++if(NOT USE_SYSTEM_MKSQUASHFS)
+ # TODO: allow using system wide mksquashfs
+ set(mksquashfs_cflags "-DXZ_SUPPORT ${CFLAGS}")
+ 
+ if(xz_LIBRARIES MATCHES "\\.a$")
+     set(mksquashfs_ldflags "${xz_LIBRARIES}")
+ else()
+     set(mksquashfs_ldflags "-l${xz_LIBRARIES}")
+ endif()
+ 
+ if(xz_INCLUDE_DIRS)
+@@ -385,20 +404,25 @@ ExternalProject_Add(mksquashfs
+     INSTALL_COMMAND ${MAKE} -C squashfs-tools/ install INSTALL_DIR=<INSTALL_DIR>
+ )
+ 
+ ExternalProject_Get_Property(mksquashfs INSTALL_DIR)
+ set(mksquashfs_INSTALL_DIR "${INSTALL_DIR}")
+ mark_as_advanced(mksquashfs_INSTALL_DIR)
+ 
+ # for later use when packaging as an AppImage
+ set(mksquashfs_BINARY "${mksquashfs_INSTALL_DIR}/mksquashfs")
+ mark_as_advanced(mksquashfs_BINARY)
++else()
++    message(STATUS "Using system mksquashfs")
++
++    set(mksquashfs_BINARY "mksquashfs")
++endif()
+ 
+ 
+ #### build dependency configuration ####
+ 
+ # only have to build custom xz when not using system libxz
+ if(TARGET xz-EXTERNAL)
+     if(TARGET squashfuse-EXTERNAL)
+         ExternalProject_Add_StepDependencies(squashfuse-EXTERNAL configure xz-EXTERNAL)
+     endif()
+     if(TARGET mksquashfs)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3f25442..974ed0e 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -197,27 +197,27 @@ target_include_directories(digest_md5
+ 
+ target_link_libraries(digest_md5
+     PRIVATE
+     libglib
+ )
+ 
+ 
+ # install binaries
+ if(AUXILIARY_FILES_DESTINATION)
+     install(
+-        PROGRAMS ${mksquashfs_INSTALL_DIR}/mksquashfs ${CMAKE_CURRENT_BINARY_DIR}/runtime
++        PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/runtime
+         DESTINATION ${AUXILIARY_FILES_DESTINATION}
+         COMPONENT applications
+     )
+ else()
+     install(
+-        PROGRAMS ${mksquashfs_INSTALL_DIR}/mksquashfs ${CMAKE_CURRENT_BINARY_DIR}/runtime
++        PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/runtime
+         DESTINATION bin
+         COMPONENT applications
+     )
+ endif()
+ 
+ install(
+     TARGETS AppRun appimagetool digest validate
+     RUNTIME DESTINATION bin COMPONENT applications
+     LIBRARY DESTINATION lib COMPONENT applications
+     ARCHIVE DESTINATION lib/static COMPONENT applications
+diff --git a/src/shared.c b/src/shared.c
+index cf5fd5c..4f48dbc 100644
+--- a/src/shared.c
++++ b/src/shared.c
+@@ -34,21 +34,21 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <dirent.h>
+ #include <errno.h>
+ 
+ #include <glib.h>
+ #include <glib/gprintf.h>
+ #include <glib/gstdio.h>
+ #include <gio/gio.h>
+ 
+-#include "squashfuse.h"
++#include <squashfuse.h>
+ #include <squashfs_fs.h>
+ #include "getsection.h"
+ #include "elf.h"
+ 
+ #include "xdg-basedir.h"
+ 
+ // own header
+ #include "shared.h"
+ 
+ #if HAVE_LIBARCHIVE3 == 1 // CentOS
diff --git a/pkgs/tools/security/b2sum/default.nix b/pkgs/tools/security/b2sum/default.nix
new file mode 100644
index 0000000000000..1679b7fddd072
--- /dev/null
+++ b/pkgs/tools/security/b2sum/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchzip, openmp ? null }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "b2sum-${version}";
+  version = "unstable-2018-06-11";
+
+  src = fetchzip {
+    url = "https://github.com/BLAKE2/BLAKE2/archive/320c325437539ae91091ce62efec1913cd8093c2.tar.gz";
+    sha256 = "0agmc515avdpr64bsgv87wby2idm0d3wbndxzkhdfjgzhgv0rb8k";
+  };
+
+  sourceRoot = "source/b2sum";
+
+  buildInputs = [ openmp ];
+
+  buildFlags = [ (optional (isNull openmp) "NO_OPENMP=1") ];
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = {
+    description = "The b2sum utility is similar to the md5sum or shasum utilities but for BLAKE2";
+    homepage = "https://blake2.net";
+    license = with licenses; [ asl20 cc0 openssl ];
+    maintainers = with maintainers; [ kirelagin ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/system/logrotate/default.nix b/pkgs/tools/system/logrotate/default.nix
index 75e25bcc6730d..75f6096844062 100644
--- a/pkgs/tools/system/logrotate/default.nix
+++ b/pkgs/tools/system/logrotate/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchFromGitHub, mailutils, gzip, popt, autoreconfHook }:
+{ stdenv, fetchFromGitHub, gzip, popt, autoreconfHook
+, mailutils ? null
+}:
 
 stdenv.mkDerivation rec {
   name = "logrotate-${version}";
@@ -14,8 +16,11 @@ stdenv.mkDerivation rec {
   # Logrotate wants to access the 'mail' program; to be done.
   patchPhase = ''
     sed -i -e 's,[a-z/]\+gzip,${gzip}/bin/gzip,' \
-           -e 's,[a-z/]\+gunzip,${gzip}/bin/gunzip,' \
-           -e 's,[a-z/]\+mail,${mailutils}/bin/mail,' configure.ac
+           -e 's,[a-z/]\+gunzip,${gzip}/bin/gunzip,' configure.ac
+
+    ${stdenv.lib.optionalString (mailutils != null) ''
+    sed -i -e 's,[a-z/]\+mail,${mailutils}/bin/mail,' configure.ac
+    ''}
   '';
 
   autoreconfPhase = ''
diff --git a/pkgs/tools/system/nvtop/default.nix b/pkgs/tools/system/nvtop/default.nix
new file mode 100644
index 0000000000000..054de73c080f1
--- /dev/null
+++ b/pkgs/tools/system/nvtop/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, cmake, nvidia_x11, cudatoolkit, ncurses }:
+
+stdenv.mkDerivation rec {
+  name = "nvtop-${version}";
+  version = "0.2.2";
+
+  src = fetchFromGitHub {
+    owner = "Syllo";
+    repo  = "nvtop";
+    rev = version;
+    sha256 = "0gampikzmd1l0vdhvarl0hckl6kmjh2rwcllpg6rrm2p75njw7hv";
+  };
+
+  cmakeFlags = [
+    "-DNVML_INCLUDE_DIRS=${cudatoolkit}/include"
+    "-DNVML_LIBRARIES=${nvidia_x11}/lib/libnvidia-ml.so.390.67"
+    "-DCMAKE_BUILD_TYPE=Release"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ ncurses nvidia_x11 cudatoolkit ];
+
+  meta = with stdenv.lib; {
+    description = "A (h)top like like task monitor for NVIDIA GPUs";
+    homepage = https://github.com/Syllo/nvtop;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ willibutz ];
+  };
+}
diff --git a/pkgs/tools/typesetting/biber/default.nix b/pkgs/tools/typesetting/biber/default.nix
index c9280c102b700..d19838f9ff06b 100644
--- a/pkgs/tools/typesetting/biber/default.nix
+++ b/pkgs/tools/typesetting/biber/default.nix
@@ -1,16 +1,9 @@
-{ stdenv, fetchFromGitHub, buildPerlModule, autovivification, BusinessISBN
-, BusinessISMN, BusinessISSN, ConfigAutoConf, DataCompare, DataDump, DateSimple
-, DateTime, DateTimeFormatBuilder, DateTimeCalendarJulian
-, EncodeEUCJPASCII, EncodeHanExtra, EncodeJIS2K, ExtUtilsLibBuilder
-, FileSlurp, FileWhich, IPCRun3, LogLog4perl, LWPProtocolHttps, ListAllUtils, ListMoreUtils
-, MozillaCA, ReadonlyXS, RegexpCommon, TextBibTeX, UnicodeCollate
-, UnicodeLineBreak, URI, XMLLibXMLSimple, XMLLibXSLT, XMLWriter, ClassAccessor
-, TextCSV, TextCSV_XS, TextRoman, DataUniqid, LinguaTranslit, UnicodeNormalize, SortKey
-, TestDifferences }:
+{ stdenv, fetchFromGitHub, perlPackages }:
 
-buildPerlModule rec {
+perlPackages.buildPerlModule rec {
   name = "biber-${version}";
   version = "2.7";
+
   src = fetchFromGitHub {
     owner = "plk";
     repo = "biber";
@@ -18,7 +11,7 @@ buildPerlModule rec {
     sha256 = "04jmsh59g2s0b61rm25z0hwb6yliqyh5gjs4y74va93d2b9mrd17";
   };
 
-  buildInputs = [
+  buildInputs = with perlPackages; [
     autovivification BusinessISBN BusinessISMN BusinessISSN ConfigAutoConf
     DataCompare DataDump DateSimple EncodeEUCJPASCII EncodeHanExtra EncodeJIS2K
     DateTime DateTimeFormatBuilder DateTimeCalendarJulian
@@ -32,10 +25,10 @@ buildPerlModule rec {
   # Tests depend on the precise Unicode-Collate version (expects 1.19, but we have 1.25)
   doCheck = false;
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Backend for BibLaTeX";
-    license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.ttuegel ];
+    license = with licenses; [ artistic1 gpl1Plus ];
+    platforms = platforms.unix;
+    maintainers = [ maintainers.ttuegel ];
   };
 }
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index 3663f6e9798a1..ece6c03e168a7 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -171,6 +171,7 @@ mapAliases ({
   mlt-qt5 = libsForQt5.mlt;  # added 2015-12-19
   mobile_broadband_provider_info = mobile-broadband-provider-info; # added 2018-02-25
   module_init_tools = kmod; # added 2016-04-22
+  mpich2 = mpich;  # added 2018-08-06
   msf = metasploit; # added 2018-04-25
   mssys = ms-sys; # added 2015-12-13
   multipath_tools = multipath-tools;  # added 2016-01-21
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e0968e1078937..074316be3ceac 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -508,6 +508,8 @@ with pkgs;
 
   appimage-run = callPackage ../tools/package-management/appimage-run {};
 
+  appimagekit = callPackage ../tools/package-management/appimagekit {};
+
   apt-cacher-ng = callPackage ../servers/http/apt-cacher-ng { };
 
   apt-offline = callPackage ../tools/misc/apt-offline { };
@@ -1147,7 +1149,7 @@ with pkgs;
 
   dateutils = callPackage ../tools/misc/dateutils { };
 
-  ddar = pythonPackages.callPackage ../tools/backup/ddar { };
+  ddar = callPackage ../tools/backup/ddar { };
 
   ddate = callPackage ../tools/misc/ddate { };
 
@@ -1581,6 +1583,10 @@ with pkgs;
 
   asynk = callPackage ../tools/networking/asynk { };
 
+  b2sum = callPackage ../tools/security/b2sum {
+    inherit (llvmPackages) openmp;
+  };
+
   bacula = callPackage ../tools/backup/bacula { };
 
   bareos = callPackage ../tools/backup/bareos { };
@@ -1607,17 +1613,7 @@ with pkgs;
 
   bgs = callPackage ../tools/X11/bgs { };
 
-  biber = callPackage ../tools/typesetting/biber {
-    inherit (perlPackages) buildPerlModule
-      autovivification BusinessISBN BusinessISMN BusinessISSN ConfigAutoConf
-      DataCompare DataDump DateSimple EncodeEUCJPASCII EncodeHanExtra EncodeJIS2K
-      DateTime DateTimeFormatBuilder DateTimeCalendarJulian
-      ExtUtilsLibBuilder FileSlurp FileWhich IPCRun3 LogLog4perl LWPProtocolHttps ListAllUtils
-      ListMoreUtils MozillaCA ReadonlyXS RegexpCommon TextBibTeX
-      UnicodeCollate UnicodeLineBreak URI XMLLibXMLSimple XMLLibXSLT XMLWriter
-      ClassAccessor TextCSV TextCSV_XS TextRoman DataUniqid LinguaTranslit UnicodeNormalize SortKey
-      TestDifferences;
-  };
+  biber = callPackage ../tools/typesetting/biber { };
 
   blueman = callPackage ../tools/bluetooth/blueman {
     withPulseAudio = config.pulseaudio or true;
@@ -4696,6 +4692,8 @@ with pkgs;
 
   proot = callPackage ../tools/system/proot { };
 
+  prototypejs = callPackage ../development/libraries/prototypejs { };
+
   proxychains = callPackage ../tools/networking/proxychains { };
 
   proxytunnel = callPackage ../tools/misc/proxytunnel { };
@@ -11095,9 +11093,7 @@ with pkgs;
 
   libmpc = callPackage ../development/libraries/libmpc { };
 
-  mpich2 = callPackage ../development/libraries/mpich2 {
-    gfortran = gfortran5;
-  };
+  mpich = callPackage ../development/libraries/mpich { };
 
   mstpd = callPackage ../os-specific/linux/mstpd { };
 
@@ -11188,6 +11184,10 @@ with pkgs;
 
   nvidia-video-sdk = callPackage ../development/libraries/nvidia-video-sdk { };
 
+  nvtop = callPackage ../tools/system/nvtop {
+    nvidia_x11 = linuxPackages.nvidia_x11.override { libsOnly = true; };
+  };
+
   ocl-icd-oclhGen = oclh: callPackage ../development/libraries/ocl-icd { opencl-headers = oclh; };
   ocl-icd-oclh_1_2 = ocl-icd-oclhGen opencl-headers_1_2;
   ocl-icd-oclh_2_2 = ocl-icd-oclhGen opencl-headers_2_2;
@@ -13858,7 +13858,6 @@ with pkgs;
         # when adding a new linux version
         # kernelPatches.cpu-cgroup-v2."4.11"
         kernelPatches.modinst_arg_list_too_long
-        kernelPatches.bcm2835_mmal_v4l2_camera_driver # Only needed for 4.16!
       ];
   };
 
@@ -16929,11 +16928,6 @@ with pkgs;
 
   jbrout = callPackage ../applications/graphics/jbrout { };
 
-  jumanji = callPackage ../applications/networking/browsers/jumanji {
-    webkitgtk = webkitgtk24x-gtk3;
-    gtk = gtk3;
-  };
-
   jwm = callPackage ../applications/window-managers/jwm { };
 
   k3d = callPackage ../applications/graphics/k3d {
@@ -18802,11 +18796,6 @@ with pkgs;
     guiSupport = "gtk3";
   });
 
-  vimNox = lowPrio (vim_configurable.override {
-    source = "vim-nox";
-    lua = pkgs.lua5_1; # vimNox source is from 2012, requires older lua
-  });
-
   qpdfview = libsForQt5.callPackage ../applications/misc/qpdfview {};
 
   qtile = callPackage ../applications/window-managers/qtile {
@@ -20523,6 +20512,9 @@ with pkgs;
 
   jags = callPackage ../applications/science/math/jags { };
 
+  libbraiding = callPackage ../development/libraries/science/math/libbraiding { };
+
+  libhomfly = callPackage ../development/libraries/science/math/libhomfly { };
 
   # We have essentially 4 permutations of liblapack: version 3.4.1 or 3.5.0,
   # and with or without atlas as a dependency. The default `liblapack` is 3.4.1
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 004fd3a663b0d..0e945ce1bffec 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -14258,12 +14258,12 @@ let self = _self // overrides; _self = with self; {
   };
 
   SysVirt = buildPerlModule rec {
-    version = "4.5.0";
+    version = "4.6.0";
     name = "Sys-Virt-${version}";
     src = assert version == pkgs.libvirt.version; pkgs.fetchgit {
       url = git://libvirt.org/libvirt-perl.git;
       rev = "v${version}";
-      sha256 = "18ns94i29c9x0j50pz9r1vcif6baayz769sa7b51v8kcvam9j52s";
+      sha256 = "0qs84sdrq85i3xc0drbk71jjm9vq1n8izdwy5zsd5r7dqays5slf";
     };
     nativeBuildInputs = [ pkgs.pkgconfig ];
     buildInputs = [ pkgs.libvirt CPANChanges TestPod TestPodCoverage XMLXPath ];
diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix
index 0057353c3e0b3..8592e3136aee9 100644
--- a/pkgs/top-level/php-packages.nix
+++ b/pkgs/top-level/php-packages.nix
@@ -160,6 +160,13 @@ let
     buildInputs = with pkgs; [ cyrus_sasl zlib ];
   };
 
+  oci8 = buildPecl rec {
+    name = "oci8-2.1.8";
+    sha256 = "1bp6fss2f2qmd5bdk7x22j8vx5qivrdhz4x7csf29vjgj6gvchxy";
+    buildInputs = [ pkgs.re2c pkgs.oracle-instantclient ];
+    configureFlags = [ "--with-oci8=shared,instantclient,${pkgs.oracle-instantclient}/lib" ];
+  };
+
   pcs = buildPecl rec {
     name = "pcs-1.3.3";
 
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 4913e533f29b4..13cf481a16f40 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -278,6 +278,8 @@ in {
 
   fido2 = callPackage ../development/python-modules/fido2 {  };
 
+  fire = callPackage ../development/python-modules/fire { };
+
   globus-sdk = callPackage ../development/python-modules/globus-sdk { };
 
   goocalendar = callPackage ../development/python-modules/goocalendar { };