From 2f0af764c0c8383f05db0d37f004f347dd2f193c Mon Sep 17 00:00:00 2001
From: "R. RyanTM" <ryantm+bot@ryantm.com>
Date: Wed, 18 Jul 2018 17:03:40 -0700
Subject: [PATCH 01/43] appstream-glib: 0.7.9 -> 0.7.10

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/appstream-glib/versions.
---
 pkgs/development/libraries/appstream-glib/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/appstream-glib/default.nix b/pkgs/development/libraries/appstream-glib/default.nix
index 3a0868ccecb4..8a148b63e8ed 100644
--- a/pkgs/development/libraries/appstream-glib/default.nix
+++ b/pkgs/development/libraries/appstream-glib/default.nix
@@ -4,7 +4,7 @@
 , libuuid, json-glib, meson, gperf, ninja
 }:
 stdenv.mkDerivation rec {
-  name = "appstream-glib-0.7.9";
+  name = "appstream-glib-0.7.10";
 
   outputs = [ "out" "dev" "man" "installedTests" ];
   outputBin = "dev";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     owner = "hughsie";
     repo = "appstream-glib";
     rev = stdenv.lib.replaceStrings ["." "-"] ["_" "_"] name;
-    sha256 = "10b32qw7iy0v1jvmf18wqgs8d1cpy52zm5rzw0wv421n90qiyidk";
+    sha256 = "1m4gww09id7hwzh4hri1y3hp7p0mdrf6fk9f924r2w66hlsdil0d";
   };
 
   nativeBuildInputs = [

From 39282575c56afdd9145c0ef982dd7ce05a7d40f5 Mon Sep 17 00:00:00 2001
From: "R. RyanTM" <ryantm+bot@ryantm.com>
Date: Wed, 8 Aug 2018 18:48:21 -0700
Subject: [PATCH 02/43] chromedriver: 2.40 -> 2.41

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/chromedriver/versions.
---
 pkgs/development/tools/selenium/chromedriver/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix
index a2cd55f52b90..eb91026c8361 100644
--- a/pkgs/development/tools/selenium/chromedriver/default.nix
+++ b/pkgs/development/tools/selenium/chromedriver/default.nix
@@ -6,7 +6,7 @@ let
   allSpecs = {
     "x86_64-linux" = {
       system = "linux64";
-      sha256 = "07b39j1glr53yxbbkkkkx12h8r44fybqkn4fd7s2lr1ysyq5vn1a";
+      sha256 = "1iwmdkkxfmmiqzvj2bjh98db6j6zfb8s2m5kq15wmnq0g44gxski";
     };
 
     "x86_64-darwin" = {
@@ -28,7 +28,7 @@ let
 in
 stdenv.mkDerivation rec {
   name = "chromedriver-${version}";
-  version = "2.40";
+  version = "2.41";
 
   src = fetchurl {
     url = "https://chromedriver.storage.googleapis.com/${version}/chromedriver_${spec.system}.zip";

From e3cbeef9a859fb287c01eb38267d4b95f9c8327c Mon Sep 17 00:00:00 2001
From: Jake Woods <jake@jakewoods.net>
Date: Sun, 12 Aug 2018 12:00:54 +1000
Subject: [PATCH 03/43] undervolt: init at 0.2.8

---
 pkgs/os-specific/linux/undervolt/default.nix | 27 ++++++++++++++++++++
 pkgs/top-level/all-packages.nix              |  2 ++
 2 files changed, 29 insertions(+)
 create mode 100644 pkgs/os-specific/linux/undervolt/default.nix

diff --git a/pkgs/os-specific/linux/undervolt/default.nix b/pkgs/os-specific/linux/undervolt/default.nix
new file mode 100644
index 000000000000..e9c033acd990
--- /dev/null
+++ b/pkgs/os-specific/linux/undervolt/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+  version = "0.2.8";
+  pname = "undervolt";
+
+  src = fetchFromGitHub {
+    owner = "georgewhewell";
+    repo = "undervolt";
+    rev = "${version}";
+    sha256 = "0crkqc5zq0gpyg031hfwdxymfc2gc1h8b6m0axzlh7gvnxlf5hra";
+  };
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/georgewhewell/undervolt/;
+    description = "A program for undervolting Intel CPUs on Linux";
+
+    longDescription = ''
+      Undervolt is a program for undervolting Intel CPUs under Linux. It works in a similar
+      manner to the Windows program ThrottleStop (i.e, MSR 0x150). You can apply a fixed
+      voltage offset to one of 5 voltage planes, and override your systems temperature
+      target (CPU will throttle when this temperature is reached).
+    '';
+    license = licenses.gpl2;
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 1c2322d5f844..d3569abffbfc 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -22179,4 +22179,6 @@ with pkgs;
   powershell = callPackage ../shells/powershell { };
 
   doing = callPackage ../applications/misc/doing  { };
+
+  undervolt = callPackage ../os-specific/linux/undervolt { };
 }

From 4142020e459b52658fd56714f50cf4ccc56d66e4 Mon Sep 17 00:00:00 2001
From: Jake Woods <jake@jakewoods.net>
Date: Sun, 12 Aug 2018 12:02:08 +1000
Subject: [PATCH 04/43] nixos/undervolt: adding undervolt module

We want to be able to configure persistent undervolting
in the NixOS configuration
---
 nixos/modules/module-list.nix                 |   1 +
 nixos/modules/services/hardware/undervolt.nix | 134 ++++++++++++++++++
 2 files changed, 135 insertions(+)
 create mode 100644 nixos/modules/services/hardware/undervolt.nix

diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 396e91204079..2846afea8fbc 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -281,6 +281,7 @@
   ./services/hardware/upower.nix
   ./services/hardware/usbmuxd.nix
   ./services/hardware/thermald.nix
+  ./services/hardware/undervolt.nix
   ./services/logging/SystemdJournal2Gelf.nix
   ./services/logging/awstats.nix
   ./services/logging/fluentd.nix
diff --git a/nixos/modules/services/hardware/undervolt.nix b/nixos/modules/services/hardware/undervolt.nix
new file mode 100644
index 000000000000..e5ef0601de3c
--- /dev/null
+++ b/nixos/modules/services/hardware/undervolt.nix
@@ -0,0 +1,134 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+let
+  cfg = config.services.undervolt;
+in {
+  options.services.undervolt = {
+    enable = mkOption {
+      type = types.bool;
+      default = false;
+      description = ''
+        Whether to undervolt intel cpus.
+      '';
+    };
+
+    verbose = mkOption {
+      type = types.bool;
+      default = false;
+      description = ''
+        Whether to enable verbose logging.
+      '';
+    };
+
+    package = mkOption {
+      type = types.package;
+      default = pkgs.undervolt;
+      defaultText = "pkgs.undervolt";
+      description = ''
+        undervolt derivation to use.
+      '';
+    };
+
+    coreOffset = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      description = ''
+        The amount of voltage to offset the CPU cores by. Accepts a floating point number.
+      '';
+    };
+
+    gpuOffset = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      description = ''
+        The amount of voltage to offset the GPU by. Accepts a floating point number.
+      '';
+    };
+
+    uncoreOffset = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      description = ''
+        The amount of voltage to offset uncore by. Accepts a floating point number.
+      '';
+    };
+
+    analogioOffset = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      description = ''
+        The amount of voltage to offset analogio by. Accepts a floating point number.
+      '';
+    };
+
+    temp = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      description = ''
+        The temperature target. Accepts a floating point number.
+      '';
+    };
+
+    tempAc = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      description = ''
+        The temperature target on AC power. Accepts a floating point number.
+      '';
+    };
+
+    tempBat = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      description = ''
+        The temperature target on battery power. Accepts a floating point number.
+      '';
+    };
+  };
+
+  config = mkIf cfg.enable {
+    boot.kernelModules = [ "msr" ];
+
+    environment.systemPackages = [ cfg.package ];
+
+    systemd.services.undervolt = {
+      path = [ pkgs.undervolt ];
+
+      description = "Intel Undervolting Service";
+      serviceConfig = {
+        Type = "oneshot";
+        Restart = "no";
+
+        # `core` and `cache` are both intentionally set to `cfg.coreOffset` as according to the undervolt docs:
+        #
+        #     Core or Cache offsets have no effect. It is not possible to set different offsets for
+        #     CPU Core and Cache. The CPU will take the smaller of the two offsets, and apply that to
+        #     both CPU and Cache. A warning message will be displayed if you attempt to set different offsets.
+        ExecStart = ''
+          ${pkgs.undervolt}/bin/undervolt \
+            ${optionalString cfg.verbose "--verbose"} \
+            ${optionalString (cfg.coreOffset != null) "--core ${cfg.coreOffset}"} \
+            ${optionalString (cfg.coreOffset != null) "--cache ${cfg.coreOffset}"} \
+            ${optionalString (cfg.gpuOffset != null) "--gpu ${cfg.gpuOffset}"} \
+            ${optionalString (cfg.uncoreOffset != null) "--uncore ${cfg.uncoreOffset}"} \
+            ${optionalString (cfg.analogioOffset != null) "--analogio ${cfg.analogioOffset}"} \
+            ${optionalString (cfg.temp != null) "--temp ${cfg.temp}"} \
+            ${optionalString (cfg.tempAc != null) "--temp-ac ${cfg.tempAc}"} \
+            ${optionalString (cfg.tempBat != null) "--temp-bat ${cfg.tempBat}"}
+        '';
+      };
+    };
+
+    systemd.timers.undervolt = {
+      description = "Undervolt timer to ensure voltage settings are always applied";
+      partOf = [ "undervolt.service" ];
+      wantedBy = [ "multi-user.target" ];
+      timerConfig = {
+        OnBootSec = "2min";
+        OnUnitActiveSec = "30";
+      };
+    };
+  };
+}

From ef6c7ae2a15a0cd4d1d8a9257a5a114709ff1aad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= <malaquias@gmail.com>
Date: Mon, 20 Aug 2018 11:49:11 -0300
Subject: [PATCH 05/43] numix-icon-theme: 2017-12-25 -> 18.07.17

---
 pkgs/data/icons/numix-icon-theme/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/data/icons/numix-icon-theme/default.nix b/pkgs/data/icons/numix-icon-theme/default.nix
index 6b6b77ae5e8b..fcff9a451a71 100644
--- a/pkgs/data/icons/numix-icon-theme/default.nix
+++ b/pkgs/data/icons/numix-icon-theme/default.nix
@@ -3,13 +3,13 @@
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   pname = "numix-icon-theme";
-  version = "17-12-25";
+  version = "18.07.17";
 
   src = fetchFromGitHub {
     owner = "numixproject";
     repo = pname;
     rev = version;
-    sha256 = "0q3hpq2jc9iwnzzqpb12g1qzjsw4ckhdqkfqf6nirl87r5drkv6j";
+    sha256 = "0clh55kmhc52d33dfm2c6h3lg6ddfh8a088ir9lv1camn9kj55bd";
   };
 
   nativeBuildInputs = [ gtk3 hicolor-icon-theme ];

From e77133c9f064316acff031dbf6d57da0d9ef0d3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= <malaquias@gmail.com>
Date: Mon, 20 Aug 2018 11:58:37 -0300
Subject: [PATCH 06/43] numix-icon-theme-circle: 18-02-16 -> 18.08.17

---
 pkgs/data/icons/numix-icon-theme-circle/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/data/icons/numix-icon-theme-circle/default.nix b/pkgs/data/icons/numix-icon-theme-circle/default.nix
index 5982074991fa..83166105209d 100644
--- a/pkgs/data/icons/numix-icon-theme-circle/default.nix
+++ b/pkgs/data/icons/numix-icon-theme-circle/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchFromGitHub, gtk3, numix-icon-theme }:
 
 stdenv.mkDerivation rec {
-  version = "18-02-16";
+  version = "18.08.17";
 
   package-name = "numix-icon-theme-circle";
 
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     owner = "numixproject";
     repo = package-name;
     rev = version;
-    sha256 = "0q08q1czsk6h0dxqscbgryr12xaakp4zbch37z0jxpwh087gnq4f";
+    sha256 = "1nxgm5vf2rzbg8qh48iy0vdj12ffahlp9qhj8h0k1li03s3nf15h";
   };
 
   nativeBuildInputs = [ gtk3 numix-icon-theme ];

From 85cbf2e6e76706fc7c786d3a52fcf6240dd0310e Mon Sep 17 00:00:00 2001
From: John Ericson <John.Ericson@Obsidian.Systems>
Date: Mon, 20 Aug 2018 16:52:24 -0400
Subject: [PATCH 07/43] nixos/netboot: Remove redundant setting

@volth tells me that is the default for `system.boot.loader.kernelFile` anyways.
---
 nixos/modules/installer/netboot/netboot.nix | 1 -
 1 file changed, 1 deletion(-)

diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix
index a2c8e26f62c2..ea640173c6dd 100644
--- a/nixos/modules/installer/netboot/netboot.nix
+++ b/nixos/modules/installer/netboot/netboot.nix
@@ -28,7 +28,6 @@ with lib;
       ++ (if pkgs.stdenv.system == "aarch64-linux"
           then []
           else [ pkgs.grub2 pkgs.syslinux ]);
-    system.boot.loader.kernelFile = pkgs.stdenv.hostPlatform.platform.kernelTarget;
 
     fileSystems."/" =
       { fsType = "tmpfs";

From c14320353df87bc53d23b156e26202fe44a23492 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= <malaquias@gmail.com>
Date: Mon, 20 Aug 2018 21:15:07 -0300
Subject: [PATCH 08/43] numix-icon-theme: restrict platforms to linux

---
 pkgs/data/icons/numix-icon-theme/default.nix | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgs/data/icons/numix-icon-theme/default.nix b/pkgs/data/icons/numix-icon-theme/default.nix
index fcff9a451a71..35f624a00f5b 100644
--- a/pkgs/data/icons/numix-icon-theme/default.nix
+++ b/pkgs/data/icons/numix-icon-theme/default.nix
@@ -29,7 +29,8 @@ stdenv.mkDerivation rec {
     description = "Numix icon theme";
     homepage = https://numixproject.org;
     license = licenses.gpl3;
-    platforms = platforms.all;
+    # darwin cannot deal with file names differing only in case
+    platforms = platforms.linux;
     maintainers = with maintainers; [ romildo jgeerds ];
   };
 }

From 3863e40507fadf68db01352a399a4402712ae104 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= <malaquias@gmail.com>
Date: Mon, 20 Aug 2018 21:29:02 -0300
Subject: [PATCH 09/43] numix-icon-theme-circle: restrict platforms to linux

---
 pkgs/data/icons/numix-icon-theme-circle/default.nix | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgs/data/icons/numix-icon-theme-circle/default.nix b/pkgs/data/icons/numix-icon-theme-circle/default.nix
index 83166105209d..5ac0998fb291 100644
--- a/pkgs/data/icons/numix-icon-theme-circle/default.nix
+++ b/pkgs/data/icons/numix-icon-theme-circle/default.nix
@@ -31,7 +31,8 @@ stdenv.mkDerivation rec {
     description = "Numix icon theme (circle version)";
     homepage = https://numixproject.org;
     license = licenses.gpl3;
-    platforms = platforms.all;
+    # darwin cannot deal with file names differing only in case
+    platforms = platforms.linux;
     maintainers = with maintainers; [ jgeerds ];
   };
 }

From e59d109e09906c8b68f8984f8587dee1b63b4e96 Mon Sep 17 00:00:00 2001
From: Uli Baum <xeji@cat3.de>
Date: Tue, 21 Aug 2018 15:00:47 +0200
Subject: [PATCH 10/43] appstream-glib: remove gcab dependency

---
 pkgs/development/libraries/appstream-glib/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/appstream-glib/default.nix b/pkgs/development/libraries/appstream-glib/default.nix
index 8a148b63e8ed..48dfe9ad894e 100644
--- a/pkgs/development/libraries/appstream-glib/default.nix
+++ b/pkgs/development/libraries/appstream-glib/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchFromGitHub, substituteAll, pkgconfig, gettext, gtk3, glib
 , gtk-doc, libarchive, gobjectIntrospection, libxslt, pngquant
-, sqlite, libsoup, gcab, attr, acl, docbook_xsl, docbook_xml_dtd_42
+, sqlite, libsoup, attr, acl, docbook_xsl, docbook_xml_dtd_42
 , libuuid, json-glib, meson, gperf, ninja
 }:
 stdenv.mkDerivation rec {
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
   ];
   buildInputs = [
     glib gettext sqlite libsoup
-    gcab attr acl libuuid json-glib
+    attr acl libuuid json-glib
     libarchive gobjectIntrospection gperf
   ];
   propagatedBuildInputs = [ gtk3 ];

From 2bcb700b058f0e215d93541b256b447744d32fe4 Mon Sep 17 00:00:00 2001
From: Robert Helgesson <robert@rycee.net>
Date: Tue, 21 Aug 2018 21:36:06 +0200
Subject: [PATCH 11/43] msmtp: support passwordeval without final '\n'

This applies an upstream patch that removes the requirement for
passwordeval commands to print a `\n` character after the password.
---
 pkgs/applications/networking/msmtp/default.nix | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/pkgs/applications/networking/msmtp/default.nix b/pkgs/applications/networking/msmtp/default.nix
index 2372685dc278..4e2f9e636d5d 100644
--- a/pkgs/applications/networking/msmtp/default.nix
+++ b/pkgs/applications/networking/msmtp/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, autoreconfHook, pkgconfig
+{ stdenv, lib, fetchpatch, fetchurl, autoreconfHook, pkgconfig
 , openssl, netcat-gnu, gnutls, gsasl, libidn, Security
 , withKeyring ? true, libsecret ? null
 , systemd ? null }:
@@ -19,6 +19,14 @@ in stdenv.mkDerivation rec {
 
   patches = [
     ./paths.patch
+
+    # To support passwordeval commands that do not print a final
+    # newline.
+    (fetchpatch {
+      name = "passwordeval-without-nl.patch";
+      url = "https://gitlab.marlam.de/marlam/msmtp/commit/df22dccf9d1af06fcd09dfdd0d6a38e1372dd5e8.patch";
+      sha256 = "06gbhvzi46zqigmmsin2aard7b9v3ihx62hbz5ljmfbj9rfs1x5y";
+    })
   ];
 
   buildInputs = [ openssl gnutls gsasl libidn ]

From 4ad233e518d25e60d06bb3cb41307f8270f3f18e Mon Sep 17 00:00:00 2001
From: Uli Baum <xeji@cat3.de>
Date: Tue, 21 Aug 2018 22:03:58 +0200
Subject: [PATCH 12/43] Revert "libvirt: fix dlopen("libjansson.so.4")"

This reverts commit 929a53f2814982247f34fa296f6c1dd0435caf20.

Upstream has reverted their move from yajl to jansson after 4.6.0
because of major issues. No point in trying to fix it.
Let's revert to libvirt 4.5.0 and wait for the next upstream release.
---
 pkgs/development/libraries/libvirt/default.nix | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix
index 4b104a04c15d..63f11daad288 100644
--- a/pkgs/development/libraries/libvirt/default.nix
+++ b/pkgs/development/libraries/libvirt/default.nix
@@ -60,9 +60,7 @@ in stdenv.mkDerivation rec {
       --replace 'lxc_path,' '"/run/libvirt/nix-emulators/libvirt_lxc",'
 
     patchShebangs . # fixes /usr/bin/python references
-    substituteInPlace src/util/virjsoncompat.c --replace \
-        '"libjansson.so.4"' '"${jansson}/lib/libjansson${stdenv.targetPlatform.extensions.sharedLibrary}"'
-   '';
+  '';
 
   configureFlags = [
     "--localstatedir=/var"

From 528f4a2d1f7e040ff4cb03733a1b604196e61a6c Mon Sep 17 00:00:00 2001
From: Uli Baum <xeji@cat3.de>
Date: Tue, 21 Aug 2018 22:07:05 +0200
Subject: [PATCH 13/43] Revert "libvirt: jansson required for qemu suppport"

This reverts commit df05344d960895d8b076341ca0d8a0c7333f24b4.

Upstream has reverted their move from yajl to jansson after 4.6.0
because of major issues.
Let's revert to libvirt 4.5.0 and wait for the next upstream release.
---
 pkgs/development/libraries/libvirt/default.nix | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix
index 63f11daad288..e584af775d2b 100644
--- a/pkgs/development/libraries/libvirt/default.nix
+++ b/pkgs/development/libraries/libvirt/default.nix
@@ -4,7 +4,7 @@
 , iproute, iptables, readline, lvm2, utillinux, systemd, libpciaccess, gettext
 , libtasn1, ebtables, libgcrypt, yajl, pmutils, libcap_ng, libapparmor
 , dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages
-, curl, libiconv, gmp, zfs, parted, bridge-utils, dmidecode, jansson
+, curl, libiconv, gmp, zfs, parted, bridge-utils, dmidecode
 , enableXen ? false, xen ? null
 , enableIscsi ? false, openiscsi
 }:
@@ -35,11 +35,11 @@ in stdenv.mkDerivation rec {
   nativeBuildInputs = [ makeWrapper pkgconfig ];
   buildInputs = [
     libxml2 gnutls perl python2 readline gettext libtasn1 libgcrypt yajl
-    libxslt xhtml1 perlPackages.XMLXPath curl libpcap jansson
+    libxslt xhtml1 perlPackages.XMLXPath curl libpcap
   ] ++ optionals (!buildFromTarball) [
     libtool autoconf automake
   ] ++ optionals stdenv.isLinux [
-    libpciaccess lvm2 utillinux systemd libnl numad zfs
+    libpciaccess lvm2 lvm2 utillinux systemd libnl numad zfs
     libapparmor libcap_ng numactl attr parted
   ] ++ optionals (enableXen && stdenv.isLinux && stdenv.isx86_64) [
     xen
@@ -66,7 +66,6 @@ in stdenv.mkDerivation rec {
     "--localstatedir=/var"
     "--sysconfdir=/var/lib"
     "--with-libpcap"
-    "--with-qemu"
     "--with-vmware"
     "--with-vbox"
     "--with-test"

From 6b5b7d96fb0bb292b43362077b6eb03a905f1cbf Mon Sep 17 00:00:00 2001
From: Uli Baum <xeji@cat3.de>
Date: Tue, 21 Aug 2018 22:08:21 +0200
Subject: [PATCH 14/43] Revert "libvirt: 4.5.0 -> 4.6.0 (#44566)"

This reverts commit 88352408958d905c77ad0461036196282c39cf69.

4.6.0 is quite broken. Let's wait for the next release.
---
 pkgs/development/libraries/libvirt/default.nix      | 6 +++---
 pkgs/development/python-modules/libvirt/default.nix | 4 ++--
 pkgs/top-level/perl-packages.nix                    | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix
index e584af775d2b..02c13e413e33 100644
--- a/pkgs/development/libraries/libvirt/default.nix
+++ b/pkgs/development/libraries/libvirt/default.nix
@@ -16,19 +16,19 @@ let
   buildFromTarball = stdenv.isDarwin;
 in stdenv.mkDerivation rec {
   name = "libvirt-${version}";
-  version = "4.6.0";
+  version = "4.5.0";
 
   src =
     if buildFromTarball then
       fetchurl {
         url = "http://libvirt.org/sources/${name}.tar.xz";
-        sha256 = "0rj0azi766g0xdxydvkq9nj95hhsiwqgclzzmyxvk2axhb8nrb5l";
+        sha256 = "02dbfyi80im37gdsxglb4fja78q63b8ahmgdc5kh8lx51kf5xsg7";
       }
     else
       fetchgit {
         url = git://libvirt.org/libvirt.git;
         rev = "v${version}";
-        sha256 = "1lv1s93k056wylrlc7j4q45zir9z4qshzcl454spy2wb8cdn3h4s";
+        sha256 = "0ija9a02znajsa2pbxamrmz87zwpmba9s29vdzzqqqw5c1rdpcr6";
         fetchSubmodules = true;
       };
 
diff --git a/pkgs/development/python-modules/libvirt/default.nix b/pkgs/development/python-modules/libvirt/default.nix
index 71e9adf11d2d..26b42020fc34 100644
--- a/pkgs/development/python-modules/libvirt/default.nix
+++ b/pkgs/development/python-modules/libvirt/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "libvirt";
-  version = "4.6.0";
+  version = "4.5.0";
 
   src = assert version == libvirt.version; fetchgit {
     url = git://libvirt.org/libvirt-python.git;
     rev = "v${version}";
-    sha256 = "0yrgibd5c9wy82ak8g9ykar6fma1wf7xzmmc47657lzm70m5av68";
+    sha256 = "0w2rzkxv7jsq4670m0j5c6p4hpyi0r0ja6wd3wdvixcwc6hhx407";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 7f09630debfc..5add53c0dc24 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -14400,12 +14400,12 @@ let
   };
 
   SysVirt = buildPerlModule rec {
-    version = "4.6.0";
+    version = "4.5.0";
     name = "Sys-Virt-${version}";
     src = assert version == pkgs.libvirt.version; pkgs.fetchgit {
       url = git://libvirt.org/libvirt-perl.git;
       rev = "v${version}";
-      sha256 = "0qs84sdrq85i3xc0drbk71jjm9vq1n8izdwy5zsd5r7dqays5slf";
+      sha256 = "18ns94i29c9x0j50pz9r1vcif6baayz769sa7b51v8kcvam9j52s";
     };
     nativeBuildInputs = [ pkgs.pkgconfig ];
     buildInputs = [ pkgs.libvirt CPANChanges TestPod TestPodCoverage XMLXPath ];

From c6191c8abff1d3eef083619ee34b8bc60cba79ff Mon Sep 17 00:00:00 2001
From: Ben Wolsieffer <benwolsieffer@gmail.com>
Date: Tue, 21 Aug 2018 16:21:11 -0400
Subject: [PATCH 15/43] nixos/cfssl: don't create user/group unless service is
 enabled

---
 nixos/modules/services/security/cfssl.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nixos/modules/services/security/cfssl.nix b/nixos/modules/services/security/cfssl.nix
index 1eb2f65ba602..ee6d5d91fe15 100644
--- a/nixos/modules/services/security/cfssl.nix
+++ b/nixos/modules/services/security/cfssl.nix
@@ -146,7 +146,7 @@ in {
     };
   };
 
-  config = {
+  config = mkIf cfg.enable {
     users.extraGroups.cfssl = {
       gid = config.ids.gids.cfssl;
     };
@@ -159,7 +159,7 @@ in {
       uid = config.ids.uids.cfssl;
     };
 
-    systemd.services.cfssl = mkIf cfg.enable {
+    systemd.services.cfssl = {
       description = "CFSSL CA API server";
       wantedBy = [ "multi-user.target" ];
       after = [ "network.target" ];

From 60970294550aa78517ae8b19b4f99c0ccf170f4a Mon Sep 17 00:00:00 2001
From: Will Dietz <github@wdtz.org>
Date: Tue, 21 Aug 2018 15:49:21 -0500
Subject: [PATCH 16/43] tootle: init 0.1.5 (#45431)

---
 pkgs/applications/misc/tootle/default.nix | 38 +++++++++++++++++++++++
 pkgs/top-level/all-packages.nix           |  2 ++
 2 files changed, 40 insertions(+)
 create mode 100644 pkgs/applications/misc/tootle/default.nix

diff --git a/pkgs/applications/misc/tootle/default.nix b/pkgs/applications/misc/tootle/default.nix
new file mode 100644
index 000000000000..b2aab54c1047
--- /dev/null
+++ b/pkgs/applications/misc/tootle/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub
+, meson, ninja, pkgconfig
+, gnome3, vala, gobjectIntrospection, wrapGAppsHook
+, gtk3, granite
+, json-glib, glib, glib-networking
+}:
+
+let
+  pname = "tootle";
+  version = "0.1.5";
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "bleakgrey";
+    repo = pname;
+    rev = version;
+    sha256 = "022h1rh1jk3m1f9al0s1rylmnqnkydyc81idfc8jf1g0frnvn5i6";
+  };
+
+  nativeBuildInputs = [ meson ninja pkgconfig vala gobjectIntrospection wrapGAppsHook ];
+  buildInputs = [
+    gtk3 granite json-glib glib glib-networking
+    gnome3.libgee gnome3.libsoup gnome3.gsettings-desktop-schemas
+  ];
+
+  postPatch = ''
+    chmod +x ./meson/post_install.py
+    patchShebangs ./meson/post_install.py
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Simple Mastodon client designed for elementary OS";
+    homepage    = https://github.com/bleakgrey/tootle;
+    license     = licenses.gpl3;
+    maintainers = with maintainers; [ dtzWill ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 302ff26ed40f..1c804b47afec 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -18772,6 +18772,8 @@ with pkgs;
 
   toot = callPackage ../applications/misc/toot { };
 
+  tootle = callPackage ../applications/misc/tootle { };
+
   toxic = callPackage ../applications/networking/instant-messengers/toxic { };
 
   toxiproxy = callPackage ../development/tools/toxiproxy { };

From ebac61b0d086d75cbf450d091c21ae1040081cbd Mon Sep 17 00:00:00 2001
From: Uli Baum <xeji@cat3.de>
Date: Tue, 21 Aug 2018 22:54:54 +0200
Subject: [PATCH 17/43] libvirt: explicitly configure qemu support

it is enabled by default in 4.5.0 but conditional in 4.6.0 so
let's already put it in here to avoid issues on the next bump.
---
 pkgs/development/libraries/libvirt/default.nix | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix
index 02c13e413e33..fd35864fe343 100644
--- a/pkgs/development/libraries/libvirt/default.nix
+++ b/pkgs/development/libraries/libvirt/default.nix
@@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
   ] ++ optionals (!buildFromTarball) [
     libtool autoconf automake
   ] ++ optionals stdenv.isLinux [
-    libpciaccess lvm2 lvm2 utillinux systemd libnl numad zfs
+    libpciaccess lvm2 utillinux systemd libnl numad zfs
     libapparmor libcap_ng numactl attr parted
   ] ++ optionals (enableXen && stdenv.isLinux && stdenv.isx86_64) [
     xen
@@ -66,6 +66,7 @@ in stdenv.mkDerivation rec {
     "--localstatedir=/var"
     "--sysconfdir=/var/lib"
     "--with-libpcap"
+    "--with-qemu"
     "--with-vmware"
     "--with-vbox"
     "--with-test"

From caf2cae44bc2717f2b94ae589c495f0c8d911908 Mon Sep 17 00:00:00 2001
From: volth <volth@volth.com>
Date: Tue, 21 Aug 2018 20:58:56 +0000
Subject: [PATCH 18/43] fetchpatch: patchutils -> buildPackages.patchutils

---
 pkgs/build-support/fetchpatch/default.nix | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pkgs/build-support/fetchpatch/default.nix b/pkgs/build-support/fetchpatch/default.nix
index 40a7675b7ac5..89d72f512f7f 100644
--- a/pkgs/build-support/fetchpatch/default.nix
+++ b/pkgs/build-support/fetchpatch/default.nix
@@ -4,7 +4,7 @@
 # often change with updating of git or cgit.
 # stripLen acts as the -p parameter when applying a patch.
 
-{ lib, fetchurl, patchutils }:
+{ lib, fetchurl, buildPackages }:
 { stripLen ? 0, extraPrefix ? null, excludes ? [], includes ? [], revert ? false, ... }@args:
 
 fetchurl ({
@@ -14,10 +14,10 @@ fetchurl ({
       echo "error: Fetched patch file '$out' is empty!" 1>&2
       exit 1
     fi
-    "${patchutils}/bin/lsdiff" "$out" \
+    "${buildPackages.patchutils}/bin/lsdiff" "$out" \
       | sort -u | sed -e 's/[*?]/\\&/g' \
       | xargs -I{} \
-        "${patchutils}/bin/filterdiff" \
+        "${buildPackages.patchutils}/bin/filterdiff" \
         --include={} \
         --strip=${toString stripLen} \
         ${lib.optionalString (extraPrefix != null) ''
@@ -32,7 +32,7 @@ fetchurl ({
       cat "$out" 1>&2
       exit 1
     fi
-    ${patchutils}/bin/filterdiff \
+    ${buildPackages.patchutils}/bin/filterdiff \
       -p1 \
       ${builtins.toString (builtins.map (x: "-x ${lib.escapeShellArg x}") excludes)} \
       ${builtins.toString (builtins.map (x: "-i ${lib.escapeShellArg x}") includes)} \
@@ -46,7 +46,7 @@ fetchurl ({
       exit 1
     fi
   '' + lib.optionalString revert ''
-    ${patchutils}/bin/interdiff "$out" /dev/null > "$tmpfile"
+    ${buildPackages.patchutils}/bin/interdiff "$out" /dev/null > "$tmpfile"
     mv "$tmpfile" "$out"
   '' + (args.postFetch or "");
   meta.broken = excludes != [] && includes != [];

From 60942ead1cb97da965957d0ff1b00d67dea8efe2 Mon Sep 17 00:00:00 2001
From: Vincent Laporte <vbgl@users.noreply.github.com>
Date: Tue, 21 Aug 2018 21:40:52 +0000
Subject: [PATCH 19/43] obuild: 0.1.8 -> 0.1.10 (#45444)

---
 pkgs/development/tools/ocaml/obuild/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/tools/ocaml/obuild/default.nix b/pkgs/development/tools/ocaml/obuild/default.nix
index 1de95f730372..41cde6f8ab73 100644
--- a/pkgs/development/tools/ocaml/obuild/default.nix
+++ b/pkgs/development/tools/ocaml/obuild/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchzip, ocaml }:
 
-let version = "0.1.8"; in
+let version = "0.1.10"; in
 
 stdenv.mkDerivation {
   name = "obuild-${version}";
 
   src = fetchzip {
     url = "https://github.com/ocaml-obuild/obuild/archive/obuild-v${version}.tar.gz";
-    sha256 = "1q1k2qqd08j1zakvydgvwgwpyn0ll7rs65gap0pvg3amnh5cp3wd";
+    sha256 = "15arsgbhk1c39vd8qhpa3pag94m44bwvzggdvkibx6hnpkv8z9bn";
   };
 
   buildInputs = [ ocaml ];

From 27f66004194ca05f172c905b4f2d1c7aacf8cb06 Mon Sep 17 00:00:00 2001
From: "R. RyanTM" <ryantm-bot@ryantm.com>
Date: Tue, 21 Aug 2018 14:43:27 -0700
Subject: [PATCH 20/43] nodejs-slim-10_x: 10.7.0 -> 10.9.0 (#45172)

Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/nodejs-slim/versions.
---
 pkgs/development/web/nodejs/v10.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/web/nodejs/v10.nix b/pkgs/development/web/nodejs/v10.nix
index 1d307c77f9fb..ee88b2313662 100644
--- a/pkgs/development/web/nodejs/v10.nix
+++ b/pkgs/development/web/nodejs/v10.nix
@@ -5,6 +5,6 @@ let
 in
   buildNodejs {
     inherit enableNpm;
-    version = "10.7.0";
-    sha256 = "0qp93ddbnvadimj11wnznwhkq8vq1f7q259iq8siy5b7r936kvil";
+    version = "10.9.0";
+    sha256 = "00hdachbmcf9pyd1iksprsi5mddwp6z59mb3lr81z8ynfbmzhzni";
   }

From 35ae816e17dcd215e6f8ade19436e5730ee95902 Mon Sep 17 00:00:00 2001
From: Vincent Laporte <vbgl@users.noreply.github.com>
Date: Tue, 21 Aug 2018 22:07:35 +0000
Subject: [PATCH 21/43] ocamlPackages.io-page: 1.6.1 -> 2.0.1 (#45393)

---
 .../ocaml-modules/io-page/default.nix           | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/pkgs/development/ocaml-modules/io-page/default.nix b/pkgs/development/ocaml-modules/io-page/default.nix
index 24aa25570829..72b7a3a54ce7 100644
--- a/pkgs/development/ocaml-modules/io-page/default.nix
+++ b/pkgs/development/ocaml-modules/io-page/default.nix
@@ -1,23 +1,24 @@
-{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, cstruct }:
+{ stdenv, fetchzip, ocaml, findlib, jbuilder, configurator, cstruct }:
 
-let version = "1.6.1"; in
+let version = "2.0.1"; in
 
 stdenv.mkDerivation {
-  name = "ocaml-io-page-${version}";
+  name = "ocaml${ocaml.version}-io-page-${version}";
 
   src = fetchzip {
-    url = "https://github.com/mirage/io-page/archive/v${version}.tar.gz";
-    sha256 = "1djwks3ss12m55q6h4jsvfsy848cxfnpaxkilw10h26xj6jchflz";
+    url = "https://github.com/mirage/io-page/archive/${version}.tar.gz";
+    sha256 = "1rw04dwrlx5hah5dkjf7d63iff82j9cifr8ifjis5pdwhgwcff8i";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild ];
+  buildInputs = [ ocaml findlib jbuilder configurator ];
   propagatedBuildInputs = [ cstruct ];
 
-  createFindlibDestdir = true;
+  inherit (jbuilder) installPhase;
 
   meta = {
     homepage = https://github.com/mirage/io-page;
-    platforms = ocaml.meta.platforms or [];
+    inherit (ocaml.meta) platforms;
+    license = stdenv.lib.licenses.isc;
     description = "IO memory page library for Mirage backends";
     maintainers = with stdenv.lib.maintainers; [ vbgl ];
   };

From 3c08c87ae9b77d3605a047685a1624898a8fbbfb Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Tue, 7 Aug 2018 19:09:14 -0500
Subject: [PATCH 22/43] radare2: 2.7.0 -> 2.8.0

---
 .../tools/analysis/radare2/default.nix         | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/pkgs/development/tools/analysis/radare2/default.nix b/pkgs/development/tools/analysis/radare2/default.nix
index 0264305134cb..43a05b5193d1 100644
--- a/pkgs/development/tools/analysis/radare2/default.nix
+++ b/pkgs/development/tools/analysis/radare2/default.nix
@@ -17,13 +17,13 @@ let
   inherit (stdenv.lib) optional;
   #<generated>
   # DO NOT EDIT! Automatically generated by ./update.py
-  version_commit = "18681";
-  gittap = "2.7.0";
-  gittip = "6e08e452a7ec231a73997c44b4ff556c2998c7d9";
-  version = "2.7.0";
-  sha256 = "1a9z8w897256dhh3yhyfnshz3n2nrc4plc2i06cm5sznhl6x9xfx";
-  cs_tip = "ec8a5ce98fa0422a395489ed47da912b15d77441";
-  cs_sha256 = "080a64bqck28a2xfjwz29ddcr8p6hc6gi67mgry3pca289qrkk3q";
+  version_commit = "19004";
+  gittap = "2.8.0";
+  gittip = "a76b965410aba07b4ef8b96d90b25b271c2003dd";
+  version = "2.8.0";
+  sha256 = "1d9rkzc3vychy2h1bnywwx4why83rr18r0lvvl1cqx87ad5awcjk";
+  cs_tip = "782ea67e17a391ca0d3faafdc365b335a1a8930a";
+  cs_sha256 = "1maww4ir78a193pm3f8lr2kdkizi7rywn68ffa65ipyr7j4pl6i4";
   #</generated>
 in
 stdenv.mkDerivation rec {
@@ -46,7 +46,9 @@ stdenv.mkDerivation rec {
     };
   in ''
     if ! grep -F "CS_TIP=${cs_tip}" shlr/Makefile; then echo "CS_TIP mismatch"; exit 1; fi
-    ln -s ${capstone} shlr/capstone
+    # When using meson, it expects capstone source relative to build directory
+    mkdir -p build/shlr
+    ln -s ${capstone} build/shlr/capstone
   '';
 
   postInstall = ''

From ec7af525bae2816cc26785aced3034706f7e81e1 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Wed, 8 Aug 2018 06:35:02 -0500
Subject: [PATCH 23/43] radare2-cutter: use newer r2, fix (latest rev used by
 cutter-git)

---
 pkgs/development/tools/analysis/radare2-cutter/default.nix | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/tools/analysis/radare2-cutter/default.nix b/pkgs/development/tools/analysis/radare2-cutter/default.nix
index ff2b4d3b54f5..b427499ad99f 100644
--- a/pkgs/development/tools/analysis/radare2-cutter/default.nix
+++ b/pkgs/development/tools/analysis/radare2-cutter/default.nix
@@ -13,8 +13,10 @@ let
     src = fetchFromGitHub {
       owner = "radare";
       repo = "radare2";
-      rev = "a98557bfbfa96e9f677a8c779ee78085ee5a23bb";
-      sha256 = "04jl1lq3dqljb6vagzlym4wc867ayhx1v52f75rkfz0iybsh249r";
+      # XXX: The revision used here should match what Cutter uses as submodule.
+      # For now it's the revision cutter-git uses for r2.
+      rev = "c9ec8b54b9ba32ba6712f319825f8d032e573e68";
+      sha256 = "04ri3wis8l1mbcp2gx419x7yfimljn7xa01izch71jy2h2mzk3z6";
     };
   });
   version = "1.6";

From 6897945879859956c4165efdd4bdf04ab930fa69 Mon Sep 17 00:00:00 2001
From: Ben Wolsieffer <benwolsieffer@gmail.com>
Date: Tue, 21 Aug 2018 17:20:55 -0400
Subject: [PATCH 24/43] nixos/networkd: replace range with assertRange

---
 nixos/modules/system/boot/networkd.nix | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index a3b7d7ba07ad..c11aaeaeb6dc 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -30,10 +30,10 @@ let
     (assertValueOneOf "UDPSegmentationOffload" boolValues)
     (assertValueOneOf "GenericReceiveOffload" boolValues)
     (assertValueOneOf "LargeReceiveOffload" boolValues)
-    (range "RxChannels" 1 4294967295)
-    (range "TxChannels" 1 4294967295)
-    (range "OtherChannels" 1 4294967295)
-    (range "CombinedChannels" 1 4294967295)
+    (assertRange "RxChannels" 1 4294967295)
+    (assertRange "TxChannels" 1 4294967295)
+    (assertRange "OtherChannels" 1 4294967295)
+    (assertRange "CombinedChannels" 1 4294967295)
   ];
 
   checkNetdev = checkUnitConfig "Netdev" [

From 4c6171c173ef5e50ecbbc1157c035147462ee721 Mon Sep 17 00:00:00 2001
From: Sarah Brofeldt <sbrofeldt@gmail.com>
Date: Tue, 21 Aug 2018 09:51:33 +0200
Subject: [PATCH 25/43] nixos/dhcpcd: Wait for devices to settle

---
 nixos/modules/services/networking/dhcpcd.nix | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix
index 019c8fd9ec48..efdbca5d52e8 100644
--- a/nixos/modules/services/networking/dhcpcd.nix
+++ b/nixos/modules/services/networking/dhcpcd.nix
@@ -161,8 +161,9 @@ in
       { description = "DHCP Client";
 
         wantedBy = [ "multi-user.target" ] ++ optional (!hasDefaultGatewaySet) "network-online.target";
-        wants = [ "network.target" ];
+        wants = [ "network.target" "systemd-udev-settle.service" ];
         before = [ "network.target" ];
+        after = [ "systemd-udev-settle.service" ];
 
         # Stopping dhcpcd during a reconfiguration is undesirable
         # because it brings down the network interfaces configured by

From 8bb5054494383f70cfd32326e03df7d01941c178 Mon Sep 17 00:00:00 2001
From: Tim Cuthbertson <tim@gfxmonk.net>
Date: Tue, 21 Aug 2018 16:01:28 +1000
Subject: [PATCH 26/43] docker-credential-gcr: remove platforms

---
 pkgs/tools/admin/docker-credential-gcr/default.nix | 1 -
 1 file changed, 1 deletion(-)

diff --git a/pkgs/tools/admin/docker-credential-gcr/default.nix b/pkgs/tools/admin/docker-credential-gcr/default.nix
index 52b68a7477cc..71bef3805441 100644
--- a/pkgs/tools/admin/docker-credential-gcr/default.nix
+++ b/pkgs/tools/admin/docker-credential-gcr/default.nix
@@ -23,6 +23,5 @@ buildGoPackage rec {
     homepage = https://github.com/GoogleCloudPlatform/docker-credential-gcr;
     license = licenses.asl20;
     maintainers = with maintainers; [ suvash ];
-    platforms = platforms.linux;
   };
 }

From 29573133569af11328ad9fd67c78f9a120605eca Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Tue, 21 Aug 2018 17:37:15 -0500
Subject: [PATCH 27/43] r2, r2-cutter: refactor and bump cutter to 1.7

---
 .../default.nix => radare2/cutter.nix}        | 19 +---
 .../tools/analysis/radare2/default.nix        | 90 +++----------------
 .../tools/analysis/radare2/generic.nix        | 75 ++++++++++++++++
 .../tools/analysis/radare2/r2-for-cutter.nix  | 16 ++++
 pkgs/top-level/all-packages.nix               | 10 ++-
 5 files changed, 116 insertions(+), 94 deletions(-)
 rename pkgs/development/tools/analysis/{radare2-cutter/default.nix => radare2/cutter.nix} (68%)
 create mode 100644 pkgs/development/tools/analysis/radare2/generic.nix
 create mode 100644 pkgs/development/tools/analysis/radare2/r2-for-cutter.nix

diff --git a/pkgs/development/tools/analysis/radare2-cutter/default.nix b/pkgs/development/tools/analysis/radare2/cutter.nix
similarity index 68%
rename from pkgs/development/tools/analysis/radare2-cutter/default.nix
rename to pkgs/development/tools/analysis/radare2/cutter.nix
index b427499ad99f..4269661a4ff3 100644
--- a/pkgs/development/tools/analysis/radare2-cutter/default.nix
+++ b/pkgs/development/tools/analysis/radare2/cutter.nix
@@ -4,22 +4,11 @@
 # Qt
 , qtbase, qtsvg, qtwebengine
 # buildInputs
-, radare2
+, r2-for-cutter
 , python3 }:
 
 let
-  r2 = radare2.overrideDerivation (o: {
-    name = "radare2-for-cutter-${version}";
-    src = fetchFromGitHub {
-      owner = "radare";
-      repo = "radare2";
-      # XXX: The revision used here should match what Cutter uses as submodule.
-      # For now it's the revision cutter-git uses for r2.
-      rev = "c9ec8b54b9ba32ba6712f319825f8d032e573e68";
-      sha256 = "04ri3wis8l1mbcp2gx419x7yfimljn7xa01izch71jy2h2mzk3z6";
-    };
-  });
-  version = "1.6";
+  version = "1.7";
 in
 stdenv.mkDerivation rec {
   name = "radare2-cutter-${version}";
@@ -28,7 +17,7 @@ stdenv.mkDerivation rec {
     owner = "radareorg";
     repo = "cutter";
     rev = "v${version}";
-    sha256 = "1ps52yf94yfnws3nn1iiwch2jy33dyvi7j47xkmh0m5fpdqi5xk7";
+    sha256 = "0z9wzxd5hw0ivakrg3xiv4zx1rjj032hlmizq0pxj22xjrj1gg9n";
   };
 
   postUnpack = "export sourceRoot=$sourceRoot/src";
@@ -43,7 +32,7 @@ stdenv.mkDerivation rec {
   '';
 
   nativeBuildInputs = [ qmake pkgconfig ];
-  buildInputs = [ qtbase qtsvg qtwebengine r2 python3 ];
+  buildInputs = [ qtbase qtsvg qtwebengine r2-for-cutter python3 ];
 
   qmakeFlags = [
     "CONFIG+=link_pkgconfig"
diff --git a/pkgs/development/tools/analysis/radare2/default.nix b/pkgs/development/tools/analysis/radare2/default.nix
index 43a05b5193d1..07a81516c986 100644
--- a/pkgs/development/tools/analysis/radare2/default.nix
+++ b/pkgs/development/tools/analysis/radare2/default.nix
@@ -1,82 +1,16 @@
-{stdenv, fetchFromGitHub
-, ninja, meson , pkgconfig
-, libusb, readline, libewf, perl, zlib, openssl
-, gtk2 ? null, vte ? null, gtkdialog ? null
-, python ? null
-, ruby ? null
-, lua ? null
-, useX11, rubyBindings, pythonBindings, luaBindings
-}:
+{ callPackage, ...} @ args:
 
-assert useX11 -> (gtk2 != null && vte != null && gtkdialog != null);
-assert rubyBindings -> ruby != null;
-assert pythonBindings -> python != null;
-
-
-let
-  inherit (stdenv.lib) optional;
+callPackage ./generic.nix (args // {
   #<generated>
   # DO NOT EDIT! Automatically generated by ./update.py
-  version_commit = "19004";
-  gittap = "2.8.0";
-  gittip = "a76b965410aba07b4ef8b96d90b25b271c2003dd";
-  version = "2.8.0";
-  sha256 = "1d9rkzc3vychy2h1bnywwx4why83rr18r0lvvl1cqx87ad5awcjk";
-  cs_tip = "782ea67e17a391ca0d3faafdc365b335a1a8930a";
-  cs_sha256 = "1maww4ir78a193pm3f8lr2kdkizi7rywn68ffa65ipyr7j4pl6i4";
+  src_info = {
+    version_commit = "19004";
+    gittap = "2.8.0";
+    gittip = "a76b965410aba07b4ef8b96d90b25b271c2003dd";
+    version = "2.8.0";
+    sha256 = "1d9rkzc3vychy2h1bnywwx4why83rr18r0lvvl1cqx87ad5awcjk";
+    cs_tip = "782ea67e17a391ca0d3faafdc365b335a1a8930a";
+    cs_sha256 = "1maww4ir78a193pm3f8lr2kdkizi7rywn68ffa65ipyr7j4pl6i4";
+  };
   #</generated>
-in
-stdenv.mkDerivation rec {
-  name = "radare2-${version}";
-
-  src = fetchFromGitHub {
-    owner = "radare";
-    repo = "radare2";
-    rev = version;
-    inherit sha256;
-  };
-
-  postPatch = let
-    capstone = fetchFromGitHub {
-      owner = "aquynh";
-      repo = "capstone";
-      # version from $sourceRoot/shlr/Makefile
-      rev = cs_tip;
-      sha256 = cs_sha256;
-    };
-  in ''
-    if ! grep -F "CS_TIP=${cs_tip}" shlr/Makefile; then echo "CS_TIP mismatch"; exit 1; fi
-    # When using meson, it expects capstone source relative to build directory
-    mkdir -p build/shlr
-    ln -s ${capstone} build/shlr/capstone
-  '';
-
-  postInstall = ''
-    ln -s $out/bin/radare2 $out/bin/r2
-    install -D -m755 $src/binr/r2pm/r2pm $out/bin/r2pm
-  '';
-
-  mesonFlags = [
-    "-Dr2_version_commit=${version_commit}"
-    "-Dr2_gittap=${gittap}"
-    "-Dr2_gittip=${gittip}"
-  ];
-
-  enableParallelBuilding = true;
-
-  nativeBuildInputs = [ pkgconfig ninja meson ];
-  buildInputs = [ readline libusb libewf perl zlib openssl]
-    ++ optional useX11 [gtkdialog vte gtk2]
-    ++ optional rubyBindings [ruby]
-    ++ optional pythonBindings [python]
-    ++ optional luaBindings [lua];
-
-  meta = {
-    description = "unix-like reverse engineering framework and commandline tools";
-    homepage = http://radare.org/;
-    license = stdenv.lib.licenses.gpl2Plus;
-    maintainers = with stdenv.lib.maintainers; [raskin makefu mic92];
-    platforms = with stdenv.lib.platforms; linux;
-    inherit version;
-  };
-}
+})
diff --git a/pkgs/development/tools/analysis/radare2/generic.nix b/pkgs/development/tools/analysis/radare2/generic.nix
new file mode 100644
index 000000000000..074cbdddbbfd
--- /dev/null
+++ b/pkgs/development/tools/analysis/radare2/generic.nix
@@ -0,0 +1,75 @@
+{stdenv, fetchFromGitHub
+, src_info, callPackage
+, ninja, meson , pkgconfig
+, libusb, readline, libewf, perl, zlib, openssl
+, gtk2 ? null, vte ? null, gtkdialog ? null
+, python ? null
+, ruby ? null
+, lua ? null
+, useX11, rubyBindings, pythonBindings, luaBindings
+}:
+
+assert useX11 -> (gtk2 != null && vte != null && gtkdialog != null);
+assert rubyBindings -> ruby != null;
+assert pythonBindings -> python != null;
+
+
+let
+  inherit (stdenv.lib) optional;
+in stdenv.mkDerivation (with src_info; rec {
+  name = "radare2-${version}";
+
+  src = fetchFromGitHub {
+    owner = "radare";
+    repo = "radare2";
+    rev = version;
+    inherit sha256;
+  };
+
+  postPatch = let
+    capstone = fetchFromGitHub {
+      owner = "aquynh";
+      repo = "capstone";
+      # version from $sourceRoot/shlr/Makefile
+      rev = cs_tip;
+      sha256 = cs_sha256;
+    };
+  in ''
+    if ! grep -F "CS_TIP=${cs_tip}" shlr/Makefile; then echo "CS_TIP mismatch"; exit 1; fi
+    # When using meson, it expects capstone source relative to build directory
+    mkdir -p build/shlr
+    ln -s ${capstone} build/shlr/capstone
+  '';
+
+  postInstall = ''
+    ln -s $out/bin/radare2 $out/bin/r2
+    install -D -m755 $src/binr/r2pm/r2pm $out/bin/r2pm
+  '';
+
+  mesonFlags = [
+    "-Dr2_version_commit=${version_commit}"
+    "-Dr2_gittap=${gittap}"
+    "-Dr2_gittip=${gittip}"
+    # 2.8.0 expects this, but later it becomes an option with default=false.
+    "-Dcapstone_in_builddir=true"
+  ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ pkgconfig ninja meson ];
+  buildInputs = [ readline libusb libewf perl zlib openssl]
+    ++ optional useX11 [gtkdialog vte gtk2]
+    ++ optional rubyBindings [ruby]
+    ++ optional pythonBindings [python]
+    ++ optional luaBindings [lua];
+
+  meta = {
+    description = "unix-like reverse engineering framework and commandline tools";
+    homepage = http://radare.org/;
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = with stdenv.lib.maintainers; [raskin makefu mic92];
+    platforms = with stdenv.lib.platforms; linux;
+    inherit version;
+  };
+})
+
diff --git a/pkgs/development/tools/analysis/radare2/r2-for-cutter.nix b/pkgs/development/tools/analysis/radare2/r2-for-cutter.nix
new file mode 100644
index 000000000000..e63d4442becd
--- /dev/null
+++ b/pkgs/development/tools/analysis/radare2/r2-for-cutter.nix
@@ -0,0 +1,16 @@
+{ callPackage, ...} @ args:
+
+callPackage ./generic.nix (args // {
+  #<generated>
+  # DO NOT EDIT! Automatically generated by ./update.py
+  src_info = {
+    version_commit = "19256";
+    gittap = "2.8.0-118-gb0547831f";
+    gittip = "b0547831f127b7357e3c93bc43933482a4d6213b";
+    version = "2.9.0-git";
+    sha256 = "1ix42kipd1aayb494ajbxawzc1cwikm9fxk343d1kchxx4a30a1m";
+    cs_tip = "782ea67e17a391ca0d3faafdc365b335a1a8930a";
+    cs_sha256 = "1maww4ir78a193pm3f8lr2kdkizi7rywn68ffa65ipyr7j4pl6i4";
+  };
+  #</generated>
+})
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 302ff26ed40f..f32d98a6d295 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8540,7 +8540,15 @@ with pkgs;
     rubyBindings = config.radare.rubyBindings or false;
     luaBindings = config.radare.luaBindings or false;
   };
-  radare2-cutter = libsForQt5.callPackage ../development/tools/analysis/radare2-cutter { };
+  r2-for-cutter = callPackage ../development/tools/analysis/radare2/r2-for-cutter.nix {
+    inherit (gnome2) vte;
+    lua = lua5;
+    useX11 = config.radare.useX11 or false;
+    pythonBindings = config.radare.pythonBindings or false;
+    rubyBindings = config.radare.rubyBindings or false;
+    luaBindings = config.radare.luaBindings or false;
+  };
+  radare2-cutter = libsForQt5.callPackage ../development/tools/analysis/radare2/cutter.nix { };
 
   ragel = ragelStable;
 

From 61c0adfbc11da6cbc20ec7482ac1b96ae7d1d2a5 Mon Sep 17 00:00:00 2001
From: Yurii Rashkovskii <yrashk@gmail.com>
Date: Wed, 8 Aug 2018 14:04:35 +0700
Subject: [PATCH 28/43] astroid: 0.11.1 -> 0.13

Couple of things were updated to make this work.

1. webkitgtk24x-gtk3 that is marked unsafe has been replaced with
   webkitgtk (2.20.*) as astroid has recently indicated that [>= 2.20
   is
   acceptable](https://github.com/astroidmail/astroid/commit/48ce7e3010d2ee99ccba18798b4f5333867bd1a2)
2. protobuf built input was added to satisfy requirements
3. astroid was not functional at all without proper icons so gnome3.defaultIconTheme
   were added to buildInputs
4. By default, astroid will use `gvim` as a setting for the embedded
   editor, however that didn't work well with nixpkgs. vim is now
   bundled with astroid by default. This setting can be overridden
   by the user in astroid's config file.
---
 .../mailreaders/astroid/default.nix           | 36 +++++++++++++++----
 .../mailreaders/astroid/run_tests.diff        | 10 ++++++
 2 files changed, 39 insertions(+), 7 deletions(-)
 create mode 100644 pkgs/applications/networking/mailreaders/astroid/run_tests.diff

diff --git a/pkgs/applications/networking/mailreaders/astroid/default.nix b/pkgs/applications/networking/mailreaders/astroid/default.nix
index 9a348fc03f7a..0cb07b8ce755 100644
--- a/pkgs/applications/networking/mailreaders/astroid/default.nix
+++ b/pkgs/applications/networking/mailreaders/astroid/default.nix
@@ -1,22 +1,44 @@
-{ stdenv, fetchFromGitHub, cmake, pkgconfig, gnome3, gmime3, webkitgtk24x-gtk3
-, libsass, notmuch, boost, wrapGAppsHook, glib-networking }:
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, gnome3, gmime3, webkitgtk
+, libsass, notmuch, boost, wrapGAppsHook, glib-networking, protobuf, vim_configurable
+, makeWrapper, python3, python3Packages
+, vim ? vim_configurable.override {
+                    features = "normal";
+                    gui = "auto";
+                  }
+}:
 
 stdenv.mkDerivation rec {
   name = "astroid-${version}";
-  version = "0.11.1";
+  version = "0.13";
 
   src = fetchFromGitHub {
     owner = "astroidmail";
     repo = "astroid";
     rev = "v${version}";
-    sha256 = "1z48rvlzwi7bq7j55rnb0gg1a4k486yj910z2cxz1p46lxk332j1";
+    sha256 = "105x5g44hng3fi03h67j3an53088148jbq8726nmcp0zs0cy9gac";
   };
 
   nativeBuildInputs = [ cmake pkgconfig wrapGAppsHook ];
 
-  buildInputs = [ gnome3.gtkmm gmime3 webkitgtk24x-gtk3 libsass gnome3.libpeas
-                  notmuch boost gnome3.gsettings-desktop-schemas
-                  glib-networking ];
+  buildInputs = [ gnome3.gtkmm gmime3 webkitgtk libsass gnome3.libpeas
+                  python3 python3Packages.pygobject3
+                  notmuch boost gnome3.gsettings-desktop-schemas gnome3.defaultIconTheme
+                  glib-networking protobuf ] ++ (if vim == null then [] else [ vim ]);
+
+  patches = [
+    # TODO: remove when https://github.com/astroidmail/astroid/pull/531
+    #       is released
+    ./run_tests.diff
+  ];
+
+  postPatch = ''
+    sed -i "s~gvim ~${vim}/bin/vim -g ~g" src/config.cc
+    sed -i "s~ -geom 10x10~~g" src/config.cc
+  '';
+
+  postInstall = ''
+    wrapProgram "$out/bin/astroid" --set CHARSET=en_us.UTF-8
+  '';
 
   meta = with stdenv.lib; {
     homepage = https://astroidmail.github.io/;
diff --git a/pkgs/applications/networking/mailreaders/astroid/run_tests.diff b/pkgs/applications/networking/mailreaders/astroid/run_tests.diff
new file mode 100644
index 000000000000..21b466741ce1
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/astroid/run_tests.diff
@@ -0,0 +1,10 @@
+diff --git a/tests/run_test.sh b/tests/run_test.sh
+index f2ea7d7..927c61d 100755
+--- a/tests/run_test.sh
++++ b/tests/run_test.sh
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#! /usr/bin/env bash
+ #
+ # Set up environment and run test specified on command line
+ 

From cdf90258e6bf911db2b56280301014a88c91be65 Mon Sep 17 00:00:00 2001
From: Vladyslav Mykhailichenko <dywedir@pm.me>
Date: Wed, 22 Aug 2018 11:38:01 +0300
Subject: [PATCH 29/43] rust-cbindgen: 0.6.1 -> 0.6.2

---
 pkgs/development/tools/rust/cbindgen/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/tools/rust/cbindgen/default.nix b/pkgs/development/tools/rust/cbindgen/default.nix
index 0dcc1287791d..c3040ec567c7 100644
--- a/pkgs/development/tools/rust/cbindgen/default.nix
+++ b/pkgs/development/tools/rust/cbindgen/default.nix
@@ -2,13 +2,13 @@
 
 rustPlatform.buildRustPackage rec {
   name = "rust-cbindgen-${version}";
-  version = "0.6.1";
+  version = "0.6.2";
 
   src = fetchFromGitHub {
     owner = "eqrion";
     repo = "cbindgen";
     rev = "v${version}";
-    sha256 = "03qzqy3indqghqy7rnli1zrrlnyfkygxjpb2s7041cik54kf2krw";
+    sha256 = "0hifmn9578cf1r5m4ajazg3rhld2ybd2v48xz04vfhappkarv4w2";
   };
 
   cargoSha256 = "0c3xpzff8jldqbn5a25yy6c2hlz5xy636ml6sj5d24wzcgwg5a2i";

From 9232c6dc36c241d6bc692b432e3fdb23eb1fd655 Mon Sep 17 00:00:00 2001
From: Uli Baum <xeji@cat3.de>
Date: Wed, 22 Aug 2018 12:17:15 +0200
Subject: [PATCH 30/43] chromedriver: update darwin hash for 2.41

---
 pkgs/development/tools/selenium/chromedriver/default.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix
index eb91026c8361..238c3bc704d0 100644
--- a/pkgs/development/tools/selenium/chromedriver/default.nix
+++ b/pkgs/development/tools/selenium/chromedriver/default.nix
@@ -11,7 +11,7 @@ let
 
     "x86_64-darwin" = {
       system = "mac64";
-      sha256 = "11hs4mmlvxjaanq41h0dljj4sff0lfwk31svvdmzfg91idlikpsz";
+      sha256 = "1blp4ig5fm6ar8mxm78dc2gvv7n82mq3kqswbyjrcizl91qs4cpx";
     };
   };
 

From 9f48572af8f78652732049ce1b3f19c7fa5bb5c5 Mon Sep 17 00:00:00 2001
From: "R. RyanTM" <ryantm-bot@ryantm.com>
Date: Wed, 22 Aug 2018 03:22:06 -0700
Subject: [PATCH 31/43] lilv: 0.24.2 -> 0.24.4 (#44743)

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/lilv/versions.
---
 pkgs/development/libraries/audio/lilv/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/audio/lilv/default.nix b/pkgs/development/libraries/audio/lilv/default.nix
index 710c5b1a92cb..f28e374c852a 100644
--- a/pkgs/development/libraries/audio/lilv/default.nix
+++ b/pkgs/development/libraries/audio/lilv/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "lilv-${version}";
-  version = "0.24.2";
+  version = "0.24.4";
 
   src = fetchurl {
     url = "https://download.drobilla.net/${name}.tar.bz2";
-    sha256 = "08m5a372pr1l7aii9s3pic5nm68gynx1n1bc7bnlswziq6qnbv7p";
+    sha256 = "0f24cd7wkk5l969857g2ydz2kjjrkvvddg1g87xzzs78lsvq8fy3";
   };
 
   nativeBuildInputs = [ pkgconfig ];

From 9cc57c1d61c242a0a681db8345b2696d7a2872b7 Mon Sep 17 00:00:00 2001
From: "R. RyanTM" <ryantm-bot@ryantm.com>
Date: Wed, 22 Aug 2018 03:28:36 -0700
Subject: [PATCH 32/43] fwup: 1.2.3 -> 1.2.5 (#45239)

Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/fwup/versions.
---
 pkgs/tools/misc/fwup/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/tools/misc/fwup/default.nix b/pkgs/tools/misc/fwup/default.nix
index be86f6496f00..97eedd9be25e 100644
--- a/pkgs/tools/misc/fwup/default.nix
+++ b/pkgs/tools/misc/fwup/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   name = "fwup-${version}";
-  version = "1.2.3";
+  version = "1.2.5";
 
   src = fetchFromGitHub {
     owner = "fhunleth";
     repo = "fwup";
     rev = "v${version}";
-    sha256 = "16v5s9xwdsii7pcphrb0a7aib2zprrw6n4fyc8w8c11gbkg27r4d";
+    sha256 = "0kraip4lr3fvcxvvq1dwjw7fyzs6bcjg14xn0g52985krxxn5pdc";
   };
 
   doCheck = true;

From 96bf79c2a13c1c564c66011d038af81b911ae932 Mon Sep 17 00:00:00 2001
From: Mario Rodas <marsam@users.noreply.github.com>
Date: Wed, 22 Aug 2018 05:32:24 -0500
Subject: [PATCH 33/43] 1password: 0.5.1 -> 0.5.3 (#45452)

---
 pkgs/applications/misc/1password/default.nix | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pkgs/applications/misc/1password/default.nix b/pkgs/applications/misc/1password/default.nix
index a44ce2d8b4c2..94dfc68fb59b 100644
--- a/pkgs/applications/misc/1password/default.nix
+++ b/pkgs/applications/misc/1password/default.nix
@@ -2,24 +2,24 @@
 
 stdenv.mkDerivation rec {
   name = "1password-${version}";
-  version = "0.5.1";
+  version = "0.5.3";
   src =
     if stdenv.system == "i686-linux" then
       fetchzip {
         url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_386_v${version}.zip";
-        sha256 = "08kzjilxpkvlwqjyxnic1n6xiy6gkndijwxdksm59k7c56mdawsz";
+        sha256 = "05s223h1yps4k9kmignl0r5sbh6w7m1hnlmafnf1kiwv7gacvxjc";
         stripRoot = false;
       }
     else if stdenv.system == "x86_64-linux" then
       fetchzip {
         url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_amd64_v${version}.zip";
-        sha256 = "1bsbzaqws0z991r6rkjrxay74fj4g5ld4d748ygr0950zwi1m3h7";
+        sha256 = "0p9x1fx0309v8dxxaf88m8x8q15zzqywfmjn6v5wb9v3scp9396v";
         stripRoot = false;
       }
     else if stdenv.system == "x86_64-darwin" then
       fetchzip {
         url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_darwin_amd64_v${version}.zip";
-        sha256 = "1dhr8m9icip27v802gxl1vhl9rf0jq5awirdm72lqmlypj86df0g";
+        sha256 = "1z2xp9bn93gr4ha6zx65va1fb58a2xlnnmpv583y96gq3vbnqdcj";
         stripRoot = false;
       }
     else throw "Architecture not supported";

From dc8cae21a822f198a7442f59c0f60b0c383b01ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Wed, 22 Aug 2018 11:45:34 +0100
Subject: [PATCH 34/43] radare2: rework update script to include cutter's
 radare2 version

---
 .../tools/analysis/radare2/default.nix        | 103 ++++++++++++++-
 .../tools/analysis/radare2/generic.nix        |  75 -----------
 .../tools/analysis/radare2/r2-for-cutter.nix  |  16 ---
 .../tools/analysis/radare2/update.py          | 123 +++++++++++++-----
 pkgs/top-level/all-packages.nix               |  14 +-
 5 files changed, 193 insertions(+), 138 deletions(-)
 delete mode 100644 pkgs/development/tools/analysis/radare2/generic.nix
 delete mode 100644 pkgs/development/tools/analysis/radare2/r2-for-cutter.nix

diff --git a/pkgs/development/tools/analysis/radare2/default.nix b/pkgs/development/tools/analysis/radare2/default.nix
index 07a81516c986..85559269f279 100644
--- a/pkgs/development/tools/analysis/radare2/default.nix
+++ b/pkgs/development/tools/analysis/radare2/default.nix
@@ -1,16 +1,109 @@
-{ callPackage, ...} @ args:
+{stdenv, fetchFromGitHub
+, callPackage
+, ninja, meson , pkgconfig
+, libusb, readline, libewf, perl, zlib, openssl
+, gtk2 ? null, vte ? null, gtkdialog ? null
+, python ? null
+, ruby ? null
+, lua ? null
+, useX11, rubyBindings, pythonBindings, luaBindings
+}:
 
-callPackage ./generic.nix (args // {
+assert useX11 -> (gtk2 != null && vte != null && gtkdialog != null);
+assert rubyBindings -> ruby != null;
+assert pythonBindings -> python != null;
+
+
+let
+  inherit (stdenv.lib) optional;
+
+  generic = {
+    version_commit,
+    gittap,
+    gittip,
+    rev,
+    version,
+    sha256,
+    cs_tip,
+    cs_sha256
+  }:
+    stdenv.mkDerivation rec {
+      name = "radare2-${version}";
+
+      src = fetchFromGitHub {
+        owner = "radare";
+        repo = "radare2";
+        inherit rev sha256;
+      };
+
+      postPatch = let
+        capstone = fetchFromGitHub {
+          owner = "aquynh";
+          repo = "capstone";
+          # version from $sourceRoot/shlr/Makefile
+          rev = cs_tip;
+          sha256 = cs_sha256;
+        };
+      in ''
+        if ! grep -F "CS_TIP=${cs_tip}" shlr/Makefile; then echo "CS_TIP mismatch"; exit 1; fi
+        # When using meson, it expects capstone source relative to build directory
+        mkdir -p build/shlr
+        ln -s ${capstone} build/shlr/capstone
+      '';
+
+      postInstall = ''
+        ln -s $out/bin/radare2 $out/bin/r2
+        install -D -m755 $src/binr/r2pm/r2pm $out/bin/r2pm
+      '';
+
+      mesonFlags = [
+        "-Dr2_version_commit=${version_commit}"
+        "-Dr2_gittap=${gittap}"
+        "-Dr2_gittip=${gittip}"
+        # 2.8.0 expects this, but later it becomes an option with default=false.
+        "-Dcapstone_in_builddir=true"
+      ];
+
+      enableParallelBuilding = true;
+
+      nativeBuildInputs = [ pkgconfig ninja meson ];
+      buildInputs = [ readline libusb libewf perl zlib openssl]
+        ++ optional useX11 [gtkdialog vte gtk2]
+        ++ optional rubyBindings [ruby]
+        ++ optional pythonBindings [python]
+        ++ optional luaBindings [lua];
+
+      meta = {
+        description = "unix-like reverse engineering framework and commandline tools";
+        homepage = http://radare.org/;
+        license = stdenv.lib.licenses.gpl2Plus;
+        maintainers = with stdenv.lib.maintainers; [raskin makefu mic92];
+        platforms = with stdenv.lib.platforms; linux;
+        inherit version;
+      };
+  };
+in {
   #<generated>
   # DO NOT EDIT! Automatically generated by ./update.py
-  src_info = {
-    version_commit = "19004";
+  radare2 = generic {
+    version_commit = "19251";
     gittap = "2.8.0";
     gittip = "a76b965410aba07b4ef8b96d90b25b271c2003dd";
+    rev = "2.8.0";
     version = "2.8.0";
     sha256 = "1d9rkzc3vychy2h1bnywwx4why83rr18r0lvvl1cqx87ad5awcjk";
     cs_tip = "782ea67e17a391ca0d3faafdc365b335a1a8930a";
     cs_sha256 = "1maww4ir78a193pm3f8lr2kdkizi7rywn68ffa65ipyr7j4pl6i4";
   };
+  r2-for-cutter = generic {
+    version_commit = "19251";
+    gittap = "2.8.0-118-gb0547831f";
+    gittip = "b0547831f127b7357e3c93bc43933482a4d6213b";
+    rev = "b0547831f127b7357e3c93bc43933482a4d6213b";
+    version = "2018-08-07";
+    sha256 = "1ix42kipd1aayb494ajbxawzc1cwikm9fxk343d1kchxx4a30a1m";
+    cs_tip = "782ea67e17a391ca0d3faafdc365b335a1a8930a";
+    cs_sha256 = "1maww4ir78a193pm3f8lr2kdkizi7rywn68ffa65ipyr7j4pl6i4";
+  };
   #</generated>
-})
+}
diff --git a/pkgs/development/tools/analysis/radare2/generic.nix b/pkgs/development/tools/analysis/radare2/generic.nix
deleted file mode 100644
index 074cbdddbbfd..000000000000
--- a/pkgs/development/tools/analysis/radare2/generic.nix
+++ /dev/null
@@ -1,75 +0,0 @@
-{stdenv, fetchFromGitHub
-, src_info, callPackage
-, ninja, meson , pkgconfig
-, libusb, readline, libewf, perl, zlib, openssl
-, gtk2 ? null, vte ? null, gtkdialog ? null
-, python ? null
-, ruby ? null
-, lua ? null
-, useX11, rubyBindings, pythonBindings, luaBindings
-}:
-
-assert useX11 -> (gtk2 != null && vte != null && gtkdialog != null);
-assert rubyBindings -> ruby != null;
-assert pythonBindings -> python != null;
-
-
-let
-  inherit (stdenv.lib) optional;
-in stdenv.mkDerivation (with src_info; rec {
-  name = "radare2-${version}";
-
-  src = fetchFromGitHub {
-    owner = "radare";
-    repo = "radare2";
-    rev = version;
-    inherit sha256;
-  };
-
-  postPatch = let
-    capstone = fetchFromGitHub {
-      owner = "aquynh";
-      repo = "capstone";
-      # version from $sourceRoot/shlr/Makefile
-      rev = cs_tip;
-      sha256 = cs_sha256;
-    };
-  in ''
-    if ! grep -F "CS_TIP=${cs_tip}" shlr/Makefile; then echo "CS_TIP mismatch"; exit 1; fi
-    # When using meson, it expects capstone source relative to build directory
-    mkdir -p build/shlr
-    ln -s ${capstone} build/shlr/capstone
-  '';
-
-  postInstall = ''
-    ln -s $out/bin/radare2 $out/bin/r2
-    install -D -m755 $src/binr/r2pm/r2pm $out/bin/r2pm
-  '';
-
-  mesonFlags = [
-    "-Dr2_version_commit=${version_commit}"
-    "-Dr2_gittap=${gittap}"
-    "-Dr2_gittip=${gittip}"
-    # 2.8.0 expects this, but later it becomes an option with default=false.
-    "-Dcapstone_in_builddir=true"
-  ];
-
-  enableParallelBuilding = true;
-
-  nativeBuildInputs = [ pkgconfig ninja meson ];
-  buildInputs = [ readline libusb libewf perl zlib openssl]
-    ++ optional useX11 [gtkdialog vte gtk2]
-    ++ optional rubyBindings [ruby]
-    ++ optional pythonBindings [python]
-    ++ optional luaBindings [lua];
-
-  meta = {
-    description = "unix-like reverse engineering framework and commandline tools";
-    homepage = http://radare.org/;
-    license = stdenv.lib.licenses.gpl2Plus;
-    maintainers = with stdenv.lib.maintainers; [raskin makefu mic92];
-    platforms = with stdenv.lib.platforms; linux;
-    inherit version;
-  };
-})
-
diff --git a/pkgs/development/tools/analysis/radare2/r2-for-cutter.nix b/pkgs/development/tools/analysis/radare2/r2-for-cutter.nix
deleted file mode 100644
index e63d4442becd..000000000000
--- a/pkgs/development/tools/analysis/radare2/r2-for-cutter.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ callPackage, ...} @ args:
-
-callPackage ./generic.nix (args // {
-  #<generated>
-  # DO NOT EDIT! Automatically generated by ./update.py
-  src_info = {
-    version_commit = "19256";
-    gittap = "2.8.0-118-gb0547831f";
-    gittip = "b0547831f127b7357e3c93bc43933482a4d6213b";
-    version = "2.9.0-git";
-    sha256 = "1ix42kipd1aayb494ajbxawzc1cwikm9fxk343d1kchxx4a30a1m";
-    cs_tip = "782ea67e17a391ca0d3faafdc365b335a1a8930a";
-    cs_sha256 = "1maww4ir78a193pm3f8lr2kdkizi7rywn68ffa65ipyr7j4pl6i4";
-  };
-  #</generated>
-})
diff --git a/pkgs/development/tools/analysis/radare2/update.py b/pkgs/development/tools/analysis/radare2/update.py
index 1f16a00905c1..ac1eb63401b9 100755
--- a/pkgs/development/tools/analysis/radare2/update.py
+++ b/pkgs/development/tools/analysis/radare2/update.py
@@ -3,13 +3,15 @@
 # USAGE - just run the script: ./update.py
 # When editing this file, make also sure it passes the mypy typecheck
 # and is formatted with yapf.
-import urllib.request
-import json
-import tempfile
-import subprocess
 import fileinput
+import json
 import re
+import subprocess
+import tempfile
+import urllib.request
+from datetime import datetime
 from pathlib import Path
+from typing import Dict
 
 
 def sh(*args: str) -> str:
@@ -18,50 +20,107 @@ def sh(*args: str) -> str:
 
 
 def prefetch_github(owner: str, repo: str, ref: str) -> str:
-    return sh("nix-prefetch-url", "--unpack",
-              f"https://github.com/{owner}/{repo}/archive/{ref}.tar.gz")
+    return sh(
+        "nix-prefetch-url",
+        "--unpack",
+        f"https://github.com/{owner}/{repo}/archive/{ref}.tar.gz",
+    )
 
 
-def main() -> None:
+def get_radare2_rev() -> str:
     url = "https://api.github.com/repos/radare/radare2/releases/latest"
     with urllib.request.urlopen(url) as response:
         release = json.load(response)  # type: ignore
-    version = release["tag_name"]
+    return release["tag_name"]
+
+
+def get_r2_cutter_rev() -> str:
+    url = "https://api.github.com/repos/radareorg/cutter/contents/"
+    with urllib.request.urlopen(url) as response:
+        data = json.load(response)  # type: ignore
+    for entry in data:
+        if entry["name"] == "radare2":
+            return entry["sha"]
+    raise Exception("no radare2 submodule found in github.com/radareorg/cutter")
+
+
+def git(dirname: str, *args: str) -> str:
+    return sh("git", "-C", dirname, *args)
+
+
+def get_repo_info(dirname: str, rev: str) -> Dict[str, str]:
+    sha256 = prefetch_github("radare", "radare2", rev)
+
+    cs_tip = None
+    with open(Path(dirname).joinpath("shlr", "Makefile")) as makefile:
+        for l in makefile:
+            match = re.match("CS_TIP=(\S+)", l)
+            if match:
+                cs_tip = match.group(1)
+    assert cs_tip is not None
+
+    cs_sha256 = prefetch_github("aquynh", "capstone", cs_tip)
+
+    return dict(
+        rev=rev,
+        sha256=sha256,
+        version_commit=git(dirname, "rev-list", "--all", "--count"),
+        gittap=git(dirname, "describe", "--tags", "--match", "[0-9]*"),
+        gittip=git(dirname, "rev-parse", "HEAD"),
+        cs_tip=cs_tip,
+        cs_sha256=cs_sha256,
+    )
+
+
+def write_package_expr(version: str, info: Dict[str, str]) -> str:
+    return f"""generic {{
+    version_commit = "{info["version_commit"]}";
+    gittap = "{info["gittap"]}";
+    gittip = "{info["gittip"]}";
+    rev = "{info["rev"]}";
+    version = "{version}";
+    sha256 = "{info["sha256"]}";
+    cs_tip = "{info["cs_tip"]}";
+    cs_sha256 = "{info["cs_sha256"]}";
+  }}"""
+
+
+def main() -> None:
+    radare2_rev = get_radare2_rev()
+    r2_cutter_rev = get_r2_cutter_rev()
+
     with tempfile.TemporaryDirectory() as dirname:
-
-        def git(*args: str) -> str:
-            return sh("git", "-C", dirname, *args)
-
-        git("clone", "--branch", version, "https://github.com/radare/radare2",
-            ".")
-        sha256 = prefetch_github("radare", "radare2", version)
+        git(
+            dirname,
+            "clone",
+            "--branch",
+            radare2_rev,
+            "https://github.com/radare/radare2",
+            ".",
+        )
         nix_file = str(Path(__file__).parent.joinpath("default.nix"))
 
-        cs_tip = None
-        with open(Path(dirname).joinpath("shlr", "Makefile")) as makefile:
-            for l in makefile:
-                match = re.match("CS_TIP=(\S+)", l)
-                if match:
-                    cs_tip = match.group(1)
-        assert cs_tip is not None
+        radare2_info = get_repo_info(dirname, radare2_rev)
 
-        cs_sha256 = prefetch_github("aquynh", "capstone", cs_tip)
+        git(dirname, "checkout", r2_cutter_rev)
+
+        timestamp = git(dirname, "log", "-n1", "--format=%at")
+        r2_cutter_version = datetime.fromtimestamp(int(timestamp)).strftime("%Y-%m-%d")
+
+        r2_cutter_info = get_repo_info(dirname, r2_cutter_rev)
 
         in_block = False
         with fileinput.FileInput(nix_file, inplace=True) as f:
             for l in f:
                 if "#<generated>" in l:
                     in_block = True
-                    print(f"""  #<generated>
+                    print(
+                        f"""  #<generated>
   # DO NOT EDIT! Automatically generated by ./update.py
-  version_commit = "{git("rev-list", "--all", "--count")}";
-  gittap = "{git("describe", "--tags", "--match", "[0-9]*")}";
-  gittip = "{git("rev-parse", "HEAD")}";
-  version = "{version}";
-  sha256 = "{sha256}";
-  cs_tip = "{cs_tip}";
-  cs_sha256 = "{cs_sha256}";
-  #</generated>""")
+  radare2 = {write_package_expr(radare2_rev, radare2_info)};
+  r2-for-cutter = {write_package_expr(r2_cutter_version, r2_cutter_info)};
+  #</generated>"""
+                    )
                 elif "#</generated>" in l:
                     in_block = False
                 elif not in_block:
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f32d98a6d295..b3e1d455d4f2 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8532,22 +8532,16 @@ with pkgs;
     rubyBindings = config.radare.rubyBindings or false;
     luaBindings = config.radare.luaBindings or false;
   };
-  radare2 = callPackage ../development/tools/analysis/radare2 {
+
+  inherit (callPackages ../development/tools/analysis/radare2 {
     inherit (gnome2) vte;
     lua = lua5;
     useX11 = config.radare.useX11 or false;
     pythonBindings = config.radare.pythonBindings or false;
     rubyBindings = config.radare.rubyBindings or false;
     luaBindings = config.radare.luaBindings or false;
-  };
-  r2-for-cutter = callPackage ../development/tools/analysis/radare2/r2-for-cutter.nix {
-    inherit (gnome2) vte;
-    lua = lua5;
-    useX11 = config.radare.useX11 or false;
-    pythonBindings = config.radare.pythonBindings or false;
-    rubyBindings = config.radare.rubyBindings or false;
-    luaBindings = config.radare.luaBindings or false;
-  };
+  }) radare2 r2-for-cutter;
+
   radare2-cutter = libsForQt5.callPackage ../development/tools/analysis/radare2/cutter.nix { };
 
   ragel = ragelStable;

From 36d8beb426a1f4113c5e94b42012a1b284236a26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Wed, 22 Aug 2018 11:48:13 +0100
Subject: [PATCH 35/43] radare2: update.py should be formatted with black now

---
 pkgs/development/tools/analysis/radare2/update.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/development/tools/analysis/radare2/update.py b/pkgs/development/tools/analysis/radare2/update.py
index ac1eb63401b9..fae6a52a3920 100755
--- a/pkgs/development/tools/analysis/radare2/update.py
+++ b/pkgs/development/tools/analysis/radare2/update.py
@@ -2,7 +2,7 @@
 #!nix-shell -p nix -p python3 -p git -i python
 # USAGE - just run the script: ./update.py
 # When editing this file, make also sure it passes the mypy typecheck
-# and is formatted with yapf.
+# and is formatted with black.
 import fileinput
 import json
 import re

From 42545f528800fe0ecc3402dafff5f0ceeaaa0a7d Mon Sep 17 00:00:00 2001
From: "R. RyanTM" <ryantm-bot@ryantm.com>
Date: Wed, 22 Aug 2018 03:54:36 -0700
Subject: [PATCH 36/43] libblockdev: 2.18 -> 2.19 (#45193)

Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/libblockdev/versions.
---
 pkgs/development/libraries/libblockdev/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/libraries/libblockdev/default.nix b/pkgs/development/libraries/libblockdev/default.nix
index b5402984d16f..585f6f18bbab 100644
--- a/pkgs/development/libraries/libblockdev/default.nix
+++ b/pkgs/development/libraries/libblockdev/default.nix
@@ -4,7 +4,7 @@
 }:
 
 let
-  version = "2.18";
+  version = "2.19";
 in stdenv.mkDerivation rec {
   name = "libblockdev-${version}";
 
@@ -12,7 +12,7 @@ in stdenv.mkDerivation rec {
     owner = "storaged-project";
     repo = "libblockdev";
     rev = "${version}-1";
-    sha256 = "03gbmji401nz1sff2zp61dhal80qls4blqwadj2p4ckbxdlmid4i";
+    sha256 = "1ny31vaarzbpw0h863p2r5cvjsfs77d33nnisf8bhjc6ps6js3ys";
   };
 
   outputs = [ "out" "dev" "devdoc" ];

From c26c7f931aae7a2bb43dc3709bac021139c9e930 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <edolstra@gmail.com>
Date: Wed, 22 Aug 2018 12:50:25 +0200
Subject: [PATCH 37/43] nixUnstable: 2.1pre6338_45bcf541 -> 2.1pre6377_954d1f4d

---
 pkgs/tools/package-management/nix/default.nix | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix
index 56bfdb046a8c..662e640ef229 100644
--- a/pkgs/tools/package-management/nix/default.nix
+++ b/pkgs/tools/package-management/nix/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, fetchFromGitHub, perl, curl, bzip2, sqlite, openssl ? null, xz
+{ lib, stdenv, fetchurl, fetchFromGitHub, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz
 , pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli, boost
 , autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns
 , busybox-sandbox-shell
@@ -33,10 +33,15 @@ let
       ++ lib.optionals is20 [ brotli ] # Since 1.12
       ++ lib.optional withLibseccomp libseccomp
       ++ lib.optional ((stdenv.isLinux || stdenv.isDarwin) && is20)
-          (aws-sdk-cpp.override {
+          ((aws-sdk-cpp.override {
             apis = ["s3" "transfer"];
             customMemoryManagement = false;
-          })
+          }).overrideDerivation (args: {
+            patches = args.patches or [] ++ [(fetchpatch {
+              url = https://github.com/edolstra/aws-sdk-cpp/commit/7d58e303159b2fb343af9a1ec4512238efa147c7.patch;
+              sha256 = "103phn6kyvs1yc7fibyin3lgxz699qakhw671kl207484im55id1";
+            })];
+          }))
       ++ lib.optional fromGit boost;
 
     propagatedBuildInputs = [ boehmgc ];
@@ -144,12 +149,12 @@ in rec {
 
   nixUnstable = (lib.lowPrio (common rec {
     name = "nix-2.1${suffix}";
-    suffix = "pre6338_45bcf541";
+    suffix = "pre6377_954d1f4d";
     src = fetchFromGitHub {
       owner = "NixOS";
       repo = "nix";
-      rev = "45bcf5416a0ce53361fd37c6b27ba4ef6a34ce96";
-      sha256 = "0ps45n78wnczz99dd9fs54ydxwh2cjq73zbvmak0y49nhc3p0vvv";
+      rev = "954d1f4d0a35063ff431b258beebadf753cb9efe";
+      sha256 = "0wnljxljvcwmniydgxlsjqmbgghmljs75m6083y2nkjql7dnrm7g";
     };
     fromGit = true;
   })) // { perl-bindings = perl-bindings {

From 4c6aa54f862f749626d0472a626924e932a6f080 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <edolstra@gmail.com>
Date: Wed, 22 Aug 2018 13:21:05 +0200
Subject: [PATCH 38/43] nixUnstable: Include a copy of libboost_context

This shaves 47 MiB off the closure size. (libboost_context.so is only
19 KiB.)
---
 pkgs/tools/package-management/nix/default.nix | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix
index 662e640ef229..c06a4f41afb1 100644
--- a/pkgs/tools/package-management/nix/default.nix
+++ b/pkgs/tools/package-management/nix/default.nix
@@ -49,6 +49,15 @@ let
     # Seems to be required when using std::atomic with 64-bit types
     NIX_LDFLAGS = lib.optionalString (stdenv.hostPlatform.system == "armv6l-linux") "-latomic";
 
+    preConfigure =
+      # Copy libboost_context so we don't get all of Boost in our closure.
+      # https://github.com/NixOS/nixpkgs/issues/45462
+      lib.optionalString fromGit
+      ''
+        mkdir -p $out/lib
+        cp ${boost}/lib/libboost_context* $out/lib
+      '';
+
     configureFlags =
       [ "--with-store-dir=${storeDir}"
         "--localstatedir=${stateDir}"

From 40ec3ffc3ef16c781c52b146c1ea7f20c65a462e Mon Sep 17 00:00:00 2001
From: Tim Steinbach <tim@nequissimus.com>
Date: Wed, 22 Aug 2018 07:54:58 -0400
Subject: [PATCH 39/43] linux: 4.4.150 -> 4.4.151

---
 pkgs/os-specific/linux/kernel/linux-4.4.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix
index 4b2f3bf6c380..31f489c4faff 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix
@@ -1,11 +1,11 @@
 { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.4.150";
+  version = "4.4.151";
   extraMeta.branch = "4.4";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1xdfq11pa4ayi89vynbddq5k47f01szc04lbl5aaxpnch982jj8g";
+    sha256 = "1s49h2my2jysh1i38vygqlcj9bz8fzg6vsv9k3ln3pi6hqqqrsjz";
   };
 } // (args.argsOverride or {}))

From 0451339392c3a91fad9caf6bf691c6af6bad83ab Mon Sep 17 00:00:00 2001
From: Tim Steinbach <tim@nequissimus.com>
Date: Wed, 22 Aug 2018 07:55:07 -0400
Subject: [PATCH 40/43] linux: 4.9.122 -> 4.9.123

---
 pkgs/os-specific/linux/kernel/linux-4.9.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix
index a8e059e99509..9b9072d302e1 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.9.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix
@@ -1,11 +1,11 @@
 { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.9.122";
+  version = "4.9.123";
   extraMeta.branch = "4.9";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "0v7qdkdlgpv83v4lzm59jgaxy1l7dzkqjr3fcahqrnrcdf3r0vx4";
+    sha256 = "0wahbq08cixh63099n13wal3xkw48gnka6w8biax1gwckymww4ld";
   };
 } // (args.argsOverride or {}))

From 368a050f731452493f8c3434e9484c6be40d674f Mon Sep 17 00:00:00 2001
From: Tim Steinbach <tim@nequissimus.com>
Date: Wed, 22 Aug 2018 07:55:19 -0400
Subject: [PATCH 41/43] linux: 4.14.65 -> 4.14.66

---
 pkgs/os-specific/linux/kernel/linux-4.14.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix
index f32af5169534..de983418b7be 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.65";
+  version = "4.14.66";
 
   # 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 = "1v55nmg1x9ygisgf0pjd3lygvjin3i6ld24anl6nggmrdd00r60j";
+    sha256 = "04q48syzmz84s045bqwyzrr37wcria8waggb5fki2kc69k563053";
   };
 } // (args.argsOverride or {}))

From 26fb5f2d7b940b23bbf9e4669683d62e6b58e546 Mon Sep 17 00:00:00 2001
From: Tim Steinbach <tim@nequissimus.com>
Date: Wed, 22 Aug 2018 07:55:30 -0400
Subject: [PATCH 42/43] linux: 4.17.17 -> 4.17.18

---
 pkgs/os-specific/linux/kernel/linux-4.17.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-4.17.nix b/pkgs/os-specific/linux/kernel/linux-4.17.nix
index ffce27178b6c..126c3284d05f 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.17.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.17.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "4.17.17";
+  version = "4.17.18";
 
   # 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 = "1g525zi7x3j7niqasrm8jwalf391p6pwa17zmr0iibal6xf3di1x";
+    sha256 = "03wvnw4xl48na08c29qq57a39kgvb67ayxfqqv4n06vpf8vmx2sd";
   };
 } // (args.argsOverride or {}))

From 899e19ad045db36cf5b89518490e5299f619a0d5 Mon Sep 17 00:00:00 2001
From: Tim Steinbach <tim@nequissimus.com>
Date: Wed, 22 Aug 2018 07:55:41 -0400
Subject: [PATCH 43/43] linux: 4.18.3 -> 4.18.4

---
 pkgs/os-specific/linux/kernel/linux-4.18.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/linux-4.18.nix b/pkgs/os-specific/linux/kernel/linux-4.18.nix
index b69d994f3b57..768a4c96542d 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.18.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.18.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "4.18.3";
+  version = "4.18.4";
 
   # 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 = "1m23hjd02bg8mqnd8dc4z4m3kxds1cyrc6j5saiwnhzbz373rvc1";
+    sha256 = "0hm8id6nv3j2g7l1fzkl4vr9wfx43s8hdspg1yc4fz6vbdxwinqj";
   };
 } // (args.argsOverride or {}))