about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/languages-frameworks/gnome.xml263
-rw-r--r--doc/languages-frameworks/index.xml1
-rw-r--r--doc/stdenv.xml8
-rw-r--r--maintainers/maintainer-list.nix4
-rw-r--r--nixos/modules/services/misc/dysnomia.nix1
-rw-r--r--pkgs/applications/editors/rstudio/default.nix11
-rw-r--r--pkgs/applications/graphics/gimp/plugins/default.nix4
-rw-r--r--pkgs/applications/misc/electrum/default.nix2
-rw-r--r--pkgs/applications/misc/tippecanoe/default.nix29
-rw-r--r--pkgs/applications/networking/gns3/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/zoom-us/default.nix4
-rw-r--r--pkgs/applications/networking/p2p/ktorrent/default.nix22
-rw-r--r--pkgs/applications/version-management/git-and-tools/ghq/default.nix18
-rw-r--r--pkgs/applications/version-management/git-and-tools/ghq/deps.nix138
-rw-r--r--pkgs/build-support/rust/build-rust-crate/build-crate.nix4
-rw-r--r--pkgs/build-support/rust/build-rust-crate/configure-crate.nix3
-rw-r--r--pkgs/build-support/rust/build-rust-crate/default.nix24
-rw-r--r--pkgs/build-support/rust/build-rust-crate/test/default.nix26
-rw-r--r--pkgs/data/fonts/fira-code/default.nix5
-rw-r--r--pkgs/data/themes/matcha/default.nix10
-rw-r--r--pkgs/development/compilers/iasl/default.nix6
-rw-r--r--pkgs/development/libraries/cimg/default.nix4
-rw-r--r--pkgs/development/libraries/libktorrent/default.nix9
-rw-r--r--pkgs/development/libraries/liblouis/default.nix28
-rw-r--r--pkgs/development/libraries/oracle-instantclient/default.nix35
-rw-r--r--pkgs/development/ocaml-modules/bap/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/bistro/default.nix10
-rw-r--r--pkgs/development/ocaml-modules/janestreet/0.12.nix466
-rw-r--r--pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix19
-rw-r--r--pkgs/development/ocaml-modules/nocrypto/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/rpclib/default.nix27
-rw-r--r--pkgs/development/python-modules/fire/default.nix16
-rw-r--r--pkgs/misc/emulators/dolphin-emu/default.nix6
-rw-r--r--pkgs/os-specific/darwin/wifi-password/default.nix26
-rw-r--r--pkgs/os-specific/linux/busybox/default.nix6
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix3
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.14.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.19.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-5.2.nix4
-rw-r--r--pkgs/os-specific/linux/v4l-utils/default.nix18
-rw-r--r--pkgs/servers/echoip/default.nix20
-rw-r--r--pkgs/servers/echoip/deps.nix74
-rw-r--r--pkgs/tools/graphics/gmic-qt/default.nix144
-rw-r--r--pkgs/tools/graphics/gmic-qt/fix-gimp-plugin-path.patch21
-rw-r--r--pkgs/tools/graphics/gmic/default.nix63
-rw-r--r--pkgs/tools/graphics/gmic_krita_qt/default.nix83
-rw-r--r--pkgs/tools/graphics/zbar/default.nix77
-rw-r--r--pkgs/tools/misc/remind/default.nix14
-rw-r--r--pkgs/tools/networking/skydive/default.nix45
-rw-r--r--pkgs/tools/networking/skydive/deps.nix1335
-rw-r--r--pkgs/tools/package-management/disnix/DisnixWebService/default.nix15
-rw-r--r--pkgs/tools/package-management/disnix/default.nix6
-rw-r--r--pkgs/tools/package-management/disnix/disnixos/default.nix10
-rw-r--r--pkgs/tools/package-management/disnix/dysnomia/default.nix14
-rw-r--r--pkgs/tools/security/asc-key-to-qr-code-gif/default.nix15
-rw-r--r--pkgs/tools/system/plan9port/builder.sh59
-rw-r--r--pkgs/tools/system/plan9port/darwin-cfframework.patch24
-rw-r--r--pkgs/tools/system/plan9port/darwin-sw_vers.patch47
-rw-r--r--pkgs/tools/system/plan9port/default.nix44
-rw-r--r--pkgs/tools/system/plan9port/tmpdir.patch41
-rw-r--r--pkgs/top-level/aliases.nix2
-rw-r--r--pkgs/top-level/all-packages.nix22
-rw-r--r--pkgs/top-level/ocaml-packages.nix11
65 files changed, 1519 insertions, 1957 deletions
diff --git a/doc/languages-frameworks/gnome.xml b/doc/languages-frameworks/gnome.xml
new file mode 100644
index 000000000000..9e0f21a6c74f
--- /dev/null
+++ b/doc/languages-frameworks/gnome.xml
@@ -0,0 +1,263 @@
+<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="sec-language-gnome">
+ <title>GNOME</title>
+
+ <section xml:id="ssec-gnome-packaging">
+  <title>Packaging GNOME applications</title>
+
+  <para>
+   Programs in the GNOME universe are written in various languages but they all use GObject-based libraries like GLib, GTK or GStreamer. These libraries are often modular, relying on looking into certain directories to find their modules. However, due to Nix’s specific file system organization, this will fail without our intervention. Fortunately, the libraries usually allow overriding the directories through environment variables, either natively or thanks to a patch in nixpkgs. <link xlink:href="#fun-wrapProgram">Wrapping</link> the executables to ensure correct paths are available to the application constitutes a significant part of packaging a modern desktop application. In this section, we will describe various modules needed by such applications, environment variables needed to make the modules load, and finally a script that will do the work for us.
+  </para>
+
+  <section xml:id="ssec-gnome-settings">
+   <title>Settings</title>
+
+   <para>
+    <link xlink:href="https://developer.gnome.org/gio/stable/GSettings.html">GSettings</link> API is often used for storing settings. GSettings schemas are required, to know the type and other metadata of the stored values. GLib looks for <filename>glib-2.0/schemas/gschemas.compiled</filename> files inside the directories of <envar>XDG_DATA_DIRS</envar>.
+   </para>
+
+   <para>
+    On Linux, GSettings API is implemented using <link xlink:href="https://wiki.gnome.org/Projects/dconf">dconf</link> backend. You will need to add <literal>dconf</literal> GIO module to <envar>GIO_EXTRA_MODULES</envar> variable, otherwise the <literal>memory</literal> backend will be used and the saved settings will not be persistent.
+   </para>
+
+   <para>
+    Last you will need the dconf database D-Bus service itself. You can enable it using <option>programs.dconf.enable</option>.
+   </para>
+
+   <para>
+    Some applications will also require <package>gsettings-desktop-schemas</package> for things like reading proxy configuration or user interface customization. This dependency is often not mentioned by upstream, you should grep for <literal>org.gnome.desktop</literal> and <literal>org.gnome.system</literal> to see if the schemas are needed.
+   </para>
+  </section>
+
+  <section xml:id="ssec-gnome-icons">
+   <title>Icons</title>
+
+   <para>
+    When an application uses icons, an icon theme should be available in <envar>XDG_DATA_DIRS</envar>. The package for the default, icon-less <link xlink:href="https://www.freedesktop.org/wiki/Software/icon-theme/">hicolor-icon-theme</link> contains <link linkend="ssec-gnome-hooks-hicolor-icon-theme">a setup hook</link> that will pick up icon themes from <literal>buildInputs</literal> and pass it to our wrapper. Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed.
+   </para>
+  </section>
+
+  <section xml:id="ssec-gnome-themes">
+   <title>GTK Themes</title>
+
+   <para>
+    Previously, a GTK theme needed to be in <envar>XDG_DATA_DIRS</envar>. This is no longer necessary for most programs since GTK incorporated Adwaita theme. Some programs (for example, those designed for <link xlink:href="https://elementary.io/docs/human-interface-guidelines#human-interface-guidelines">elementary HIG</link>) might require a special theme like <package>pantheon.elementary-gtk-theme</package>.
+   </para>
+  </section>
+
+  <section xml:id="ssec-gnome-typelibs">
+   <title>GObject introspection typelibs</title>
+
+   <para>
+    <link xlink:href="https://wiki.gnome.org/Projects/GObjectIntrospection">GObject introspection</link> allows applications to use C libraries in other languages easily. It does this through <literal>typelib</literal> files searched in <envar>GI_TYPELIB_PATH</envar>.
+   </para>
+  </section>
+
+  <section xml:id="ssec-gnome-plugins">
+   <title>Various plug-ins</title>
+
+   <para>
+    If your application uses <link xlink:href="https://gstreamer.freedesktop.org/">GStreamer</link> or <link xlink:href="https://wiki.gnome.org/Projects/Grilo">Grilo</link>, you should set <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar>, respectively.
+   </para>
+  </section>
+ </section>
+
+ <section xml:id="ssec-gnome-hooks">
+  <title>Onto <package>wrapGAppsHook</package></title>
+
+  <para>
+   Given the requirements above, the package expression would become messy quickly:
+<programlisting>
+preFixup = ''
+  for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
+    wrapProgram "$f" \
+      --prefix GIO_EXTRA_MODULES : "${getLib gnome3.dconf}/lib/gio/modules" \
+      --prefix XDG_DATA_DIRS : "$out/share" \
+      --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \
+      --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
+      --prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
+      --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}"
+  done
+'';
+</programlisting>
+   Fortunately, there is <package>wrapGAppsHook</package>, that does the wrapping for us. In particular, it works in conjunction with other setup hooks that will populate the variable:
+   <itemizedlist>
+    <listitem xml:id="ssec-gnome-hooks-wrapgappshook">
+     <para>
+      <package>wrapGAppsHook</package> itself will add the package’s <filename>share</filename> directory to <envar>XDG_DATA_DIRS</envar>.
+     </para>
+    </listitem>
+    <listitem xml:id="ssec-gnome-hooks-glib">
+     <para>
+      <package>glib</package> setup hook will populate <envar>GSETTINGS_SCHEMAS_PATH</envar> and then <package>wrapGAppsHook</package> will prepend it to <envar>XDG_DATA_DIRS</envar>.
+     </para>
+    </listitem>
+    <listitem xml:id="ssec-gnome-hooks-dconf">
+     <para>
+      <package>gnome3.dconf.lib</package> is a dependency of <package>wrapGAppsHook</package>, which then also adds it to the <envar>GIO_EXTRA_MODULES</envar> variable.
+     </para>
+    </listitem>
+    <listitem xml:id="ssec-gnome-hooks-hicolor-icon-theme">
+     <para>
+      <package>hicolor-icon-theme</package>’s setup hook will add icon themes to <envar>XDG_ICON_DIRS</envar> which is prepended to <envar>XDG_DATA_DIRS</envar> by <package>wrapGAppsHook</package>.
+     </para>
+    </listitem>
+    <listitem xml:id="ssec-gnome-hooks-gobject-introspection">
+     <para>
+      <package>gobject-introspection</package> setup hook populates <envar>GI_TYPELIB_PATH</envar> variable with <filename>lib/girepository-1.0</filename> directories of dependencies, which is then added to wrapper by <package>wrapGAppsHook</package>. It also adds <filename>share</filename> directories of dependencies to <envar>XDG_DATA_DIRS</envar>, which is intended to promote GIR files but it also <link xlink:href="https://github.com/NixOS/nixpkgs/issues/32790">pollutes the closures</link> of packages using <package>wrapGAppsHook</package>.
+     </para>
+     <warning>
+      <para>
+       The setup hook <link xlink:href="https://github.com/NixOS/nixpkgs/issues/56943">currently</link> does not work in expressions with <literal>strictDeps</literal> enabled, like Python packages. In those cases, you will need to disable it with <code>strictDeps = false;</code>.
+      </para>
+     </warning>
+    </listitem>
+    <listitem xml:id="ssec-gnome-hooks-gst-grl-plugins">
+     <para>
+      Setup hooks of <package>gst_all_1.gstreamer</package> and <package>gnome3.grilo</package> will populate the <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar> variables, respectively, which will then be added to the wrapper by <literal>wrapGAppsHook</literal>.
+     </para>
+    </listitem>
+   </itemizedlist>
+  </para>
+
+  <para>
+   You can also pass additional arguments to <literal>makeWrapper</literal> using <literal>gappsWrapperArgs</literal> in <literal>preFixup</literal> hook:
+<programlisting>
+preFixup = ''
+  gappsWrapperArgs+=(
+    # Thumbnailers
+    --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
+    --prefix XDG_DATA_DIRS : "${librsvg}/share"
+    --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
+  )
+'';
+</programlisting>
+  </para>
+ </section>
+
+ <section xml:id="ssec-gnome-updating">
+  <title>Updating GNOME packages</title>
+
+  <para>
+   Most GNOME package offer <link linkend="var-passthru-updateScript"><literal>updateScript</literal></link>, it is therefore possible to update to latest source tarball by running <command>nix-shell maintainers/scripts/update.nix --argstr package gnome3.nautilus</command> or even en masse with <command>nix-shell maintainers/scripts/update.nix --argstr path gnome3</command>. Read the package’s <filename>NEWS</filename> file to see what changed.
+  </para>
+ </section>
+
+ <section xml:id="ssec-gnome-common-issues">
+  <title>Frequently encountered issues</title>
+
+  <variablelist>
+   <varlistentry xml:id="ssec-gnome-common-issues-no-schemas">
+    <term>
+     <computeroutput>GLib-GIO-ERROR **: <replaceable>06:04:50.903</replaceable>: No GSettings schemas are installed on the system</computeroutput>
+    </term>
+    <listitem>
+     <para>
+      There are no schemas avalable in <envar>XDG_DATA_DIRS</envar>. Temporarily add a random package containing schemas like <package>gsettings-desktop-schemas</package> to <literal>buildInputs</literal>. <link linkend="ssec-gnome-hooks-glib"><package>glib</package></link> and <link linkend="ssec-gnome-hooks-wrapgappshook"><package>wrapGAppsHook</package></link> setup hooks will take care of making the schemas available to application and you will see the actual missing schemas with the <link linkend="ssec-gnome-common-issues-missing-schema">next error</link>. Or you can try looking through the source code for the actual schemas used.
+     </para>
+    </listitem>
+   </varlistentry>
+   <varlistentry xml:id="ssec-gnome-common-issues-missing-schema">
+    <term>
+     <computeroutput>GLib-GIO-ERROR **: <replaceable>06:04:50.903</replaceable>: Settings schema ‘<replaceable>org.gnome.foo</replaceable>’ is not installed</computeroutput>
+    </term>
+    <listitem>
+     <para>
+      Package is missing some GSettings schemas. You can find out the package containing the schema with <command>nix-locate <replaceable>org.gnome.foo</replaceable>.gschema.xml</command> and let the hooks handle the wrapping as <link linkend="ssec-gnome-common-issues-no-schemas">above</link>.
+     </para>
+    </listitem>
+   </varlistentry>
+   <varlistentry xml:id="ssec-gnome-common-issues-double-wrapped">
+    <term>
+     When using <package>wrapGAppsHook</package> with special derivers you can end up with double wrapped binaries.
+    </term>
+    <listitem>
+     <para>
+      This is because derivers like <function>python.pkgs.buildPythonApplication</function> or <function>qt5.mkDerivation</function> have setup-hooks automatically added that produce wrappers with <package>makeWrapper</package>. The simplest way to workaround that is to disable the <package>wrapGAppsHook</package> automatic wrapping with <code>dontWrapGApps = true;</code> and pass the arguments it intended to pass to <package>makeWrapper</package> to another.
+     </para>
+     <para>
+      In the case of a Python application it could look like:
+<programlisting>
+python3.pkgs.buildPythonApplication {
+  pname = "gnome-music";
+  version = "3.32.2";
+
+  nativeBuildInputs = [
+    wrapGAppsHook
+    gobject-introspection
+    ...
+  ];
+
+  dontWrapGApps = true;
+
+  # Arguments to be passed to `makeWrapper`, only used by buildPython*
+  makeWrapperArgs = [
+    "\${gappsWrapperArgs[@]}"
+  ];
+}
+</programlisting>
+      And for a QT app like:
+<programlisting>
+mkDerivation {
+  pname = "calibre";
+  version = "3.47.0";
+
+  nativeBuildInputs = [
+    wrapGAppsHook
+    qmake
+    ...
+  ];
+
+  dontWrapGApps = true;
+
+  # Arguments to be passed to `makeWrapper`, only used by qt5’s mkDerivation
+  qtWrapperArgs [
+    "\${gappsWrapperArgs[@]}"
+  ];
+}
+</programlisting>
+     </para>
+    </listitem>
+   </varlistentry>
+   <varlistentry xml:id="ssec-gnome-common-issues-unwrappable-package">
+    <term>
+     I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension.
+    </term>
+    <listitem>
+     <para>
+      You can rely on applications depending on the library set the necessary environment variables but that it often easy to miss. Instead we recommend to patch the paths in the source code whenever possible. Here are some examples:
+      <itemizedlist>
+       <listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext">
+        <para>
+         <link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix#L21-L24">Replacing a <envar>GI_TYPELIB_PATH</envar> in GNOME Shell extension</link> – we are using <function>substituteAll</function> to include the path to a typelib into a patch.
+        </para>
+       </listitem>
+       <listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings">
+        <para>
+         The following examples are hardcoding GSettings schema paths. To get the schema paths we use the functions
+         <itemizedlist>
+          <listitem>
+           <para>
+            <function>glib.getSchemaPath</function> Takes a nix package attribute as an argument.
+           </para>
+          </listitem>
+          <listitem>
+           <para>
+            <function>glib.makeSchemaPath</function> Takes a package output like <literal>$out</literal> and a derivation name. You should use this if the schemas you need to hardcode are in the same derivation.
+           </para>
+          </listitem>
+         </itemizedlist>
+        </para>
+        <para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-vala">
+         <link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/pantheon/apps/elementary-files/default.nix#L78-L86">Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library)</link> – here, <function>substituteAll</function> cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a <link xlink:href="https://github.com/NixOS/nix/issues/1846">Nix bug</link>.
+        </para>
+        <para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-c">
+         <link xlink:href="https://github.com/NixOS/nixpkgs/blob/29c120c065d03b000224872251bed93932d42412/pkgs/development/libraries/glib-networking/default.nix#L31-L34">Hard-coding GSettings schema path in C library</link> – nothing special other than using <link xlink:href="https://github.com/NixOS/nixpkgs/pull/67957#issuecomment-527717467">Coccinelle patch</link> to generate the patch itself.
+        </para>
+       </listitem>
+      </itemizedlist>
+     </para>
+    </listitem>
+   </varlistentry>
+  </variablelist>
+ </section>
+</section>
diff --git a/doc/languages-frameworks/index.xml b/doc/languages-frameworks/index.xml
index cd4e95cfae69..5836294b7748 100644
--- a/doc/languages-frameworks/index.xml
+++ b/doc/languages-frameworks/index.xml
@@ -14,6 +14,7 @@
  <xi:include href="beam.xml" />
  <xi:include href="bower.xml" />
  <xi:include href="coq.xml" />
+ <xi:include href="gnome.xml" />
  <xi:include href="go.xml" />
  <xi:include href="haskell.section.xml" />
  <xi:include href="idris.section.xml" />
diff --git a/doc/stdenv.xml b/doc/stdenv.xml
index 15a13ba49e8e..16003fb4acfb 100644
--- a/doc/stdenv.xml
+++ b/doc/stdenv.xml
@@ -699,7 +699,7 @@ passthru = {
      </para>
     </listitem>
    </varlistentry>
-   <varlistentry>
+   <varlistentry xml:id="var-passthru-updateScript">
     <term>
      <varname>passthru.updateScript</varname>
     </term>
@@ -2629,13 +2629,11 @@ addEnvHooks "$hostOffset" myBashFunction
     </varlistentry>
     <varlistentry>
      <term>
-      GStreamer
+      GNOME platform
      </term>
      <listitem>
       <para>
-       Adds the GStreamer plugins subdirectory of each build input to the
-       <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> or
-       <envar>GST_PLUGIN_SYSTEM_PATH</envar> environment variable.
+       Hooks related to GNOME platform and related libraries like GLib, GTK and GStreamer are described in <xref linkend="sec-language-gnome" />.
       </para>
      </listitem>
     </varlistentry>
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index a5b7ce5eaa47..fe6b51c0259a 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -5840,6 +5840,10 @@
     github = "sikmir";
     githubId = 688044;
     name = "Nikolay Korotkiy";
+    keys = [{
+      longkeyid = "rsa2048/0xD1DE6D7F693663A5";
+      fingerprint = "ADF4 C13D 0E36 1240 BD01  9B51 D1DE 6D7F 6936 63A5";
+    }];
   };
   simonvandel = {
     email = "simon.vandel@gmail.com";
diff --git a/nixos/modules/services/misc/dysnomia.nix b/nixos/modules/services/misc/dysnomia.nix
index 9402d5cd801c..33a6fb152641 100644
--- a/nixos/modules/services/misc/dysnomia.nix
+++ b/nixos/modules/services/misc/dysnomia.nix
@@ -151,6 +151,7 @@ in
       enableSubversionRepository = config.services.svnserve.enable;
       enableTomcatWebApplication = config.services.tomcat.enable;
       enableMongoDatabase = config.services.mongodb.enable;
+      enableInfluxDatabase = config.services.influxdb.enable;
     });
 
     dysnomia.properties = {
diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix
index 74e5460f529f..933644cc4717 100644
--- a/pkgs/applications/editors/rstudio/default.nix
+++ b/pkgs/applications/editors/rstudio/default.nix
@@ -4,6 +4,7 @@
 , llvmPackages
 }:
 
+with stdenv.lib;
 let
   verMajor = "1";
   verMinor = "2";
@@ -47,7 +48,13 @@ stdenv.mkDerivation rec {
     sha256 = "19x000m3jwnkqgi6ic81lkzyjvvxcfacw2j0vcfcaknvvagzhyhb";
   };
 
-  hunspellDictionaries = with stdenv.lib; filter isDerivation (unique (attrValues hunspellDicts));
+  hunspellDictionaries = filter isDerivation (unique (attrValues hunspellDicts));
+  # These dicts contain identically-named dict files, so we only keep the
+  # -large versions in case of clashes
+  largeDicts = filter (d: hasInfix "-large-wordlist" d) hunspellDictionaries;
+  otherDicts = filter (d: !(hasAttr "dictFileName" d &&
+                            elem d.dictFileName (map (d: d.dictFileName) largeDicts))) hunspellDictionaries;
+  dictionaries = largeDicts ++ otherDicts;
 
   mathJaxSrc = fetchurl {
     url = https://s3.amazonaws.com/rstudio-buildtools/mathjax-26.zip;
@@ -77,7 +84,7 @@ stdenv.mkDerivation rec {
       mv gwt-${gwtVer} $GWT_LIB_DIR/gwt/${gwtVer}
 
       mkdir dependencies/common/dictionaries
-      for dict in ${builtins.concatStringsSep " " hunspellDictionaries}; do
+      for dict in ${builtins.concatStringsSep " " dictionaries}; do
         for i in "$dict/share/hunspell/"*; do
           ln -sv $i dependencies/common/dictionaries/
         done
diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix
index 008bfdf881e5..2c520f21f848 100644
--- a/pkgs/applications/graphics/gimp/plugins/default.nix
+++ b/pkgs/applications/graphics/gimp/plugins/default.nix
@@ -152,7 +152,9 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; {
     installPhase = "installPlugins src/gimp-lqr-plugin";
   };
 
-  gmic = pkgs.gmic.gimpPlugin;
+  gmic = pkgs.gmic-qt.override {
+    variant = "gimp";
+  };
 
   ufraw = pkgs.ufraw.gimpPlugin;
 
diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix
index c48d458567dc..0ebeb1beffa1 100644
--- a/pkgs/applications/misc/electrum/default.nix
+++ b/pkgs/applications/misc/electrum/default.nix
@@ -88,7 +88,7 @@ python3Packages.buildPythonApplication {
       --replace ${libsecp256k1_name} ${secp256k1}/lib/libsecp256k1${stdenv.hostPlatform.extensions.sharedLibrary}
   '' + (if enableQt then ''
     substituteInPlace ./electrum/qrscanner.py \
-      --replace ${libzbar_name} ${zbar}/lib/libzbar${stdenv.hostPlatform.extensions.sharedLibrary}
+      --replace ${libzbar_name} ${zbar.lib}/lib/libzbar${stdenv.hostPlatform.extensions.sharedLibrary}
   '' else ''
     sed -i '/qdarkstyle/d' contrib/requirements/requirements.txt
   '');
diff --git a/pkgs/applications/misc/tippecanoe/default.nix b/pkgs/applications/misc/tippecanoe/default.nix
new file mode 100644
index 000000000000..8d84ab59d479
--- /dev/null
+++ b/pkgs/applications/misc/tippecanoe/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, sqlite, zlib, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "tippecanoe";
+  version = "1.34.3";
+
+  src = fetchFromGitHub {
+    owner = "mapbox";
+    repo = pname;
+    rev = version;
+    sha256 = "08pkxzwp4w5phrk9b0vszxnx8yymp50v0bcw96pz8qwk48z4xm0i";
+  };
+
+  buildInputs = [ sqlite zlib ];
+  checkInputs = [ perl ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  enableParallelBuilding = true;
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "Build vector tilesets from large collections of GeoJSON features";
+    homepage = https://github.com/mapbox/tippecanoe;
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix
index c5cf7a7c2ee9..1d2756de7e69 100644
--- a/pkgs/applications/networking/gns3/default.nix
+++ b/pkgs/applications/networking/gns3/default.nix
@@ -2,7 +2,7 @@
 
 let
   stableVersion = "2.1.21";
-  previewVersion = "2.2.0rc4";
+  previewVersion = "2.2.0rc5";
   addVersion = args:
     let version = if args.stable then stableVersion else previewVersion;
         branch = if args.stable then "stable" else "preview";
@@ -18,7 +18,7 @@ in {
   };
   guiPreview = mkGui {
     stable = false;
-    sha256Hash = "14fzjaanaxya97wrya2lybxz6qv72fk4ws8i92zvjz4jkvjdk9n3";
+    sha256Hash = "0x4sp6yjnvzpk8cxdqlf51njckmvvkijdb7rvcb4hvqq1ab6gb2x";
   };
 
   serverStable = mkServer {
@@ -27,6 +27,6 @@ in {
   };
   serverPreview = mkServer {
     stable = false;
-    sha256Hash = "03s2kq5f8whk14rhprg9yp3918641b1cwj6djcbjw8xpz0n3w022";
+    sha256Hash = "0inj6fac0683s1sxaba3ljia90cfach0y42xylzgzza36wpyqpqg";
   };
 }
diff --git a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
index b9791cbfbac1..933badccf631 100644
--- a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
+++ b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
@@ -14,11 +14,11 @@ assert pulseaudioSupport -> libpulseaudio != null;
 let
   inherit (stdenv.lib) concatStringsSep makeBinPath optional;
 
-  version = "3.0.287250.0828";
+  version = "3.0.291715.0908";
   srcs = {
     x86_64-linux = fetchurl {
       url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
-      sha256 = "0k4h43wydbcyx7b7gwxkmvbph8qc6kjpcypd7vwz8rph1l7kl1y1";
+      sha256 = "1f2fcwf0p86bxcnfdhij6hvgizd7n7gjcccwzdm2jv0dbqskad2f";
     };
   };
 
diff --git a/pkgs/applications/networking/p2p/ktorrent/default.nix b/pkgs/applications/networking/p2p/ktorrent/default.nix
index 6dd2fc343550..535991312f1d 100644
--- a/pkgs/applications/networking/p2p/ktorrent/default.nix
+++ b/pkgs/applications/networking/p2p/ktorrent/default.nix
@@ -7,11 +7,11 @@
 
 stdenv.mkDerivation rec {
   pname = "ktorrent";
-  version = "${libktorrent.mainVersion}.0";
+  version = "${libktorrent.mainVersion}";
 
   src = fetchurl {
     url    = "mirror://kde/stable/ktorrent/${libktorrent.mainVersion}/${pname}-${version}.tar.xz";
-    sha256 = "18w6qh09k84qpzaxxb76a4g59k4mx5wk897vqp1wwv80g0pqhmrw";
+    sha256 = "0kwd0npxfg4mdh7f3xadd2zjlqalpb1jxk61505qpcgcssijf534";
   };
 
   nativeBuildInputs = [ cmake kdoctools extra-cmake-modules ];
@@ -22,24 +22,6 @@ stdenv.mkDerivation rec {
     libktorrent taglib libgcrypt kplotting
   ];
 
-  patches = [
-    # Fix build with CMake 3.11
-    (fetchpatch {
-      url = "https://cgit.kde.org/ktorrent.git/patch/?id=672c5076de7e3a526d9bdbb484a69e9386bc49f8";
-      sha256 = "1cn4rnbhadrsxqx50fawpd747azskavbjraygr6s11rh1wbfrxid";
-    })
-
-    # Fix build against Qt 5.11
-    (fetchpatch {
-      url = "https://cgit.kde.org/ktorrent.git/patch/?id=7876857d204188016a135a25938d9f8530fba4e8";
-      sha256 = "1wnmfzkhf6y7fd0z2djwphs6i9lsg7fcrj8fqmbyi0j57dvl9gxl";
-    })
-    (fetchpatch {
-      url = "https://cgit.kde.org/ktorrent.git/patch/?id=36d112e56e56541d439326a267eb906da8b3ee60";
-      sha256 = "1d41pqniljhwqs6awa644s6ks0zwm9sr0hpfygc63wyxnpcrsw2y";
-    })
-  ];
-
   enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/version-management/git-and-tools/ghq/default.nix b/pkgs/applications/version-management/git-and-tools/ghq/default.nix
index b73825737dff..477b628c4d7b 100644
--- a/pkgs/applications/version-management/git-and-tools/ghq/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/ghq/default.nix
@@ -1,11 +1,9 @@
-{ stdenv, buildGoPackage, fetchFromGitHub }:
+{ stdenv, buildGoModule, fetchFromGitHub, fetchpatch }:
 
-buildGoPackage rec {
+buildGoModule rec {
   pname = "ghq";
   version = "0.12.6";
 
-  goPackagePath = "github.com/motemen/ghq";
-
   src = fetchFromGitHub {
     owner = "motemen";
     repo = "ghq";
@@ -13,7 +11,7 @@ buildGoPackage rec {
     sha256 = "14rm7fvphr7r9x0ys10vhzjwhfhhscgr574n1i1z4lzw551lrnp4";
   };
 
-  goDeps = ./deps.nix;
+  modSha256 = "1y2v8ir7kc2avgri06nagfyaxqr3xrg4g5pxl9rwzq9dyzm6ci5z";
 
   buildFlagsArray = ''
     -ldflags=
@@ -21,9 +19,17 @@ buildGoPackage rec {
   '';
 
   postInstall = ''
-    install -m 444 -D ${src}/zsh/_ghq $bin/share/zsh/site-functions/_ghq
+    install -m 444 -D ${src}/zsh/_ghq $out/share/zsh/site-functions/_ghq
   '';
 
+  patches = [
+    (fetchpatch {
+      # remove once the commit lands in a release.
+      url = "https://github.com/motemen/ghq/commit/38ac89e60e60182b5870108f9753c9fe8d00e4a6.patch";
+      sha256 = "1z8yvzmka3sh44my6jnwc39p8zs7mczxgvwc9z0pkqk4vgvaj8gj";
+    })
+  ];
+
   meta = {
     description = "Remote repository management made easy";
     homepage = https://github.com/motemen/ghq;
diff --git a/pkgs/applications/version-management/git-and-tools/ghq/deps.nix b/pkgs/applications/version-management/git-and-tools/ghq/deps.nix
deleted file mode 100644
index dde1b19b4c3b..000000000000
--- a/pkgs/applications/version-management/git-and-tools/ghq/deps.nix
+++ /dev/null
@@ -1,138 +0,0 @@
-# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
-[
-  {
-    goPackagePath = "github.com/Songmu/gitconfig";
-    fetch = {
-      type = "git";
-      url = "https://github.com/Songmu/gitconfig";
-      rev = "v0.0.2";
-      sha256 = "0w1xd1mzxzwh755l6lgpn6psjp959kvx89l39zhc8lag9jh7rc44";
-    };
-  }
-  {
-    goPackagePath = "github.com/daviddengcn/go-colortext";
-    fetch = {
-      type = "git";
-      url = "https://github.com/daviddengcn/go-colortext";
-      rev = "186a3d44e920";
-      sha256 = "18piv4zzcb8abbc7fllz9p6rd4zhsy1gc6iygym381caggmmgxgk";
-    };
-  }
-  {
-    goPackagePath = "github.com/golangplus/bytes";
-    fetch = {
-      type = "git";
-      url = "https://github.com/golangplus/bytes";
-      rev = "45c989fe5450";
-      sha256 = "1fpwg1idakpbvkmk8j8yyhv9g7mhr9c922kvff6kj4br4k05zyzr";
-    };
-  }
-  {
-    goPackagePath = "github.com/golangplus/fmt";
-    fetch = {
-      type = "git";
-      url = "https://github.com/golangplus/fmt";
-      rev = "2a5d6d7d2995";
-      sha256 = "1242q05qnawhv0klzy1pbq63q8jxkms5hc7421992hzq2m40k5yn";
-    };
-  }
-  {
-    goPackagePath = "github.com/golangplus/testing";
-    fetch = {
-      type = "git";
-      url = "https://github.com/golangplus/testing";
-      rev = "af21d9c3145e";
-      sha256 = "1g83sjvcavqbh92vyirc48mrqd18yfci08zya0hrgk840cr94czc";
-    };
-  }
-  {
-    goPackagePath = "github.com/motemen/go-colorine";
-    fetch = {
-      type = "git";
-      url = "https://github.com/motemen/go-colorine";
-      rev = "45d19169413a";
-      sha256 = "1mdy6q0926s1frj027nlzlvm2qssmkpjis7ic3l2smajkzh07118";
-    };
-  }
-  {
-    goPackagePath = "github.com/urfave/cli";
-    fetch = {
-      type = "git";
-      url = "https://github.com/urfave/cli";
-      rev = "v1.20.0";
-      sha256 = "0y6f4sbzkiiwrxbl15biivj8c7qwxnvm3zl2dd3mw4wzg4x10ygj";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/crypto";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/crypto";
-      rev = "c2843e01d9a2";
-      sha256 = "01xgxbj5r79nmisdvpq48zfy8pzaaj90bn6ngd4nf33j9ar1dp8r";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/net";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/net";
-      rev = "3ec191127204";
-      sha256 = "0zzhbkw3065dp1jscp7q8dxw3mkwj95ixnrr8j7c47skis0m11i3";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/sync";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/sync";
-      rev = "112230192c58";
-      sha256 = "05i2k43j2d0llq768hg5pf3hb2yhfzp9la1w5wp0rsnnzblr0lfn";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/sys";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/sys";
-      rev = "d0b11bdaac8a";
-      sha256 = "18yfsmw622l7gc5sqriv5qmck6903vvhivpzp8i3xfy3z33dybdl";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/text";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/text";
-      rev = "v0.3.0";
-      sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/xerrors";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/xerrors";
-      rev = "3ee3066db522";
-      sha256 = "12xyaa116bq9zy25fwk7zzi83v8aab9lm91pqg0c3jrfkjdbr255";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/check.v1";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/check.v1";
-      rev = "20d25e280405";
-      sha256 = "0k1m83ji9l1a7ng8a7v40psbymxasmssbrrhpdv2wl4rhs0nc3np";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/yaml.v2";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/yaml.v2";
-      rev = "v2.2.2";
-      sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa";
-    };
-  }
-]
diff --git a/pkgs/build-support/rust/build-rust-crate/build-crate.nix b/pkgs/build-support/rust/build-rust-crate/build-crate.nix
index 2999c3d4c1d9..e0a52e62561b 100644
--- a/pkgs/build-support/rust/build-rust-crate/build-crate.nix
+++ b/pkgs/build-support/rust/build-rust-crate/build-crate.nix
@@ -1,13 +1,13 @@
 { lib, stdenv, echo_build_heading, noisily, makeDeps }:
 { crateName,
   dependencies,
-  crateFeatures, libName, release, libPath,
+  crateFeatures, crateRenames, libName, release, libPath,
   crateType, metadata, crateBin, hasCrateBin,
   extraRustcOpts, verbose, colors }:
 
   let
 
-    deps = makeDeps dependencies;
+    deps = makeDeps dependencies crateRenames;
     rustcOpts =
       lib.lists.foldl' (opts: opt: opts + " " + opt)
         (if release then "-C opt-level=3" else "-C debuginfo=2")
diff --git a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix
index 169adcf2d43a..2a40240671cb 100644
--- a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix
+++ b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix
@@ -9,6 +9,7 @@
 , crateHomepage
 , crateFeatures
 , crateName
+, crateRenames
 , crateVersion
 , extraLinkFlags
 , extraRustcOpts
@@ -24,7 +25,7 @@ let version_ = lib.splitString "-" crateVersion;
     rustcOpts = lib.lists.foldl' (opts: opt: opts + " " + opt)
         (if release then "-C opt-level=3" else "-C debuginfo=2")
         (["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts);
-    buildDeps = makeDeps buildDependencies;
+    buildDeps = makeDeps buildDependencies crateRenames;
     authors = lib.concatStringsSep ":" crateAuthors;
     optLevel = if release then 3 else 0;
     completeDepsDir = lib.concatStringsSep " " completeDeps;
diff --git a/pkgs/build-support/rust/build-rust-crate/default.nix b/pkgs/build-support/rust/build-rust-crate/default.nix
index acb2ee63cce4..6534e21c0f0c 100644
--- a/pkgs/build-support/rust/build-rust-crate/default.nix
+++ b/pkgs/build-support/rust/build-rust-crate/default.nix
@@ -13,13 +13,18 @@ let
       then "macos"
       else stdenv.hostPlatform.parsed.kernel.name;
 
-    makeDeps = dependencies:
+    makeDeps = dependencies: crateRenames:
       (lib.concatMapStringsSep " " (dep:
-        let extern = lib.strings.replaceStrings ["-"] ["_"] dep.libName; in
-        (if lib.lists.any (x: x == "lib") dep.crateType then
-           " --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}.rlib"
+        let
+          extern = lib.strings.replaceStrings ["-"] ["_"] dep.libName;
+          name = if builtins.hasAttr dep.crateName crateRenames then
+            lib.strings.replaceStrings ["-"] ["_"] crateRenames.${dep.crateName}
+          else
+            extern;
+        in (if lib.lists.any (x: x == "lib") dep.crateType then
+           " --extern ${name}=${dep.out}/lib/lib${extern}-${dep.metadata}.rlib"
          else
-           " --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}")
+           " --extern ${name}=${dep.out}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}")
       ) dependencies);
 
     echo_build_heading = colors: ''
@@ -60,7 +65,7 @@ let
     in
 
 crate_: lib.makeOverridable ({ rust, release, verbose, features, buildInputs, crateOverrides,
-  dependencies, buildDependencies,
+  dependencies, buildDependencies, crateRenames,
   extraRustcOpts,
   preUnpack, postUnpack, prePatch, patches, postPatch,
   preConfigure, postConfigure, preBuild, postBuild, preInstall, postInstall }:
@@ -70,7 +75,7 @@ let crate = crate_ // (lib.attrByPath [ crate_.crateName ] (attr: {}) crateOverr
     buildDependencies_ = buildDependencies;
     processedAttrs = [
       "src" "buildInputs" "crateBin" "crateLib" "libName" "libPath"
-      "buildDependencies" "dependencies" "features"
+      "buildDependencies" "dependencies" "features" "crateRenames"
       "crateName" "version" "build" "authors" "colors" "edition"
     ];
     extraDerivationAttrs = lib.filterAttrs (n: v: ! lib.elem n processedAttrs) crate;
@@ -143,13 +148,13 @@ stdenv.mkDerivation (rec {
 
     configurePhase = configureCrate {
       inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription
-              crateFeatures libName build workspace_member release libPath crateVersion
+              crateFeatures crateRenames libName build workspace_member release libPath crateVersion
               extraLinkFlags extraRustcOpts
               crateAuthors crateHomepage verbose colors target_os;
     };
     buildPhase = buildCrate {
       inherit crateName dependencies
-              crateFeatures libName release libPath crateType
+              crateFeatures crateRenames libName release libPath crateType
               metadata crateBin hasCrateBin verbose colors
               extraRustcOpts;
     };
@@ -177,4 +182,5 @@ stdenv.mkDerivation (rec {
   postInstall = crate_.postInstall or "";
   dependencies = crate_.dependencies or [];
   buildDependencies = crate_.buildDependencies or [];
+  crateRenames = crate_.crateRenames or {};
 }
diff --git a/pkgs/build-support/rust/build-rust-crate/test/default.nix b/pkgs/build-support/rust/build-rust-crate/test/default.nix
index f3f9ef377c8c..4a90cf442a4d 100644
--- a/pkgs/build-support/rust/build-rust-crate/test/default.nix
+++ b/pkgs/build-support/rust/build-rust-crate/test/default.nix
@@ -22,6 +22,13 @@ let
     }
   '';
 
+  mkBinExtern = name: extern: mkFile name ''
+    extern crate ${extern};
+    fn main() {
+      assert_eq!(${extern}::test(), 23);
+    }
+  '';
+
   mkLib = name: mkFile name "pub fn test() -> i32 { return 23; }";
 
   mkTest = crateArgs: let
@@ -34,12 +41,7 @@ let
     libTestBinary = if !isLib then null else mkCrate {
       crateName = "run-test-${crateName}";
       dependencies = [ crate ];
-      src = mkFile "src/main.rs" ''
-        extern crate ${libName};
-        fn main() {
-          assert_eq!(${libName}::test(), 23);
-        }
-      '';
+      src = mkBinExtern "src/main.rs" libName;
     };
 
     in runCommand "run-buildRustCrate-${crateName}-test" {
@@ -71,6 +73,18 @@ let
       };
       crateBinNoPath3 =  { crateBin = [{ name = "my-binary5"; }]; src = mkBin "src/bin/main.rs"; };
       crateBinNoPath4 =  { crateBin = [{ name = "my-binary6"; }]; src = mkBin "src/main.rs";};
+      crateBinRename1 = {
+        crateBin = [{ name = "my-binary-rename1"; }];
+        src = mkBinExtern "src/main.rs" "foo_renamed";
+        dependencies = [ (mkCrate { crateName = "foo"; src = mkLib "src/lib.rs"; }) ];
+        crateRenames = { "foo" = "foo_renamed"; };
+      };
+      crateBinRename2 = {
+        crateBin = [{ name = "my-binary-rename2"; }];
+        src = mkBinExtern "src/main.rs" "foo_renamed";
+        dependencies = [ (mkCrate { crateName = "foo"; libName = "foolib"; src = mkLib "src/lib.rs"; }) ];
+        crateRenames = { "foo" = "foo_renamed"; };
+      };
     };
     brotliCrates = (callPackage ./brotli-crates.nix {});
   in lib.mapAttrs (key: value: mkTest (value // lib.optionalAttrs (!value?crateName) { crateName = key; })) cases // {
diff --git a/pkgs/data/fonts/fira-code/default.nix b/pkgs/data/fonts/fira-code/default.nix
index 09bae8cbea53..46149b0781b5 100644
--- a/pkgs/data/fonts/fira-code/default.nix
+++ b/pkgs/data/fonts/fira-code/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchzip }:
 
 let
-  version = "1.207";
+  version = "2";
 in fetchzip {
   name = "fira-code-${version}";
 
@@ -10,9 +10,10 @@ in fetchzip {
   postFetch = ''
     mkdir -p $out/share/fonts
     unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
+    unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
   '';
 
-  sha256 = "13w2jklqndria2plgangl5gi56v1cj5ja9vznh9079kqnvq0cffz";
+  sha256 = "0kg9lrrjr6wrd4r96y0rnslnaw2276558a369qdvalwb3q1gi8d2";
 
   meta = with stdenv.lib; {
     homepage = https://github.com/tonsky/FiraCode;
diff --git a/pkgs/data/themes/matcha/default.nix b/pkgs/data/themes/matcha/default.nix
index db0b4ec66104..bfbf98b508e5 100644
--- a/pkgs/data/themes/matcha/default.nix
+++ b/pkgs/data/themes/matcha/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, gdk-pixbuf, librsvg, gtk-engine-murrine }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "matcha";
-  version = "2019-06-22";
+  version = "2019-07";
 
   src = fetchFromGitHub {
     owner = "vinceliuice";
-    repo = "matcha";
-    rev = "f42df7a3219d7fbacb7be1b2e0e416d74339865e";
-    sha256 = "1x954rmxv14xndn4ybhbr4pmzccnwqp462bpvzd2hak5wsqs4wxc";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1jv7qq4lsjpz40wchrqlzc8w4ggrmwjavy4ipzz11jal99skpv7i";
   };
 
   buildInputs = [ gdk-pixbuf librsvg ];
diff --git a/pkgs/development/compilers/iasl/default.nix b/pkgs/development/compilers/iasl/default.nix
index 1bcf4106a34d..fccdf7a978d4 100644
--- a/pkgs/development/compilers/iasl/default.nix
+++ b/pkgs/development/compilers/iasl/default.nix
@@ -17,12 +17,6 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ bison flex ];
 
-  patches = fetchpatch {
-    /* https://github.com/acpica/acpica/pull/389 */
-    url = "https://github.com/acpica/acpica/commit/935ca65f7806a3ef9bd02a947e50f3a1f586ac67.patch";
-    sha256 = "0jz4bakifphm425shbd1j99hldgy71m7scl8mwibm441d56l3ydf";
-  };
-
   installPhase =
     ''
       install -d $out/bin
diff --git a/pkgs/development/libraries/cimg/default.nix b/pkgs/development/libraries/cimg/default.nix
index 3e7ef6d96eec..6181122aa7f1 100644
--- a/pkgs/development/libraries/cimg/default.nix
+++ b/pkgs/development/libraries/cimg/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "cimg";
-  version = "2.7.0";
+  version = "2.7.1";
 
   src = fetchurl {
     url = "http://cimg.eu/files/CImg_${version}.zip";
-    sha256 = "1la6332cppyciyn3pflbchxa3av72a70p0n1c9sm1hgfbjlydqnv";
+    sha256 = "1lw1hjk65zyd5x9w113yrqyy8db45jdzzkqslkipaiskl9f81y9z";
   };
 
   nativeBuildInputs = [ unzip ];
diff --git a/pkgs/development/libraries/libktorrent/default.nix b/pkgs/development/libraries/libktorrent/default.nix
index 8b5f189a9e1e..04dabf14100c 100644
--- a/pkgs/development/libraries/libktorrent/default.nix
+++ b/pkgs/development/libraries/libktorrent/default.nix
@@ -4,14 +4,15 @@
 }:
 
 let
-    mainVersion = "5.1";
+  mainVersion = "5.1.2";
 
 in stdenv.mkDerivation rec {
-  name = "libktorrent-2.1";
+  pname = "libktorrent";
+  version = "2.1.1";
 
   src = fetchurl {
-    url    = "mirror://kde/stable/ktorrent/${mainVersion}/${name}.tar.xz";
-    sha256 = "0vz2dwc4xd80q56g6r5bx5wqdl9fxcibxmw2irahqhbkxk7drvry";
+    url    = "mirror://kde/stable/ktorrent/${mainVersion}/${pname}-${version}.tar.xz";
+    sha256 = "0051zh8bb4p9wmcfn5ql987brhsaiw9880xdck7b5dm1a05mri2w";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/liblouis/default.nix b/pkgs/development/libraries/liblouis/default.nix
index 6dfb95d1fb83..0f73be7ebcea 100644
--- a/pkgs/development/libraries/liblouis/default.nix
+++ b/pkgs/development/libraries/liblouis/default.nix
@@ -1,26 +1,36 @@
-{ fetchFromGitHub, stdenv, autoreconfHook, pkgconfig, gettext, python3
-, texinfo, help2man, libyaml, perl
+{ fetchFromGitHub
+, stdenv
+, autoreconfHook
+, pkgconfig
+, gettext
+, python3
+, texinfo
+, help2man
+, libyaml
+, perl
 }:
 
-let
-  version = "3.10.0";
-in stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "liblouis";
-  inherit version;
+  version = "3.11.0";
 
   src = fetchFromGitHub {
     owner = "liblouis";
     repo = "liblouis";
     rev = "v${version}";
-    sha256 = "1wimv2wfl566jp8hhrxr91dmx20hldqzj70dar8i9k3hzq1kmb4q";
+    sha256 = "1y0pypgxchxczdnjkblibbvvy4gdk2pf8dzpqmbf824c7zpy8z5r";
   };
 
   outputs = [ "out" "dev" "man" "info" "doc" ];
 
   nativeBuildInputs = [
-    autoreconfHook pkgconfig gettext python3
+    autoreconfHook
+    pkgconfig
+    gettext
+    python3
     # Docs, man, info
-    texinfo help2man
+    texinfo
+    help2man
   ];
 
   buildInputs = [
diff --git a/pkgs/development/libraries/oracle-instantclient/default.nix b/pkgs/development/libraries/oracle-instantclient/default.nix
index f47b6ac8b21f..a7865fc7f4be 100644
--- a/pkgs/development/libraries/oracle-instantclient/default.nix
+++ b/pkgs/development/libraries/oracle-instantclient/default.nix
@@ -1,6 +1,5 @@
 { stdenv
 , fetchurl
-, requireFile
 , autoPatchelfHook
 , fixDarwinDylibNames
 , unzip
@@ -23,7 +22,7 @@ let
   # determine the version number, there might be different ones per architecture
   version = {
     x86_64-linux = "19.3.0.0.0";
-    x86_64-darwin = "18.1.0.0.0";
+    x86_64-darwin = "19.3.0.0.0";
   }.${stdenv.hostPlatform.system} or throwSystem;
 
   # hashes per component and architecture
@@ -35,18 +34,15 @@ let
       odbc    = "1g1z6pdn76dp440fh49pm8ijfgjazx4cvxdi665fsr62h62xkvch";
     };
     x86_64-darwin = {
-      basic   = "fac3cdaaee7526f6c50ff167edb4ba7ab68efb763de24f65f63fb48cc1ba44c0";
-      sdk     = "98e6d797f1ce11e59b042b232f62380cec29ec7d5387b88a9e074b741c13e63a";
-      sqlplus = "02e66dc52398fced75e7efcb6b4372afcf617f7d88344fb7f0f4bb2bed371f3b";
-      odbc    = "5d0cdd7f9dd2e27affbc9b36ef9fc48e329713ecd36905fdd089366e365ae8a2";
+      basic   = "f4335c1d53e8188a3a8cdfb97494ff87c4d0f481309284cf086dc64080a60abd";
+      sdk     = "b46b4b87af593f7cfe447cfb903d1ae5073cec34049143ad8cdc9f3e78b23b27";
+      sqlplus = "f7565c3cbf898b0a7953fbb0017c5edd9d11d1863781588b7caf3a69937a2e9e";
+      odbc    = "f91da40684abaa866aa059eb26b1322f2d527670a1937d678404c991eadeb725";
     };
   }.${stdenv.hostPlatform.system} or throwSystem;
 
   # rels per component and architecture, optional
   rels = {
-    x86_64-darwin = {
-      sdk = "2";
-    };
   }.${stdenv.hostPlatform.system} or {};
 
   # convert platform to oracle architecture names
@@ -55,29 +51,24 @@ let
     x86_64-darwin = "macos.x64";
   }.${stdenv.hostPlatform.system} or throwSystem;
 
+  shortArch = {
+    x86_64-linux = "linux";
+    x86_64-darwin = "macos";
+  }.${stdenv.hostPlatform.system} or throwSystem;
+
   # calculate the filename of a single zip file
   srcFilename = component: arch: version: rel:
     "instantclient-${component}-${arch}-${version}" +
     (optionalString (rel != "") "-${rel}") +
-    (optionalString (arch == "linux.x64") "dbru") + # ¯\_(ツ)_/¯
+    (optionalString (arch == "linux.x64" || arch == "macos.x64") "dbru") + # ¯\_(ツ)_/¯
     ".zip";
 
-  # fetcher for the clickthrough artifacts (requiring manual download)
-  fetchClickThrough =  srcFilename: hash: (requireFile {
-    name = srcFilename;
-    url = "https://www.oracle.com/database/technologies/instant-client/downloads.html";
-    sha256 = hash;
-  });
-
   # fetcher for the non clickthrough artifacts
-  fetchSimple = srcFilename: hash: fetchurl {
-    url = "https://download.oracle.com/otn_software/linux/instantclient/193000/${srcFilename}";
+  fetcher = srcFilename: hash: fetchurl {
+    url = "https://download.oracle.com/otn_software/${shortArch}/instantclient/193000/${srcFilename}";
     sha256 = hash;
   };
 
-  # pick the appropriate fetcher depending on the platform
-  fetcher = if stdenv.hostPlatform.system == "x86_64-linux" then fetchSimple else fetchClickThrough;
-
   # assemble srcs
   srcs = map (component:
     (fetcher (srcFilename component arch version rels.${component} or "") hashes.${component} or ""))
diff --git a/pkgs/development/ocaml-modules/bap/default.nix b/pkgs/development/ocaml-modules/bap/default.nix
index 5ddb9a462242..0766e6e8a8c5 100644
--- a/pkgs/development/ocaml-modules/bap/default.nix
+++ b/pkgs/development/ocaml-modules/bap/default.nix
@@ -6,6 +6,10 @@
  which, makeWrapper, writeText
 }:
 
+if stdenv.lib.versionAtLeast core_kernel.version "0.12"
+then throw "BAP needs core_kernel-0.11 (hence OCaml ≤ 4.06)"
+else
+
 stdenv.mkDerivation rec {
   name = "ocaml${ocaml.version}-bap-${version}";
   version = "1.6.0";
diff --git a/pkgs/development/ocaml-modules/bistro/default.nix b/pkgs/development/ocaml-modules/bistro/default.nix
index b3dddec511c4..d6a1cac17195 100644
--- a/pkgs/development/ocaml-modules/bistro/default.nix
+++ b/pkgs/development/ocaml-modules/bistro/default.nix
@@ -1,22 +1,22 @@
 { lib, fetchFromGitHub, buildDunePackage
-, core, lwt ? ocaml_lwt, ocaml_lwt, ocamlgraph, rresult, tyxml
+, base64, bos, core, lwt_react, ocamlgraph, rresult, tyxml
 }:
 
 buildDunePackage rec {
   pname = "bistro";
-  version = "0.4.0";
+  version = "0.5.0";
   src = fetchFromGitHub {
     owner = "pveber";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0bxnggm4nkyl2iqwj4f5afw8lj5miq2rqsc9qfrlmg4g4rr3zh1c";
+    sha256 = "114gq48cpj2mvycypa9lfyqqb26wa2gkdfwkcqhnx7m6sdwv9a38";
   };
 
-  buildInputs = [ lwt ocamlgraph rresult tyxml ];
+  buildInputs = [ base64 bos lwt_react ocamlgraph rresult tyxml ];
 
   propagatedBuildInputs = [ core ];
 
-  minimumOCamlVersion = "4.04";
+  minimumOCamlVersion = "4.07";
 
   meta = {
     inherit (src.meta) homepage;
diff --git a/pkgs/development/ocaml-modules/janestreet/0.12.nix b/pkgs/development/ocaml-modules/janestreet/0.12.nix
new file mode 100644
index 000000000000..4089b24ca228
--- /dev/null
+++ b/pkgs/development/ocaml-modules/janestreet/0.12.nix
@@ -0,0 +1,466 @@
+{ janePackage
+, ctypes
+, num
+, octavius
+, ppxlib
+, re
+, openssl
+}:
+
+rec {
+
+  ocaml-compiler-libs = janePackage {
+    pname = "ocaml-compiler-libs";
+    hash = "0g9y1ljjsj1nw0lz460ivb6qmz9vhcmfl8krlmqfrni6pc7b0r6f";
+    meta.description = "OCaml compiler libraries repackaged";
+  };
+
+  sexplib0 = janePackage {
+    pname = "sexplib0";
+    hash = "13xdd0pvypxqn0ldwdgikmlinrp3yfh8ixknv1xrpxbx3np4qp0g";
+    meta.description = "Library containing the definition of S-expressions and some base converters";
+  };
+
+  base = janePackage {
+    pname = "base";
+    version = "0.12.2";
+    hash = "0gl89zpgsf3n30nb6v5cns27g2bfg4rf3s2427gqvwbkr5gcf7ri";
+    meta.description = "Full standard library replacement for OCaml";
+    propagatedBuildInputs = [ sexplib0 ];
+  };
+
+  stdio = janePackage {
+    pname = "stdio";
+    hash = "1pn8jjcb79n6crpw7dkp68s4lz2mw103lwmfslil66f05jsxhjhg";
+    meta.description = "Standard IO library for OCaml";
+    propagatedBuildInputs = [ base ];
+  };
+
+  ppx_sexp_conv = janePackage {
+    pname = "ppx_sexp_conv";
+    hash = "0idzp1kzds0gnilschzs9ydi54if8y5xpn6ajn710vkipq26qcld";
+    meta.description = "[@@deriving] plugin to generate S-expression conversion functions";
+    propagatedBuildInputs = [ ppxlib ];
+  };
+
+  ppx_here = janePackage {
+    pname = "ppx_here";
+    hash = "07qbchwif1i9ii8z7v1bib57d3mjv0b27i8iixw78i83wnsycmdx";
+    meta.description = "Expands [%here] into its location";
+    propagatedBuildInputs = [ ppxlib ];
+  };
+
+  ppx_compare = janePackage {
+    pname = "ppx_compare";
+    hash = "0n1ax4k2smhps9hc2v58lc06a0fgimwvbi1aj4x78vwh5j492bys";
+    meta.description = "Generation of comparison functions from types";
+    propagatedBuildInputs = [ ppxlib ];
+  };
+
+  ppx_assert = janePackage {
+    pname = "ppx_assert";
+    hash = "0as6mzr6ki2a9d4k6132p9dskn0qssla1s7j5rkzp75bfikd0ip8";
+    meta.description = "Assert-like extension nodes that raise useful errors on failure";
+    propagatedBuildInputs = [ ppx_compare ppx_here ppx_sexp_conv ];
+  };
+
+  ppx_inline_test = janePackage {
+    pname = "ppx_inline_test";
+    hash = "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50";
+    meta.description = "Syntax extension for writing in-line tests in ocaml code";
+    propagatedBuildInputs = [ ppxlib ];
+  };
+
+  ppx_custom_printf = janePackage {
+    pname = "ppx_custom_printf";
+    version = "0.12.1";
+    hash = "0q7591agvd3qy9ihhbyk4db48r0ng7yxspfj8afxxiawl7k5bas6";
+    meta.description = "Printf-style format-strings for user-defined string conversion";
+    propagatedBuildInputs = [ ppx_sexp_conv ];
+  };
+
+  fieldslib = janePackage {
+    pname = "fieldslib";
+    hash = "0dlgr7cimqmjlcymk3bdcyzqzvdy12q5lqa844nqix0k2ymhyphf";
+    meta.description = "Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values";
+    propagatedBuildInputs = [ base ];
+  };
+
+  ppx_fields_conv = janePackage {
+    pname = "ppx_fields_conv";
+    hash = "0flrdyxdfcqcmdrbipxdjq0s3djdgs7z5pvjdycsvs6czbixz70v";
+    meta.description = "Generation of accessor and iteration functions for ocaml records";
+    propagatedBuildInputs = [ fieldslib ppxlib ];
+  };
+
+  variantslib = janePackage {
+    pname = "variantslib";
+    hash = "1cclb5magk63gyqmkci8abhs05g2pyhyr60a2c1bvmig0faqcnsf";
+    meta.description = "Part of Jane Street's Core library";
+    propagatedBuildInputs = [ base ];
+  };
+
+  ppx_variants_conv = janePackage {
+    pname = "ppx_variants_conv";
+    hash = "05j9bgra8xq6fcp12ch3z9vjrk139p2wrcjjcs4h52n5hhc8vzbz";
+    meta.description = "Generation of accessor and iteration functions for ocaml variant types";
+    propagatedBuildInputs = [ variantslib ppxlib ];
+  };
+
+  ppx_expect = janePackage {
+    pname = "ppx_expect";
+    hash = "1wawsbjfkri4sw52n8xqrzihxc3xfpdicv3ahz83a1rsn4lb8j5q";
+    meta.description = "Cram like framework for OCaml";
+    propagatedBuildInputs = [ ppx_assert ppx_custom_printf ppx_fields_conv ppx_inline_test ppx_variants_conv re ];
+  };
+
+  ppx_enumerate = janePackage {
+    pname = "ppx_enumerate";
+    hash = "08zfpq6bdm5lh7xj9k72iz9f2ihv3aznl3nypw3x78vz1chj8dqa";
+    meta.description = "Generate a list containing all values of a finite type";
+    propagatedBuildInputs = [ ppxlib ];
+  };
+
+  ppx_hash = janePackage {
+    pname = "ppx_hash";
+    hash = "1dfsfvhiyp1mnf24mr93svpdn432kla0y7x631lssacxxp2sadbg";
+    meta.description = "A ppx rewriter that generates hash functions from type expressions and definitions";
+    propagatedBuildInputs = [ ppx_compare ppx_sexp_conv ];
+  };
+
+  ppx_js_style = janePackage {
+    pname = "ppx_js_style";
+    hash = "1lz931m3qdv3yzqy6dnb8fq1d99r61w0n7cwf3b9fl9rhk0pggwh";
+    meta.description = "Code style checker for Jane Street Packages";
+    propagatedBuildInputs = [ octavius ppxlib ];
+  };
+
+  ppx_base = janePackage {
+    pname = "ppx_base";
+    hash = "0vd96rp2l084iamkwmvizzhl9625cagjb6gzzbir06czii5mlq2p";
+    meta.description = "Base set of ppx rewriters";
+    propagatedBuildInputs = [ ppx_enumerate ppx_hash ppx_js_style ];
+  };
+
+  ppx_bench = janePackage {
+    pname = "ppx_bench";
+    hash = "1ib81irawxzq091bmpi50z0kmpx6z2drg14k2xcgmwbb1d4063xn";
+    meta.description = "Syntax extension for writing in-line benchmarks in ocaml code";
+    propagatedBuildInputs = [ ppx_inline_test ];
+  };
+
+  ppx_sexp_message = janePackage {
+    pname = "ppx_sexp_message";
+    hash = "0yskd6v48jc6wa0nhg685kylh1n9qb6b7d1wglr9wnhl9sw990mc";
+    meta.description = "A ppx rewriter for easy construction of s-expressions";
+    propagatedBuildInputs = [ ppx_here ppx_sexp_conv ];
+  };
+
+  splittable_random = janePackage {
+    pname = "splittable_random";
+    hash = "1wpyz7807cgj8b50gdx4rw6f1zsznp4ni5lzjbnqdwa66na6ynr4";
+    meta.description = "PRNG that can be split into independent streams";
+    propagatedBuildInputs = [ base ppx_assert ppx_bench ppx_sexp_message ];
+  };
+
+  ppx_let = janePackage {
+    pname = "ppx_let";
+    hash = "146dmyzkbmafa3giz69gpxccvdihg19cvk4xsg8krbbmlkvdda22";
+    meta.description = "Monadic let-bindings";
+    propagatedBuildInputs = [ ppxlib ];
+  };
+
+  base_quickcheck = janePackage {
+    pname = "base_quickcheck";
+    hash = "1la6qgq1zwmfyq1hqy6i337w435ym5yqgx2ygk86qip6nws0s6r3";
+    meta.description = "Randomized testing framework, designed for compatibility with Base";
+    propagatedBuildInputs = [ ppx_base ppx_fields_conv ppx_let splittable_random ];
+  };
+
+  ppx_stable = janePackage {
+    pname = "ppx_stable";
+    hash = "15zvf66wlkvz0yd4bkvndkpq74dj20jv1qkljp9n52hh7d0f9ykh";
+    meta.description = "Stable types conversions generator";
+    propagatedBuildInputs = [ ppxlib ];
+  };
+
+  bin_prot = janePackage {
+    pname = "bin_prot";
+    hash = "0hh6s7g9s004z35hsr8z6nw5phlcvcd6g2q3bj4f0s1s0anlsswm";
+    meta.description = "A binary protocol generator";
+    propagatedBuildInputs = [ ppx_compare ppx_custom_printf ppx_fields_conv ppx_variants_conv ];
+  };
+
+  ppx_bin_prot = janePackage {
+    pname = "ppx_bin_prot";
+    version = "0.12.1";
+    hash = "1j0kjgmv58dmg3x5dj5zrfbm920rwq21lvkkaqq493y76cd0x8xg";
+    meta.description = "Generation of bin_prot readers and writers from types";
+    propagatedBuildInputs = [ bin_prot ppx_here ];
+  };
+
+  ppx_fail = janePackage {
+    pname = "ppx_fail";
+    hash = "0krsv6z9gi0ifxmw5ss6gwn108qhywyhbs41an10x9d5zpgf4l1n";
+    meta.description = "Add location to calls to failwiths";
+    propagatedBuildInputs = [ ppx_here ];
+  };
+
+  jst-config = janePackage {
+    pname = "jst-config";
+    hash = "0yxcz13vda1mdh9ah7qqxwfxpcqang5sgdssd8721rszbwqqaw93";
+    meta.description = "Compile-time configuration for Jane Street libraries";
+    buildInputs = [ ppx_assert ];
+  };
+
+  ppx_optcomp = janePackage {
+    pname = "ppx_optcomp";
+    hash = "0bdbx01kz0174g1szdhv3mcfqxqqf2frxq7hk13xaf6fsz04kwmj";
+    meta.description = "Optional compilation for OCaml";
+    propagatedBuildInputs = [ ppxlib ];
+  };
+
+  jane-street-headers = janePackage {
+    pname = "jane-street-headers";
+    hash = "0qa4llf812rjqa8nb63snmy8d8ny91p3anwhb50afb7vjaby8m34";
+    meta.description = "Jane Street C header files";
+  };
+
+  time_now = janePackage {
+    pname = "time_now";
+    hash = "169mgsb3rja4j1j9nj5xa7bbkd21p9kfpskqz0wjf9x2fpxqsniq";
+    meta.description = "Reports the current time";
+    buildInputs = [ jst-config ppx_optcomp ];
+    propagatedBuildInputs = [ jane-street-headers base ppx_base ];
+  };
+
+  ppx_module_timer = janePackage {
+    pname = "ppx_module_timer";
+    hash = "0yziakm7f4c894na76k1z4bp7azy82xc33mh36fj761w1j9zy3wm";
+    meta.description = "Ppx rewriter that records top-level module startup times";
+    propagatedBuildInputs = [ time_now ];
+  };
+
+  ppx_optional = janePackage {
+    pname = "ppx_optional";
+    hash = "07i0iipbd5xw2bc604qkwlcxmhncfpm3xmrr6svyj2ij86pyssh8";
+    meta.description = "Pattern matching on flat options";
+    propagatedBuildInputs = [ ppxlib ];
+  };
+
+  ppx_pipebang = janePackage {
+    pname = "ppx_pipebang";
+    hash = "1p4pdpl8h2bblbhpn5nk17ri4rxpz0aih0gffg3cl1186irkj0xj";
+    meta.description = "A ppx rewriter that inlines reverse application operators `|>` and `|!`";
+    propagatedBuildInputs = [ ppxlib ];
+  };
+
+  ppx_sexp_value = janePackage {
+    pname = "ppx_sexp_value";
+    hash = "1mg81834a6dx1x7x9zb9wc58438cabjjw08yhkx6i386hxfy891p";
+    meta.description = "A ppx rewriter that simplifies building s-expressions from ocaml values";
+    propagatedBuildInputs = [ ppx_here ppx_sexp_conv ];
+  };
+
+  typerep = janePackage {
+    pname = "typerep";
+    hash = "1psl6gsk06a62szh60y5sc1s92xpmrl1wpw3rhha09v884b7arbc";
+    meta.description = "Typerep is a library for runtime types";
+    propagatedBuildInputs = [ base ];
+  };
+
+  ppx_typerep_conv = janePackage {
+    pname = "ppx_typerep_conv";
+    hash = "09vik6qma1id44k8nz87y48l9wbjhqhap1ar1hpfdfkjai1hrzzq";
+    meta.description = "Generation of runtime types from type declarations";
+    propagatedBuildInputs = [ ppxlib typerep ];
+  };
+
+  ppx_jane = janePackage {
+    pname = "ppx_jane";
+    hash = "1a2602isqzsh640q20qbmarx0sc316mlsqc3i25ysv2kdyhh0kyw";
+    meta.description = "Standard Jane Street ppx rewriters";
+    propagatedBuildInputs = [ base_quickcheck ppx_bench ppx_bin_prot ppx_expect ppx_fail ppx_module_timer ppx_optcomp ppx_optional ppx_pipebang ppx_sexp_value ppx_stable ppx_typerep_conv ];
+  };
+
+  base_bigstring = janePackage {
+    pname = "base_bigstring";
+    hash = "0rbgyg511847fbnxad40prz2dyp4da6sffzyzl88j18cxqxbh1by";
+    meta.description = "String type based on [Bigarray], for use in I/O and C-bindings";
+    propagatedBuildInputs = [ ppx_jane ];
+  };
+
+  parsexp = janePackage {
+    pname = "parsexp";
+    hash = "1974i9s2c2n03iffxrm6ncwbd2gg6j6avz5jsxfd35scc2zxcd4l";
+    meta.description = "S-expression parsing library";
+    propagatedBuildInputs = [ base sexplib0 ];
+  };
+
+  sexplib = janePackage {
+    pname = "sexplib";
+    hash = "0780klc5nnv0ij6aklzra517cfnfkjdlp8ylwjrqwr8dl9rvxza2";
+    meta.description = "Library for serializing OCaml values to and from S-expressions";
+    propagatedBuildInputs = [ num parsexp ];
+  };
+
+  core_kernel = janePackage {
+    pname = "core_kernel";
+    version = "0.12.2";
+    hash = "0c85bjvadrb4pmjcg0gjk3bkkgka62r90pjm690mjvcbbv5zjxzj";
+    meta.description = "System-independent part of Core";
+    buildInputs = [ jst-config ];
+    propagatedBuildInputs = [ base_bigstring sexplib ];
+  };
+
+  spawn = janePackage {
+    pname = "spawn";
+    version = "0.13.0";
+    hash = "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf";
+    meta.description = "Spawning sub-processes";
+    buildInputs = [ ppx_expect ];
+  };
+
+  core = janePackage {
+    pname = "core";
+    version = "0.12.3";
+    hash = "1vmjqiafkg45hqfvahx6jnlaww1q4a4215k8znbgprf0qn3zymnj";
+    meta.description = "System-independent part of Core";
+    buildInputs = [ jst-config ];
+    propagatedBuildInputs = [ core_kernel spawn ];
+  };
+
+  async_kernel = janePackage {
+    pname = "async_kernel";
+    hash = "1d9illx7vvpblj1i2r9y0f2yff2fbhy3rp4hhvamq1n9n3lvxmh2";
+    meta.description = "Monadic concurrency library";
+    propagatedBuildInputs = [ core_kernel ];
+  };
+
+  protocol_version_header = janePackage {
+    pname = "protocol_version_header";
+    hash = "14vqhx3r84rlfhcjq52gxdqksckiaswlck9s47g7y2z1lsc17v7r";
+    meta.description = "Protocol versioning";
+    propagatedBuildInputs = [ core_kernel ];
+  };
+
+  async_rpc_kernel = janePackage {
+    pname = "async_rpc_kernel";
+    hash = "1znhqbzx4fp58i7dbcgyv5rx7difbhb5d8cbqzv96yqvbn67lsjk";
+    meta.description = "Platform-independent core of Async RPC library";
+    propagatedBuildInputs = [ async_kernel protocol_version_header ];
+  };
+
+  async_unix = janePackage {
+    pname = "async_unix";
+    hash = "09h10rdyykbm88n6r9nb5a22mlb6vcxa04q6hvrcr0kys6qhhqmb";
+    meta.description = "Monadic concurrency library";
+    propagatedBuildInputs = [ async_kernel core ];
+  };
+
+  async_extra = janePackage {
+    pname = "async_extra";
+    hash = "10j4mwlyqvf67yrp5dwd857llqjinpnnykmlzw2gpmks9azxk6mh";
+    meta.description = "Monadic concurrency library";
+    propagatedBuildInputs = [ async_rpc_kernel async_unix ];
+  };
+
+  textutils = janePackage {
+    pname = "textutils";
+    hash = "0302awqihf3abib9mvzvn4g8m364hm6jxry1r3kc01hzybhy9acq";
+    meta.description = "Text output utilities";
+    propagatedBuildInputs = [ core ];
+  };
+
+  async = janePackage {
+    pname = "async";
+    hash = "0pk7z3h2gi21nfchvmjz2wx516bynf9vgwf84zf5qhvlvqqsmyrx";
+    meta.description = "Monadic concurrency library";
+    propagatedBuildInputs = [ async_extra textutils ];
+  };
+
+  async_ssl = janePackage {
+    pname = "async_ssl";
+    hash = "02ard8x5q5c42d9jdqmyzfx624yjq8cxxmvq3zb82hf6p8cc57ml";
+    meta.description = "An Async-pipe-based interface with OpenSSL";
+    propagatedBuildInputs = [ async ctypes openssl ];
+  };
+
+  async_find = janePackage {
+    pname = "async_find";
+    hash = "0qsz9f15s5rlk6za10s810v6nlkdxg2g9p1827lcpa7nhjcpi673";
+    meta.description = "Directory traversal with Async";
+    propagatedBuildInputs = [ async ];
+  };
+
+  re2 = janePackage {
+    pname = "re2";
+    hash = "1sw32lb0y501y971ij7287796lvfhs0nfgla895r74ymfks2rcjb";
+    meta.description = "OCaml bindings for RE2, Google's regular expression library";
+    propagatedBuildInputs = [ core_kernel ];
+  };
+
+  shell = janePackage {
+    pname = "shell";
+    hash = "158857rdr6qgglc5iksg0l54jgf51b5lmsw7nlazpxwdwc9fcn5n";
+    meta.description = "Yet another implementation of fork&exec and related functionality";
+    buildInputs = [ jst-config ];
+    propagatedBuildInputs = [ re2 textutils ];
+  };
+
+  async_shell = janePackage {
+    pname = "async_shell";
+    hash = "0cxln9hkc3cy522la9yi9p23qjwl69kqmadsq4lnjh5bxdad06sv";
+    meta.description = "Shell helpers for Async";
+    propagatedBuildInputs = [ async shell ];
+  };
+
+  core_bench = janePackage {
+    pname = "core_bench";
+    hash = "00hyzbbj19dkcw0vhfnc8w0ca3zkjriwwvl00ssa0a2g9mygijdm";
+    meta.description = "Benchmarking library";
+    propagatedBuildInputs = [ textutils ];
+  };
+
+  core_extended = janePackage {
+    pname = "core_extended";
+    hash = "1gwx66235irpf5krb1r25a3c7w52qhmass8hp7rdv89il9jn49w4";
+    meta.description = "Extra components that are not as closely vetted or as stable as Core";
+    propagatedBuildInputs = [ core ];
+  };
+
+  ### Packages at version 0.11, with dependencies at version 0.12
+
+  configurator = janePackage {
+    pname = "configurator";
+    version = "0.11.0";
+    hash = "0h686630cscav7pil8c3w0gbh6rj4b41dvbnwmicmlkc746q5bfk";
+    propagatedBuildInputs = [ stdio ];
+    meta.description = "Helper library for gathering system configuration";
+  };
+
+  ppx_core = janePackage {
+    pname = "ppx_core";
+    version = "0.11.0";
+    hash = "11hgm9mxig4cm3c827f6dns9mjv3pf8g6skf10x0gw9xnp1dmzmx";
+    propagatedBuildInputs = [ ppxlib ];
+    meta.description = "Deprecated (see ppxlib)";
+  };
+
+  ppx_driver = janePackage {
+    pname = "ppx_driver";
+    version = "0.11.0";
+    hash = "00kfx6js2kxk57k4v7hiqvwk7h35whgjihnxf75m82rnaf4yzvfi";
+    propagatedBuildInputs = [ ppxlib ];
+    meta.description = "Deprecated (see ppxlib)";
+  };
+
+  ppx_type_conv = janePackage {
+    pname = "ppx_type_conv";
+    version = "0.11.0";
+    hash = "04dbrglqqhkas25cpjz8xhjcbpk141c35qggzw66bn69izczfmaf";
+    propagatedBuildInputs = [ ppxlib ];
+    meta.description = "Deprecated (see ppxlib)";
+  };
+
+}
diff --git a/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix b/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix
new file mode 100644
index 000000000000..5b7d9c3210d4
--- /dev/null
+++ b/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix
@@ -0,0 +1,19 @@
+{ lib, fetchFromGitHub, buildDunePackage, defaultVersion ? "0.12.0" }:
+
+{ pname, version ? defaultVersion, hash, ...}@args:
+
+buildDunePackage (args // {
+  inherit version;
+
+  minimumOCamlVersion = "4.07";
+
+  src = fetchFromGitHub {
+    owner = "janestreet";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = hash;
+  };
+
+  meta.license = lib.licenses.mit;
+  meta.homepage = "https://github.com/janestreet/${pname}";
+})
diff --git a/pkgs/development/ocaml-modules/nocrypto/default.nix b/pkgs/development/ocaml-modules/nocrypto/default.nix
index 9108fd248c01..06a87c072b4a 100644
--- a/pkgs/development/ocaml-modules/nocrypto/default.nix
+++ b/pkgs/development/ocaml-modules/nocrypto/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, topkg
 , cpuid, ocb-stubblr, sexplib
-, cstruct, zarith, ppx_sexp_conv
+, cstruct, zarith, ppx_sexp_conv, ppx_deriving
 , cstruct-lwt ? null
 }:
 
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs = [ ocaml findlib ocamlbuild topkg cpuid ocb-stubblr ];
-  propagatedBuildInputs = [ cstruct ppx_sexp_conv sexplib zarith ] ++ optional withLwt cstruct-lwt;
+  propagatedBuildInputs = [ cstruct ppx_deriving ppx_sexp_conv sexplib zarith ] ++ optional withLwt cstruct-lwt;
 
   buildPhase = "${topkg.buildPhase} --with-lwt ${boolToString withLwt}";
   inherit (topkg) installPhase;
diff --git a/pkgs/development/ocaml-modules/rpclib/default.nix b/pkgs/development/ocaml-modules/rpclib/default.nix
new file mode 100644
index 000000000000..2b4ab1818590
--- /dev/null
+++ b/pkgs/development/ocaml-modules/rpclib/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, buildDunePackage, alcotest, cmdliner, rresult, result, xmlm, yojson }:
+
+buildDunePackage rec {
+  pname = "rpclib";
+  version = "5.9.0";
+
+  minimumOCamlVersion = "4.04";
+
+  src = fetchFromGitHub {
+    owner = "mirage";
+    repo = "ocaml-rpc";
+    rev = "v${version}";
+    sha256 = "1swnnmmnkn53mxqpckdnd1j8bz0wksqznjbv0zamspxyqybmancq";
+  };
+
+  buildInputs = [ alcotest cmdliner yojson ];
+  propagatedBuildInputs = [ rresult result xmlm ];
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/mirage/ocaml-rpc";
+    description = "Light library to deal with RPCs in OCaml";
+    license = licenses.isc;
+    maintainers = [ maintainers.vyorkin ];
+  };
+}
diff --git a/pkgs/development/python-modules/fire/default.nix b/pkgs/development/python-modules/fire/default.nix
index c44083e4c29a..7af8d29fce73 100644
--- a/pkgs/development/python-modules/fire/default.nix
+++ b/pkgs/development/python-modules/fire/default.nix
@@ -1,18 +1,18 @@
 { stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, six, hypothesis, mock
-, python-Levenshtein, pytest }:
+, python-Levenshtein, pytest, termcolor, isPy27, enum34 }:
 
 buildPythonPackage rec {
   pname = "fire";
-  version = "0.1.3";
+  version = "0.2.1";
 
   src = fetchFromGitHub {
     owner = "google";
     repo = "python-fire";
     rev = "v${version}";
-    sha256 = "0kdcmzr3sgzjsw5fmvdylgrn8akqjbs433jbgqzp498njl9cc6qx";
+    sha256 = "1r6cmihafd7mb6j3mvgk251my6ckb0sqqj1l2ny2azklv175b38a";
   };
 
-  propagatedBuildInputs = [ six ];
+  propagatedBuildInputs = [ six termcolor ] ++ stdenv.lib.optional isPy27 enum34;
 
   checkInputs = [ hypothesis mock python-Levenshtein pytest ];
 
@@ -20,14 +20,6 @@ buildPythonPackage rec {
     py.test
   '';
 
-  patches = [
-    # Add Python 3.7 support. Remove with the next release
-    (fetchpatch {
-      url = "https://github.com/google/python-fire/commit/668007ae41391f5964870b4597e41493a936a11e.patch";
-      sha256 = "0rf7yzv9qx66zfmdggfz478z37fi4rwx4hlh3dk1065sx5rfksi0";
-    })
-  ];
-
   meta = with stdenv.lib; {
     description = "A library for automatically generating command line interfaces";
     longDescription = ''
diff --git a/pkgs/misc/emulators/dolphin-emu/default.nix b/pkgs/misc/emulators/dolphin-emu/default.nix
index 813730d435d0..303c2f82d9ef 100644
--- a/pkgs/misc/emulators/dolphin-emu/default.nix
+++ b/pkgs/misc/emulators/dolphin-emu/default.nix
@@ -22,6 +22,12 @@ stdenv.mkDerivation rec {
       name = "dolphin-emu-5.0-soundtouch-exception-fix.patch";
       sha256 = "0yd3l46nja5qiknnl30ryad98f3v8911jwnr67hn61dzx2kwbbaw";
     })
+    # Fix build with gcc 8
+    (fetchpatch {
+      url = "https://salsa.debian.org/games-team/dolphin-emu/raw/9b7b4aeac1b60dcf28bdcafbed6bc498b2aeb0ad/debian/patches/03_gcc8.patch";
+      name = "03_gcc8.patch";
+      sha256 = "1da95gb8c95kd5cjhdvg19cv2z863lj3va5gx3bqc7g8r36glqxr";
+    })
   ];
 
   postPatch = ''
diff --git a/pkgs/os-specific/darwin/wifi-password/default.nix b/pkgs/os-specific/darwin/wifi-password/default.nix
new file mode 100644
index 000000000000..801e180f7344
--- /dev/null
+++ b/pkgs/os-specific/darwin/wifi-password/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  version = "0.1.0";
+  pname = "wifi-password";
+
+  src = fetchFromGitHub {
+    owner = "rauchg";
+    repo = pname;
+    rev = version;
+    sha256 = "0sfvb40h7rz9jzp4l9iji3jg80paklqsbmnk5h7ipsv2xbsplp64";
+  };
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp wifi-password.sh $out/bin/wifi-password
+  '';
+
+  meta = {
+    homepage = https://github.com/rauchg/wifi-password;
+    description = "Get the password of the wifi you're on";
+    platforms = stdenv.lib.platforms.darwin;
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.nikitavoloboev ];
+  };
+}
diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix
index da9ed304db88..f041d2b50429 100644
--- a/pkgs/os-specific/linux/busybox/default.nix
+++ b/pkgs/os-specific/linux/busybox/default.nix
@@ -1,7 +1,7 @@
 { stdenv, lib, buildPackages, fetchurl
 , enableStatic ? false
 , enableMinimal ? false
-, useMusl ? stdenv.hostPlatform.libc == "musl"
+, useMusl ? stdenv.hostPlatform.libc == "musl", musl
 , extraConfig ? ""
 }:
 
@@ -88,6 +88,10 @@ stdenv.mkDerivation rec {
     runHook postConfigure
   '';
 
+  postConfigure = lib.optionalString useMusl ''
+    makeFlagsArray+=("CC=${stdenv.cc.targetPrefix}cc -isystem ${musl.dev}/include -B${musl}/lib -L${musl}/lib")
+  '';
+
   depsBuildBuild = [ buildPackages.stdenv.cc ];
 
   buildInputs = lib.optionals (enableStatic && !useMusl && stdenv.cc.libc ? static) [ stdenv.cc.libc stdenv.cc.libc.static ];
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index 23a29cfb7b19..4ad222b83e44 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -158,6 +158,9 @@ let
       ATH9K_AHB             = option yes; # Ditto, AHB bus
       B43_PHY_HT            = option yes;
       BCMA_HOST_PCI         = option yes;
+      RTW88                 = whenAtLeast "5.2" module;
+      RTW88_8822BE          = whenAtLeast "5.2" yes;
+      RTW88_8822CE          = whenAtLeast "5.2" yes;
     };
 
     fb = {
diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix
index ae39047a9d3d..0a0ccaffa7d2 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.142";
+  version = "4.14.143";
 
   # 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 = "1wwhnm1n1b6yzsd2zzzf9i3n4hlvgnph70p67cwahw0ik4ssayz6";
+    sha256 = "14rxck0dd0rirj09aj4xsbylcvvfrgqxr1fx0c570dxr7kqg4d15";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.19.nix b/pkgs/os-specific/linux/kernel/linux-4.19.nix
index 56d254c1ecb8..16277e6c85ff 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.19.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.19.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "4.19.71";
+  version = "4.19.72";
 
   # 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 = "1bjwkb7k82l646ryyy0jbwsnygm2qsxgcwli8bdrj844skzynlqz";
+    sha256 = "0v8zypwyc9bcmm16hbvk092h9qnwqc0f6m61bz2ml499pnrvdz7r";
   };
 } // (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 2889dc34aba7..9f03e200f1bd 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, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.4.191";
+  version = "4.4.192";
   extraMeta.branch = "4.4";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "0x3lnq4xyj5v6r1cz4jizm4vdspws1nb806f5qczwi3yil5nm6bh";
+    sha256 = "0fwak1hrahcky1hdk4h8693rjpx65c2sqzfm1x71nhhysa6r3fig";
   };
 } // (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 d494c7bb6235..9b91ced27d00 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, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.9.191";
+  version = "4.9.192";
   extraMeta.branch = "4.9";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1g5p736p8zx5rmxaj56yw93jp768npl868jsn8973dny0rsbim6y";
+    sha256 = "0m4d6b5sfcx3iv0agia080fbcn9icyqzgzxp946zv93hrq6306ks";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-5.2.nix b/pkgs/os-specific/linux/kernel/linux-5.2.nix
index dfce0f303987..47e57b8bb0aa 100644
--- a/pkgs/os-specific/linux/kernel/linux-5.2.nix
+++ b/pkgs/os-specific/linux/kernel/linux-5.2.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "5.2.13";
+  version = "5.2.14";
 
   # 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/v5.x/linux-${version}.tar.xz";
-    sha256 = "12hpph3iynr22mfwz7745lp01waf2kg579hr56d4pvhx4iahzdhp";
+    sha256 = "136fs0pn5acg40rlq51zl5001rk8fx01gi2ffd58cspfgx3kckf6";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/v4l-utils/default.nix b/pkgs/os-specific/linux/v4l-utils/default.nix
index a688f60492a8..73db222d390c 100644
--- a/pkgs/os-specific/linux/v4l-utils/default.nix
+++ b/pkgs/os-specific/linux/v4l-utils/default.nix
@@ -19,14 +19,14 @@ in stdenv.mkDerivation rec {
     sha256 = "1ng0x3wj3a1ckfd00yxa4za43xms92gdp7rdag060b7p39z7m4gf";
   };
 
-  outputs = [ "out" "dev" ];
+  outputs = [ "out" ] ++ lib.optional withUtils "lib" ++ [ "dev" ];
 
-  configureFlags =
-    if withUtils then [
-      "--with-udevdir=${placeholder "out"}/lib/udev"
-    ] else [
-      "--disable-v4l-utils"
-    ];
+  configureFlags = (if withUtils then [
+    "--with-localedir=${placeholder "lib"}/share/locale"
+    "--with-udevdir=${placeholder "out"}/lib/udev"
+  ] else [
+    "--disable-v4l-utils"
+  ]);
 
   postFixup = ''
     # Create symlink for V4l1 compatibility
@@ -39,10 +39,8 @@ in stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ libjpeg ];
 
-  NIX_CFLAGS_COMPILE = lib.optional withQt "-std=c++11";
-
   postPatch = ''
-    patchShebangs .
+    patchShebangs utils/cec-ctl/msg2ctl.pl
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/servers/echoip/default.nix b/pkgs/servers/echoip/default.nix
index d55eb1d0bbdf..b3402933f9fe 100644
--- a/pkgs/servers/echoip/default.nix
+++ b/pkgs/servers/echoip/default.nix
@@ -1,25 +1,23 @@
-{ lib, buildGoPackage, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub }:
 
-buildGoPackage {
+buildGoModule {
   pname = "echoip";
-  version = "unstable-2018-11-20";
-
-  goPackagePath = "github.com/mpolden/echoip";
+  version = "unstable-2019-07-12";
 
   src = fetchFromGitHub {
     owner = "mpolden";
     repo = "echoip";
-    rev = "4bfaf671b9f75a7b2b37543b2991401cbf57f1f0";
-    sha256 = "0n5d9i8cc5lqgy5apqd3zhyl3h1xjacf612z8xpvbm75jnllcvxy";
+    rev = "fb5fac92d2173c2a5b07ed4ecc7b5fefe8484ed2";
+    sha256 = "17gkh1qfxasvxy25lmjdwk5fsjkcp7lmw9si3xzf01m7qnj5zi4b";
   };
 
-  goDeps = ./deps.nix;
+  modSha256 = "025p891klwpid5fw4z39fimgfkwgkcwqpn5276hflzdp1hfv35ly";
 
-  outputs = [ "bin" "out" ];
+  outputs = [ "out" "index" ];
 
   postInstall = ''
-    mkdir -p $out
-    cp $src/index.html $out/index.html
+    mkdir -p $index
+    cp $src/index.html $index/index.html
   '';
 
   meta = with lib; {
diff --git a/pkgs/servers/echoip/deps.nix b/pkgs/servers/echoip/deps.nix
deleted file mode 100644
index 4e4f0799bdae..000000000000
--- a/pkgs/servers/echoip/deps.nix
+++ /dev/null
@@ -1,74 +0,0 @@
-# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
-[
-
-  {
-    goPackagePath = "github.com/davecgh/go-spew";
-    fetch = {
-      type = "git";
-      url = "https://github.com/davecgh/go-spew";
-      rev = "v1.1.1";
-      sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y";
-    };
-  }
-
-  {
-    goPackagePath = "github.com/jessevdk/go-flags";
-    fetch = {
-      type = "git";
-      url = "https://github.com/jessevdk/go-flags";
-      rev = "v1.4.0";
-      sha256 = "0algnnigph27spgn655zm4723yfjxjjvlf4k14z9drj3682df25a";
-    };
-  }
-
-  {
-    goPackagePath = "github.com/oschwald/geoip2-golang";
-    fetch = {
-      type = "FromGitHub";
-      owner = "oschwald";
-      repo = "geoip2-golang";
-      rev = "v1.2.1";
-      sha256 = "0zpgpz577rghvgis6ji9l99pq87z5izbgzmnbyn3dy533bayrgpw";
-    };
-  }
-
-  {
-    goPackagePath = "github.com/oschwald/maxminddb-golang";
-    fetch = {
-      type = "git";
-      url = "https://github.com/oschwald/maxminddb-golang";
-      rev = "v1.2.1";
-      sha256 = "0nlip5a2yiig0sv9y3ky4kn8730236wal3zjcs4yfgnw6nxl3rjr";
-    };
-  }
-
-  {
-    goPackagePath = "github.com/pmezard/go-difflib";
-    fetch = {
-      type = "git";
-      url = "https://github.com/pmezard/go-difflib";
-      rev = "v1.0.0";
-      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
-    };
-  }
-
-  {
-    goPackagePath = "github.com/stretchr/testify";
-    fetch = {
-      type = "git";
-      url = "https://github.com/stretchr/testify";
-      rev = "v1.2.2";
-      sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs";
-    };
-  }
-
-  {
-    goPackagePath = "golang.org/x/sys";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/sys";
-      rev = "37707fdb30a5";
-      sha256 = "1abrr2507a737hdqv4q7pw7hv6ls9pdiq9crhdi52r3gcz6hvizg";
-    };
-  }
-]
diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix
new file mode 100644
index 000000000000..cb0862c63736
--- /dev/null
+++ b/pkgs/tools/graphics/gmic-qt/default.nix
@@ -0,0 +1,144 @@
+{ lib
+, mkDerivation
+, fetchurl
+, fetchpatch
+, variant ? "standalone"
+, fetchFromGitHub
+, fetchFromGitLab
+, cmake
+, pkgconfig
+, opencv
+, openexr
+, graphicsmagick
+, fftw
+, zlib
+, libjpeg
+, libtiff
+, libpng
+, curl
+, krita ? null
+, gimp ? null
+, qtbase
+, qttools
+}:
+
+let
+  variants = {
+    gimp = {
+      extraDeps = [
+        gimp
+        gimp.gtk
+      ];
+      description = "GIMP plugin for the G'MIC image processing framework";
+    };
+
+    krita = {
+      extraDeps = [
+        krita
+      ];
+      description = "Krita plugin for the G'MIC image processing framework";
+    };
+
+    standalone = {
+      description = "Versatile front-end to the image processing framework G'MIC";
+    };
+  };
+
+in
+
+assert lib.assertMsg (builtins.hasAttr variant variants) "gmic-qt variant “${variant}” is not supported. Please use one of ${lib.concatStringsSep ", " (builtins.attrNames variants)}.";
+
+assert lib.assertMsg (builtins.all (d: d != null) variants.${variant}.extraDeps or []) "gmic-qt variant “${variant}” is missing one of its dependencies.";
+
+mkDerivation rec {
+  pname = "gmic-qt${lib.optionalString (variant != "standalone") ''-${variant}''}";
+  version = "2.7.1";
+
+  gmic-community = fetchFromGitHub {
+    owner = "dtschump";
+    repo = "gmic-community";
+    rev = "3fd528f20a2a7d651e96078c205ff21efb9cdd1a";
+    sha256 = "08d37b49qgh5d4rds7hvr5wjj4p1y8cnbidz1cyqsibq0555pwq2";
+  };
+
+  CImg = fetchFromGitLab {
+    domain = "framagit.org";
+    owner = "dtschump";
+    repo = "CImg";
+    rev = "v.${version}";
+    sha256 = "1mfkjvf5r3ppc1dd6yvqn7xlhgzfg9k1k5v2sq2k9m70g8p7rgpd";
+  };
+
+  gmic_stdlib = fetchurl {
+    name = "gmic_stdlib.h";
+    url = "http://gmic.eu/gmic_stdlib${lib.replaceStrings ["."] [""] version}.h";
+    sha256 = "0v12smknr1s44s6wq2gbnw0hb98xrwp6i3zg9wf49cl7s9qf76j3";
+  };
+
+  gmic = fetchFromGitHub {
+    owner = "dtschump";
+    repo = "gmic";
+    rev = "v.${version}";
+    sha256 = "0pa6kflr1gqgzh8rk7bylvkxs989r5jy0q7b62mnzx8895slwfb5";
+  };
+
+  gmic_qt = fetchFromGitHub {
+    owner = "c-koi";
+    repo = "gmic-qt";
+    rev = "v.${version}";
+    sha256 = "08a0660083wv5fb1w9qqhm4f8cfwbqq723qzqq647mid1n7sy959";
+  };
+
+  patches = [
+    # Install GIMP plug-in to a correct destination
+    # https://github.com/c-koi/gmic-qt/pull/78
+    ./fix-gimp-plugin-path.patch
+  ];
+
+  unpackPhase = ''
+    cp -r ${gmic} gmic
+    ln -s ${gmic-community} gmic-community
+    cp -r ${gmic_qt} gmic_qt
+    chmod -R +w gmic gmic_qt
+    ln -s ${CImg} CImg
+
+    cp ${gmic_stdlib} gmic/src/gmic_stdlib.h
+
+    cd gmic_qt
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkgconfig
+  ];
+
+  buildInputs = [
+    qtbase
+    qttools
+    fftw
+    zlib
+    libjpeg
+    libtiff
+    libpng
+    opencv
+    openexr
+    graphicsmagick
+    curl
+  ] ++ variants.${variant}.extraDeps or [];
+
+  cmakeFlags = [
+    "-DGMIC_QT_HOST=${if variant == "standalone" then "none" else variant}"
+  ];
+
+  postFixup = lib.optionalString (variant == "gimp") ''
+    echo "wrapping $out/${gimp.targetPluginDir}/gmic_gimp_qt"
+    wrapQtApp "$out/${gimp.targetPluginDir}/gmic_gimp_qt"
+  '';
+
+  meta = with lib; {
+    description = variants.${variant}.description;
+    homepage = http://gmic.eu/;
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/tools/graphics/gmic-qt/fix-gimp-plugin-path.patch b/pkgs/tools/graphics/gmic-qt/fix-gimp-plugin-path.patch
new file mode 100644
index 000000000000..ac0600fb76c3
--- /dev/null
+++ b/pkgs/tools/graphics/gmic-qt/fix-gimp-plugin-path.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1483056..26d2b9a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -473,6 +473,7 @@
+ 
+     execute_process(COMMAND gimptool-2.0 --libs-noui OUTPUT_VARIABLE GIMP2_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE)
+     execute_process(COMMAND gimptool-2.0 --cflags-noui OUTPUT_VARIABLE GIMP2_INCLUDE_DIRS OUTPUT_STRIP_TRAILING_WHITESPACE)
++    execute_process(COMMAND pkg-config gimp-2.0 --define-variable=prefix=${CMAKE_INSTALL_PREFIX} --variable gimplibdir OUTPUT_VARIABLE GIMP2_PKGLIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GIMP2_INCLUDE_DIRS}")
+ 
+     set (gmic_qt_SRCS ${gmic_qt_SRCS} src/Host/Gimp/host_gimp.cpp)
+@@ -484,7 +485,7 @@
+       ${GIMP2_LIBRARIES}
+       ${gmic_qt_LIBRARIES}
+       )
+-    install(TARGETS gmic_gimp_qt RUNTIME DESTINATION bin)
++    install(TARGETS gmic_gimp_qt RUNTIME DESTINATION "${GIMP2_PKGLIBDIR}/plug-ins")
+ 
+ elseif (${GMIC_QT_HOST} STREQUAL "krita")
+ 
diff --git a/pkgs/tools/graphics/gmic/default.nix b/pkgs/tools/graphics/gmic/default.nix
index c487e42329d8..c6781310bdb5 100644
--- a/pkgs/tools/graphics/gmic/default.nix
+++ b/pkgs/tools/graphics/gmic/default.nix
@@ -1,46 +1,53 @@
-{ stdenv, fetchurl, cmake, ninja, pkgconfig
-, opencv, openexr, graphicsmagick, fftw, zlib, libjpeg, libtiff, libpng
-, withGimpPlugin ? true, gimp ? null}:
-
-assert withGimpPlugin -> gimp != null;
-
-let
-  version = "2.2.2";
-
-  # CMakeLists.txt is missing from the tarball and Makefile is terrible
-  CMakeLists = fetchurl {
-    url = "https://github.com/dtschump/gmic/raw/v.${version}/CMakeLists.txt";
-    sha256 = "0lv5jrg98cpbk13fl4xm7l4sk1axfz054q570bpi741w815d7cpg";
-  };
-in stdenv.mkDerivation {
+{ stdenv
+, fetchurl
+, cmake
+, ninja
+, pkgconfig
+, opencv
+, openexr
+, graphicsmagick
+, fftw
+, zlib
+, libjpeg
+, libtiff
+, libpng
+}:
+
+stdenv.mkDerivation rec {
   pname = "gmic";
-  inherit version;
+  version = "2.7.1";
 
-  outputs = [ "out" "lib" "dev" "man" ] ++ stdenv.lib.optional withGimpPlugin "gimpPlugin";
+  outputs = [ "out" "lib" "dev" "man" ];
 
   src = fetchurl {
     url = "https://gmic.eu/files/source/gmic_${version}.tar.gz";
-    sha256 = "0zqfj2ym5nn3ff93xh2wf9ayxqlznabbdi00xw4lm7vw3iwkzqnc";
+    sha256 = "1sxgmrxv1px07h5m7dcdg24c6x39ifjbc1fmz8p2ah91pm57h7n7";
   };
 
-  nativeBuildInputs = [ cmake ninja pkgconfig ];
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pkgconfig
+  ];
 
   buildInputs = [
-    fftw zlib libjpeg libtiff libpng opencv openexr graphicsmagick
-  ] ++ stdenv.lib.optionals withGimpPlugin [ gimp gimp.gtk ];
+    fftw
+    zlib
+    libjpeg
+    libtiff
+    libpng
+    opencv
+    openexr
+    graphicsmagick
+  ];
 
   cmakeFlags = [
     "-DBUILD_LIB_STATIC=OFF"
-    "-DBUILD_PLUGIN=${if withGimpPlugin then "ON" else "OFF"}"
     "-DENABLE_DYNAMIC_LINKING=ON"
-  ] ++ stdenv.lib.optional withGimpPlugin "-DPLUGIN_INSTALL_PREFIX=${placeholder "gimpPlugin"}/${gimp.targetPluginDir}";
-
-  postPatch = ''
-    cp ${CMakeLists} CMakeLists.txt
-  '';
+  ];
 
   meta = with stdenv.lib; {
-    description = "G'MIC is an open and full-featured framework for image processing";
+    description = "Open and full-featured framework for image processing";
     homepage = http://gmic.eu/;
     license = licenses.cecill20;
     platforms = platforms.unix;
diff --git a/pkgs/tools/graphics/gmic_krita_qt/default.nix b/pkgs/tools/graphics/gmic_krita_qt/default.nix
deleted file mode 100644
index e5bdf6f31775..000000000000
--- a/pkgs/tools/graphics/gmic_krita_qt/default.nix
+++ /dev/null
@@ -1,83 +0,0 @@
-{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig
-, opencv, openexr, graphicsmagick, fftw, zlib, libjpeg, libtiff, libpng
-, curl, krita, qtbase, qttools
-, fetchgit }:
-
-let
-  version = "2.3.6";
-
-in stdenv.mkDerivation rec {
-  pname = "gmic_krita_qt";
-  inherit version;
-
-  gmic-community = fetchFromGitHub {
-    owner = "dtschump";
-    repo = "gmic-community";
-    rev = "3fd528f20a2a7d651e96078c205ff21efb9cdd1a";
-    sha256 = "08d37b49qgh5d4rds7hvr5wjj4p1y8cnbidz1cyqsibq0555pwq2";
-  };
-
-  CImg = fetchgit {
-    url = "https://framagit.org/dtschump/CImg";
-    rev = "90f5657d8eab7b549ef945103ef680e747385805";
-    sha256 = "1af3dwqq18dkw0lz2gvnlw8y0kc1cw01hnc72rf3pg2wyjcp0pvc";
-  };
-
-  gmic_stdlib = fetchurl {
-    name = "gmic_stdlib.h";
-    # Version should e in sync with gmic. Basically the version string without dots
-    url = "http://gmic.eu/gmic_stdlib236.h";
-    sha256 = "0q5g87dsn9byd2qqsa9xrsggfb9qv055s3l2gc0jrcvpx2qbza4q";
-  };
-
-  gmic = fetchFromGitHub {
-    owner = "dtschump";
-    repo = "gmic";
-    rev = "v.${version}";
-    sha256 = "1yg9ri3n07drv8gz4x0mn39ryi801ibl26jaza47m19ma893m8fi";
-  };
-
-  gmic_qt = fetchFromGitHub {
-    owner = "c-koi";
-    repo = "gmic-qt";
-    rev = "v.${version}";
-    sha256= "0j9wqlq67dwzir36yg58xy5lbblwizvgcvlmzcv9d6l901d5ayf3";
-  };
-
-  unpackPhase = ''
-    cp -r ${gmic} gmic
-    ln -s ${gmic-community} gmic-community
-    cp -r ${gmic_qt} gmic_qt
-    chmod -R +w gmic gmic_qt
-    ln -s ${CImg} CImg
-
-    cp ${gmic_stdlib} gmic/src/gmic_stdlib.h
-
-    cd gmic_qt
-  '';
-
-  preConfigure = ''
-    make -C ../gmic/src CImg.h gmic_stdlib.h
-  '';
-
-  nativeBuildInputs = [ cmake pkgconfig ];
-
-  buildInputs = [
-    qtbase qttools fftw zlib libjpeg libtiff libpng
-    opencv openexr graphicsmagick curl krita
-  ];
-
-  cmakeFlags = [ "-DGMIC_QT_HOST=krita" ];
-
-  installPhase = ''
-    mkdir -p $out/bin;
-    install -Dm755 gmic_krita_qt "$out/bin/gmic_krita_qt"
-  '';
-
-  meta = with stdenv.lib; {
-    description = "Krita plugin for the G'MIC image processing framework";
-    homepage = http://gmic.eu/;
-    license = licenses.gpl3;
-    platforms = platforms.unix;
-  };
-}
diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix
index 503461018abb..cb5ea25211cd 100644
--- a/pkgs/tools/graphics/zbar/default.nix
+++ b/pkgs/tools/graphics/zbar/default.nix
@@ -1,15 +1,28 @@
-{ stdenv, fetchFromGitHub, imagemagickBig, pkgconfig, python2Packages, perl
-, libX11, libv4l, qt5, gtk2, xmlto, docbook_xsl, autoreconfHook, dbus
-, enableVideo ? stdenv.isLinux, enableDbus ? stdenv.isLinux
+{ stdenv
+, lib
+, fetchFromGitHub
+, imagemagickBig
+, pkgconfig
+, libX11
+, libv4l
+, qtbase
+, qtx11extras
+, wrapQtAppsHook
+, gtk3
+, xmlto
+, docbook_xsl
+, autoreconfHook
+, dbus
+, enableVideo ? stdenv.isLinux
+, enableDbus ? stdenv.isLinux
 }:
 
-with stdenv.lib;
-let
-  inherit (python2Packages) pygtk python;
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
   pname = "zbar";
   version = "0.23";
 
+  outputs = [ "out" "lib" "dev" "doc" "man" ];
+
   src = fetchFromGitHub {
     owner = "mchehab";
     repo = "zbar";
@@ -17,27 +30,49 @@ in stdenv.mkDerivation rec {
     sha256 = "0hlxakpyjg4q9hp7yp3har1n78341b4knwyll28hn48vykg28pza";
   };
 
-  nativeBuildInputs = [ pkgconfig xmlto autoreconfHook docbook_xsl ];
+  nativeBuildInputs = [
+    pkgconfig
+    xmlto
+    autoreconfHook
+    docbook_xsl
+    wrapQtAppsHook
+  ];
 
   buildInputs = [
-    imagemagickBig python pygtk perl libX11
-  ] ++ optional enableDbus dbus
-  ++ optionals enableVideo [
-    libv4l gtk2 qt5.qtbase qt5.qtx11extras
+    imagemagickBig
+    libX11
+  ] ++ lib.optionals enableDbus [
+    dbus
+  ] ++ lib.optionals enableVideo [
+    libv4l
+    gtk3
+    qtbase
+    qtx11extras
   ];
 
-  configureFlags = (if enableDbus then [
-    "--with-dbusconfdir=$out/etc/dbus-1/system.d"
-  ] else [ "--without-dbus" ])
-  ++ optionals (!enableVideo) [
-    "--disable-video" "--without-gtk" "--without-qt"
-  ];
+  configureFlags = [
+    "--without-python"
+  ] ++ (if enableDbus then [
+    "--with-dbusconfdir=${placeholder "out"}/etc"
+  ] else [
+    "--without-dbus"
+  ]) ++ (if enableVideo then [
+    "--with-gtk=gtk3"
+  ] else [
+    "--disable-video"
+    "--without-gtk"
+    "--without-qt"
+  ]);
+
+  dontWrapQtApps = true;
+  dontWrapGApps = true;
 
-  postInstall = optionalString enableDbus ''
-    install -Dm644 dbus/org.linuxtv.Zbar.conf $out/etc/dbus-1/system.d/org.linuxtv.Zbar.conf
+  postFixup = lib.optionalString enableVideo ''
+    wrapProgram "$out/bin/zbarcam-gtk" "''${gappsWrapperArgs[@]}"
+    wrapQtApp "$out/bin/zbarcam-qt"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Bar code reader";
     longDescription = ''
       ZBar is an open source software suite for reading bar codes from various
diff --git a/pkgs/tools/misc/remind/default.nix b/pkgs/tools/misc/remind/default.nix
index cc842105d0ae..91d8e4721307 100644
--- a/pkgs/tools/misc/remind/default.nix
+++ b/pkgs/tools/misc/remind/default.nix
@@ -11,6 +11,9 @@ let
   tclLibraries = stdenv.lib.optionals tkremind [ tcllib tk ];
   tclLibPaths = stdenv.lib.concatStringsSep " "
     (map (p: "${p}/lib/${p.libPrefix}") tclLibraries);
+  tkremindPatch = optionalString tkremind ''
+    substituteInPlace scripts/tkremind --replace "exec wish" "exec ${tk}/bin/wish"
+  '';
 in stdenv.mkDerivation {
   name = "remind-3.1.16";
   src = fetchurl {
@@ -21,8 +24,13 @@ in stdenv.mkDerivation {
   nativeBuildInputs = optional tkremind makeWrapper;
   propagatedBuildInputs = tclLibraries;
 
-  postPatch = optionalString tkremind ''
-    substituteInPlace scripts/tkremind --replace "exec wish" "exec ${tk}/bin/wish"
+  postPatch = ''
+    substituteInPlace ./configure \
+      --replace "sleep 1" "true"
+    substituteInPlace ./src/init.c \
+      --replace "rkrphgvba(0);" "" \
+      --replace "rkrphgvba(1);" ""
+    ${tkremindPatch}
   '';
 
   postInstall = optionalString tkremind ''
@@ -34,6 +42,6 @@ in stdenv.mkDerivation {
     description = "Sophisticated calendar and alarm program for the console";
     license = stdenv.lib.licenses.gpl2;
     maintainers = with stdenv.lib.maintainers; [raskin kovirobi];
-    platforms = with stdenv.lib.platforms; linux;
+    platforms = with stdenv.lib.platforms; unix;
   };
 }
diff --git a/pkgs/tools/networking/skydive/default.nix b/pkgs/tools/networking/skydive/default.nix
deleted file mode 100644
index 722deaff655c..000000000000
--- a/pkgs/tools/networking/skydive/default.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{ lib, buildGoPackage, fetchFromGitHub, perl
-, go-bindata, libxml2, protobuf3_1, libpcap, pkgconfig, go-protobuf }:
-
-buildGoPackage rec {
-  pname = "skydive";
-  version = "0.17.0";
-  goPackagePath = "github.com/skydive-project/skydive";
-
-  src = fetchFromGitHub {
-    owner = "skydive-project";
-    repo = "skydive";
-    rev = "v${version}";
-    sha256 = "03y26imiib2v9icrgwlamzsrx3ph6vn582051vdk1x9ar80xp4dv";
-  };
-
-  patchPhase = ''
-    substituteInPlace Makefile \
-      --replace ".proto: builddep" ".proto: " \
-      --replace ".bindata: builddep" ".bindata: "
-  '';
-
-  buildInputs = [ perl go-bindata go-protobuf libxml2 protobuf3_1 libpcap pkgconfig ];
-  goDeps = ./deps.nix;
-
-  preBuild = ''
-    make -C go/src/github.com/skydive-project/skydive genlocalfiles VERSION=${version}
-  '';
-
-  preInstall = ''
-    mkdir -p $out/share/skydive
-    cp go/src/github.com/skydive-project/skydive/etc/skydive.yml.default $out/share/skydive/
-  '';
-
-  postInstall = ''
-    rm $bin/bin/snort
-  '';
-
-  meta = {
-    homepage = http://skydive.network;
-    description = "A real-time network analyzer";
-    license = lib.licenses.asl20;
-    platforms = [ "x86_64-linux" ];
-    maintainers = [ lib.maintainers.lewo ];
-  };
-}
diff --git a/pkgs/tools/networking/skydive/deps.nix b/pkgs/tools/networking/skydive/deps.nix
deleted file mode 100644
index c573a7231bb6..000000000000
--- a/pkgs/tools/networking/skydive/deps.nix
+++ /dev/null
@@ -1,1335 +0,0 @@
-# This file was generated by https://github.com/kamilchm/go2nix v2.0-dev
-[
-  {
-    goPackagePath = "github.com/Microsoft/go-winio";
-    fetch = {
-      type = "git";
-      url = "https://github.com/Microsoft/go-winio";
-      rev = "fff283ad5116362ca252298cfc9b95828956d85d";
-      sha256 = "0kfd6477rndcdl5c4dg9k64kxxp2667qqlbp4ccl7xk4qg9jckg9";
-    };
-  }
-  {
-    goPackagePath = "github.com/PuerkitoBio/purell";
-    fetch = {
-      type = "git";
-      url = "https://github.com/PuerkitoBio/purell";
-      rev = "fd18e053af8a4ff11039269006e8037ff374ce0e";
-      sha256 = "1v62jhcq1zvnsj83z3dyqr7msndnp85rlm53l6iq78yryd54i115";
-    };
-  }
-  {
-    goPackagePath = "github.com/PuerkitoBio/urlesc";
-    fetch = {
-      type = "git";
-      url = "https://github.com/PuerkitoBio/urlesc";
-      rev = "de5bf2ad457846296e2031421a34e2568e304e35";
-      sha256 = "0n0srpqwbaan1wrhh2b7ysz543pjs1xw2rghvqyffg9l0g8kzgcw";
-    };
-  }
-  {
-    goPackagePath = "github.com/Sirupsen/logrus";
-    fetch = {
-      type = "git";
-      url = "https://github.com/Sirupsen/logrus";
-      rev = "4b6ea7319e214d98c938f12692336f7ca9348d6b";
-      sha256 = "06wnl1dkkib2zpm31aavk5c4290s64h2ss68nl1vgcbxzsfbxjaq";
-    };
-  }
-  {
-    goPackagePath = "github.com/StackExchange/wmi";
-    fetch = {
-      type = "git";
-      url = "https://github.com/StackExchange/wmi";
-      rev = "5d049714c4a64225c3c79a7cf7d02f7fb5b96338";
-      sha256 = "1slw6v1fl8i0hz4db9lph55pbhnrxhqyndq6vm27dgvpj22k29fk";
-    };
-  }
-  {
-    goPackagePath = "github.com/abbot/go-http-auth";
-    fetch = {
-      type = "git";
-      url = "https://github.com/abbot/go-http-auth";
-      rev = "ca62df34b58d26b6a064246c21c0a18f97813173";
-      sha256 = "169i8549ai9ljjpvfgqjx4azclps7zjvislfszw5fndkw0qx7v1n";
-    };
-  }
-  {
-    goPackagePath = "github.com/araddon/gou";
-    fetch = {
-      type = "git";
-      url = "https://github.com/araddon/gou";
-      rev = "0c2ab7394d785afff14c983fedce4be70ccc431f";
-      sha256 = "0pppl3hm6r7mf7nnncjsfjfb8l020chzzl6n3c9g3qi02fkp3b1d";
-    };
-  }
-  {
-    goPackagePath = "github.com/armon/consul-api";
-    fetch = {
-      type = "git";
-      url = "https://github.com/armon/consul-api";
-      rev = "dcfedd50ed5334f96adee43fc88518a4f095e15c";
-      sha256 = "1k3yl34j4d8y6xxqdm70pjrbdcnp11dbf8i1mp60480xg0cwpb6d";
-    };
-  }
-  {
-    goPackagePath = "github.com/beorn7/perks";
-    fetch = {
-      type = "git";
-      url = "https://github.com/beorn7/perks";
-      rev = "b965b613227fddccbfffe13eae360ed3fa822f8d";
-      sha256 = "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk";
-    };
-  }
-  {
-    goPackagePath = "github.com/bitly/go-hostpool";
-    fetch = {
-      type = "git";
-      url = "https://github.com/bitly/go-hostpool";
-      rev = "d0e59c22a56e8dadfed24f74f452cea5a52722d2";
-      sha256 = "14ph12krn5zlg00vh9g6g08lkfjxnpw46nzadrfb718yl1hgyk3g";
-    };
-  }
-  {
-    goPackagePath = "github.com/c-bata/go-prompt";
-    fetch = {
-      type = "git";
-      url = "https://github.com/c-bata/go-prompt";
-      rev = "e99fbc797b795e0a7a94affc8d44f6a0350d85f0";
-      sha256 = "00i8wfi51hzla59qgkdlijnvad4h1p1si9jaaw3jzchm7g7ryrlj";
-    };
-  }
-  {
-    goPackagePath = "github.com/cenk/hub";
-    fetch = {
-      type = "git";
-      url = "https://github.com/cenk/hub";
-      rev = "11382a9960d39b0ecda16fd01c424c11ff765a34";
-      sha256 = "02f0l563niy2i5zq5cq7mqab775zzywp062pl0r12ny3gs0l8ssm";
-    };
-  }
-  {
-    goPackagePath = "github.com/cenk/rpc2";
-    fetch = {
-      type = "git";
-      url = "https://github.com/cenk/rpc2";
-      rev = "7ab76d2e88c77ca1a715756036d8264b2886acd2";
-      sha256 = "1yazkf6g370zy13fxnwjvn1n37zf7m7mcfws0jrrjflfw49fbpv8";
-    };
-  }
-  {
-    goPackagePath = "github.com/cnf/structhash";
-    fetch = {
-      type = "git";
-      url = "https://github.com/cnf/structhash";
-      rev = "7710f1f78fb9c581deeeab57ecfb7978901b36bc";
-      sha256 = "07dlpnwmqdmhj9s7w558lc0wnzvngz3i7d42a5y9rfg9k079l3fp";
-    };
-  }
-  {
-    goPackagePath = "github.com/cockroachdb/cmux";
-    fetch = {
-      type = "git";
-      url = "https://github.com/cockroachdb/cmux";
-      rev = "30d10be492927e2dcae0089c374c455d42414fcb";
-      sha256 = "0ixif6hwcm2dpi1si5ah49dmdyy5chillz1048jpvjzwzxyfv1nx";
-    };
-  }
-  {
-    goPackagePath = "github.com/coreos/bbolt";
-    fetch = {
-      type = "git";
-      url = "https://github.com/coreos/bbolt";
-      rev = "32c383e75ce054674c53b5a07e55de85332aee14";
-      sha256 = "0qa4434g081ksil9g479v9yk3ylhl48c9k95zki5kjq49cb0c589";
-    };
-  }
-  {
-    goPackagePath = "github.com/coreos/etcd";
-    fetch = {
-      type = "git";
-      url = "https://github.com/coreos/etcd";
-      rev = "b5abfe1858ddde05b83b96a810dc2b50cc5fcd94";
-      sha256 = "0lkhc45irh2pvlnqs60s06q74q5mlym9wl8h7rk8kk4zcfxqaa8i";
-    };
-  }
-  {
-    goPackagePath = "github.com/coreos/go-semver";
-    fetch = {
-      type = "git";
-      url = "https://github.com/coreos/go-semver";
-      rev = "8ab6407b697782a06568d4b7f1db25550ec2e4c6";
-      sha256 = "1gghi5bnqj50hfxhqc1cxmynqmh2yk9ii7ab9gsm75y5cp94ymk0";
-    };
-  }
-  {
-    goPackagePath = "github.com/coreos/go-systemd";
-    fetch = {
-      type = "git";
-      url = "https://github.com/coreos/go-systemd";
-      rev = "7b2428fec40033549c68f54e26e89e7ca9a9ce31";
-      sha256 = "0kfbxvm9zsjgvgmiq2jl807y4s5z0rya65rm399llr5rr7vz1lxd";
-    };
-  }
-  {
-    goPackagePath = "github.com/coreos/pkg";
-    fetch = {
-      type = "git";
-      url = "https://github.com/coreos/pkg";
-      rev = "66fe44ad037ccb80329115cb4db0dbe8e9beb03a";
-      sha256 = "1pxcwx0c6aazqdypcjvibam6zw88v1gsfhnsn5bscy33yzqmjrd4";
-    };
-  }
-  {
-    goPackagePath = "github.com/davecgh/go-spew";
-    fetch = {
-      type = "git";
-      url = "https://github.com/davecgh/go-spew";
-      rev = "346938d642f2ec3594ed81d874461961cd0faa76";
-      sha256 = "0d4jfmak5p6lb7n2r6yvf5p1zcw0l8j74kn55ghvr7zr7b7axm6c";
-    };
-  }
-  {
-    goPackagePath = "github.com/dgrijalva/jwt-go";
-    fetch = {
-      type = "git";
-      url = "https://github.com/dgrijalva/jwt-go";
-      rev = "d2709f9f1f31ebcda9651b03077758c1f3a0018c";
-      sha256 = "02zhyimshzfzp3by2lggm2z382j4pvbrbcxx9p1wqmmmwy5yz182";
-    };
-  }
-  {
-    goPackagePath = "github.com/docker/distribution";
-    fetch = {
-      type = "git";
-      url = "https://github.com/docker/distribution";
-      rev = "325b0804fef3a66309d962357aac3c2ce3f4d329";
-      sha256 = "1yg2zrikn3vkvkx5mn51p6bfjk840qdkn7ahhhvvcsc8mpigrjc6";
-    };
-  }
-  {
-    goPackagePath = "github.com/docker/docker";
-    fetch = {
-      type = "git";
-      url = "https://github.com/docker/docker";
-      rev = "c6d412e329c85f32a4b2269b49aaa0794affcf88";
-      sha256 = "1h3hkg15c3isfgaqpkp3mr7ys5826cz24hn3f3wz07jmismq98q7";
-    };
-  }
-  {
-    goPackagePath = "github.com/docker/go-connections";
-    fetch = {
-      type = "git";
-      url = "https://github.com/docker/go-connections";
-      rev = "990a1a1a70b0da4c4cb70e117971a4f0babfbf1a";
-      sha256 = "16lcf485a7gl0kzkc5n0qq9frjkfinxhcr3j4874qqkr8ghghwbb";
-    };
-  }
-  {
-    goPackagePath = "github.com/docker/go-units";
-    fetch = {
-      type = "git";
-      url = "https://github.com/docker/go-units";
-      rev = "5d2041e26a699eaca682e2ea41c8f891e1060444";
-      sha256 = "0hn8xdbaykp046inc4d2mwig5ir89ighma8hk18dfkm8rh1vvr8i";
-    };
-  }
-  {
-    goPackagePath = "github.com/emicklei/go-restful";
-    fetch = {
-      type = "git";
-      url = "https://github.com/emicklei/go-restful";
-      rev = "68c9750c36bb8cb433f1b88c807b4b30df4acc40";
-      sha256 = "0bc0wd5nipz1x078vpq82acyc7ip0qv1sddl451d7f7bvfms6h67";
-    };
-  }
-  {
-    goPackagePath = "github.com/emicklei/go-restful-swagger12";
-    fetch = {
-      type = "git";
-      url = "https://github.com/emicklei/go-restful-swagger12";
-      rev = "7524189396c68dc4b04d53852f9edc00f816b123";
-      sha256 = "1rqmrxpx55kin0059k7svmcbqx2jgybc200cjdc9ysaif3rhkd73";
-    };
-  }
-  {
-    goPackagePath = "github.com/fatih/structs";
-    fetch = {
-      type = "git";
-      url = "https://github.com/fatih/structs";
-      rev = "f5faa72e73092639913f5833b75e1ac1d6bc7a63";
-      sha256 = "1kdwvygp2g9jc9ygkr7snmk6zk6wmy7xywrf1p6q6iiwwil4xghz";
-    };
-  }
-  {
-    goPackagePath = "github.com/fsnotify/fsnotify";
-    fetch = {
-      type = "git";
-      url = "https://github.com/fsnotify/fsnotify";
-      rev = "30411dbcefb7a1da7e84f75530ad3abe4011b4f8";
-      sha256 = "0kbpvyi6p9942k0vmcw5z13mja47f7hq7nqd332pn2zydss6kddm";
-    };
-  }
-  {
-    goPackagePath = "github.com/ghodss/yaml";
-    fetch = {
-      type = "git";
-      url = "https://github.com/ghodss/yaml";
-      rev = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7";
-      sha256 = "0skwmimpy7hlh7pva2slpcplnm912rp3igs98xnqmn859kwa5v8g";
-    };
-  }
-  {
-    goPackagePath = "github.com/gima/govalid";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gima/govalid";
-      rev = "7b486932bea218beb6e85f7ed28650d283dd6ce6";
-      sha256 = "1w3gbfjl283qdfk3xj9mavhwx5wyh1v4w26d85plcdx4kcjmn6hy";
-    };
-  }
-  {
-    goPackagePath = "github.com/go-ole/go-ole";
-    fetch = {
-      type = "git";
-      url = "https://github.com/go-ole/go-ole";
-      rev = "a41e3c4b706f6ae8dfbff342b06e40fa4d2d0506";
-      sha256 = "114h8x7dh4jp7w7k678fm98lr9icavsf74v6jfipyq7q35bsfr1p";
-    };
-  }
-  {
-    goPackagePath = "github.com/go-openapi/jsonpointer";
-    fetch = {
-      type = "git";
-      url = "https://github.com/go-openapi/jsonpointer";
-      rev = "779f45308c19820f1a69e9a4cd965f496e0da10f";
-      sha256 = "10vv0xsabkvv81xpqqq95fvxnlpf07x9zwzl41g8x2lx05ibxsnc";
-    };
-  }
-  {
-    goPackagePath = "github.com/go-openapi/jsonreference";
-    fetch = {
-      type = "git";
-      url = "https://github.com/go-openapi/jsonreference";
-      rev = "36d33bfe519efae5632669801b180bf1a245da3b";
-      sha256 = "0d163wv3mj9cbhdqc9jqzw2kwi961lg4p30d8gcd6ddz0q752ykh";
-    };
-  }
-  {
-    goPackagePath = "github.com/go-openapi/spec";
-    fetch = {
-      type = "git";
-      url = "https://github.com/go-openapi/spec";
-      rev = "7abd5745472fff5eb3685386d5fb8bf38683154d";
-      sha256 = "1z9hwfzxgwr59r1syy0s4hgybs27q87n9mm1bbxl0yl5yvzw67rl";
-    };
-  }
-  {
-    goPackagePath = "github.com/go-openapi/swag";
-    fetch = {
-      type = "git";
-      url = "https://github.com/go-openapi/swag";
-      rev = "f3f9494671f93fcff853e3c6e9e948b3eb71e590";
-      sha256 = "13lqn4xqy9vma9aqsjb0fzfzi0q8l6dmg65sjxqdxf3q6gzkvmjy";
-    };
-  }
-  {
-    goPackagePath = "github.com/gobwas/httphead";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gobwas/httphead";
-      rev = "01c9b01b368a438f615030bbbd5e4f9e0023e15c";
-      sha256 = "0g1fig36plp3668wc3hm6w4sb7ki0ss24c311a59jpdgy9awfp56";
-    };
-  }
-  {
-    goPackagePath = "github.com/gobwas/pool";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gobwas/pool";
-      rev = "32dbaa12caca20fad12253c30591227e04f62cdd";
-      sha256 = "0iqqfi7zf6jrx1857xxk17hy4j1ln90j5w4jzyxd5x72v5jnmhxm";
-    };
-  }
-  {
-    goPackagePath = "github.com/gobwas/ws";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gobwas/ws";
-      rev = "915eed3240022c5265584c55032ef1b8c8f84168";
-      sha256 = "10r08qrssbmqkxhh26h1s7vvf1lpp7j5b5a4rn0cbr38gv4zwmx9";
-    };
-  }
-  {
-    goPackagePath = "github.com/gogo/protobuf";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gogo/protobuf";
-      rev = "2adc21fd136931e0388e278825291678e1d98309";
-      sha256 = "0z6lxahhq3d16w4ff3swrggly08yavzrjsjmmchfq7wcxxdrc9s6";
-    };
-  }
-  {
-    goPackagePath = "github.com/golang/glog";
-    fetch = {
-      type = "git";
-      url = "https://github.com/golang/glog";
-      rev = "23def4e6c14b4da8ac2ed8007337bc5eb5007998";
-      sha256 = "0jb2834rw5sykfr937fxi8hxi2zy80sj2bdn9b3jb4b26ksqng30";
-    };
-  }
-  {
-    goPackagePath = "github.com/golang/protobuf";
-    fetch = {
-      type = "git";
-      url = "https://github.com/golang/protobuf";
-      rev = "925541529c1fa6821df4e44ce2723319eb2be768";
-      sha256 = "1d3zjvhl115l23xakj0014qpjchivlg098h10v5nfirkk1i9f9sa";
-    };
-  }
-  {
-    goPackagePath = "github.com/google/btree";
-    fetch = {
-      type = "git";
-      url = "https://github.com/google/btree";
-      rev = "cc6329d4279e3f025a53a83c397d2339b5705c45";
-      sha256 = "1aqvcqr0c7z3sgj272n5f9g8g6cy4361697a0f240amqdvj0ax9v";
-    };
-  }
-  {
-    goPackagePath = "github.com/google/gofuzz";
-    fetch = {
-      type = "git";
-      url = "https://github.com/google/gofuzz";
-      rev = "24818f796faf91cd76ec7bddd72458fbced7a6c1";
-      sha256 = "0cq90m2lgalrdfrwwyycrrmn785rgnxa3l3vp9yxkvnv88bymmlm";
-    };
-  }
-  {
-    goPackagePath = "github.com/google/gopacket";
-    fetch = {
-      type = "git";
-      url = "https://github.com/google/gopacket";
-      rev = "67a21c4470a0598531a769727aef40b870ffa128";
-      sha256 = "1clxrcabrdrkrgwbal852w3cynvzdwbpl4gc0f5yyzncmaazxmhq";
-    };
-  }
-  {
-    goPackagePath = "github.com/googleapis/gnostic";
-    fetch = {
-      type = "git";
-      url = "https://github.com/googleapis/gnostic";
-      rev = "41d03372f44f2bc18a72c97615a669fb60e7452a";
-      sha256 = "04l6384y7riya4wrc7s7ry7c8dil4sdyks1psqavw85bgy9q1iql";
-    };
-  }
-  {
-    goPackagePath = "github.com/gophercloud/gophercloud";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gophercloud/gophercloud";
-      rev = "849a2e71dd64dbfa2bd4be110ace68881802414b";
-      sha256 = "12xn9gph7hg6sfyqd5z9advsx1s776pm5ji9qnarnq1781k7gzh2";
-    };
-  }
-  {
-    goPackagePath = "github.com/gorilla/context";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gorilla/context";
-      rev = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42";
-      sha256 = "03p4hn87vcmfih0p9w663qbx9lpsf7i7j3lc7yl7n84la3yz63m4";
-    };
-  }
-  {
-    goPackagePath = "github.com/gorilla/handlers";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gorilla/handlers";
-      rev = "90663712d74cb411cbef281bc1e08c19d1a76145";
-      sha256 = "03h5ygjcwama9kr9k7nbg0spv5c7hdlw2ydaclj969i820aq3dpz";
-    };
-  }
-  {
-    goPackagePath = "github.com/gorilla/mux";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gorilla/mux";
-      rev = "5ab525f4fb1678e197ae59401e9050fa0b6cb5fd";
-      sha256 = "0d8rbiz2ykn43knf75arnm545jfxgw0zf5yx8ncjmfm9iimzj20i";
-    };
-  }
-  {
-    goPackagePath = "github.com/gorilla/websocket";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gorilla/websocket";
-      rev = "cdedf21e585dae942951e34d6defc3215b4280fa";
-      sha256 = "1kb7phyvvyl67pdsnd80sgpq3a6gv8lkr8ylppb1i6xwi25yppiv";
-    };
-  }
-  {
-    goPackagePath = "github.com/gosuri/uitable";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gosuri/uitable";
-      rev = "36ee7e946282a3fb1cfecd476ddc9b35d8847e42";
-      sha256 = "1ff68fv9g1df91fwbrcq83ar429gb4fi2vsd22zjmhvmbqx2zkil";
-    };
-  }
-  {
-    goPackagePath = "github.com/gregjones/httpcache";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gregjones/httpcache";
-      rev = "2bcd89a1743fd4b373f7370ce8ddc14dfbd18229";
-      sha256 = "1qx04bqbd4cwkakzq8ahz1jq6pq8435h5zcapwn8k8a0f1bgfrnz";
-    };
-  }
-  {
-    goPackagePath = "github.com/grpc-ecosystem/go-grpc-prometheus";
-    fetch = {
-      type = "git";
-      url = "https://github.com/grpc-ecosystem/go-grpc-prometheus";
-      rev = "6b7015e65d366bf3f19b2b2a000a831940f0f7e0";
-      sha256 = "039l2c5jsqrhm0g9bngrd3kry89kkai9v97kbd4mayqb619jcdxs";
-    };
-  }
-  {
-    goPackagePath = "github.com/grpc-ecosystem/grpc-gateway";
-    fetch = {
-      type = "git";
-      url = "https://github.com/grpc-ecosystem/grpc-gateway";
-      rev = "8cc3a55af3bcf171a1c23a90c4df9cf591706104";
-      sha256 = "1pfxxskhihz7ijdfj2vinadx05iljqim9h7g19jzgvrl34p8bhix";
-    };
-  }
-  {
-    goPackagePath = "github.com/hashicorp/golang-lru";
-    fetch = {
-      type = "git";
-      url = "https://github.com/hashicorp/golang-lru";
-      rev = "0a025b7e63adc15a622f29b0b2c4c3848243bbf6";
-      sha256 = "1iq7lbpsz7ks052mpznmkf8s4k43p51z4dik2n9ivrxk666q2wxi";
-    };
-  }
-  {
-    goPackagePath = "github.com/hashicorp/hcl";
-    fetch = {
-      type = "git";
-      url = "https://github.com/hashicorp/hcl";
-      rev = "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8";
-      sha256 = "0db4lpqb5m130rmfy3s3gjjf4dxllypmyrzxv6ggqhkmwmc7w4mc";
-    };
-  }
-  {
-    goPackagePath = "github.com/howeyc/gopass";
-    fetch = {
-      type = "git";
-      url = "https://github.com/howeyc/gopass";
-      rev = "bf9dde6d0d2c004a008c27aaee91170c786f6db8";
-      sha256 = "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45";
-    };
-  }
-  {
-    goPackagePath = "github.com/hydrogen18/stoppableListener";
-    fetch = {
-      type = "git";
-      url = "https://github.com/hydrogen18/stoppableListener";
-      rev = "dadc9ccc400c712e5a316107a5c462863919e579";
-      sha256 = "0yf2a9641v5zscw8sj52aky21nm35cj5d946sbvhrjsr4vzzbbm7";
-    };
-  }
-  {
-    goPackagePath = "github.com/imdario/mergo";
-    fetch = {
-      type = "git";
-      url = "https://github.com/imdario/mergo";
-      rev = "e3000cb3d28c72b837601cac94debd91032d19fe";
-      sha256 = "1bsz1aj0h266x7g08jj7f3nd3d5islbad0cygb5vh37hjgzirg4d";
-    };
-  }
-  {
-    goPackagePath = "github.com/inconshreveable/mousetrap";
-    fetch = {
-      type = "git";
-      url = "https://github.com/inconshreveable/mousetrap";
-      rev = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75";
-      sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152";
-    };
-  }
-  {
-    goPackagePath = "github.com/intel-go/yanff";
-    fetch = {
-      type = "git";
-      url = "https://github.com/intel-go/yanff";
-      rev = "35804adce65005f76409327527e4e256569cacc6";
-      sha256 = "0rank8ij0ky9ryfw23aqk4mk72lznycqqbs5wr7y71d0pl9ljrgh";
-    };
-  }
-  {
-    goPackagePath = "github.com/iovisor/gobpf";
-    fetch = {
-      type = "git";
-      url = "https://github.com/iovisor/gobpf";
-      rev = "dd767a9fd5f868874ed117811461410100cea403";
-      sha256 = "0kj7g5iz81j9qmz57m5b2a9mfpapmwpp3ad9h5rz58r6wzm5anc3";
-    };
-  }
-  {
-    goPackagePath = "github.com/jbowtie/gokogiri";
-    fetch = {
-      type = "git";
-      url = "https://github.com/jbowtie/gokogiri";
-      rev = "e2644e49d5b4a4d2382d1a4b28dfbb313a4ffb0c";
-      sha256 = "1skbfr0w438xip7p58dkv6806yvm22f1wixqppb2yszgxril0j29";
-    };
-  }
-  {
-    goPackagePath = "github.com/jonboulle/clockwork";
-    fetch = {
-      type = "git";
-      url = "https://github.com/jonboulle/clockwork";
-      rev = "ed104f61ea4877bea08af6f759805674861e968d";
-      sha256 = "04ari17wr4pabjf607jcr7cf13r83dlxlspy8yvfh7hlr0xb16z2";
-    };
-  }
-  {
-    goPackagePath = "github.com/json-iterator/go";
-    fetch = {
-      type = "git";
-      url = "https://github.com/json-iterator/go";
-      rev = "ff2b70c1dbffdd98567bd8c2f9449d97c0d04c88";
-      sha256 = "1flbh2qg16445md5vcsqvbq538icj5l25k5ygyjf86lxdfkh5kr0";
-    };
-  }
-  {
-    goPackagePath = "github.com/juju/loggo";
-    fetch = {
-      type = "git";
-      url = "https://github.com/juju/loggo";
-      rev = "8232ab8918d91c72af1a9fb94d3edbe31d88b790";
-      sha256 = "11y5gk41g1i5q6aqn6jpgm06nsq2mf7fdmkzwqrqagnajgb0h1s1";
-    };
-  }
-  {
-    goPackagePath = "github.com/juju/ratelimit";
-    fetch = {
-      type = "git";
-      url = "https://github.com/juju/ratelimit";
-      rev = "5b9ff866471762aa2ab2dced63c9fb6f53921342";
-      sha256 = "12fsx3wqg49wisigbybdzic7gc2p5a0fk55714mpv7zq8jr6i46k";
-    };
-  }
-  {
-    goPackagePath = "github.com/juju/webbrowser";
-    fetch = {
-      type = "git";
-      url = "https://github.com/juju/webbrowser";
-      rev = "54b8c57083b4afb7dc75da7f13e2967b2606a507";
-      sha256 = "0ngj27f0kgpc4m6jr2hz04kigv6p9z8hviddijgpb9srjzkl7dhz";
-    };
-  }
-  {
-    goPackagePath = "github.com/julienschmidt/httprouter";
-    fetch = {
-      type = "git";
-      url = "https://github.com/julienschmidt/httprouter";
-      rev = "d1898390779332322e6b5ca5011da4bf249bb056";
-      sha256 = "19r684s93b7pxqkpxa7p3pba9dw3xf547z05biykil39xk7rgyfa";
-    };
-  }
-  {
-    goPackagePath = "github.com/kardianos/osext";
-    fetch = {
-      type = "git";
-      url = "https://github.com/kardianos/osext";
-      rev = "c2c54e542fb797ad986b31721e1baedf214ca413";
-      sha256 = "02vmjhkx90601l5fym7c3r4d44b88h3cign86nz4yy6j8qqxvz3h";
-    };
-  }
-  {
-    goPackagePath = "github.com/kr/fs";
-    fetch = {
-      type = "git";
-      url = "https://github.com/kr/fs";
-      rev = "2788f0dbd16903de03cb8186e5c7d97b69ad387b";
-      sha256 = "1c0fipl4rsh0v5liq1ska1dl83v3llab4k6lm8mvrx9c4dyp71ly";
-    };
-  }
-  {
-    goPackagePath = "github.com/kr/pty";
-    fetch = {
-      type = "git";
-      url = "https://github.com/kr/pty";
-      rev = "95d05c1eef33a45bd58676b6ce28d105839b8d0b";
-      sha256 = "0lyvs0g2pq0hdblfnpcgvp399j13xy4fzbr24l9zh5vbiw7d1lwc";
-    };
-  }
-  {
-    goPackagePath = "github.com/lxc/lxd";
-    fetch = {
-      type = "git";
-      url = "https://github.com/lxc/lxd";
-      rev = "9907f3a64b6b8ec9144e8be02d633b951439c0f6";
-      sha256 = "0qn0v2facxvg0w5vnasa28nxhvfdy817vkmvsnfqzgcnh60k3z20";
-    };
-  }
-  {
-    goPackagePath = "github.com/magiconair/properties";
-    fetch = {
-      type = "git";
-      url = "https://github.com/magiconair/properties";
-      rev = "c81f9d71af8f8cba1466501d30326b99a4e56c19";
-      sha256 = "1000zi161vzrk2fskjna31j9r9hd6m82i7r7wz76f88421i1xlx5";
-    };
-  }
-  {
-    goPackagePath = "github.com/mailru/easyjson";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mailru/easyjson";
-      rev = "2a92e673c9a6302dd05c3a691ae1f24aef46457d";
-      sha256 = "1k0c952c60zcbly9gzi48jyzwphgawnq9f70bgniciyp4jb8hfv3";
-    };
-  }
-  {
-    goPackagePath = "github.com/mattbaird/elastigo";
-    fetch = {
-      type = "git";
-      url = "https://github.com/safchain/elastigo";
-      rev = "441c1531dca50a19990385930149f6785f78fe59";
-      sha256 = "0dmsswm5zkr0054zrvq8h3naddnx4mygsd76fnjqxs25zf88v7ir";
-    };
-  }
-  {
-    goPackagePath = "github.com/mattn/go-colorable";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mattn/go-colorable";
-      rev = "167de6bfdfba052fa6b2d3664c8f5272e23c9072";
-      sha256 = "1nwjmsppsjicr7anq8na6md7b1z84l9ppnlr045hhxjvbkqwalvx";
-    };
-  }
-  {
-    goPackagePath = "github.com/mattn/go-isatty";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mattn/go-isatty";
-      rev = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39";
-      sha256 = "06w45aqz2a6yrk25axbly2k5wmsccv8cspb94bfmz4izvw8h927n";
-    };
-  }
-  {
-    goPackagePath = "github.com/mattn/go-runewidth";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mattn/go-runewidth";
-      rev = "d6bea18f789704b5f83375793155289da36a3c7f";
-      sha256 = "1hnigpn7rjbwd1ircxkyx9hvi0xmxr32b2jdy2jzw6b3jmcnz1fs";
-    };
-  }
-  {
-    goPackagePath = "github.com/mattn/go-tty";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mattn/go-tty";
-      rev = "931426f7535ac39720c8909d70ece5a41a2502a6";
-      sha256 = "00cb07v13xrfqm39m1j2h2zvj684gl9fzr51591i9a52a9m6xlj5";
-    };
-  }
-  {
-    goPackagePath = "github.com/matttproud/golang_protobuf_extensions";
-    fetch = {
-      type = "git";
-      url = "https://github.com/matttproud/golang_protobuf_extensions";
-      rev = "d0c3fe89de86839aecf2e0579c40ba3bb336a453";
-      sha256 = "0jkjgpi1s8l9bdbf14fh8050757jqy36kn1l1hxxlb2fjn1pcg0r";
-    };
-  }
-  {
-    goPackagePath = "github.com/mitchellh/go-homedir";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mitchellh/go-homedir";
-      rev = "756f7b183b7ab78acdbbee5c7f392838ed459dda";
-      sha256 = "0yd3682x22lqrfq4h0q16c4swcfn3lmds05ijynm2fk1gcbnwiqn";
-    };
-  }
-  {
-    goPackagePath = "github.com/mitchellh/hashstructure";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mitchellh/hashstructure";
-      rev = "ab25296c0f51f1022f01cd99dfb45f1775de8799";
-      sha256 = "1k21xr0x7k03hbkh72xbdi8gz8fk3wdlcbfpy7l90rxvi21jzz0f";
-    };
-  }
-  {
-    goPackagePath = "github.com/mitchellh/mapstructure";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mitchellh/mapstructure";
-      rev = "281073eb9eb092240d33ef253c404f1cca550309";
-      sha256 = "1zjx9fv29639sp1fn84rxs830z7gp7bs38yd5y1hl5adb8s5x1mh";
-    };
-  }
-  {
-    goPackagePath = "github.com/nlewo/contrail-introspect-cli";
-    fetch = {
-      type = "git";
-      url = "https://github.com/nlewo/contrail-introspect-cli";
-      rev = "e4df28ccf9801abbe32edd5ddaba31a7a62b61b6";
-      sha256 = "0wf3s9gqy8pvv5gzngz30j9p7fa4mv5qyr9gnlf5ps85xpnlngbq";
-    };
-  }
-  {
-    goPackagePath = "github.com/nu7hatch/gouuid";
-    fetch = {
-      type = "git";
-      url = "https://github.com/nu7hatch/gouuid";
-      rev = "179d4d0c4d8d407a32af483c2354df1d2c91e6c3";
-      sha256 = "1isyfix5w1wm26y3a15ha3nnpsxqaxz5ngq06hnh6c6y0inl2fwj";
-    };
-  }
-  {
-    goPackagePath = "github.com/op/go-logging";
-    fetch = {
-      type = "git";
-      url = "https://github.com/op/go-logging";
-      rev = "970db520ece77730c7e4724c61121037378659d9";
-      sha256 = "1cpna2x5l071z1vrnk7zipdkka8dzwsjyx7m79xk0lr08rip0kcj";
-    };
-  }
-  {
-    goPackagePath = "github.com/opencontainers/runc";
-    fetch = {
-      type = "git";
-      url = "https://github.com/opencontainers/runc";
-      rev = "8fa5343b0058459296399a89bc532aa5508de28d";
-      sha256 = "15wbnj19fbprgsrf0k7hpmpxrkh2vzrm71qn3gya05p908k81v03";
-    };
-  }
-  {
-    goPackagePath = "github.com/pelletier/go-toml";
-    fetch = {
-      type = "git";
-      url = "https://github.com/pelletier/go-toml";
-      rev = "05bcc0fb0d3e60da4b8dd5bd7e0ea563eb4ca943";
-      sha256 = "0ma7fwsyl0qflvhbb6qfc5h3yi81iy5lpc6wkdyd1sdafvrzpbb8";
-    };
-  }
-  {
-    goPackagePath = "github.com/petar/GoLLRB";
-    fetch = {
-      type = "git";
-      url = "https://github.com/petar/GoLLRB";
-      rev = "53be0d36a84c2a886ca057d34b6aa4468df9ccb4";
-      sha256 = "01xp3lcamqkvl91jg6ly202gdsgf64j39rkrcqxi6v4pbrcv7hz0";
-    };
-  }
-  {
-    goPackagePath = "github.com/peterbourgon/diskv";
-    fetch = {
-      type = "git";
-      url = "https://github.com/peterbourgon/diskv";
-      rev = "2973218375c3d13162e1d3afe1708aaee318ef3f";
-      sha256 = "10jbkxyxilv5hixm4dww4qfn01cnb5fr8mgxvwigq5jcb85mrxig";
-    };
-  }
-  {
-    goPackagePath = "github.com/peterh/liner";
-    fetch = {
-      type = "git";
-      url = "https://github.com/peterh/liner";
-      rev = "8975875355a81d612fafb9f5a6037bdcc2d9b073";
-      sha256 = "17l7p6lxhlnna1w1drgh7g8afxcxxd5j472givm2g7l9v8yg4f17";
-    };
-  }
-  {
-    goPackagePath = "github.com/pkg/errors";
-    fetch = {
-      type = "git";
-      url = "https://github.com/pkg/errors";
-      rev = "ff09b135c25aae272398c51a07235b90a75aa4f0";
-      sha256 = "0pwl6v3hmc22zp32gkyqykl4kg69xk1mlp0vmhgd1f44difd5fvz";
-    };
-  }
-  {
-    goPackagePath = "github.com/pkg/sftp";
-    fetch = {
-      type = "git";
-      url = "https://github.com/pkg/sftp";
-      rev = "e84cc8c755ca39b7b64f510fe1fffc1b51f210a5";
-      sha256 = "1gkmk60lskyrn5751rgb9pxn41wi7y29wsn8psrfb16bg4flcvrq";
-    };
-  }
-  {
-    goPackagePath = "github.com/pkg/term";
-    fetch = {
-      type = "git";
-      url = "https://github.com/pkg/term";
-      rev = "cda20d4ac917ad418d86e151eff439648b06185b";
-      sha256 = "08frhz411dwyli5spfxn32d3ni9mrgdav51lmg8a1wpdmw0r0wwp";
-    };
-  }
-  {
-    goPackagePath = "github.com/pmylund/go-cache";
-    fetch = {
-      type = "git";
-      url = "https://github.com/pmylund/go-cache";
-      rev = "a3647f8e31d79543b2d0f0ae2fe5c379d72cedc0";
-      sha256 = "10020inkzrm931r4bixf8wqr9n39wcrb78vfyxmbvjavvw4zybgs";
-    };
-  }
-  {
-    goPackagePath = "github.com/prometheus/client_golang";
-    fetch = {
-      type = "git";
-      url = "https://github.com/prometheus/client_golang";
-      rev = "5cec1d0429b02e4323e042eb04dafdb079ddf568";
-      sha256 = "1cgd5pcxf4zgcafq284yf2i711m3kddpb05prxy51li5p1l5cbq0";
-    };
-  }
-  {
-    goPackagePath = "github.com/prometheus/client_model";
-    fetch = {
-      type = "git";
-      url = "https://github.com/prometheus/client_model";
-      rev = "fa8ad6fec33561be4280a8f0514318c79d7f6cb6";
-      sha256 = "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9";
-    };
-  }
-  {
-    goPackagePath = "github.com/prometheus/common";
-    fetch = {
-      type = "git";
-      url = "https://github.com/prometheus/common";
-      rev = "23070236b1ebff452f494ae831569545c2b61d26";
-      sha256 = "111vqp3lqsdli7z5rnkrpcfv6yri0qjikyl70whwxzcvkqp9k42s";
-    };
-  }
-  {
-    goPackagePath = "github.com/prometheus/procfs";
-    fetch = {
-      type = "git";
-      url = "https://github.com/prometheus/procfs";
-      rev = "406e5b7bfd8201a36e2bb5f7bdae0b03380c2ce8";
-      sha256 = "0yla9hz15pg63394ygs9iiwzsqyv29labl8p424hijwsc9z9nka8";
-    };
-  }
-  {
-    goPackagePath = "github.com/robertkrimen/otto";
-    fetch = {
-      type = "git";
-      url = "https://github.com/robertkrimen/otto";
-      rev = "6c383dd335ef8dcccef05e651ce1eccfe4d0f011";
-      sha256 = "1n6h7c8gi6wv4nklqd7ygzx2afvh7ddxbml9w9x0jxwcfb3bdy17";
-    };
-  }
-  {
-    goPackagePath = "github.com/rogpeppe/fastuuid";
-    fetch = {
-      type = "git";
-      url = "https://github.com/rogpeppe/fastuuid";
-      rev = "6724a57986aff9bff1a1770e9347036def7c89f6";
-      sha256 = "12s65phfx6hxj4v0b5kj8akgrbf5mxpa101fyzw03h6hld1f70cz";
-    };
-  }
-  {
-    goPackagePath = "github.com/safchain/ethtool";
-    fetch = {
-      type = "git";
-      url = "https://github.com/safchain/ethtool";
-      rev = "e01512671ed4c2248daf0c5e974ecf88a4947335";
-      sha256 = "11wk834aas1jj3bag3rwr0sb5alhd40si3fcqkvs0fsg6wjmwxyc";
-    };
-  }
-  {
-    goPackagePath = "github.com/shirou/gopsutil";
-    fetch = {
-      type = "git";
-      url = "https://github.com/shirou/gopsutil";
-      rev = "6a368fb7cd1221fa6ea90facc9447c9a2234c255";
-      sha256 = "0vjf2jwkpb1fls997w3pvw5sg25yjygx0nv1i5pwcfrnpvnw9zxk";
-    };
-  }
-  {
-    goPackagePath = "github.com/skydive-project/dede";
-    fetch = {
-      type = "git";
-      url = "https://github.com/skydive-project/dede";
-      rev = "d95b69cd1f75137aab3bcc01d6facf2aa7a43b80";
-      sha256 = "16qgpxb24zq2js7ril8xf71yz927ly7fsadys23is8jzkgsx56mf";
-    };
-  }
-  {
-    goPackagePath = "github.com/socketplane/libovsdb";
-    fetch = {
-      type = "git";
-      url = "https://github.com/socketplane/libovsdb";
-      rev = "5113f8fb4d9d374417ab4ce35424fbea1aad7272";
-      sha256 = "1b4yz6jvsi2gz8ha9y42hy105q6ylf7516pd59wgg42r6n627w4g";
-    };
-  }
-  {
-    goPackagePath = "github.com/spf13/afero";
-    fetch = {
-      type = "git";
-      url = "https://github.com/spf13/afero";
-      rev = "a80ea588265c05730645be8342eeafeaa72b2923";
-      sha256 = "1i2z4l3a335jz0jg8xzwfdcp0dlf77h8rb6nd88mnd1nbmbd58w4";
-    };
-  }
-  {
-    goPackagePath = "github.com/spf13/cast";
-    fetch = {
-      type = "git";
-      url = "https://github.com/spf13/cast";
-      rev = "8965335b8c7107321228e3e3702cab9832751bac";
-      sha256 = "177bk7lq40jbgv9p9r80aydpaccfk8ja3a7jjhfwiwk9r1pa4rr2";
-    };
-  }
-  {
-    goPackagePath = "github.com/spf13/cobra";
-    fetch = {
-      type = "git";
-      url = "https://github.com/spf13/cobra";
-      rev = "9c28e4bbd74e5c3ed7aacbc552b2cab7cfdfe744";
-      sha256 = "02bgp0yy9bi05k2in9axqi3db1c6mjffdsmki51pn9iryxz4zkh3";
-    };
-  }
-  {
-    goPackagePath = "github.com/spf13/jwalterweatherman";
-    fetch = {
-      type = "git";
-      url = "https://github.com/spf13/jwalterweatherman";
-      rev = "d00654080cddbd2b082acaa74007cb94a2b40866";
-      sha256 = "06zv87v7m0zgx9zy3w283008fmlx0v41xyldkql7qmp7l5l4vcpw";
-    };
-  }
-  {
-    goPackagePath = "github.com/spf13/pflag";
-    fetch = {
-      type = "git";
-      url = "https://github.com/spf13/pflag";
-      rev = "c7e63cf4530bcd3ba943729cee0efeff2ebea63f";
-      sha256 = "197mlkgb01zk86fxfl8r8maymcxsspqblg7hmngjxf7ivdid1i1l";
-    };
-  }
-  {
-    goPackagePath = "github.com/spf13/viper";
-    fetch = {
-      type = "git";
-      url = "https://github.com/lebauce/viper";
-      rev = "54676d0dbb12f9b6febb2f8210e9590d81d4b5e3";
-      sha256 = "1dm01151hn6mywv6hm0nbqsr8qgwp393l4xz9p9jrd8asynpdpsb";
-    };
-  }
-  {
-    goPackagePath = "github.com/tchap/zapext";
-    fetch = {
-      type = "git";
-      url = "https://github.com/tchap/zapext";
-      rev = "e61c0c8823393722ae09ce0faee42fa177088a4b";
-      sha256 = "16xw01phxkndhsn8l9n587vdpmr0kh9xg0vxlk0l6ywkp31583cr";
-    };
-  }
-  {
-    goPackagePath = "github.com/tebeka/selenium";
-    fetch = {
-      type = "git";
-      url = "https://github.com/tebeka/selenium";
-      rev = "657e45ec600f26e76da253936c1f2adb6978ff72";
-      sha256 = "1gqhmlqcq4y5pxw7inqd987xwyrnd5zsmj8blmb5vizhan7liw99";
-    };
-  }
-  {
-    goPackagePath = "github.com/ugorji/go";
-    fetch = {
-      type = "git";
-      url = "https://github.com/ugorji/go";
-      rev = "ded73eae5db7e7a0ef6f55aace87a2873c5d2b74";
-      sha256 = "04iwqjj049q4dldf1wpqymf1y9kdppxp3y0ywsqzaw21bi8b3zcc";
-    };
-  }
-  {
-    goPackagePath = "github.com/vishvananda/netlink";
-    fetch = {
-      type = "git";
-      url = "https://github.com/vishvananda/netlink";
-      rev = "016ba6f67a12c03708643150afcfb1509be7747a";
-      sha256 = "08z5g217nynq6nrdls8hj1761wwl9skhwfz2fad9di8ziy8mk7w4";
-    };
-  }
-  {
-    goPackagePath = "github.com/vishvananda/netns";
-    fetch = {
-      type = "git";
-      url = "https://github.com/vishvananda/netns";
-      rev = "604eaf189ee867d8c147fafc28def2394e878d25";
-      sha256 = "0zii8dyy6qb2dh649syz3ablabw78k038w8a7fwnsk3x482p59s7";
-    };
-  }
-  {
-    goPackagePath = "github.com/weaveworks/tcptracer-bpf";
-    fetch = {
-      type = "git";
-      url = "https://github.com/weaveworks/tcptracer-bpf";
-      rev = "e080bd747dc6b62d4ed3ed2b7f0be4801bef8faf";
-      sha256 = "1ijqpzj4nmymi8gh3pl9rnwjzm5q89d1585iwj1s190cxcp1ix81";
-    };
-  }
-  {
-    goPackagePath = "github.com/xeipuuv/gojsonpointer";
-    fetch = {
-      type = "git";
-      url = "https://github.com/xeipuuv/gojsonpointer";
-      rev = "6fe8760cad3569743d51ddbb243b26f8456742dc";
-      sha256 = "1b1flqamhzfi5lc4lbh8iw4s3lix0vxyrq0adpx0znx7lkkxhjvz";
-    };
-  }
-  {
-    goPackagePath = "github.com/xeipuuv/gojsonreference";
-    fetch = {
-      type = "git";
-      url = "https://github.com/xeipuuv/gojsonreference";
-      rev = "e02fc20de94c78484cd5ffb007f8af96be030a45";
-      sha256 = "195in5zr3bhb3r1iins2h610kz339naj284b3839xmrhc15wqxzq";
-    };
-  }
-  {
-    goPackagePath = "github.com/xeipuuv/gojsonschema";
-    fetch = {
-      type = "git";
-      url = "https://github.com/xeipuuv/gojsonschema";
-      rev = "702b404897d4364af44dc8dcabc9815947942325";
-      sha256 = "1lby7iar87q2kjqvcbx2jql4p2ggjq9ml114x7hlb3966447ayfr";
-    };
-  }
-  {
-    goPackagePath = "github.com/xiang90/probing";
-    fetch = {
-      type = "git";
-      url = "https://github.com/xiang90/probing";
-      rev = "07dd2e8dfe18522e9c447ba95f2fe95262f63bb2";
-      sha256 = "0r8rq27yigz72mk8z7p61yjfan8id021dnp1v421ln9byzpvabn2";
-    };
-  }
-  {
-    goPackagePath = "github.com/xordataexchange/crypt";
-    fetch = {
-      type = "git";
-      url = "https://github.com/xordataexchange/crypt";
-      rev = "b2862e3d0a775f18c7cfe02273500ae307b61218";
-      sha256 = "04q3856anpzl4gdfgmg7pbp9cx231nkz3ymq2xp27rnmmwhfxr8y";
-    };
-  }
-  {
-    goPackagePath = "go.uber.org/atomic";
-    fetch = {
-      type = "git";
-      url = "https://github.com/uber-go/atomic";
-      rev = "0506d69f5564c56e25797bf7183c28921d4c6360";
-      sha256 = "0b1b0iz6jwk5f77mwsggsvkywmxwwn1b4a6n63xd5czl23vi7a6q";
-    };
-  }
-  {
-    goPackagePath = "go.uber.org/multierr";
-    fetch = {
-      type = "git";
-      url = "https://github.com/uber-go/multierr";
-      rev = "3c4937480c32f4c13a875a1829af76c98ca3d40a";
-      sha256 = "1slfc6syvw8cvr6rbrjsy6ja5w8gsx0f8aq8qm16rp2x5c2pj07w";
-    };
-  }
-  {
-    goPackagePath = "go.uber.org/zap";
-    fetch = {
-      type = "git";
-      url = "https://github.com/uber-go/zap";
-      rev = "35aad584952c3e7020db7b839f6b102de6271f89";
-      sha256 = "0n79ir7jcr7s51j85swji7an0jgy1w5dxg1g68j722rmpbvsagwv";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/crypto";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/crypto";
-      rev = "1f22c0103821b9390939b6776727195525381532";
-      sha256 = "1acy12f396sr3lrnbcnym5q72qnlign5bagving41qijzjnc219m";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/net";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/net";
-      rev = "a6577fac2d73be281a500b310739095313165611";
-      sha256 = "00wks377dp0ws47dvc9f6y4sin1mwdk649v5jfz047ik1jh1nq5h";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/sys";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/sys";
-      rev = "810d7000345868fc619eb81f46307107118f4ae1";
-      sha256 = "07lm9h86l29dd45ca3vjsi06xpwg36899hf1ns7qwabflzgm0nxy";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/text";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/text";
-      rev = "1cbadb444a806fd9430d14ad08967ed91da4fa0a";
-      sha256 = "0ih9ysagh4ylj08393497sscf3yziybc6acg4mrh0wa7mld75j56";
-    };
-  }
-  {
-    goPackagePath = "google.golang.org/genproto";
-    fetch = {
-      type = "git";
-      url = "https://github.com/google/go-genproto";
-      rev = "2b5a72b8730b0b16380010cfe5286c42108d88e7";
-      sha256 = "0i69x08kg5yqwaz5grxbfhg2hjdkdhaqbc1v4x4l91232kw5nd38";
-    };
-  }
-  {
-    goPackagePath = "google.golang.org/grpc";
-    fetch = {
-      type = "git";
-      url = "https://github.com/grpc/grpc-go";
-      rev = "5b3c4e850e90a4cf6a20ebd46c8b32a0a3afcb9e";
-      sha256 = "1sf3fvphz16pf7jbm86n07rip9m5fh40wjcc2j2d5zpka36xvjw4";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/errgo.v1";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/errgo.v1";
-      rev = "442357a80af5c6bf9b6d51ae791a39c3421004f3";
-      sha256 = "0gg7vqkfh2bpn2z9xfdahrxdkvn365mdb63zs8s5v5cbm2glfq56";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/fsnotify/fsnotify.v1";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/fsnotify/fsnotify.v1";
-      rev = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9";
-      sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/httprequest.v1";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/httprequest.v1";
-      rev = "93f8fee4081f01ea23d258bdbbcdd319f668d718";
-      sha256 = "1lgicrb355m2vb31ly4ly997ral1zvqk9fy89x4qkxals1zfqi3q";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/inf.v0";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/inf.v0";
-      rev = "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4";
-      sha256 = "0rf3vwyb8aqnac9x9d6ax7z5526c45a16yjm2pvkijr6qgqz8b82";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/macaroon-bakery.v2";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/macaroon-bakery.v2";
-      rev = "22c04a94d902625448265ef041bb53e715452a40";
-      sha256 = "1iaisvljir95m7jh02k98jv2j68bs38fdlis4pnjbpj8mbarllw4";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/macaroon.v2";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/macaroon.v2";
-      rev = "bed2a428da6e56d950bed5b41fcbae3141e5b0d0";
-      sha256 = "199dcdl38vjj078aq56kpfzni0sm7j3062nxd8yyj1bd67x0xmsi";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/sourcemap.v1";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/sourcemap.v1";
-      rev = "eef8f47ab679652a7d3a4ee34c34314d255d2536";
-      sha256 = "0ahmw49lswks636vz49vb33r4rq0g3rrkqwsh8fn0kmhp94c9w40";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/urfave/cli.v2";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/urfave/cli.v2";
-      rev = "b2bf3c5abeb90da407891aecd1df2c5a1f6170c1";
-      sha256 = "1x90qcnjcicq1d933bd9mdyjkwd0h9hdxgva45z85gqr7lavs5h3";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/validator.v2";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/validator.v2";
-      rev = "3e4f037f12a1221a0864cf0dd2e81c452ab22448";
-      sha256 = "1294nz3wi4avn1nwyr8cdcx8jqjvlzadlnswarpwrq41mhlmhjfs";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/yaml.v2";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/yaml.v2";
-      rev = "bef53efd0c76e49e6de55ead051f886bea7e9420";
-      sha256 = "0df5gr2qyflh1vmb1i2jbkc46dc3mqmdbc53vbyrzw0ilzhzh0si";
-    };
-  }
-  {
-    goPackagePath = "k8s.io/api";
-    fetch = {
-      type = "git";
-      url = "https://github.com/kubernetes/api";
-      rev = "4df58c811fe2e65feb879227b2b245e4dc26e7ad";
-      sha256 = "14pxzm1gqh4pa1179c8hfcbi5rqy9fx2cvpns8pwlyqz807rg2vl";
-    };
-  }
-  {
-    goPackagePath = "k8s.io/apimachinery";
-    fetch = {
-      type = "git";
-      url = "https://github.com/kubernetes/apimachinery";
-      rev = "019ae5ada31de202164b118aee88ee2d14075c31";
-      sha256 = "1l1przxkbid3sfn80n60w2z883yad99cl89k4zwb9i7wcydk85w1";
-    };
-  }
-  {
-    goPackagePath = "k8s.io/client-go";
-    fetch = {
-      type = "git";
-      url = "https://github.com/kubernetes/client-go";
-      rev = "35ccd4336052e7d73018b1382413534936f34eee";
-      sha256 = "1sp0v60xpy6lsdzsqq7lzcqkmqds100ziqzj2fip68svcysgqg9g";
-    };
-  }
-  {
-    goPackagePath = "k8s.io/kube-openapi";
-    fetch = {
-      type = "git";
-      url = "https://github.com/kubernetes/kube-openapi";
-      rev = "39a7bf85c140f972372c2a0d1ee40adbf0c8bfe1";
-      sha256 = "08b5yx07saj5vzzic50hlzw68p2fd7xc118x1liq4wqrikxmv8wa";
-    };
-  }
-]
diff --git a/pkgs/tools/package-management/disnix/DisnixWebService/default.nix b/pkgs/tools/package-management/disnix/DisnixWebService/default.nix
index 3299ab8b63b6..dd64241fd372 100644
--- a/pkgs/tools/package-management/disnix/DisnixWebService/default.nix
+++ b/pkgs/tools/package-management/disnix/DisnixWebService/default.nix
@@ -1,23 +1,16 @@
-{stdenv, fetchurl, apacheAnt, jdk, axis2, dbus_java, fetchpatch }:
+{stdenv, fetchurl, apacheAnt, jdk, axis2, dbus_java }:
 
 stdenv.mkDerivation {
-  name = "DisnixWebService-0.8";
+  name = "DisnixWebService-0.9";
   src = fetchurl {
-    url = https://github.com/svanderburg/DisnixWebService/files/1756703/DisnixWebService-0.8.tar.gz;
-    sha256 = "05hmyz17rmqlph0i321kmhabnpw84kqz32lgc5cd4shxyzsal9hz";
+    url = https://github.com/svanderburg/DisnixWebService/releases/download/DisnixWebService-0.9/DisnixWebService-0.9.tar.gz;
+    sha256 = "1z7w44bf023c0aqchjfi4mla3qbhsh87mdzx7pqn0sy74cjfgqvl";
   };
   buildInputs = [ apacheAnt jdk ];
   PREFIX = ''''${env.out}'';
   AXIS2_LIB = "${axis2}/lib";
   AXIS2_WEBAPP = "${axis2}/webapps/axis2";
   DBUS_JAVA_LIB = "${dbus_java}/share/java";
-  patches = [
-    # Safe to remove once https://github.com/svanderburg/DisnixWebService/pull/1 is merged
-    (fetchpatch {
-      url = "https://github.com/mmahut/DisnixWebService/commit/cf07918b8c81b4ce01e0b489c1b5a3ef9c9a1cd6.patch";
-      sha256 = "15zi1l69wzgwvvqx4492s7l444gfvc9vcm7ckgif4b6cvp837brn";
-    })
-  ];
   prePatch = ''
     sed -i -e "s|#JAVA_HOME=|JAVA_HOME=${jdk}|" \
        -e "s|#AXIS2_LIB=|AXIS2_LIB=${axis2}/lib|" \
diff --git a/pkgs/tools/package-management/disnix/default.nix b/pkgs/tools/package-management/disnix/default.nix
index a55fd33f8991..50e071be29c5 100644
--- a/pkgs/tools/package-management/disnix/default.nix
+++ b/pkgs/tools/package-management/disnix/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, glib, libxml2, libxslt, getopt, nixUnstable, dysnomia, libintl, libiconv }:
 
 stdenv.mkDerivation {
-  name = "disnix-0.8";
+  name = "disnix-0.9";
 
   src = fetchurl {
-    url = https://github.com/svanderburg/disnix/files/1756701/disnix-0.8.tar.gz;
-    sha256 = "02cmj1jqk5i90szjsn5csr7qb7n42v04rvl9syx0zi9sx9ldnb0w";
+    url = https://github.com/svanderburg/disnix/releases/download/disnix-0.9/disnix-0.9.tar.gz;
+    sha256 = "1kc4520zjc1z72mknylfvrsyda9rbmm5c9mw8w13zhdwg3zbna06";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/tools/package-management/disnix/disnixos/default.nix b/pkgs/tools/package-management/disnix/disnixos/default.nix
index 7a58ec04e64d..319716c0f3ea 100644
--- a/pkgs/tools/package-management/disnix/disnixos/default.nix
+++ b/pkgs/tools/package-management/disnix/disnixos/default.nix
@@ -1,16 +1,16 @@
 { stdenv, fetchurl, dysnomia, disnix, socat, pkgconfig, getopt }:
 
 stdenv.mkDerivation {
-  name = "disnixos-0.7.1";
+  name = "disnixos-0.8";
   
   src = fetchurl {
-    url = https://github.com/svanderburg/disnixos/files/2281312/disnixos-0.7.1.tar.gz;
-    sha256 = "00d7mcj77lwbj67vnh81bw6k6pg2asimky4zkq32mh8dslnhpnz6";
+    url = https://github.com/svanderburg/disnixos/releases/download/disnixos-0.8/disnixos-0.8.tar.gz;
+    sha256 = "186blirfx89i8hdp4a0djy4q9qr9wcl0ilwr66hlil0wxqj1sr91";
   };
-  
+
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ socat dysnomia disnix getopt ];
-  
+
   meta = {
     description = "Provides complementary NixOS infrastructure deployment to Disnix";
     license = stdenv.lib.licenses.lgpl21Plus;
diff --git a/pkgs/tools/package-management/disnix/dysnomia/default.nix b/pkgs/tools/package-management/disnix/dysnomia/default.nix
index 14c07df6ffa8..7b5d99bef9e7 100644
--- a/pkgs/tools/package-management/disnix/dysnomia/default.nix
+++ b/pkgs/tools/package-management/disnix/dysnomia/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl
-, ejabberd ? null, mysql ? null, postgresql ? null, subversion ? null, mongodb ? null, mongodb-tools ? null
+, ejabberd ? null, mysql ? null, postgresql ? null, subversion ? null, mongodb ? null, mongodb-tools ? null, influxdb ? null
 , enableApacheWebApplication ? false
 , enableAxis2WebService ? false
 , enableEjabberdDump ? false
@@ -8,6 +8,7 @@
 , enableSubversionRepository ? false
 , enableTomcatWebApplication ? false
 , enableMongoDatabase ? false
+, enableInfluxDatabase ? false
 , catalinaBaseDir ? "/var/tomcat"
 , jobTemplate ? "systemd"
 , getopt
@@ -18,12 +19,13 @@ assert enablePostgreSQLDatabase -> postgresql != null;
 assert enableSubversionRepository -> subversion != null;
 assert enableEjabberdDump -> ejabberd != null;
 assert enableMongoDatabase -> (mongodb != null && mongodb-tools != null);
+assert enableInfluxDatabase -> influxdb != null;
 
 stdenv.mkDerivation {
-  name = "dysnomia-0.8";
+  name = "dysnomia-0.9";
   src = fetchurl {
-    url = https://github.com/svanderburg/dysnomia/files/1756700/dysnomia-0.8.tar.gz;
-    sha256 = "0pc4zwmmlsz02a6a4srpwdwhqrfvn3wkn22sz3fg7lwxbdbd5k0z";
+    url = https://github.com/svanderburg/dysnomia/releases/download/dysnomia-0.9/dysnomia-0.9.tar.gz;
+    sha256 = "09pk2l3pss48kvm5wvskh842vakbzmjzxzfzyw1nkqnvni130ikl";
   };
 
   preConfigure = if enableEjabberdDump then "export PATH=$PATH:${ejabberd}/sbin" else "";
@@ -37,6 +39,7 @@ stdenv.mkDerivation {
      (if enableSubversionRepository then "--with-subversion" else "--without-subversion")
      (if enableTomcatWebApplication then "--with-tomcat=${catalinaBaseDir}" else "--without-tomcat")
      (if enableMongoDatabase then "--with-mongodb" else "--without-mongodb")
+     (if enableInfluxDatabase then "--with-influxdb" else "--without-influxdb")
      "--with-job-template=${jobTemplate}"
    ];
 
@@ -46,7 +49,8 @@ stdenv.mkDerivation {
     ++ stdenv.lib.optional enablePostgreSQLDatabase postgresql
     ++ stdenv.lib.optional enableSubversionRepository subversion
     ++ stdenv.lib.optional enableMongoDatabase mongodb
-    ++ stdenv.lib.optional enableMongoDatabase mongodb-tools;
+    ++ stdenv.lib.optional enableMongoDatabase mongodb-tools
+    ++ stdenv.lib.optional enableInfluxDatabase influxdb;
 
   meta = {
     description = "Automated deployment of mutable components and services for Disnix";
diff --git a/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix b/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix
index 6b3a922bbe5c..580cf7585c92 100644
--- a/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix
+++ b/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix
@@ -15,15 +15,20 @@ stdenv.mkDerivation {
     sha256 = "0yrc302a2fhbzryb10718ky4fymfcps3lk67ivis1qab5kbp6z8r";
   };
 
-  buildInputs = [ imagemagick qrencode ] ++ stdenv.lib.optional testQR zbar;
   dontBuild = true;
   dontStrip = true;
   dontPatchELF = true;
 
-  preInstall = ''
-    substituteInPlace asc-to-gif.sh \
-      --replace "convert" "${imagemagick}/bin/convert" \
-      --replace "qrencode" "${qrencode.bin}/bin/qrencode"
+  preInstall = let
+    substitutions = [
+      ''--replace "convert" "${imagemagick}/bin/convert"''
+      ''--replace "qrencode" "${qrencode.bin}/bin/qrencode"''
+    ] ++ stdenv.lib.optional testQR [
+      ''--replace "hash zbarimg" "true"'' # hash does not work on NixOS
+      ''--replace "$(zbarimg --raw" "$(${zbar.out}/bin/zbarimg --raw"''
+    ];
+  in ''
+    substituteInPlace asc-to-gif.sh ${stdenv.lib.concatStringsSep " " substitutions}
   '';
 
   installPhase = ''
diff --git a/pkgs/tools/system/plan9port/builder.sh b/pkgs/tools/system/plan9port/builder.sh
index c0d7134bcc59..77f6632ff533 100644
--- a/pkgs/tools/system/plan9port/builder.sh
+++ b/pkgs/tools/system/plan9port/builder.sh
@@ -3,11 +3,40 @@ source $stdenv/setup
 export PLAN9=$out/plan9
 export PLAN9_TARGET=$PLAN9
 
+plan9portLinkFlags()
+{
+    local -a linkFlags=()
+    eval set -- "$NIX_LDFLAGS"
+    while (( $# > 0 )); do
+        if [[ $1 = -rpath ]]; then
+            linkFlags+=( "-Wl,-rpath,$2" )
+            shift 2
+        else
+            linkFlags+=( "$1" )
+            shift
+        fi
+    done
+    echo "${linkFlags[*]}"
+}
+
 configurePhase()
 {
-    echo CFLAGS=\"-I${fontconfig_dev}/include -I${xorgproto_exp}/include -I${libX11_dev}/include -I${libXt_dev}/include -I${libXext_dev}/include -I${freetype_dev}/include -I${zlib_dev}/include\" > LOCAL.config
-    echo LDFLAGS=\"-L${fontconfig_lib}/lib -L${xorgproto_exp}/lib -L${libX11_exp}/lib -L${libXt_exp}/lib -L${libXext_exp}/lib -L${freetype_exp}/lib -L${zlib_exp}/lib\" >> LOCAL.config    
-    echo X11=\"${libXt_dev}/include\" >> LOCAL.config
+    (
+        echo CC9=\"$(which $CC)\"
+        echo CFLAGS=\"$NIX_CFLAGS_COMPILE\"
+        echo LDFLAGS=\"$(plan9portLinkFlags)\"
+        echo X11=\"${libXt_dev}/include\"
+        case "$system" in
+          x86_64-*) echo OBJTYPE=x86_64;;
+          i?86-*)   echo OBJTYPE=386;;
+          *power*)  echo OBJTYPE=power;;
+          *sparc*)  echo OBJTYPE=sparc;;
+          *) exit 12
+        esac
+        if [[ $system =~ .*linux.* ]]; then
+          echo SYSVERSION=2.6.x
+        fi
+    ) >config
 
     for f in `grep -l -r /usr/local/plan9`; do
         sed "s,/usr/local/plan9,${PLAN9},g" -i $f
@@ -17,15 +46,29 @@ configurePhase()
 buildPhase()
 {
     mkdir -p $PLAN9
-    ./INSTALL -b
+
+    # Copy sources, some necessary bin scripts
+    cp -R * $PLAN9
+
+    local originalPath="$PATH"
+    export PATH="$PLAN9/bin:$PATH"
+    export NPROC=$NIX_BUILD_CORES
+    pushd src
+    ../dist/buildmk
+    mk clean
+    mk libs-nuke
+    mk all
+    mk -k install
+    if [[ -f $PLAN9/bin/quote1 ]]; then
+        cp $PLAN9/bin/quote1 $PLAN9/bin/'"'
+        cp $PLAN9/bin/quote2 $PLAN9/bin/'""'
+    fi
+    popd
+    export PATH="$originalPath"
 }
 
 installPhase()
 {
-    ./INSTALL -c
-    # Copy sources
-    cp -R * $PLAN9
-
     # Copy the `9' utility. This way you can use
     # $ 9 awk
     # to use the plan 9 awk
diff --git a/pkgs/tools/system/plan9port/darwin-cfframework.patch b/pkgs/tools/system/plan9port/darwin-cfframework.patch
new file mode 100644
index 000000000000..01541af92e37
--- /dev/null
+++ b/pkgs/tools/system/plan9port/darwin-cfframework.patch
@@ -0,0 +1,24 @@
+From d1f0bd3de7d3d54523aeefd9731ea850d20eaab4 Mon Sep 17 00:00:00 2001
+From: Jason Felice <jason.m.felice@gmail.com>
+Date: Tue, 2 Jul 2019 13:19:23 -0400
+Subject: [PATCH] Need CoreFoundation
+
+---
+ src/cmd/devdraw/cocoa-screen.m | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m
+index 97128da2..0e380dd3 100644
+--- a/src/cmd/devdraw/cocoa-screen.m
++++ b/src/cmd/devdraw/cocoa-screen.m
+@@ -56,6 +56,7 @@
+ #endif
+ 
+ AUTOFRAMEWORK(Cocoa)
++AUTOFRAMEWORK(CoreFoundation)
+ 
+ #define LOG	if(0)NSLog
+ #define panic	sysfatal
+-- 
+2.21.0
+
diff --git a/pkgs/tools/system/plan9port/darwin-sw_vers.patch b/pkgs/tools/system/plan9port/darwin-sw_vers.patch
new file mode 100644
index 000000000000..3e61c83e5403
--- /dev/null
+++ b/pkgs/tools/system/plan9port/darwin-sw_vers.patch
@@ -0,0 +1,47 @@
+From d21d082275f04f88eabcc8ecdb03ee932c71ebf1 Mon Sep 17 00:00:00 2001
+From: Jason Felice <jason.m.felice@gmail.com>
+Date: Mon, 1 Jul 2019 15:23:19 -0400
+Subject: [PATCH 2/3] Build for 10.12
+
+---
+ bin/osxvers                    | 3 +--
+ src/cmd/devdraw/mkwsysrules.sh | 4 ++--
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/bin/osxvers b/bin/osxvers
+index 4af44da2..3be7e6e9 100755
+--- a/bin/osxvers
++++ b/bin/osxvers
+@@ -2,6 +2,5 @@
+ 
+ u=`uname`
+ case "$u" in
+-Darwin)
+-	sw_vers | awk '$1 == "ProductVersion:" {print $2}' | awk -F. '{printf("CFLAGS=$CFLAGS -DOSX_VERSION=%d%02d%02d\n", $1, $2, $3)}'
++Darwin) printf 'CFLAGS=$CFLAGS -DOSX_VERSION=101200\n';;
+ esac
+diff --git a/src/cmd/devdraw/mkwsysrules.sh b/src/cmd/devdraw/mkwsysrules.sh
+index e94afbd3..40e632db 100644
+--- a/src/cmd/devdraw/mkwsysrules.sh
++++ b/src/cmd/devdraw/mkwsysrules.sh
+@@ -22,7 +22,7 @@ fi
+ 
+ if [ "x$WSYSTYPE" = "x" ]; then
+ 	if [ "x`uname`" = "xDarwin" ]; then
+-		if sw_vers | grep 'ProductVersion:	10\.[0-5]\.' >/dev/null; then
++		if false; then
+ 			echo 1>&2 'OS X 10.5 and older are not supported'
+ 			exit 1
+ 		else
+@@ -54,7 +54,7 @@ if [ $WSYSTYPE = x11 ]; then
+ 	XO=`ls x11-*.c 2>/dev/null | sed 's/\.c$/.o/'`
+ 	echo 'WSYSOFILES=$WSYSOFILES '$XO
+ elif [ $WSYSTYPE = osx-cocoa ]; then
+-	if sw_vers|awk '/ProductVersion/{split($2,a,".");exit(a[2]<14)}' >/dev/null; then	# 0 is true in sh.
++	if false; then
+ 		echo 'OBJCFLAGS=$OBJCFLAGS -fobjc-arc'
+ 		echo 'WSYSOFILES=$WSYSOFILES osx-draw.o cocoa-screen-metal-objc.o cocoa-srv.o cocoa-thread.o'
+ 	else
+-- 
+2.21.0
+
diff --git a/pkgs/tools/system/plan9port/default.nix b/pkgs/tools/system/plan9port/default.nix
index 21487e66bcd9..9776960327e1 100644
--- a/pkgs/tools/system/plan9port/default.nix
+++ b/pkgs/tools/system/plan9port/default.nix
@@ -1,7 +1,11 @@
-{ stdenv, fetchFromGitHub, which, libX11, libXt, fontconfig, freetype
+{ stdenv, fetchFromGitHub, which
+, darwin ? null
 , xorgproto ? null
+, libX11
 , libXext ? null
-, zlib ? null
+, libXt ? null
+, fontconfig ? null
+, freetype ? null
 , perl ? null  # For building web manuals
 }:
 
@@ -16,14 +20,24 @@ stdenv.mkDerivation {
     sha256 = "1lp17948q7vpl8rc2bf5a45bc8jqyj0s3zffmks9r25ai42vgb43";
   };
 
+  patches = [
+    ./tmpdir.patch
+    ./darwin-sw_vers.patch
+    ./darwin-cfframework.patch
+  ];
+
   postPatch = ''
     #hardcoded path
     substituteInPlace src/cmd/acme/acme.c \
       --replace /lib/font/bit $out/plan9/font
+
     #deprecated flags
     find . -type f \
       -exec sed -i -e 's/_SVID_SOURCE/_DEFAULT_SOURCE/g' {} \; \
       -exec sed -i -e 's/_BSD_SOURCE/_DEFAULT_SOURCE/g' {} \;
+
+    substituteInPlace bin/9c \
+      --replace 'which uniq' '${which}/bin/which uniq'
   '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
     #add missing ctrl+c\z\x\v keybind for non-Darwin
     substituteInPlace src/cmd/acme/text.c \
@@ -34,30 +48,16 @@ stdenv.mkDerivation {
   '';
 
   buildInputs = [
-    which perl libX11 fontconfig xorgproto libXt libXext
+    perl
+  ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [
+    xorgproto libX11 libXext libXt fontconfig
     freetype # fontsrv wants ft2build.h provides system fonts for acme and sam.
-  ];
+  ] ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+    darwin.cf-private Carbon Cocoa IOKit Metal QuartzCore
+  ]);
 
   builder = ./builder.sh;
-
-  libX11_dev = libX11.dev;
   libXt_dev = libXt.dev;
-  libXext_dev = libXext.dev;
-  fontconfig_dev = fontconfig.dev;
-  freetype_dev = freetype.dev;
-  zlib_dev = zlib.dev;
-
-  xorgproto_exp = xorgproto;
-  libX11_exp = libX11;
-  libXt_exp = libXt;
-  libXext_exp = libXext;
-  freetype_exp = freetype;
-  zlib_exp = zlib;
-
-  fontconfig_lib = fontconfig.lib;
-
-  NIX_LDFLAGS="-lgcc_s";
-  enableParallelBuilding = true;
 
   doInstallCheck = true;
   installCheckPhase = ''
diff --git a/pkgs/tools/system/plan9port/tmpdir.patch b/pkgs/tools/system/plan9port/tmpdir.patch
new file mode 100644
index 000000000000..e8200a177a27
--- /dev/null
+++ b/pkgs/tools/system/plan9port/tmpdir.patch
@@ -0,0 +1,41 @@
+From c762625549ff367b54bcd8281d1ce248a69b4401 Mon Sep 17 00:00:00 2001
+From: Jason Felice <jason.m.felice@gmail.com>
+Date: Mon, 1 Jul 2019 15:01:21 -0400
+Subject: [PATCH] Use $TMPDIR if available
+
+NixOS sandboxed builds (at least on Mac) don't have access to /tmp,
+and this should be better POSIX.
+---
+ bin/9c | 2 +-
+ bin/9l | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/bin/9c b/bin/9c
+index 3ffb716c..88c47887 100755
+--- a/bin/9c
++++ b/bin/9c
+@@ -133,7 +133,7 @@ case "$tag" in
+ esac
+ 
+ # N.B. Must use temp file to avoid pipe; pipe loses status.
+-xtmp=/tmp/9c.$$.$USER.out
++xtmp=${TMPDIR-/tmp}/9c.$$.$USER.out
+ $cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" 2>$xtmp
+ status=$?
+ quiet $xtmp
+diff --git a/bin/9l b/bin/9l
+index 6195815f..717a540a 100755
+--- a/bin/9l
++++ b/bin/9l
+@@ -346,7 +346,7 @@ then
+ 	echo $ld -L$PLAN9/lib "$@" $libsl $extralibs $frameworks
+ fi
+ 
+-xtmp=/tmp/9l.$$.$USER.out
++xtmp="${TMPDIR-/tmp}/9l.$$.$USER.out"
+ xxout() {
+ 	sed 's/.*: In function `[^:]*: *//' $xtmp | egrep . | 
+ 	egrep -v 'is (often|almost always) misused|is dangerous, better use|text-based stub' 
+-- 
+2.21.0
+
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index 046c6bc9acc3..4e60fb137322 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -114,6 +114,7 @@ mapAliases ({
   git-hub = gitAndTools.git-hub; # added 2016-04-29
   glib_networking = glib-networking; # added 2018-02-25
   gnome-mpv = celluloid; # added 2019-08-22
+  gmic_krita_qt = gmic-qt-krita; # added 2019-09-07
   gnome-themes-standard = gnome-themes-extra; # added 2018-03-14
   gnome_doc_utils = gnome-doc-utils; # added 2018-02-25
   gnome_themes_standard = gnome-themes-standard; # added 2018-02-25
@@ -325,6 +326,7 @@ mapAliases ({
   shared_mime_info = shared-mime-info; # added 2018-02-25
   skrooge2 = skrooge; # added 2017-02-18
   skype = skypeforlinux; # added 2017-07-27
+  skydive = throw "skydive has been removed from nixpkgs (2019-09-10)";
   slic3r-prusa3d = prusa-slicer; # added 2019-05-21
   slurm-llnl = slurm; # renamed July 2017
   slurm-llnl-full = slurm-full; # renamed July 2017
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index b85585c435a0..748ca777f4f7 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1694,7 +1694,11 @@ in
 
   gmic = callPackage ../tools/graphics/gmic { };
 
-  gmic_krita_qt = libsForQt5.callPackage ../tools/graphics/gmic_krita_qt { };
+  gmic-qt = libsForQt5.callPackage ../tools/graphics/gmic-qt { };
+
+  gmic-qt-krita = gmic-qt.override {
+    variant = "krita";
+  };
 
   goa = callPackage ../development/tools/goa { };
 
@@ -7188,7 +7192,7 @@ in
 
   zbackup = callPackage ../tools/backup/zbackup {};
 
-  zbar = callPackage ../tools/graphics/zbar { };
+  zbar = libsForQt5.callPackage ../tools/graphics/zbar { };
 
   zdelta = callPackage ../tools/compression/zdelta { };
 
@@ -13567,12 +13571,6 @@ in
     sdnotify-wrapper = callPackage ../os-specific/linux/sdnotify-wrapper { };
   };
 
-  skydive = callPackage ../tools/networking/skydive {
-    # XXX: this is failing with Go 1.12. Error is related to cgo, an
-    # update to this package might fix it.
-    buildGoPackage = buildGo111Package;
-  };
-
   slang = callPackage ../development/libraries/slang { };
 
   slibGuile = callPackage ../development/libraries/slib {
@@ -18408,8 +18406,6 @@ in
 
   getxbook = callPackage ../applications/misc/getxbook { };
 
-  ghq = gitAndTools.ghq;
-
   gimp = callPackage ../applications/graphics/gimp {
     gegl = gegl_0_4;
     lcms = lcms2;
@@ -18428,7 +18424,7 @@ in
 
   gitAndTools = recurseIntoAttrs (callPackage ../applications/version-management/git-and-tools {});
 
-  inherit (gitAndTools) git gitFull gitSVN git-cola svn2git git-radar git-secret git-secrets transcrypt git-crypt;
+  inherit (gitAndTools) git gitFull gitSVN git-cola svn2git git-radar git-secret git-secrets transcrypt git-crypt ghq;
 
   gitMinimal = git.override {
     withManual = false;
@@ -20815,6 +20811,8 @@ in
     inherit (linuxPackages) x86_energy_perf_policy;
   };
 
+  tippecanoe = callPackage ../applications/misc/tippecanoe { };
+
   tmatrix = callPackage ../applications/misc/tmatrix { };
 
   tnef = callPackage ../applications/misc/tnef { };
@@ -24831,4 +24829,6 @@ in
 
   nix-store-gcs-proxy = callPackage ../tools/nix/nix-store-gcs-proxy {};
 
+  wifi-password = callPackage ../os-specific/darwin/wifi-password {};
+
 }
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index af3f446cb259..4ece950f09e2 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -731,6 +731,8 @@ let
 
     rope = callPackage ../development/ocaml-modules/rope { };
 
+    rpclib = callPackage ../development/ocaml-modules/rpclib { };
+
     rresult = callPackage ../development/ocaml-modules/rresult { };
 
     safepass = callPackage ../development/ocaml-modules/safepass { };
@@ -823,7 +825,14 @@ let
 
     janePackage = callPackage ../development/ocaml-modules/janestreet/janePackage.nix {};
 
-    janeStreet = import ../development/ocaml-modules/janestreet {
+    janeStreet =
+    if lib.versionOlder "4.07" ocaml.version
+    then import ../development/ocaml-modules/janestreet/0.12.nix {
+      janePackage = callPackage ../development/ocaml-modules/janestreet/janePackage_0_12.nix {};
+      inherit ctypes num octavius ppxlib re;
+      inherit (pkgs) openssl;
+    }
+    else import ../development/ocaml-modules/janestreet {
       inherit janePackage ocamlbuild angstrom ctypes cryptokit;
       inherit magic-mime num ocaml-migrate-parsetree octavius ounit;
       inherit ppx_deriving re ppxlib;