about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/alsa-lib/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/alsa-topology-conf/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/alsa-ucm-conf/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/alsa-utils/default.nix13
-rw-r--r--nixpkgs/pkgs/os-specific/linux/apparmor/default.nix17
-rw-r--r--nixpkgs/pkgs/os-specific/linux/batman-adv/version.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/bcc/default.nix13
-rw-r--r--nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/btfs/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/busybox/0001-Fix-build-with-glibc-2.31.patch71
-rw-r--r--nixpkgs/pkgs/os-specific/linux/busybox/0001-wget-implement-TLS-verification-with-ENABLE_FEATURE_.patch94
-rw-r--r--nixpkgs/pkgs/os-specific/linux/busybox/default.nix35
-rw-r--r--nixpkgs/pkgs/os-specific/linux/can-isotp/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/checksec/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/conky/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/conspy/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cpuid/default.nix50
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cramfsprogs/default.nix32
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cramfsprogs/include-sysmacros.patch12
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cramfsswap/builder.sh6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cramfsswap/default.nix15
-rw-r--r--nixpkgs/pkgs/os-specific/linux/crda/default.nix9
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cryptodev/default.nix15
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix20
-rw-r--r--nixpkgs/pkgs/os-specific/linux/deepin-anything/default.nix22
-rw-r--r--nixpkgs/pkgs/os-specific/linux/device-tree/default.nix27
-rw-r--r--nixpkgs/pkgs/os-specific/linux/device-tree/raspberrypi.nix3
-rw-r--r--nixpkgs/pkgs/os-specific/linux/displaylink/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/dmidecode/default.nix46
-rw-r--r--nixpkgs/pkgs/os-specific/linux/dpdk/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/e1000e/default.nix7
-rw-r--r--nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ell/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/evdi/default.nix9
-rw-r--r--nixpkgs/pkgs/os-specific/linux/eventstat/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/exfat/default.nix13
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ffado/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firejail/default.nix17
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/firmware-manager/default.nix38
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix141
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/system76-firmware/default.nix39
-rw-r--r--nixpkgs/pkgs/os-specific/linux/fnotifystat/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/forkstat/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/fscrypt/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/fswebcam/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/fuse/common.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/fuse/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/fwts/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/gobi_loader/default.nix28
-rw-r--r--nixpkgs/pkgs/os-specific/linux/guvcview/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/hwdata/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ifmetric/default.nix36
-rw-r--r--nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/default.nix11
-rw-r--r--nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/etc-dir.patch15
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iproute/default.nix7
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iproute/mptcp.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iptables/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iptstate/default.nix1
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iputils/default.nix27
-rw-r--r--nixpkgs/pkgs/os-specific/linux/irqbalance/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iw/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iwd/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/jool/source.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/gpio-utils.nix5
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix41
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.6.nix41
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix15
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix23
-rwxr-xr-xnixpkgs/pkgs/os-specific/linux/kernel/update-rt.sh77
-rwxr-xr-xnixpkgs/pkgs/os-specific/linux/kernel/update.sh3
-rw-r--r--nixpkgs/pkgs/os-specific/linux/klibc/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/klibc/shrunk.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix1
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kmod-debian-aliases/default.nix7
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kmod/default.nix16
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kmod/no-name-field.patch24
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kmscon/default.nix43
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kmscon/kmscon-8-glibc-2.26.patch25
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libaio/default.nix11
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libbpf/default.nix33
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libfabric/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libvolume_id/default.nix9
-rw-r--r--nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/lockdep/default.nix43
-rw-r--r--nixpkgs/pkgs/os-specific/linux/lvm2/default.nix125
-rw-r--r--nixpkgs/pkgs/os-specific/linux/lvm2/default.upstream4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/lxc/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/lxcfs/default.nix10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/microcode/amd.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/mmc-utils/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/multipath-tools/default.nix7
-rw-r--r--nixpkgs/pkgs/os-specific/linux/multipath-tools/json-c-0.14.patch21
-rw-r--r--nixpkgs/pkgs/os-specific/linux/musl/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/mwprocapture/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/netatop/default.nix5
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nftables/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/numworks-udev-rules/50-numworks-calculator.rules2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/numworks-udev-rules/default.nix21
-rwxr-xr-xnixpkgs/pkgs/os-specific/linux/numworks-udev-rules/update.sh3
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix39
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix17
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nvidia-x11/persistenced.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nvidia-x11/settings.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix58
-rw-r--r--nixpkgs/pkgs/os-specific/linux/open-iscsi/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/openvswitch/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pam_gnupg/default.nix32
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pam_p11/default.nix24
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pcm/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/piper/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/powerstat/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/powertop/default.nix11
-rw-r--r--nixpkgs/pkgs/os-specific/linux/powertop/fix-vertical-scrolling.patch13
-rw-r--r--nixpkgs/pkgs/os-specific/linux/r8125/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/rdma-core/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/rfkill/default.nix20
-rw-r--r--nixpkgs/pkgs/os-specific/linux/rfkill/udev.nix5
-rw-r--r--nixpkgs/pkgs/os-specific/linux/roccat-tools/default.nix3
-rw-r--r--nixpkgs/pkgs/os-specific/linux/rtl8192eu/default.nix10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/rtl8821ce/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/rtl8821cu/default.nix37
-rw-r--r--nixpkgs/pkgs/os-specific/linux/rtlwifi_new/default.nix3
-rw-r--r--nixpkgs/pkgs/os-specific/linux/sd-switch/default.nix26
-rw-r--r--nixpkgs/pkgs/os-specific/linux/smemstat/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/sysdig/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/sysklogd/default.nix5
-rw-r--r--nixpkgs/pkgs/os-specific/linux/syslinux/default.nix13
-rw-r--r--nixpkgs/pkgs/os-specific/linux/system76-acpi/default.nix43
-rw-r--r--nixpkgs/pkgs/os-specific/linux/system76-io/default.nix38
-rw-r--r--nixpkgs/pkgs/os-specific/linux/system76/default.nix44
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch24
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0004-Look-for-fsck-in-the-right-place.patch4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0005-Add-some-NixOS-specific-unit-directories.patch107
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0006-Get-rid-of-a-useless-message-in-user-sessions.patch8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0007-hostnamed-localed-timedated-disable-methods-that-cha.patch48
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0008-Fix-hwdb-paths.patch4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0009-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch28
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0010-localectl-use-etc-X11-xkb-for-list-x11.patch8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0011-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0012-Install-default-configuration-into-out-share-factory.patch71
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0014-add-rootprefix-to-lookup-dir-paths.patch4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0015-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0016-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0017-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0018-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix34
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/default.nix92
-rw-r--r--nixpkgs/pkgs/os-specific/linux/sysvinit/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/targetcli/default.nix10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/tiscamera/default.nix42
-rw-r--r--nixpkgs/pkgs/os-specific/linux/turbostat/default.nix3
-rw-r--r--nixpkgs/pkgs/os-specific/linux/undervolt/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/util-linux/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/v4l-utils/default.nix5
-rw-r--r--nixpkgs/pkgs/os-specific/linux/wireguard/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/xf86-video-nested/default.nix7
-rw-r--r--nixpkgs/pkgs/os-specific/linux/xpadneo/default.nix43
-rw-r--r--nixpkgs/pkgs/os-specific/linux/zenmonitor/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/zenpower/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/zfs/default.nix24
165 files changed, 1990 insertions, 867 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/alsa-lib/default.nix b/nixpkgs/pkgs/os-specific/linux/alsa-lib/default.nix
index 335ae204833d..3c5427340baf 100644
--- a/nixpkgs/pkgs/os-specific/linux/alsa-lib/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/alsa-lib/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, alsa-ucm-conf, alsa-topology-conf }:
 
 stdenv.mkDerivation rec {
-  name = "alsa-lib-1.2.2";
+  name = "alsa-lib-1.2.3";
 
   src = fetchurl {
     url = "mirror://alsa/lib/${name}.tar.bz2";
-    sha256 = "1v5kb8jyvrpkvvq7dq8hfbmcj68lml97i4s0prxpfx2mh3c57s6q";
+    sha256 = "13k7dx1g749z74rz71hs5j8z0pqdjgx7l69pn0vsy7jizhi0kw02";
   };
 
   patches = [
diff --git a/nixpkgs/pkgs/os-specific/linux/alsa-topology-conf/default.nix b/nixpkgs/pkgs/os-specific/linux/alsa-topology-conf/default.nix
index f73bbbdba357..54340d017ade 100644
--- a/nixpkgs/pkgs/os-specific/linux/alsa-topology-conf/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/alsa-topology-conf/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "alsa-topology-conf-${version}";
-  version = "1.2.2";
+  version = "1.2.3";
 
   src = fetchurl {
     url = "mirror://alsa/lib/${name}.tar.bz2";
-    sha256 = "09cls485ckdjsp4azhv3nw7chyg3r7zrqgald6yp70f7cysxcwml";
+    sha256 = "1zwxc9zhfcmyffjjbibzpdvf4kx7wv9g2zl6xz7y0d6srfr9jgw3";
   };
 
   dontBuild = true;
diff --git a/nixpkgs/pkgs/os-specific/linux/alsa-ucm-conf/default.nix b/nixpkgs/pkgs/os-specific/linux/alsa-ucm-conf/default.nix
index 685ba3e2c3e5..2a9f28c855a5 100644
--- a/nixpkgs/pkgs/os-specific/linux/alsa-ucm-conf/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/alsa-ucm-conf/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "alsa-ucm-conf-${version}";
-  version = "1.2.2";
+  version = "1.2.3";
 
   src = fetchurl {
     url = "mirror://alsa/lib/${name}.tar.bz2";
-    sha256 = "0364fgzdm2qrsqvgqri25gzscbma7yqlv31wz8b1z9c5phlxkgvy";
+    sha256 = "000db5yla7dljidjbbwbiaxvc1a7wh1zpw694gipaymj9fh4vhhv";
   };
 
   dontBuild = true;
diff --git a/nixpkgs/pkgs/os-specific/linux/alsa-utils/default.nix b/nixpkgs/pkgs/os-specific/linux/alsa-utils/default.nix
index 470536db4b7b..91d7e05a882c 100644
--- a/nixpkgs/pkgs/os-specific/linux/alsa-utils/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/alsa-utils/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, alsaLib, gettext, ncurses, libsamplerate, pciutils, fftw}:
+{stdenv, fetchurl, alsaLib, gettext, makeWrapper, ncurses, libsamplerate, pciutils, which, fftw}:
 
 stdenv.mkDerivation rec {
   pname = "alsa-utils";
@@ -9,18 +9,17 @@ stdenv.mkDerivation rec {
     sha256 = "1ai1z4kf91b1m3qrpwqkc1af5vm2fkdkknqv95xdwf19q94aw6gz";
   };
 
-  patchPhase = ''
-    substituteInPlace alsa-info/alsa-info.sh \
-      --replace "which" "type -p" \
-      --replace "lspci" "${pciutils}/bin/lspci"
-  '';
-  nativeBuildInputs = [ gettext ];
+  nativeBuildInputs = [ gettext makeWrapper ];
   buildInputs = [ alsaLib ncurses libsamplerate fftw ];
 
   configureFlags = [ "--disable-xmlto" "--with-udev-rules-dir=$(out)/lib/udev/rules.d" ];
 
   installFlags = [ "ASOUND_STATE_DIR=$(TMPDIR)/dummy" ];
 
+  postFixup = ''
+    wrapProgram $out/bin/alsa-info.sh --prefix PATH : "${stdenv.lib.makeBinPath [ which pciutils ]}"
+  '';
+
   meta = with stdenv.lib; {
     homepage = "http://www.alsa-project.org/";
     description = "ALSA, the Advanced Linux Sound Architecture utils";
diff --git a/nixpkgs/pkgs/os-specific/linux/apparmor/default.nix b/nixpkgs/pkgs/os-specific/linux/apparmor/default.nix
index afb6799fbafc..0e10add55613 100644
--- a/nixpkgs/pkgs/os-specific/linux/apparmor/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/apparmor/default.nix
@@ -30,7 +30,18 @@ let
     sha256 = "03nislxccnbxld89giak2s8xa4mdbwscfxbdwhmw5qpvgz08dgwh";
   };
 
+  # See <https://gitlab.com/apparmor/apparmor/-/issues/74> This and the
+  # accompanying application in prePatchCommon should be removed in 2.13.5
+  gnumake43Patch = fetchpatch {
+    url = "https://gitlab.com/apparmor/apparmor/-/merge_requests/465.patch";
+    name = "2-23-fix-build-with-make-4.3.patch";
+    sha256 = "0xw028iqp69j9mxv0kbwraplgkj5i5djdlgf0anpkc5cdbsf96r9";
+  };
+
   prePatchCommon = ''
+    patch -p1 < ${gnumake43Patch}
+    chmod a+x ./common/list_capabilities.sh ./common/list_af_names.sh
+    patchShebangs ./common/list_capabilities.sh ./common/list_af_names.sh
     substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${buildPackages.perl}/bin/pod2man"
     substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${buildPackages.perl}/bin/pod2html"
     substituteInPlace ./common/Make.rules --replace "/usr/include/linux/capability.h" "${linuxHeaders}/include/linux/capability.h"
@@ -119,7 +130,11 @@ let
       libapparmor.python
     ];
 
-    prePatch = prePatchCommon;
+    prePatch = prePatchCommon + ''
+      substituteInPlace ./utils/apparmor/easyprof.py --replace "/sbin/apparmor_parser" "${apparmor-parser}/bin/apparmor_parser"
+      substituteInPlace ./utils/apparmor/aa.py --replace "/sbin/apparmor_parser" "${apparmor-parser}/bin/apparmor_parser"
+      substituteInPlace ./utils/logprof.conf --replace "/sbin/apparmor_parser" "${apparmor-parser}/bin/apparmor_parser"
+    '';
     inherit patches;
     postPatch = "cd ./utils";
     makeFlags = [ "LANGS=" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/batman-adv/version.nix b/nixpkgs/pkgs/os-specific/linux/batman-adv/version.nix
index f9f3013e1f96..e617881a570c 100644
--- a/nixpkgs/pkgs/os-specific/linux/batman-adv/version.nix
+++ b/nixpkgs/pkgs/os-specific/linux/batman-adv/version.nix
@@ -1,9 +1,9 @@
 {
-  version = "2019.5";
+  version = "2020.3";
 
   sha256 = {
-    batman-adv = "1v18zvvg12jgywncbhxshgjc93r72ajpxgw22zp0zx22g2q13z99";
-    alfred = "09npizg89ks1wm19l5xz0pq1ljpsbwy030xnprqnd0p53976wywa";
-    batctl = "1b9w4636dq8m38nzr8j0v0j3b0vdsw84c58c2isc33h66dx8brgz";
+    batman-adv = "0wrzh0k44zzjx2s5zj65hjkh4jm9y38qpis1s5cbx9cyj756slb5";
+    alfred = "13bvccz90pkjl09jyw68gj23pbrw9b05w1vhds9sjggwf3jkj5w2";
+    batctl = "0r2w2v4sy6wgr7mp9lc7yj9k4ldsbsm3425rjil7p0b17zmzf4rm";
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/bcc/default.nix b/nixpkgs/pkgs/os-specific/linux/bcc/default.nix
index 7f95ef47ee9c..de02ffb30a39 100644
--- a/nixpkgs/pkgs/os-specific/linux/bcc/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/bcc/default.nix
@@ -1,15 +1,16 @@
-{ stdenv, fetchurl, makeWrapper, cmake, llvmPackages, kernel
+{ stdenv, fetchurl, fetchpatch
+, makeWrapper, cmake, llvmPackages, kernel
 , flex, bison, elfutils, python, luajit, netperf, iperf, libelf
 , systemtap, bash
 }:
 
 python.pkgs.buildPythonApplication rec {
   pname = "bcc";
-  version = "0.14.0";
+  version = "0.16.0";
 
   src = fetchurl {
     url = "https://github.com/iovisor/bcc/releases/download/v${version}/bcc-src-with-submodule.tar.gz";
-    sha256 = "1hw02bib06fjyw61as5pmhf0qxy0wv0nw8fff2i8a9d1zcd8xf3p";
+    sha256 = "sha256-ekVRyugpZOU1nr0N9kWCSoJTmtD2qGsn/DmWgK7XZ/c=";
   };
   format = "other";
 
@@ -23,6 +24,12 @@ python.pkgs.buildPythonApplication rec {
     # This is needed until we fix
     # https://github.com/NixOS/nixpkgs/issues/40427
     ./fix-deadlock-detector-import.patch
+
+    # This is already upstream; remove it on the next release
+    (fetchpatch {
+      url = "https://github.com/iovisor/bcc/commit/60de17161fe7f44b534a8da343edbad2427220e3.patch";
+      sha256 = "0pd5b4vgpdxbsrjwrw2kmn4l9hpj0rwdm3hvwvk7dsr3raz7w4b3";
+    })
   ];
 
   propagatedBuildInputs = [ python.pkgs.netaddr ];
diff --git a/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix b/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix
index 0c360e60b7e0..fc7c8ecba2da 100644
--- a/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix
@@ -1,17 +1,18 @@
 { stdenv, fetchFromGitHub
 , cmake, pkgconfig, flex, bison
-, llvmPackages, kernel, elfutils, libelf, bcc
+, llvmPackages, kernel, elfutils
+, libelf, libbfd, libbpf, libopcodes, bcc
 }:
 
 stdenv.mkDerivation rec {
   pname = "bpftrace";
-  version = "0.9.4";
+  version = "0.11.0";
 
   src = fetchFromGitHub {
     owner  = "iovisor";
     repo   = "bpftrace";
     rev    = "refs/tags/v${version}";
-    sha256 = "00fvkq3razwacnpb82zkpv63dgyigbqx3gj6g0ka94nwa74i5i77";
+    sha256 = "02f2r731yj3fdc8341id1ksk4dma9rwm2765n2xgx2ldrrz5823y";
   };
 
   enableParallelBuilding = true;
@@ -19,6 +20,7 @@ stdenv.mkDerivation rec {
   buildInputs = with llvmPackages;
     [ llvm clang-unwrapped
       kernel elfutils libelf bcc
+      libbpf libbfd libopcodes
     ];
 
   nativeBuildInputs = [ cmake pkgconfig flex bison ]
@@ -41,7 +43,7 @@ stdenv.mkDerivation rec {
   #
   cmakeFlags =
     [ "-DBUILD_TESTING=FALSE"
-      "-DLIBBCC_INCLUDE_DIRS=${bcc}/include/bcc"
+      "-DLIBBCC_INCLUDE_DIRS=${bcc}/include"
     ];
 
   # nuke the example/reference output .txt files, for the included tools,
diff --git a/nixpkgs/pkgs/os-specific/linux/btfs/default.nix b/nixpkgs/pkgs/os-specific/linux/btfs/default.nix
index 146a66154241..b4107e8ba001 100644
--- a/nixpkgs/pkgs/os-specific/linux/btfs/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/btfs/default.nix
@@ -3,13 +3,13 @@
 
 stdenv.mkDerivation rec {
   pname = "btfs";
-  version = "2.21";
+  version = "2.22";
 
   src = fetchFromGitHub {
     owner  = "johang";
     repo   = pname;
     rev    = "v${version}";
-    sha256 = "0zqkzfc49jl9kn3m0cg7q0156xyzrdl5w4v70p16sqxdly86mwb0";
+    sha256 = "1z88bk1z4sns3jdn56x83mvh06snxg0lr5h4v0c24lzlf5wbdifz";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
diff --git a/nixpkgs/pkgs/os-specific/linux/busybox/0001-Fix-build-with-glibc-2.31.patch b/nixpkgs/pkgs/os-specific/linux/busybox/0001-Fix-build-with-glibc-2.31.patch
new file mode 100644
index 000000000000..029333b57e4d
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/busybox/0001-Fix-build-with-glibc-2.31.patch
@@ -0,0 +1,71 @@
+From c29b637b55c93214993f40b1a223233d40b8a7d6 Mon Sep 17 00:00:00 2001
+From: Maximilian Bosch <maximilian@mbosch.me>
+Date: Wed, 19 Feb 2020 22:32:28 +0100
+Subject: [PATCH] Fix build with glibc 2.31
+
+This is derived from the corresponding upstream patch[1], however this
+one doesn't apply cleanly on busybox-1.31.1, so I rebased the patch
+locally and added it directly to nixpkgs.
+
+[1] https://git.busybox.net/busybox/patch/?id=d3539be8f27b8cbfdfee460fe08299158f08bcd9
+---
+ coreutils/date.c         | 2 +-
+ libbb/missing_syscalls.c | 8 --------
+ util-linux/rdate.c       | 8 ++++++--
+ 3 files changed, 7 insertions(+), 11 deletions(-)
+
+diff --git a/coreutils/date.c b/coreutils/date.c
+index 3414d38..931b7f9 100644
+--- a/coreutils/date.c
++++ b/coreutils/date.c
+@@ -303,7 +303,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
+ 		ts.tv_sec = validate_tm_time(date_str, &tm_time);
+ 
+ 		/* if setting time, set it */
+-		if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) {
++		if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) {
+ 			bb_perror_msg("can't set date");
+ 		}
+ 	}
+diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c
+index 87cf59b..dc40d91 100644
+--- a/libbb/missing_syscalls.c
++++ b/libbb/missing_syscalls.c
+@@ -15,14 +15,6 @@ pid_t getsid(pid_t pid)
+ 	return syscall(__NR_getsid, pid);
+ }
+ 
+-int stime(const time_t *t)
+-{
+-	struct timeval tv;
+-	tv.tv_sec = *t;
+-	tv.tv_usec = 0;
+-	return settimeofday(&tv, NULL);
+-}
+-
+ int sethostname(const char *name, size_t len)
+ {
+ 	return syscall(__NR_sethostname, name, len);
+diff --git a/util-linux/rdate.c b/util-linux/rdate.c
+index 70f829e..878375d 100644
+--- a/util-linux/rdate.c
++++ b/util-linux/rdate.c
+@@ -95,9 +95,13 @@ int rdate_main(int argc UNUSED_PARAM, char **argv)
+ 	if (!(flags & 2)) { /* no -p (-s may be present) */
+ 		if (time(NULL) == remote_time)
+ 			bb_error_msg("current time matches remote time");
+-		else
+-			if (stime(&remote_time) < 0)
++		else {
++			struct timespec ts;
++			ts.tv_sec = remote_time;
++			ts.tv_nsec = 0;
++			if (clock_settime(CLOCK_REALTIME, &ts) < 0)
+ 				bb_perror_msg_and_die("can't set time of day");
++		}
+ 	}
+ 
+ 	if (flags != 1) /* not lone -s */
+-- 
+2.25.0
+
diff --git a/nixpkgs/pkgs/os-specific/linux/busybox/0001-wget-implement-TLS-verification-with-ENABLE_FEATURE_.patch b/nixpkgs/pkgs/os-specific/linux/busybox/0001-wget-implement-TLS-verification-with-ENABLE_FEATURE_.patch
new file mode 100644
index 000000000000..d11cd670d5e8
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/busybox/0001-wget-implement-TLS-verification-with-ENABLE_FEATURE_.patch
@@ -0,0 +1,94 @@
+From 45fa3f18adf57ef9d743038743d9c90573aeeb91 Mon Sep 17 00:00:00 2001
+From: Dimitri John Ledkov <xnox@ubuntu.com>
+Date: Tue, 19 May 2020 18:20:39 +0100
+Subject: [PATCH] wget: implement TLS verification with
+ ENABLE_FEATURE_WGET_OPENSSL
+
+When ENABLE_FEATURE_WGET_OPENSSL is enabled, correctly implement TLS
+verification by default. And only ignore verification errors, if
+--no-check-certificate was passed.
+
+Also note, that previously OPENSSL implementation did not implement
+TLS verification, nor printed any warning messages that verification
+was not performed.
+
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1879533
+
+CVE-2018-1000500
+
+Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+---
+ networking/wget.c | 20 +++++++++++++++++---
+ 1 file changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/networking/wget.c b/networking/wget.c
+index f2fc9e215..6a8c08324 100644
+--- a/networking/wget.c
++++ b/networking/wget.c
+@@ -91,6 +91,9 @@
+ //config:	patches, but do want to waste bandwidth expaining how wrong
+ //config:	it is, you will be ignored.
+ //config:
++//config:	FEATURE_WGET_OPENSSL does implement TLS verification
++//config:	using the certificates available to OpenSSL.
++//config:
+ //config:config FEATURE_WGET_OPENSSL
+ //config:	bool "Try to connect to HTTPS using openssl"
+ //config:	default y
+@@ -115,6 +118,9 @@
+ //config:	If openssl can't be executed, internal TLS code will be used
+ //config:	(if you enabled it); if openssl can be executed but fails later,
+ //config:	wget can't detect this, and download will fail.
++//config:
++//config:	By default TLS verification is performed, unless
++//config:	--no-check-certificate option is passed.
+ 
+ //applet:IF_WGET(APPLET(wget, BB_DIR_USR_BIN, BB_SUID_DROP))
+ 
+@@ -124,8 +130,11 @@
+ //usage:	IF_FEATURE_WGET_LONG_OPTIONS(
+ //usage:       "[-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]\n"
+ //usage:       "	[-o|--output-file FILE] [--header 'header: value'] [-Y|--proxy on/off]\n"
++//usage:	IF_FEATURE_WGET_OPENSSL(
++//usage:       "	[--no-check-certificate]\n"
++//usage:	)
+ /* Since we ignore these opts, we don't show them in --help */
+-/* //usage:    "	[--no-check-certificate] [--no-cache] [--passive-ftp] [-t TRIES]" */
++/* //usage:    "	[--no-cache] [--passive-ftp] [-t TRIES]" */
+ /* //usage:    "	[-nv] [-nc] [-nH] [-np]" */
+ //usage:       "	[-P DIR] [-S|--server-response] [-U|--user-agent AGENT]" IF_FEATURE_WGET_TIMEOUT(" [-T SEC]") " URL..."
+ //usage:	)
+@@ -137,7 +146,9 @@
+ //usage:       "Retrieve files via HTTP or FTP\n"
+ //usage:	IF_FEATURE_WGET_LONG_OPTIONS(
+ //usage:     "\n	--spider	Only check URL existence: $? is 0 if exists"
+-///////:     "\n	--no-check-certificate	Don't validate the server's certificate"
++//usage:	IF_FEATURE_WGET_OPENSSL(
++//usage:     "\n	--no-check-certificate	Don't validate the server's certificate"
++//usage:	)
+ //usage:	)
+ //usage:     "\n	-c		Continue retrieval of aborted transfer"
+ //usage:     "\n	-q		Quiet"
+@@ -662,7 +673,7 @@ static int spawn_https_helper_openssl(const char *host, unsigned port)
+ 	pid = xvfork();
+ 	if (pid == 0) {
+ 		/* Child */
+-		char *argv[8];
++		char *argv[9];
+ 
+ 		close(sp[0]);
+ 		xmove_fd(sp[1], 0);
+@@ -689,6 +700,9 @@ static int spawn_https_helper_openssl(const char *host, unsigned port)
+ 			argv[5] = (char*)"-servername";
+ 			argv[6] = (char*)servername;
+ 		}
++		if (!(option_mask32 & WGET_OPT_NO_CHECK_CERT)) {
++			argv[7] = (char*)"-verify_return_error";
++		}
+ 
+ 		BB_EXECVP(argv[0], argv);
+ 		xmove_fd(3, 2);
+-- 
+2.28.0
+
diff --git a/nixpkgs/pkgs/os-specific/linux/busybox/default.nix b/nixpkgs/pkgs/os-specific/linux/busybox/default.nix
index 430066831b87..599754129b43 100644
--- a/nixpkgs/pkgs/os-specific/linux/busybox/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/busybox/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, buildPackages, fetchurl
+{ stdenv, lib, buildPackages, fetchurl, fetchFromGitLab
 , enableStatic ? false
 , enableMinimal ? false
 # Allow forcing musl without switching stdenv itself, e.g. for our bootstrapping:
@@ -31,9 +31,26 @@ let
     CONFIG_FEATURE_UTMP n
     CONFIG_FEATURE_WTMP n
   '';
+
+  # The debian version lacks behind the upstream version and also contains
+  # a debian-specific suffix. We only fetch the debian repository to get the
+  # default.script
+  debianVersion = "1.30.1-6";
+  debianSource = fetchFromGitLab {
+    domain = "salsa.debian.org";
+    owner = "installer-team";
+    repo = "busybox";
+    rev = "debian/1%${debianVersion}";
+    sha256 = "sha256-6r0RXtmqGXtJbvLSD1Ma1xpqR8oXL2bBKaUE/cSENL8=";
+  };
+  debianDispatcherScript = "${debianSource}/debian/tree/udhcpc/etc/udhcpc/default.script";
+  outDispatchPath = "$out/default.script";
 in
 
 stdenv.mkDerivation rec {
+  # TODO: When bumping this version, please validate whether the wget patch is present upstream
+  # and remove the patch if it is. The patch should be present upstream for all versions 1.32.0+.
+  # See NixOs/nixpkgs#94722 for context.
   name = "busybox-1.31.1";
 
   # Note to whoever is updating busybox: please verify that:
@@ -49,6 +66,8 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./busybox-in-store.patch
+    ./0001-Fix-build-with-glibc-2.31.patch
+    ./0001-wget-implement-TLS-verification-with-ENABLE_FEATURE_.patch
   ] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./clang-cross.patch;
 
   postPatch = "patchShebangs .";
@@ -80,6 +99,9 @@ stdenv.mkDerivation rec {
     # Bump from 4KB, much faster I/O
     CONFIG_FEATURE_COPYBUF_KB 64
 
+    # Set the path for the udhcpc script
+    CONFIG_UDHCPC_DEFAULT_SCRIPT "${outDispatchPath}"
+
     ${extraConfig}
     CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.targetPrefix}"
     ${libcConfig}
@@ -94,6 +116,15 @@ stdenv.mkDerivation rec {
     makeFlagsArray+=("CC=${stdenv.cc.targetPrefix}cc -isystem ${musl.dev}/include -B${musl}/lib -L${musl}/lib")
   '';
 
+  postInstall = ''
+    sed -e '
+    1 a busybox() { '$out'/bin/busybox "$@"; }\
+    logger() { '$out'/bin/logger "$@"; }\
+    ' ${debianDispatcherScript} > ${outDispatchPath}
+    chmod 555 ${outDispatchPath}
+    PATH=$out/bin patchShebangs ${outDispatchPath}
+  '';
+
   depsBuildBuild = [ buildPackages.stdenv.cc ];
 
   buildInputs = lib.optionals (enableStatic && !useMusl && stdenv.cc.libc ? static) [ stdenv.cc.libc stdenv.cc.libc.static ];
@@ -106,7 +137,7 @@ stdenv.mkDerivation rec {
     description = "Tiny versions of common UNIX utilities in a single small executable";
     homepage = "https://busybox.net/";
     license = licenses.gpl2;
-    maintainers = with maintainers; [ ];
+    maintainers = with maintainers; [ TethysSvensson ];
     platforms = platforms.linux;
     priority = 10;
   };
diff --git a/nixpkgs/pkgs/os-specific/linux/can-isotp/default.nix b/nixpkgs/pkgs/os-specific/linux/can-isotp/default.nix
index 7f16ecb9e6d4..cccc7550fba8 100644
--- a/nixpkgs/pkgs/os-specific/linux/can-isotp/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/can-isotp/default.nix
@@ -2,15 +2,15 @@
 
 stdenv.mkDerivation {
   pname = "can-isotp";
-  version = "20180629";
+  version = "20200910";
 
   hardeningDisable = [ "pic" ];
   
   src = fetchFromGitHub {
     owner = "hartkopp";
     repo = "can-isotp";
-    rev = "6003f9997587e6a563cebf1f246bcd0eb6deff3d";
-    sha256 = "0b2pqb0vd1wgv2zpl7lvfavqkzr8mrwhrv7zdqkq3rz9givcv8w7";
+    rev = "21a3a59e2bfad246782896841e7af042382fcae7";
+    sha256 = "1laax93czalclg7cy9iq1r7hfh9jigh7igj06y9lski75ap2vhfq";
   };
 
   KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
diff --git a/nixpkgs/pkgs/os-specific/linux/checksec/default.nix b/nixpkgs/pkgs/os-specific/linux/checksec/default.nix
index 7984c25bf3fd..5a66e536956f 100644
--- a/nixpkgs/pkgs/os-specific/linux/checksec/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/checksec/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   pname = "checksec";
-  version = "2.2.1";
+  version = "2.2.3";
 
   src = fetchFromGitHub {
     owner = "slimm609";
     repo = "checksec.sh";
     rev = version;
-    sha256 = "035ydf7kp9yh5gpjnq4cgi76j582a0q6dxcbgkraxpkml0d8n2xd";
+    sha256 = "0hw8bd7dj71m1ml9zvfab2j87jacs542z7a89nziapckmg6kmh6f";
   };
 
   patches = [ ./0001-attempt-to-modprobe-config-before-checking-kernel.patch ];
diff --git a/nixpkgs/pkgs/os-specific/linux/conky/default.nix b/nixpkgs/pkgs/os-specific/linux/conky/default.nix
index 14f17da55a77..ee67140cd861 100644
--- a/nixpkgs/pkgs/os-specific/linux/conky/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/conky/default.nix
@@ -68,13 +68,13 @@ with stdenv.lib;
 
 stdenv.mkDerivation rec {
   pname = "conky";
-  version = "1.11.5";
+  version = "1.11.6";
 
   src = fetchFromGitHub {
     owner = "brndnmtthws";
     repo = "conky";
     rev = "v${version}";
-    sha256 = "1a75ss48mn9pknrxy33dh5rdgm67a5kpddsyqfhlcn1761kfzzyp";
+    sha256 = "0y2g66fjqp2hdk0y1h4ijxhnv34j16gizvxpmbigwh4n6zijcm6v";
   };
 
   postPatch = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/conspy/default.nix b/nixpkgs/pkgs/os-specific/linux/conspy/default.nix
index 32905b8ec39f..a52b87385706 100644
--- a/nixpkgs/pkgs/os-specific/linux/conspy/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/conspy/default.nix
@@ -3,11 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="conspy";
-    version="1.14";
+    version="1.16";
     name="${baseName}-${version}";
-    hash="069k26xpzsvrn3197ix5yd294zvz03zi2xqj4fip6rlsw74habsf";
-    url="mirror://sourceforge/project/conspy/conspy-1.14-1/conspy-1.14.tar.gz";
-    sha256="069k26xpzsvrn3197ix5yd294zvz03zi2xqj4fip6rlsw74habsf";
+    hash="02andak806vd04bgjlr0y0d2ddx7cazyf8nvca80vlh8x94gcppf";
+    url="mirror://sourceforge/project/conspy/conspy-1.16-1/conspy-1.16.tar.gz";
+    sha256="02andak806vd04bgjlr0y0d2ddx7cazyf8nvca80vlh8x94gcppf";
   };
   buildInputs = [
     autoconf automake ncurses
diff --git a/nixpkgs/pkgs/os-specific/linux/cpuid/default.nix b/nixpkgs/pkgs/os-specific/linux/cpuid/default.nix
new file mode 100644
index 000000000000..df0017eadc1f
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/cpuid/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchurl, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "cpuid";
+  version = "20200427";
+
+  src = fetchurl {
+    name = "${pname}-${version}.src.tar.gz";
+    url = "http://etallen.com/cpuid/${pname}-${version}.src.tar.gz";
+    sha256 = "1m31238z2ya8f8pzpyklwp0ksf5xicqrw1z941hhhx913wzldaf1";
+  };
+
+  # For pod2man during the build process.
+  nativeBuildInputs = [ perl ];
+
+  # As runtime dependency for cpuinfo2cpuid.
+  buildInputs = [ perl ];
+
+  # The Makefile hardcodes $(BUILDROOT)/usr as installation
+  # destination. Just nuke all mentions of /usr to get the right
+  # installation location.
+  patchPhase = ''
+    sed -i -e 's,/usr/,/,' Makefile
+  '';
+
+  installPhase = ''
+    make install BUILDROOT=$out
+
+    if [ ! -x $out/bin/cpuid ]; then
+      echo Failed to properly patch Makefile.
+      exit 1
+    fi
+  '';
+
+  meta = {
+    description = "Linux tool to dump x86 CPUID information about the CPU";
+    longDescription = ''
+      cpuid dumps detailed information about the CPU(s) gathered from the CPUID
+      instruction, and also determines the exact model of CPU(s). It supports
+      Intel, AMD, VIA, Hygon, and Zhaoxin CPUs, as well as older Transmeta,
+      Cyrix, UMC, NexGen, Rise, and SiS CPUs.
+    '';
+
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    license = stdenv.lib.licenses.gpl2;
+    homepage = "http://etallen.com/cpuid.html";
+    maintainers = with stdenv.lib.maintainers; [ blitz ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/cramfsprogs/default.nix b/nixpkgs/pkgs/os-specific/linux/cramfsprogs/default.nix
new file mode 100644
index 000000000000..8633823ab5c5
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/cramfsprogs/default.nix
@@ -0,0 +1,32 @@
+{ stdenv
+, fetchurl
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cramfsprogs";
+  version = "1.1";
+
+  src = fetchurl {
+    url = "mirror://debian/pool/main/c/cramfs/cramfs_${version}.orig.tar.gz";
+    sha256 = "0s13sabykbkbp0pcw8clxddwzxckyq7ywm2ial343ip7qjiaqg0k";
+  };
+
+  # CramFs is unmaintained upstream: https://tracker.debian.org/pkg/cramfs.
+  # So patch the "missing include" bug ourselves.
+  patches = [ ./include-sysmacros.patch ];
+
+  installPhase = ''
+    install --target $out/bin -D cramfsck mkcramfs
+  '';
+
+  buildInputs = [ zlib ];
+
+  meta = with stdenv.lib; {
+    description = "Tools to create, check, and extract content of CramFs images";
+    homepage = "https://packages.debian.org/jessie/cramfsprogs";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ pamplemousse ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/cramfsprogs/include-sysmacros.patch b/nixpkgs/pkgs/os-specific/linux/cramfsprogs/include-sysmacros.patch
new file mode 100644
index 000000000000..7c115a66ac90
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/cramfsprogs/include-sysmacros.patch
@@ -0,0 +1,12 @@
+diff --git a/mkcramfs.c b/mkcramfs.c
+index a2ef018959d..bec83c112d1 100644
+--- a/mkcramfs.c
++++ b/mkcramfs.c
+@@ -22,6 +22,7 @@
+  * If you change the disk format of cramfs, please update fs/cramfs/README.
+  */
+ 
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <stdio.h>
+ #include <sys/stat.h>
diff --git a/nixpkgs/pkgs/os-specific/linux/cramfsswap/builder.sh b/nixpkgs/pkgs/os-specific/linux/cramfsswap/builder.sh
deleted file mode 100644
index 51a5b11dda69..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/cramfsswap/builder.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-source $stdenv/setup
-
-export DESTDIR=$out
-mkdir -p $out/usr/bin
-
-genericBuild
diff --git a/nixpkgs/pkgs/os-specific/linux/cramfsswap/default.nix b/nixpkgs/pkgs/os-specific/linux/cramfsswap/default.nix
index eb04761eef47..afb38364c4e6 100644
--- a/nixpkgs/pkgs/os-specific/linux/cramfsswap/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/cramfsswap/default.nix
@@ -1,17 +1,22 @@
 {stdenv, fetchurl, zlib}:
 
-stdenv.mkDerivation {
-  name = "cramfsswap-1.4.1";
-  builder = ./builder.sh;
+stdenv.mkDerivation rec {
+  pname = "cramfsswap";
+  version = "1.4.1";
+
   src = fetchurl {
-    url = "mirror://debian/pool/main/c/cramfsswap/cramfsswap_1.4.1.tar.gz";
+    url = "mirror://debian/pool/main/c/cramfsswap/${pname}_${version}.tar.gz";
     sha256 = "0c6lbx1inkbcvvhh3y6fvfaq3w7d1zv7psgpjs5f3zjk1jysi9qd";
   };
 
   buildInputs = [zlib];
 
+  installPhase = ''
+    install --target $out/bin -D cramfsswap
+  '';
+
   meta = with stdenv.lib; {
-    description = "swap endianess of a cram filesystem (cramfs)";
+    description = "Swap endianess of a cram filesystem (cramfs)";
     homepage = "https://packages.debian.org/sid/utils/cramfsswap";
     license = licenses.gpl2;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/os-specific/linux/crda/default.nix b/nixpkgs/pkgs/os-specific/linux/crda/default.nix
index 5811e9358b01..979b7cf1deb3 100644
--- a/nixpkgs/pkgs/os-specific/linux/crda/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/crda/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, libgcrypt, libnl, pkgconfig, python3, wireless-regdb }:
+{ stdenv, fetchurl, fetchpatch, libgcrypt, libnl, pkgconfig, python3Packages, wireless-regdb }:
 
 stdenv.mkDerivation rec {
   pname = "crda";
@@ -25,13 +25,14 @@ stdenv.mkDerivation rec {
   buildInputs = [ libgcrypt libnl ];
   nativeBuildInputs = [
     pkgconfig
-    python3
-    python3.pkgs.pycrypto
+    python3Packages.pycrypto
   ];
 
   postPatch = ''
     patchShebangs utils/
-    substituteInPlace Makefile --replace ldconfig true
+    substituteInPlace Makefile \
+      --replace ldconfig true \
+      --replace pkg-config $PKG_CONFIG
     sed -i crda.c \
       -e "/\/usr\/.*\/regulatory.bin/d" \
       -e "s|/lib/crda|${wireless-regdb}/lib/crda|g"
diff --git a/nixpkgs/pkgs/os-specific/linux/cryptodev/default.nix b/nixpkgs/pkgs/os-specific/linux/cryptodev/default.nix
index 321f00b0ef2d..79132852d239 100644
--- a/nixpkgs/pkgs/os-specific/linux/cryptodev/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/cryptodev/default.nix
@@ -1,14 +1,14 @@
-{ fetchurl, stdenv, kernel ? false }:
+{ fetchFromGitHub, stdenv, kernel ? false }:
 
 stdenv.mkDerivation rec {
-  pname = "cryptodev-linux-1.9";
+  pname = "cryptodev-linux-1.11";
   name = "${pname}-${kernel.version}";
 
-  src = fetchurl {
-    urls = [
-      "http://nwl.cc/pub/cryptodev-linux/${pname}.tar.gz"
-    ];
-    sha256 = "0l3r8s71vkd0s2h01r7fhqnc3j8cqw4msibrdxvps9hfnd4hnk4z";
+  src = fetchFromGitHub {
+    owner = "cryptodev-linux";
+    repo = "cryptodev-linux";
+    rev = pname;
+    sha256 = "1ky850qiyacq8p3lng7n3w6h3x2clqrz4lkv2cv3psy92mg9pvc9";
   };
 
   hardeningDisable = [ "pic" ];
@@ -22,6 +22,5 @@ stdenv.mkDerivation rec {
     homepage = "http://cryptodev-linux.org/";
     license = stdenv.lib.licenses.gpl2Plus;
     platforms = stdenv.lib.platforms.linux;
-    broken = !stdenv.lib.versionOlder kernel.version "4.13";
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix b/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix
index 06be9f3432e7..caa22b4df3ec 100644
--- a/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix
@@ -1,17 +1,15 @@
 { stdenv, fetchurl, lvm2, json_c
-, openssl, libuuid, pkgconfig, popt
-, enablePython ? false, python2 ? null }:
-
-assert enablePython -> python2 != null;
+, openssl, libuuid, pkgconfig, popt }:
 
 stdenv.mkDerivation rec {
-  name = "cryptsetup-2.1.0";
+  pname = "cryptsetup";
+  version = "2.3.3";
 
   outputs = [ "out" "dev" "man" ];
 
   src = fetchurl {
-    url = "mirror://kernel/linux/utils/cryptsetup/v2.1/${name}.tar.xz";
-    sha256 = "15y8n547garz0x5kqv09gscdsrz0c0y1y6c5cp8pccwg3xsb5vm3";
+    url = "mirror://kernel/linux/utils/cryptsetup/v2.3/${pname}-${version}.tar.xz";
+    sha256 = "1pw2bq4nv2z3xyycckxkbp7dp9kkp2n6bspna3plryg277z4zjiv";
   };
 
   # Disable 4 test cases that fail in a sandbox
@@ -19,9 +17,6 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     patchShebangs tests
-    ${stdenv.lib.optionalString enablePython ''
-      patchShebangs ./python/pycryptsetup-test.py
-    ''}
 
     # O_DIRECT is filesystem dependent and fails in a sandbox (on tmpfs)
     # and on several filesystem types (btrfs, zfs) without sandboxing.
@@ -34,11 +29,10 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--enable-cryptsetup-reencrypt"
     "--with-crypto_backend=openssl"
-  ] ++ stdenv.lib.optional enablePython "--enable-python";
+  ];
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ lvm2 json_c openssl libuuid popt ]
-    ++ stdenv.lib.optional enablePython python2;
+  buildInputs = [ lvm2 json_c openssl libuuid popt ];
 
   doCheck = true;
 
diff --git a/nixpkgs/pkgs/os-specific/linux/deepin-anything/default.nix b/nixpkgs/pkgs/os-specific/linux/deepin-anything/default.nix
deleted file mode 100644
index 4139cc153cdd..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/deepin-anything/default.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ stdenv, deepin, kernel }:
-
-stdenv.mkDerivation {
-  pname = "deepin-anything-module";
-  version = "${deepin.deepin-anything.version}-${kernel.version}";
-  src = deepin.deepin-anything.modsrc;
-
-  nativeBuildInputs = kernel.moduleBuildDependencies;
-
-  buildPhase = ''
-    make -C src/deepin-anything-0.0 kdir=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build
-  '';
-
-  installPhase = ''
-     install -m 644 -D -t $out/lib/modules/${kernel.modDirVersion}/extra src/deepin-anything-0.0/*.ko
-  '';
-
-  meta = deepin.deepin-anything.meta // {
-    description = deepin.deepin-anything.meta.description + " (kernel modules)";
-    badPlatforms = [ "aarch64-linux" ];  # the kernel module is not building
-  };
-}
diff --git a/nixpkgs/pkgs/os-specific/linux/device-tree/default.nix b/nixpkgs/pkgs/os-specific/linux/device-tree/default.nix
index 13d819a08a5b..0599289ab726 100644
--- a/nixpkgs/pkgs/os-specific/linux/device-tree/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/device-tree/default.nix
@@ -1,16 +1,31 @@
 { stdenvNoCC, dtc, findutils }:
 
 with stdenvNoCC.lib; {
-  applyOverlays = (base: overlays: stdenvNoCC.mkDerivation {
+  applyOverlays = (base: overlays': stdenvNoCC.mkDerivation {
     name = "device-tree-overlays";
     nativeBuildInputs = [ dtc findutils ];
     buildCommand = let
-      quotedDtbos = concatMapStringsSep " " (o: "\"${toString o}\"") (toList overlays);
+      overlays = toList overlays';
     in ''
-      for dtb in $(find ${base} -name "*.dtb" ); do
-        outDtb=$out/$(realpath --relative-to "${base}" "$dtb")
-        mkdir -p "$(dirname "$outDtb")"
-        fdtoverlay -o "$outDtb" -i "$dtb" ${quotedDtbos};
+      mkdir -p $out
+      cd ${base}
+      find . -type f -name '*.dtb' -print0 \
+        | xargs -0 cp -v --no-preserve=mode --target-directory $out --parents
+
+      for dtb in $(find $out -type f -name '*.dtb'); do
+        dtbCompat="$( fdtget -t s $dtb / compatible )"
+
+        ${flip (concatMapStringsSep "\n") overlays (o: ''
+        overlayCompat="$( fdtget -t s ${o.dtboFile} / compatible )"
+        # overlayCompat in dtbCompat
+        if [[ "$dtbCompat" =~ "$overlayCompat" ]]; then
+          echo "Applying overlay ${o.name} to $( basename $dtb )"
+          mv $dtb{,.in}
+          fdtoverlay -o "$dtb" -i "$dtb.in" ${o.dtboFile};
+          rm $dtb.in
+        fi
+        '')}
+
       done
     '';
   });
diff --git a/nixpkgs/pkgs/os-specific/linux/device-tree/raspberrypi.nix b/nixpkgs/pkgs/os-specific/linux/device-tree/raspberrypi.nix
index b5886f6bd116..5a0d5710392b 100644
--- a/nixpkgs/pkgs/os-specific/linux/device-tree/raspberrypi.nix
+++ b/nixpkgs/pkgs/os-specific/linux/device-tree/raspberrypi.nix
@@ -31,6 +31,7 @@ stdenvNoCC.mkDerivation {
     overlays = "${raspberrypifw}/share/raspberrypi/boot/overlays";
   };
   meta = with stdenvNoCC.lib; {
-    platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
+    inherit (raspberrypifw.meta) platforms homepage license;
+    description = "DTBs for the Raspberry Pi";
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix b/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix
index 642d05e4beb6..3db9a7d3005c 100644
--- a/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix
@@ -11,17 +11,17 @@ let
 
 in stdenv.mkDerivation rec {
   pname = "displaylink";
-  version = "5.2.14";
+  version = "5.3.1.34";
 
   src = requireFile rec {
     name = "displaylink.zip";
-    sha256 = "03b176y95f04rg3lcnjps9llsjbvd8yksh1fpvjwaciz48mnxh2i";
+    sha256 = "1c1kbjgpb71f73qnyl44rvwi6l4ivddq789rwvvh0ahw2jm324hy";
     message = ''
       In order to install the DisplayLink drivers, you must first
       comply with DisplayLink's EULA and download the binaries and
       sources from here:
 
-      http://www.displaylink.com/downloads/file?id=1369
+      https://www.displaylink.com/downloads/file?id=1576
 
       Once you have downloaded the file, please use the following
       commands and re-run the installation:
@@ -67,7 +67,7 @@ in stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "DisplayLink DL-5xxx, DL-41xx and DL-3x00 Driver for Linux";
-    maintainers = with maintainers; [ nshalman abbradar peterhoeg ];
+    maintainers = with maintainers; [ nshalman abbradar peterhoeg eyjhb ];
     platforms = [ "x86_64-linux" "i686-linux" ];
     license = licenses.unfree;
     homepage = "https://www.displaylink.com/";
diff --git a/nixpkgs/pkgs/os-specific/linux/dmidecode/default.nix b/nixpkgs/pkgs/os-specific/linux/dmidecode/default.nix
index 97ad75851a6a..7d0990d9f81a 100644
--- a/nixpkgs/pkgs/os-specific/linux/dmidecode/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/dmidecode/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, fetchpatch }:
 
 stdenv.mkDerivation rec {
   name = "dmidecode-3.2";
@@ -8,6 +8,50 @@ stdenv.mkDerivation rec {
     sha256 = "1pcfhcgs2ifdjwp7amnsr3lq95pgxpr150bjhdinvl505px0cw07";
   };
 
+  patches = [
+    # suggested patches for 3.2 according to https://www.nongnu.org/dmidecode/
+    (fetchpatch {
+      name = "0001-fix_redfish_hostname_print_length.patch";
+      url = "https://git.savannah.gnu.org/cgit/dmidecode.git/patch/?id=fde47bb227b8fa817c88d7e10a8eb771c46de1df";
+      sha256 = "133nd0c72p68hnqs5m714167761r1pp6bd3kgbsrsrwdx40jlc3m";
+    })
+    (fetchpatch {
+      name = "0002-add_logical_non-volatile_device_to_memory_device_types.patch";
+      url = "https://git.savannah.gnu.org/cgit/dmidecode.git/patch/?id=74dfb854b8199ddb0a27e89296fa565f4706cb9d";
+      sha256 = "0wdpmlcwmqdyyrsmyis8jb7cx3q6fnqpdpc5xly663dj841jcvwh";
+    })
+    (fetchpatch {
+      name = "0003-only-scan-devmem-for-entry-point-on-x86.patch";
+      url = "https://git.savannah.gnu.org/cgit/dmidecode.git/patch/?id=e12ec26e19e02281d3e7258c3aabb88a5cf5ec1d";
+      sha256 = "1y2858n98bfa49syjinx911vza6mm7aa6xalvzjgdlyirhccs30i";
+    })
+    (fetchpatch {
+      name = "0004-fix_formatting_of_tpm_table_output.patch";
+      url = "https://git.savannah.gnu.org/cgit/dmidecode.git/patch/?id=1d0db85949a5bdd96375f6131d393a11204302a6";
+      sha256 = "11s8jciw7xf2668v79qcq2c9w2gwvm3dkcik8dl9v74p654y1nr8";
+    })
+    (fetchpatch {
+      name = "0005-fix_system-slot_information_for_pcie_ssd.patch";
+      url = "https://git.savannah.gnu.org/cgit/dmidecode.git/patch/?id=fd08479625b5845e4d725ab628628f7ebfccc407";
+      sha256 = "07l61wvsw1d8g14zzf6zm7l0ri9kkqz8j5n4h116qwhg1p2k49y4";
+    })
+    (fetchpatch {
+      name = "0006-print_type_33_name_unconditionally.patch";
+      url = "https://git.savannah.gnu.org/cgit/dmidecode.git/patch/?id=65438a7ec0f4cddccf810136da6f280bd148af71";
+      sha256 = "0gqz576ccxys0c8217spf1qmw9lxi9xalw85jjqwsi2bj1k6vy4n";
+    })
+    (fetchpatch {
+      name = "0007-dont_choke_on_invalid_processor_voltage.patch";
+      url = "https://git.savannah.gnu.org/cgit/dmidecode.git/patch/?id=5bb7eb173b72256f70c6b3f3916d7a444be93340";
+      sha256 = "1dkg4lq9kn2g1w5raz1gssn6zqk078zjqbnh9i32f822f727syhp";
+    })
+    (fetchpatch {
+      name = "0008-fix_the_alignment_of_type_25_name.patch";
+      url = "https://git.savannah.gnu.org/cgit/dmidecode.git/patch/?id=557c3c373a9992d45d4358a6a2ccf53b03276f39";
+      sha256 = "18hc91pk7civyqrlilg3kn2nmp2warhh49xlbzrwqi7hgipyf12z";
+    })
+  ];
+
   makeFlags = [ "prefix=$(out)" ];
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/os-specific/linux/dpdk/default.nix b/nixpkgs/pkgs/os-specific/linux/dpdk/default.nix
index 8ad703bdd4b6..aacbc3cdfbe2 100644
--- a/nixpkgs/pkgs/os-specific/linux/dpdk/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/dpdk/default.nix
@@ -11,11 +11,11 @@ let
 
 in stdenv.mkDerivation rec {
   name = "dpdk-${version}" + lib.optionalString mod "-${kernel.version}";
-  version = "19.11";
+  version = "20.05";
 
   src = fetchurl {
     url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz";
-    sha256 = "1aqjn6bm9miv3v2rbqi1rh1c19wa8nip9fvnqaqpnrs3i2b36wa6";
+    sha256 = "0h0xv2zwb91b9n29afg5ihn06a8q28in64hag2f112kc19f79jj8";
   };
 
   nativeBuildInputs = [
@@ -38,7 +38,7 @@ in stdenv.mkDerivation rec {
   ] ++ lib.optionals mod kernel.moduleBuildDependencies;
 
   postPatch = ''
-    patchShebangs config/arm
+    patchShebangs config/arm buildtools
   '';
 
   mesonFlags = [
diff --git a/nixpkgs/pkgs/os-specific/linux/e1000e/default.nix b/nixpkgs/pkgs/os-specific/linux/e1000e/default.nix
index ea17c287a292..d5d6697a01e3 100644
--- a/nixpkgs/pkgs/os-specific/linux/e1000e/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/e1000e/default.nix
@@ -4,11 +4,11 @@ assert stdenv.lib.versionOlder kernel.version "4.10";
 
 stdenv.mkDerivation rec {
   name = "e1000e-${version}-${kernel.version}";
-  version = "3.3.5.3";
+  version = "3.8.4";
 
   src = fetchurl {
     url = "mirror://sourceforge/e1000/e1000e-${version}.tar.gz";
-    sha256 = "1ajz3vdnf1y307k585w95r6jlh4ah8d74bq36gdkjl1z5hgiqi9q";
+    sha256 = "1q8dbqh14c7r15q6k6iv5k0d6xpi74i71d5r54py60gr099m2ha4";
   };
 
   hardeningDisable = [ "pic" ];
@@ -16,7 +16,8 @@ stdenv.mkDerivation rec {
   configurePhase = ''
     cd src
     kernel_version=${kernel.modDirVersion}
-    sed -i -e 's|/lib/modules|${kernel.dev}/lib/modules|' Makefile
+    substituteInPlace common.mk \
+      --replace "/lib/modules" "${kernel.dev}/lib/modules"
     export makeFlags="BUILD_KERNEL=$kernel_version"
   '';
 
diff --git a/nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix b/nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix
index 8233c065c2b4..575da8aca732 100644
--- a/nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "earlyoom";
-  version = "1.6";
+  version = "1.6.1";
 
   src = fetchFromGitHub {
     owner = "rfjakob";
     repo = "earlyoom";
     rev = "v${version}";
-    sha256 = "0g2bjsvnqq5h4g1k3a0x6ixb334wpzbm2gafl78b6ic6j45smwcs";
+    sha256 = "1cn0bgbgiq69i8mk8zxly1f7j01afm82g672qzccz6swsi2637j4";
   };
 
   nativeBuildInputs = stdenv.lib.optionals withManpage [ pandoc installShellFiles ];
diff --git a/nixpkgs/pkgs/os-specific/linux/ell/default.nix b/nixpkgs/pkgs/os-specific/linux/ell/default.nix
index cb971d452d61..9faeb831b4b2 100644
--- a/nixpkgs/pkgs/os-specific/linux/ell/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/ell/default.nix
@@ -7,14 +7,14 @@
 
 stdenv.mkDerivation rec {
   pname = "ell";
-  version = "0.31";
+  version = "0.33";
 
   outputs = [ "out" "dev" ];
 
   src = fetchgit {
      url = "https://git.kernel.org/pub/scm/libs/${pname}/${pname}.git";
      rev = version;
-     sha256 = "1qlpc906xd78fzxvvj2kxi3aikgnw0c0h3x620s131apax4qrnqa";
+     sha256 = "0li788l57m2ic1i33fag4nnblqghbwqjyqkgppi8s2sifcvswfbw";
   };
 
   patches = [
diff --git a/nixpkgs/pkgs/os-specific/linux/evdi/default.nix b/nixpkgs/pkgs/os-specific/linux/evdi/default.nix
index 2a6ce13c1628..119ba22ca264 100644
--- a/nixpkgs/pkgs/os-specific/linux/evdi/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/evdi/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "evdi";
-  version = "unstable-20200222";
+  version = "unstable-20200416";
 
   src = fetchFromGitHub {
     owner = "DisplayLink";
     repo = pname;
-    rev = "bb3038c1b10aae99feddc7354c74a5bf22341246";
-    sha256 = "058f8gdma6fndg2w512l08mwl79h4hffacx4rnfkjxrb2ard3gd1";
+    rev = "dc595db636845aef39490496bc075f6bf067106c";
+    sha256 = "1yrny6jj9403z0rxbd3nxf49xc4w0rfpl7xsq03pq32pb3vlbqw7";
   };
 
   nativeBuildInputs = kernel.moduleBuildDependencies;
@@ -24,11 +24,12 @@ stdenv.mkDerivation rec {
 
   installPhase = ''
     install -Dm755 module/evdi.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/evdi/evdi.ko
-    install -Dm755 library/libevdi.so.1.6.4 $out/lib/libevdi.so
+    install -Dm755 library/libevdi.so $out/lib/libevdi.so
   '';
 
   meta = with stdenv.lib; {
     description = "Extensible Virtual Display Interface";
+    maintainers = with maintainers; [ eyjhb ];
     platforms = platforms.linux;
     license = with licenses; [ lgpl21 gpl2 ];
     homepage = "https://www.displaylink.com/";
diff --git a/nixpkgs/pkgs/os-specific/linux/eventstat/default.nix b/nixpkgs/pkgs/os-specific/linux/eventstat/default.nix
index 6dfaa6ab38bb..ca4984257212 100644
--- a/nixpkgs/pkgs/os-specific/linux/eventstat/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/eventstat/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   pname = "eventstat";
-  version = "0.04.09";
+  version = "0.04.10";
   src = fetchzip {
     url = "https://kernel.ubuntu.com/~cking/tarballs/eventstat/eventstat-${version}.tar.gz";
-    sha256 = "1b3m58mak62ym2amnmk62c2d6fypk30fw6jsmirh1qz7dwix4bl5";
+    sha256 = "0rmg49m56qxji7gwci03pkk4f4hnaq1n2x1348dqkaf5zs5nhi6b";
   };
   buildInputs = [ ncurses ];
   installFlags = [ "DESTDIR=$(out)" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/exfat/default.nix b/nixpkgs/pkgs/os-specific/linux/exfat/default.nix
index 59f9c709e5fa..5e212825bab3 100644
--- a/nixpkgs/pkgs/os-specific/linux/exfat/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/exfat/default.nix
@@ -5,14 +5,19 @@
 assert lib.versionAtLeast kernel.version  "4.2" || lib.versionOlder kernel.version "4.0";
 
 stdenv.mkDerivation rec {
+  # linux kernel above 5.7 comes with its own exfat implementation https://github.com/arter97/exfat-linux/issues/27
+  # Assertion moved here due to some tests unintenionally triggering it,
+  # e.g. nixosTests.kernel-latest; it's unclear how/why so far.
+  assertion = assert lib.versionOlder kernel.version "5.8"; null;
+
   name = "exfat-nofuse-${version}-${kernel.version}";
-  version = "2019-09-06";
+  version = "2020-04-15";
 
   src = fetchFromGitHub {
-    owner = "AdrianBan";
+    owner = "barrybingo";
     repo = "exfat-nofuse";
-    rev = "5536f067373c196f152061f5000fe0032dc07c48";
-    sha256 = "00mhadsv2iw8z00a6170hwbvk3afx484nn3irmd5f5kmhs34sw7k";
+    rev = "297a5739cd4a942a1d814d05a9cd9b542e7b8fc8";
+    sha256 = "14jahy7n6pr482fjfrlf9ck3f2rkr5ds0n5r85xdfsla37ria26d";
   };
 
   hardeningDisable = [ "pic" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/ffado/default.nix b/nixpkgs/pkgs/os-specific/linux/ffado/default.nix
index e814091d59e2..b93caccc7574 100644
--- a/nixpkgs/pkgs/os-specific/linux/ffado/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/ffado/default.nix
@@ -13,7 +13,7 @@
 , libxmlxx3
 , pkgconfig
 , python3
-, scons
+, sconsPackages
 , which
 , wrapQtAppsHook
 }:
@@ -45,7 +45,7 @@ mkDerivation rec {
 
   nativeBuildInputs = [
     desktop-file-utils
-    scons.py2
+    sconsPackages.scons_3_1_2
     pkgconfig
     which
     python
diff --git a/nixpkgs/pkgs/os-specific/linux/firejail/default.nix b/nixpkgs/pkgs/os-specific/linux/firejail/default.nix
index 8c7a109cb76b..272b8612d7a7 100644
--- a/nixpkgs/pkgs/os-specific/linux/firejail/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/firejail/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, which}:
+{stdenv, fetchurl, fetchpatch, which, nixosTests}:
 let
   s = # Generated upstream information
   rec {
@@ -20,6 +20,19 @@ stdenv.mkDerivation {
     name = "${s.name}.tar.bz2";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "CVE-2020-17367.patch";
+      url = "https://github.com/netblue30/firejail/commit/2c734d6350ad321fccbefc5ef0382199ac331b37.patch";
+      sha256 = "1gxz4jxp80gxnn46195qxcpmikwqab9d0ylj9zkm62lycp84ij6n";
+    })
+    (fetchpatch {
+      name = "CVE-2020-17368.patch";
+      url = "https://github.com/netblue30/firejail/commit/34193604fed04cad2b7b6b0f1a3a0428afd9ed5b.patch";
+      sha256 = "0n4ch3qykxx870201l8lz81f7h84vk93pzz77f5cjbd30cxnbddl";
+    })
+  ];
+
   prePatch = ''
     # Allow whitelisting ~/.nix-profile
     substituteInPlace etc/firejail.config --replace \
@@ -63,6 +76,8 @@ stdenv.mkDerivation {
   # bash: src/fsec-optimize/fsec-optimize: No such file or directory
   enableParallelBuilding = false;
 
+  passthru.tests = nixosTests.firejail;
+
   meta = {
     inherit (s) version;
     description = ''Namespace-based sandboxing tool for Linux'';
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/firmware-manager/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/firmware-manager/default.nix
new file mode 100644
index 000000000000..e98de6bbe9e8
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/firmware-manager/default.nix
@@ -0,0 +1,38 @@
+{ rustPlatform, lib, fetchFromGitHub, lzma, pkgconfig, openssl, dbus, glib, udev, cairo, pango, atk, gdk-pixbuf, gtk3, wrapGAppsHook }:
+rustPlatform.buildRustPackage rec {
+  pname = "firmware-manager";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "pop-os";
+    repo = pname;
+    rev = version;
+    sha256 = "0x9604jsflqxvbkfp139mzjicpyx8v21139jj8bp88c14ngvmdlw";
+  };
+
+  nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
+
+  buildInputs = [ lzma openssl dbus glib udev cairo pango atk gdk-pixbuf gtk3 ];
+
+  depsExtraArgs.postPatch = "make prefix='$(out)' toml-gen";
+
+  postPatch = ''
+    sed -i 's|etc|$(prefix)/etc|' Makefile
+  '';
+
+  buildPhase = "make prefix='$(out)'";
+
+  installPhase = "make prefix='$(out)' install";
+
+  cargoSha256 = "0byc0pqa1w2qnfrx3psrzdq1c8qjslbmzxg872b9v6fr5d4c9cvg";
+
+  doCheck = false;
+
+  meta = {
+    description = "Graphical frontend for firmware management";
+    homepage = "https://github.com/pop-os/firmware-manager";
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.shlevy ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix
index af9237d1d833..d502d049ace4 100644
--- a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix
@@ -5,9 +5,9 @@
 , fetchpatch
 , substituteAll
 , gtk-doc
-, pkgconfig
+, pkg-config
 , gobject-introspection
-, intltool
+, gettext
 , libgudev
 , polkit
 , libxmlb
@@ -23,13 +23,12 @@
 , libsmbios
 , efivar
 , gnu-efi
-, libyaml
 , valgrind
 , meson
 , libuuid
 , colord
 , docbook_xml_dtd_43
-, docbook_xsl
+, docbook-xsl-nons
 , ninja
 , gcab
 , python3
@@ -67,10 +66,6 @@ let
     requests
   ]);
 
-  fontsConf = makeFontsConf {
-    fontDirectories = [ freefont_ttf ];
-  };
-
   isx86 = stdenv.isx86_64 || stdenv.isi686;
 
   # Dell isn't supported on Aarch64
@@ -93,30 +88,50 @@ let
 
   self = stdenv.mkDerivation rec {
     pname = "fwupd";
-    version = "1.4.4";
-
-    src = fetchurl {
-      url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
-      sha256 = "03yn96kxs53vxcbza17y99rdhbjlybv44gkc90vaj6301grxahnp";
-    };
+    version = "1.4.6";
 
     # libfwupd goes to lib
     # daemon, plug-ins and libfwupdplugin go to out
     # CLI programs go to out
     outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ];
 
+    src = fetchurl {
+      url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
+      sha256 = "AKG5stioIveQc7ooYb/2UoOaBzbPUFzYk8tZK0rzvK0=";
+    };
+
+    patches = [
+      # Do not try to create useless paths in /var.
+      ./fix-paths.patch
+
+      # Allow installing
+      ./add-option-for-installation-sysconfdir.patch
+
+      # Install plug-ins and libfwupdplugin to out,
+      # they are not really part of the library.
+      ./install-fwupdplugin-to-out.patch
+
+      # Installed tests are installed to different output
+      # we also cannot have fwupd-tests.conf in $out/etc since it would form a cycle.
+      (substituteAll {
+        src = ./installed-tests-path.patch;
+        # Needs a different set of modules than po/make-images.
+        inherit installedTestsPython;
+      })
+    ];
+
     nativeBuildInputs = [
       meson
       ninja
       gtk-doc
-      pkgconfig
+      pkg-config
       gobject-introspection
-      intltool
+      gettext
       shared-mime-info
       valgrind
       gcab
       docbook_xml_dtd_43
-      docbook_xsl
+      docbook-xsl-nons
       help2man
       libxslt
       python
@@ -133,7 +148,6 @@ let
       libsoup
       elfutils
       gnu-efi
-      libyaml
       libgudev
       colord
       libjcat
@@ -152,50 +166,6 @@ let
       libsmbios
     ];
 
-    patches = [
-      ./fix-paths.patch
-      ./add-option-for-installation-sysconfdir.patch
-
-      # Install plug-ins and libfwupdplugin to out,
-      # they are not really part of the library.
-      ./install-fwupdplugin-to-out.patch
-
-      # Installed tests are installed to different output
-      # we also cannot have fwupd-tests.conf in $out/etc since it would form a cycle.
-      (substituteAll {
-        src = ./installed-tests-path.patch;
-        # Needs a different set of modules than po/make-images.
-        inherit installedTestsPython;
-      })
-    ];
-
-    postPatch = ''
-      patchShebangs \
-        contrib/get-version.py \
-        contrib/generate-version-script.py \
-        meson_post_install.sh \
-        po/make-images \
-        po/make-images.sh \
-        po/test-deps
-    '';
-
-    # /etc/os-release not available in sandbox
-    # doCheck = true;
-
-    preFixup = let
-      binPath = [
-        efibootmgr
-        bubblewrap
-        tpm2-tools
-      ] ++ stdenv.lib.optional haveFlashrom flashrom;
-    in ''
-      gappsWrapperArgs+=(
-        --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
-        # See programs reached with fu_common_find_program_in_path in source
-        --prefix PATH : "${stdenv.lib.makeBinPath binPath}"
-      )
-    '';
-
     mesonFlags = [
       "-Dgtkdoc=true"
       "-Dplugin_dummy=true"
@@ -223,20 +193,57 @@ let
       "-Dplugin_flashrom=true"
     ];
 
-    FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
+    # TODO: wrapGAppsHook wraps efi capsule even though it is not ELF
+    dontWrapGApps = true;
+
+    # /etc/os-release not available in sandbox
+    # doCheck = true;
+
+    # Environment variables
+
+    # Fontconfig error: Cannot load default config file
+    FONTCONFIG_FILE =
+      let
+        fontsConf = makeFontsConf {
+          fontDirectories = [ freefont_ttf ];
+        };
+      in fontsConf;
 
     # error: “PolicyKit files are missing”
     # https://github.com/NixOS/nixpkgs/pull/67625#issuecomment-525788428
     PKG_CONFIG_POLKIT_GOBJECT_1_ACTIONDIR = "/run/current-system/sw/share/polkit-1/actions";
 
-    # TODO: wrapGAppsHook wraps efi capsule even though it is not elf
-    dontWrapGApps = true;
+    # Phase hooks
+
+    postPatch = ''
+      patchShebangs \
+        contrib/get-version.py \
+        contrib/generate-version-script.py \
+        meson_post_install.sh \
+        po/make-images \
+        po/make-images.sh \
+        po/test-deps
+    '';
 
     preCheck = ''
       addToSearchPath XDG_DATA_DIRS "${shared-mime-info}/share"
     '';
 
-    # so we need to wrap the executables manually
+    preFixup = let
+      binPath = [
+        efibootmgr
+        bubblewrap
+        tpm2-tools
+      ] ++ stdenv.lib.optional haveFlashrom flashrom;
+    in ''
+      gappsWrapperArgs+=(
+        --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
+        # See programs reached with fu_common_find_program_in_path in source
+        --prefix PATH : "${stdenv.lib.makeBinPath binPath}"
+      )
+    '';
+
+    # Since we had to disable wrapGAppsHook, we need to wrap the executables manually.
     postFixup = ''
       find -L "$out/bin" "$out/libexec" -type f -executable -print0 \
         | while IFS= read -r -d ''' file; do
@@ -307,7 +314,7 @@ let
     meta = with stdenv.lib; {
       homepage = "https://fwupd.org/";
       maintainers = with maintainers; [ jtojnar ];
-      license = [ licenses.gpl2 ];
+      license = licenses.lgpl21Plus;
       platforms = platforms.linux;
     };
   };
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/system76-firmware/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
new file mode 100644
index 000000000000..40598abac921
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
@@ -0,0 +1,39 @@
+{ rustPlatform, lib, fetchFromGitHub, lzma, pkgconfig, openssl, dbus, efibootmgr, makeWrapper }:
+rustPlatform.buildRustPackage rec {
+  pname = "system76-firmware";
+  # Check Makefile when updating, make sure postInstall matches make install
+  version = "1.0.17";
+
+  src = fetchFromGitHub {
+    owner = "pop-os";
+    repo = pname;
+    rev = version;
+    sha256 = "0cnrskfk3sam90lfpgsraqs4bx9yz8rxhwfs8rxdri04lakxgghg";
+  };
+
+  nativeBuildInputs = [ pkgconfig makeWrapper ];
+
+  buildInputs = [ lzma openssl dbus ];
+
+  cargoBuildFlags = [ "--workspace" ];
+
+  cargoSha256 = "06jrmxy68glcmbn9px29wc0s8pqdn26iy4jn3c246dapv1zvbb4s";
+
+  # Purposefully don't install systemd unit file, that's for NixOS
+  postInstall = ''
+    install -D -m -0644 data/system76-firmware-daemon.conf $out/etc/dbus-1/system.d/system76-firmware-daemon.conf
+
+    for bin in $out/bin/system76-firmware-*
+    do
+      wrapProgram $bin --prefix PATH : "${efibootmgr}/bin"
+    done
+  '';
+
+  meta = {
+    description = "Tools for managing firmware updates for system76 devices.";
+    homepage = "https://github.com/pop-os/system76-firmware";
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.shlevy ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/fnotifystat/default.nix b/nixpkgs/pkgs/os-specific/linux/fnotifystat/default.nix
index ef247ad956b6..f01c96259a80 100644
--- a/nixpkgs/pkgs/os-specific/linux/fnotifystat/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/fnotifystat/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   pname = "fnotifystat";
-  version = "0.02.05";
+  version = "0.02.06";
   src = fetchurl {
     url = "https://kernel.ubuntu.com/~cking/tarballs/fnotifystat/fnotifystat-${version}.tar.gz";
-    sha256 = "1b8pxq731sj976m2daf0hnqfaaq688vqnjffinpwh2w9nzzi4gi9";
+    sha256 = "1mr2qzh8r8qq7haz4qgci2k5lcrcy493fm0m3ri40a81vaajfniy";
   };
   installFlags = [ "DESTDIR=$(out)" ];
   postInstall = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/forkstat/default.nix b/nixpkgs/pkgs/os-specific/linux/forkstat/default.nix
index eee4691aeb30..d42091085baf 100644
--- a/nixpkgs/pkgs/os-specific/linux/forkstat/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/forkstat/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   pname = "forkstat";
-  version = "0.02.14";
+  version = "0.02.15";
   src = fetchurl {
     url = "https://kernel.ubuntu.com/~cking/tarballs/forkstat/forkstat-${version}.tar.xz";
-    sha256 = "10kibb5psb5gqdmq9lfb7qw566diwg54gdb49b5zd71qwpybk3dl";
+    sha256 = "11dvg7bbklpfywx6i6vb29vvc28pbfk3mff0g18n5imxvzsd7jxs";
   };
   installFlags = [ "DESTDIR=$(out)" ];
   postInstall = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/fscrypt/default.nix b/nixpkgs/pkgs/os-specific/linux/fscrypt/default.nix
index aee406b03f0c..000400e4cdf9 100644
--- a/nixpkgs/pkgs/os-specific/linux/fscrypt/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/fscrypt/default.nix
@@ -21,6 +21,8 @@ buildGoModule rec {
 
   vendorSha256 = "0yak221mlyfacvlsaq9g3xiyk94n94vqgkbaji8d21pi8hhr38m6";
 
+  doCheck = false;
+
   nativeBuildInputs = [ gnum4 ];
   buildInputs = [ pam ];
 
@@ -32,10 +34,6 @@ buildGoModule rec {
     make install
   '';
 
-  preFixup = ''
-    remove-references-to -t ${fscrypt-experimental.go} $out/lib/security/pam_fscrypt.so
-  '';
-
   meta = with stdenv.lib; {
     description =
       "A high-level tool for the management of Linux filesystem encryption";
diff --git a/nixpkgs/pkgs/os-specific/linux/fswebcam/default.nix b/nixpkgs/pkgs/os-specific/linux/fswebcam/default.nix
index 53a1bdbc4c7e..fc1a25633821 100644
--- a/nixpkgs/pkgs/os-specific/linux/fswebcam/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/fswebcam/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, libv4l, gd }:
 
 stdenv.mkDerivation rec {
-  name = "fswebcam-20140113";
+  name = "fswebcam-20200725";
 
   src = fetchurl {
     url = "https://www.sanslogic.co.uk/fswebcam/files/${name}.tar.gz";
-    sha256 = "3ee389f72a7737700d22e0c954720b1e3bbadc8a0daad6426c25489ba9dc3199";
+    sha256 = "1dazsrcaw9s30zz3jpxamk9lkff5dkmflp1s0jjjvdbwa0k6k6ii";
   };
 
   buildInputs =
diff --git a/nixpkgs/pkgs/os-specific/linux/fuse/common.nix b/nixpkgs/pkgs/os-specific/linux/fuse/common.nix
index b0f684e6242a..2010be53c2d8 100644
--- a/nixpkgs/pkgs/os-specific/linux/fuse/common.nix
+++ b/nixpkgs/pkgs/os-specific/linux/fuse/common.nix
@@ -2,7 +2,7 @@
 
 { stdenv, fetchFromGitHub, fetchpatch
 , fusePackages, utillinux, gettext
-, meson, ninja, pkgconfig
+, meson, ninja, pkg-config
 , autoreconfHook
 , python3Packages, which
 }:
@@ -34,7 +34,7 @@ in stdenv.mkDerivation rec {
       else [ ./fuse2-Do-not-set-FUSERMOUNT_DIR.patch ]);
 
   nativeBuildInputs = if isFuse3
-    then [ meson ninja pkgconfig ]
+    then [ meson ninja pkg-config ]
     else [ autoreconfHook gettext ];
 
   outputs = [ "out" ] ++ stdenv.lib.optional isFuse3 "common";
@@ -60,6 +60,10 @@ in stdenv.mkDerivation rec {
       # ./fuse3-install_man.patch)
       install -D -m444 doc/fusermount3.1 $out/share/man/man1/fusermount3.1
       install -D -m444 doc/mount.fuse3.8 $out/share/man/man8/mount.fuse3.8
+
+      # TODO: Temporary version fix:
+      substituteInPlace meson.build \
+        --replace "version: '3.9.3'" "version: '${version}'"
     '' else ''
       sed -e 's@CONFIG_RPATH=/usr/share/gettext/config.rpath@CONFIG_RPATH=${gettext}/share/gettext/config.rpath@' -i makeconf.sh
       ./makeconf.sh
diff --git a/nixpkgs/pkgs/os-specific/linux/fuse/default.nix b/nixpkgs/pkgs/os-specific/linux/fuse/default.nix
index 4d2e12367de7..8c342743dfce 100644
--- a/nixpkgs/pkgs/os-specific/linux/fuse/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/fuse/default.nix
@@ -11,7 +11,7 @@ in {
   };
 
   fuse_3 = mkFuse {
-    version = "3.9.2";
-    sha256Hash = "10xsbly7rv895c9zv4fqmnrxbdc0kd1qhlk75x4m9cv95f93k843";
+    version = "3.9.4";
+    sha256Hash = "1j11niqw3p94yd6mfdrkdra0nic8a38fc179y5h9yz81q39m2f3b";
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/fwts/default.nix b/nixpkgs/pkgs/os-specific/linux/fwts/default.nix
index d05a8c52551b..5de0eea0beac 100644
--- a/nixpkgs/pkgs/os-specific/linux/fwts/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/fwts/default.nix
@@ -3,11 +3,11 @@
 
 stdenv.mkDerivation rec {
   pname = "fwts";
-  version = "20.05.00";
+  version = "20.08.00";
 
   src = fetchzip {
     url = "http://fwts.ubuntu.com/release/${pname}-V${version}.tar.gz";
-    sha256 = "14rqm45al6w42mzi0rqpwbw1spy7iv1jhywhwkdgs4w91zzc4gaj";
+    sha256 = "098vxj5sd2nm88jmj6cxzcvid8w81m8fxdz881iki0pi7ysixa5q";
     stripRoot = false;
   };
 
diff --git a/nixpkgs/pkgs/os-specific/linux/gobi_loader/default.nix b/nixpkgs/pkgs/os-specific/linux/gobi_loader/default.nix
new file mode 100644
index 000000000000..b8735354c2c6
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/gobi_loader/default.nix
@@ -0,0 +1,28 @@
+{ stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gobi_loader";
+  version = "0.7";
+
+  src = fetchurl {
+    url = "https://www.codon.org.uk/~mjg59/gobi_loader/download/${pname}-${version}.tar.gz";
+    sha256 = "0jkmpqkiddpxrzl2s9s3kh64ha48m00nn53f82m1rphw8maw5gbq";
+  };
+
+  postPatch = ''
+    substituteInPlace 60-gobi.rules --replace "gobi_loader" "${placeholder "out"}/lib/udev/gobi_loader"
+    substituteInPlace 60-gobi.rules --replace "/lib/firmware" "/run/current-system/firmware"
+  '';
+
+  makeFlags = "prefix=${placeholder "out"}";
+
+  meta = with stdenv.lib; {
+    description = "Firmware loader for Qualcomm Gobi USB chipsets";
+    homepage = "https://www.codon.org.uk/~mjg59/gobi_loader/";
+    license = with licenses; [ gpl2 ];
+    maintainers = with maintainers; [ _0x4A6F ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/guvcview/default.nix b/nixpkgs/pkgs/os-specific/linux/guvcview/default.nix
index 41c21502e0b3..d780cade7865 100644
--- a/nixpkgs/pkgs/os-specific/linux/guvcview/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/guvcview/default.nix
@@ -5,7 +5,7 @@
 , pkgconfig
 , portaudio
 , SDL2
-, ffmpeg_3
+, ffmpeg
 , udev
 , libusb1
 , libv4l
@@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
   buildInputs = [
     SDL2
     alsaLib
-    ffmpeg_3
+    ffmpeg
     libusb1
     libv4l
     portaudio
diff --git a/nixpkgs/pkgs/os-specific/linux/hwdata/default.nix b/nixpkgs/pkgs/os-specific/linux/hwdata/default.nix
index 2f6e6cd5cc9a..9b54f404f72e 100644
--- a/nixpkgs/pkgs/os-specific/linux/hwdata/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/hwdata/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "hwdata";
-  version = "0.316";
+  version = "0.335";
 
   src = fetchFromGitHub {
     owner = "vcrhonek";
     repo = "hwdata";
     rev = "v${version}";
-    sha256 = "0k3fypykbq9943cnxlmmpk0xp9nhhf46pfdhkgm99iaa27b8s1gb";
+    sha256 = "0f8ikwfrs6xd5sywypd9rq9cln8a0rf3vj6nm0adwzn1p8mgmrb2";
   };
 
   preConfigure = "patchShebangs ./configure";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   outputHashMode = "recursive";
   outputHashAlgo = "sha256";
-  outputHash = "0g2w4jr4p1hykracp2za7jb0rcr51kks1m43pzcaf7g99x8669ww";
+  outputHash = "101lppd1805drwd038b4njr5czzjnqqxf3xlf6v3l22wfwr2cn3l";
 
   meta = {
     homepage = "https://github.com/vcrhonek/hwdata";
diff --git a/nixpkgs/pkgs/os-specific/linux/ifmetric/default.nix b/nixpkgs/pkgs/os-specific/linux/ifmetric/default.nix
new file mode 100644
index 000000000000..1f69d728f604
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/ifmetric/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, lynx }:
+
+stdenv.mkDerivation rec {
+  pname = "ifmetric";
+  version = "0.3";
+
+  src = fetchurl {
+    url = "http://0pointer.de/lennart/projects/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "1v0s5x81jzwnnl7hr254d4nkyc8qcv983pzr6vqmbr9l9q553a0g";
+  };
+
+  buildInputs = [ lynx ];
+
+  patches = [
+    # Fixes an issue related to the netlink API.
+    # Upstream is largely inactive; this is a Debian patch.
+    (fetchurl {
+      url = "https://launchpadlibrarian.net/85974387/10_netlink_fix.patch";
+      sha256 = "1pnlcr0qvk0bd5243wpg14i387zp978f4xhwwkcqn1cir91x7fbc";
+    })
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Tool for setting IP interface metrics";
+    longDescription = ''
+      ifmetric is a Linux tool for setting the metrics of all IPv4 routes
+      attached to a given network interface at once. This may be used to change
+      the priority of routing IPv4 traffic over the interface. Lower metrics
+      correlate with higher priorities.
+    '';
+    homepage = "http://0pointer.de/lennart/projects/ifmetric";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.anna328p ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/default.nix b/nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/default.nix
index 869041256b62..bba3549daf67 100644
--- a/nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/default.nix
@@ -11,18 +11,15 @@
 
 stdenv.mkDerivation rec {
   pname = "intel-compute-runtime";
-  version = "20.02.15268";
+  version = "20.33.17675";
 
   src = fetchFromGitHub {
     owner = "intel";
     repo = "compute-runtime";
     rev = version;
-    sha256 = "138gi92w85bn6haw5x38k39pgiyvvzfhiwpvz6hqlx2j03n8cs2k";
+    sha256 = "1ckzspf05skdrjh947gv96finxbv5dpgc84hppm5pdsp5q70iyxp";
   };
 
-  # Build script tries to write the ICD to /etc
-  patches = [ ./etc-dir.patch ];
-
   nativeBuildInputs = [ cmake pkgconfig ];
 
   buildInputs = [ intel-gmmlib intel-graphics-compiler libva ];
@@ -31,7 +28,7 @@ stdenv.mkDerivation rec {
     "-DSKIP_UNIT_TESTS=1"
 
     "-DIGC_DIR=${intel-graphics-compiler}"
-    "-DETC_DIR=${placeholder "out"}/etc"
+    "-DOCL_ICD_VENDORDIR=${placeholder "out"}/etc/OpenCL/vendors"
 
     # The install script assumes this path is relative to CMAKE_INSTALL_PREFIX
     "-DCMAKE_INSTALL_LIBDIR=lib"
@@ -43,7 +40,7 @@ stdenv.mkDerivation rec {
   '';
 
   postFixup = ''
-    patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ intel-gmmlib intel-graphics-compiler libva ]} \
+    patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ intel-gmmlib intel-graphics-compiler libva stdenv.cc.cc.lib ]} \
       $out/lib/intel-opencl/libigdrcl.so
   '';
 
diff --git a/nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/etc-dir.patch b/nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/etc-dir.patch
deleted file mode 100644
index d9a80ffa6f97..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/etc-dir.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/package.cmake b/package.cmake
-index 24960d5..e9a21e7 100644
---- a/package.cmake
-+++ b/package.cmake
-@@ -24,7 +24,9 @@ if(UNIX)
- 
-   get_os_release_info(os_name os_version)
- 
--  if("${os_name}" STREQUAL "clear-linux-os")
-+  if(DEFINED ETC_DIR)
-+    set(_dir_etc ${ETC_DIR})
-+  elseif("${os_name}" STREQUAL "clear-linux-os")
-     # clear-linux-os distribution avoids /etc for distribution defaults.
-     set(_dir_etc "/usr/share/defaults/etc")
-   else()
diff --git a/nixpkgs/pkgs/os-specific/linux/iproute/default.nix b/nixpkgs/pkgs/os-specific/linux/iproute/default.nix
index 3ac79464ac4b..a9fcf455ee43 100644
--- a/nixpkgs/pkgs/os-specific/linux/iproute/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iproute/default.nix
@@ -5,16 +5,19 @@
 
 stdenv.mkDerivation rec {
   pname = "iproute2";
-  version = "5.7.0";
+  version = "5.8.0";
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/net/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "088gs56iqhdlpw1iqjwrss4zxd4zbl2wl8s2implrrdajjxcfpbj";
+    sha256 = "0vk4vickrpahdhl3zazr2qn2bf99v5549ncirjpwiy4h0a4izkfg";
   };
 
   preConfigure = ''
     # Don't try to create /var/lib/arpd:
     sed -e '/ARPDDIR/d' -i Makefile
+    # TODO: Drop temporary version fix for 5.8 (53159d81) once 5.9 is out:
+    substituteInPlace include/version.h \
+      --replace "v5.7.0-77-gb687d1067169" "5.8.0"
   '';
 
   outputs = [ "out" "dev" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/iproute/mptcp.nix b/nixpkgs/pkgs/os-specific/linux/iproute/mptcp.nix
index 4a58ae9e0469..63f0abcd2a29 100644
--- a/nixpkgs/pkgs/os-specific/linux/iproute/mptcp.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iproute/mptcp.nix
@@ -11,6 +11,12 @@ iproute.overrideAttrs (oa: rec {
     sha256 = "07fihvwlaj0ng8s8sxqhd0a9h1narcnp4ibk88km9cpsd32xv4q3";
   };
 
+  preConfigure = ''
+    # Don't try to create /var/lib/arpd:
+    sed -e '/ARPDDIR/d' -i Makefile
+    patchShebangs configure
+  '';
+
   meta = with stdenv.lib; {
     homepage = "https://github.com/multipath-tcp/iproute-mptcp";
     description = "IP-Route extensions for MultiPath TCP";
diff --git a/nixpkgs/pkgs/os-specific/linux/iptables/default.nix b/nixpkgs/pkgs/os-specific/linux/iptables/default.nix
index 7502769c3aed..c9c342ad7682 100644
--- a/nixpkgs/pkgs/os-specific/linux/iptables/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iptables/default.nix
@@ -6,12 +6,12 @@
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  version = "1.8.4";
+  version = "1.8.5";
   pname = "iptables";
 
   src = fetchurl {
     url = "https://www.netfilter.org/projects/${pname}/files/${pname}-${version}.tar.bz2";
-    sha256 = "0z0mgs1ghvn3slc868mgbf2g26njgrzcy5ggyb5w4i55j1a3lflr";
+    sha256 = "02a3575ypdpg6a2x752mhk3f7h1381ymkq1n0gss6fp6292xfmyl";
   };
 
   nativeBuildInputs = [ pkgconfig pruneLibtoolFiles flex bison ];
diff --git a/nixpkgs/pkgs/os-specific/linux/iptstate/default.nix b/nixpkgs/pkgs/os-specific/linux/iptstate/default.nix
index cd290113e00e..529a82e96469 100644
--- a/nixpkgs/pkgs/os-specific/linux/iptstate/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iptstate/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
     platforms = platforms.linux;
     maintainers = with maintainers; [ trevorj ];
     downloadPage = "https://github.com/jaymzh/iptstate/releases";
+    license = licenses.zlib;
   };
 
   installPhase = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/iputils/default.nix b/nixpkgs/pkgs/os-specific/linux/iputils/default.nix
index 127846383484..e12c44888a0b 100644
--- a/nixpkgs/pkgs/os-specific/linux/iputils/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iputils/default.nix
@@ -1,12 +1,12 @@
-{ stdenv, fetchFromGitHub, fetchpatch
+{ stdenv, fetchFromGitHub
 , meson, ninja, pkgconfig, gettext, libxslt, docbook_xsl_ns
-, libcap, nettle, libidn2, systemd
+, libcap, systemd, libidn2
 }:
 
 with stdenv.lib;
 
 let
-  version = "20190709";
+  version = "20200821";
   sunAsIsLicense = {
     fullName = "AS-IS, SUN MICROSYSTEMS license";
     url = "https://github.com/iputils/iputils/blob/s${version}/rdisc.c";
@@ -19,26 +19,27 @@ in stdenv.mkDerivation rec {
     owner = pname;
     repo = pname;
     rev = "s${version}";
-    sha256 = "04bp4af15adp79ipxmiakfp0ij6hx5qam266flzbr94pr8z8l693";
+    sha256 = "1jhbcz75a4ij1myyyi110ma1d8d5hpm3scz9pyw7js6qym50xvh4";
   };
 
-  mesonFlags =
-    [ "-DUSE_CRYPTO=nettle"
-      "-DBUILD_RARPD=true"
-      "-DBUILD_TRACEROUTE6=true"
-      "-DNO_SETCAP_OR_SUID=true"
-      "-Dsystemdunitdir=etc/systemd/system"
-    ]
+  mesonFlags = [
+    "-DBUILD_RARPD=true"
+    "-DBUILD_TRACEROUTE6=true"
+    "-DBUILD_TFTPD=true"
+    "-DNO_SETCAP_OR_SUID=true"
+    "-Dsystemdunitdir=etc/systemd/system"
+  ]
     # Disable idn usage w/musl (https://github.com/iputils/iputils/pull/111):
     ++ optional stdenv.hostPlatform.isMusl "-DUSE_IDN=false";
 
   nativeBuildInputs = [ meson ninja pkgconfig gettext libxslt.bin docbook_xsl_ns ];
-  buildInputs = [ libcap nettle systemd ]
+  buildInputs = [ libcap systemd ]
     ++ optional (!stdenv.hostPlatform.isMusl) libidn2;
 
   meta = {
-    homepage = "https://github.com/iputils/iputils";
     description = "A set of small useful utilities for Linux networking";
+    inherit (src.meta) homepage;
+    changelog = "https://github.com/iputils/iputils/releases/tag/s${version}";
     license = with licenses; [ gpl2Plus bsd3 sunAsIsLicense ];
     platforms = platforms.linux;
     maintainers = with maintainers; [ primeos lheckemann ];
diff --git a/nixpkgs/pkgs/os-specific/linux/irqbalance/default.nix b/nixpkgs/pkgs/os-specific/linux/irqbalance/default.nix
index 4c4e1ff025d9..d61d02b5598d 100644
--- a/nixpkgs/pkgs/os-specific/linux/irqbalance/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/irqbalance/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "irqbalance";
-  version = "1.6.0";
+  version = "1.7.0";
 
   src = fetchFromGitHub {
     owner = "irqbalance";
     repo = "irqbalance";
     rev = "v${version}";
-    sha256 = "01r9s63yxaijg8jqcbkwqlyqq2z673szb0vzd7qb2y3gk5jlif2y";
+    sha256 = "1677ap6z4hvwga0vb8hrvpc0qggyarg9mlg11pxywz7mq94vdx19";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
diff --git a/nixpkgs/pkgs/os-specific/linux/iw/default.nix b/nixpkgs/pkgs/os-specific/linux/iw/default.nix
index 585bbfd165e2..cbd19b7da8b4 100644
--- a/nixpkgs/pkgs/os-specific/linux/iw/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iw/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "iw";
-  version = "5.4";
+  version = "5.8";
 
   src = fetchurl {
     url = "https://www.kernel.org/pub/software/network/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "0prrgb11pjrr6dw71v7nx2bic127qzrjifvz183v3mw8f1kryim2";
+    sha256 = "1d1dfynrzh52zdia1l23ajv4q5wixgffnc1gkz05qrxnn2n4p75m";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/nixpkgs/pkgs/os-specific/linux/iwd/default.nix b/nixpkgs/pkgs/os-specific/linux/iwd/default.nix
index be2a4ff3e56a..adf37a1b71b6 100644
--- a/nixpkgs/pkgs/os-specific/linux/iwd/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iwd/default.nix
@@ -13,14 +13,16 @@
 
 stdenv.mkDerivation rec {
   pname = "iwd";
-  version = "1.7";
+  version = "1.9";
 
   src = fetchgit {
     url = "https://git.kernel.org/pub/scm/network/wireless/iwd.git";
     rev = version;
-    sha256 = "1qi25qav1rv8gm5lbrip8ayq5vwynmyv2q4ar7bbmnjh6cglvyh2";
+    sha256 = "193wa13i2prfz1zr7nvwbgrxgacms57zj1n7x28yy5hmm3nnwbrd";
   };
 
+  outputs = [ "out" "man" ];
+
   nativeBuildInputs = [
     autoreconfHook
     docutils
diff --git a/nixpkgs/pkgs/os-specific/linux/jool/source.nix b/nixpkgs/pkgs/os-specific/linux/jool/source.nix
index 9e8de46edba7..abf7b0dac45f 100644
--- a/nixpkgs/pkgs/os-specific/linux/jool/source.nix
+++ b/nixpkgs/pkgs/os-specific/linux/jool/source.nix
@@ -1,11 +1,11 @@
 { fetchFromGitHub }:
 
 rec {
-  version = "4.0.5";
+  version = "4.0.9";
   src = fetchFromGitHub {
     owner = "NICMx";
     repo = "Jool";
     rev = "v${version}";
-    sha256 = "0zfda8mbcg4mgg39shxdx5n2bq6zi9w3v8bcx03b3dp09lmq45y3";
+    sha256 = "0zhdpk1sbsv1iyr9rvj94wk853684avz3zzn4cv2k4254d7n25m7";
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix b/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix
index 06eb81a49b00..8bd5d0212044 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix
@@ -244,6 +244,8 @@ let
       DRM_AMDGPU_SI = whenAtLeast "4.9" yes;
       # (stable) amdgpu support for bonaire and newer chipsets
       DRM_AMDGPU_CIK = whenAtLeast "4.9" yes;
+      # Allow device firmware updates
+      DRM_DP_AUX_CHARDEV = whenAtLeast "4.6" yes;
     } // optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux") {
       # Intel GVT-g graphics virtualization supports 64-bit only
       DRM_I915_GVT = whenAtLeast "4.16" yes;
@@ -257,7 +259,7 @@ let
       SND_HDA_RECONFIG    = yes; # Support reconfiguration of jack functions
       # Support configuring jack functions via fw mechanism at boot
       SND_HDA_PATCH_LOADER = yes;
-      SND_HDA_CODEC_CA0132_DSP = whenOlder "5.8" yes; # Enable DSP firmware loading on Creative Soundblaster Z/Zx/ZxR/Recon
+      SND_HDA_CODEC_CA0132_DSP = whenOlder "5.7" yes; # Enable DSP firmware loading on Creative Soundblaster Z/Zx/ZxR/Recon
       SND_OSSEMUL         = yes;
       SND_USB_CAIAQ_INPUT = yes;
       # Enable PSS mixer (Beethoven ADSP-16 and other compatible)
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/gpio-utils.nix b/nixpkgs/pkgs/os-specific/linux/kernel/gpio-utils.nix
index 447704eedc8d..e28d838efb3f 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/gpio-utils.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/gpio-utils.nix
@@ -18,7 +18,8 @@ stdenv.mkDerivation {
 
   meta = {
     description = "Linux tools to inspect the gpiochip interface";
-    maintainers = with stdenv.lib.maintainers; [ kwohlfahrt ];
-    platforms = stdenv.lib.platforms.linux;
+    maintainers = with maintainers; [ kwohlfahrt ];
+    platforms = platforms.linux;
+    license = licenses.gpl2;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix
index e531f878d029..d3ea80ecb22d 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix
@@ -1,8 +1,8 @@
 { stdenv, lib, fetchsvn, linux
 , scripts ? fetchsvn {
     url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/";
-    rev = "17537";
-    sha256 = "15fj5ba28jw515fzfp4pbrkpq5xyvxvx7r9yh1l0qsxjzs2zml8b";
+    rev = "17624";
+    sha256 = "0gs3mpiffny408l9kdrxpj48axarfb2fxvcw4w8zsz5wr7yig0n2";
   }
 , ...
 }:
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix
new file mode 100644
index 000000000000..f58f08ca913d
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix
@@ -0,0 +1,41 @@
+{ lib, buildLinux, fetchurl
+, kernelPatches ? [ ]
+, structuredExtraConfig ? {}
+, extraMeta ? {}
+, argsOverride ? {}
+, ... } @ args:
+
+let
+  version = "5.4.66-rt38"; # updated by ./update-rt.sh
+  branch = lib.versions.majorMinor version;
+  kversion = builtins.elemAt (lib.splitString "-" version) 0;
+in buildLinux (args // {
+  inherit version;
+
+  src = fetchurl {
+    url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz";
+    sha256 = "1cnsrz21kcf0h7krpv9p1a7n59mybr5ii0jdi3yc3x3lcwvk06gz";
+  };
+
+  kernelPatches = let rt-patch = {
+    name = "rt";
+    patch = fetchurl {
+      url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
+      sha256 = "1w0v5wl5fhxl5axd4701dljxhv9rywpgiix3yv7l6i3c5b8iw1zi";
+    };
+  }; in [ rt-patch ] ++ lib.remove rt-patch kernelPatches;
+
+  structuredExtraConfig = with lib.kernel; {
+    PREEMPT_RT = yes;
+    # Fix error: unused option: PREEMPT_RT.
+    EXPERT = yes; # PREEMPT_RT depends on it (in kernel/Kconfig.preempt)
+    # Fix error: option not set correctly: PREEMPT_VOLUNTARY (wanted 'y', got 'n').
+    PREEMPT_VOLUNTARY = lib.mkForce no; # PREEMPT_RT deselects it.
+    # Fix error: unused option: RT_GROUP_SCHED.
+    RT_GROUP_SCHED = lib.mkForce (option no); # Removed by sched-disable-rt-group-sched-on-rt.patch.
+  } // structuredExtraConfig;
+
+  extraMeta = extraMeta // {
+    inherit branch;
+  };
+} // argsOverride)
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.6.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.6.nix
new file mode 100644
index 000000000000..7c77454040d5
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.6.nix
@@ -0,0 +1,41 @@
+{ lib, buildLinux, fetchurl
+, kernelPatches ? [ ]
+, structuredExtraConfig ? {}
+, extraMeta ? {}
+, argsOverride ? {}
+, ... } @ args:
+
+let
+  version = "5.6.19-rt12"; # updated by ./update-rt.sh
+  branch = lib.versions.majorMinor version;
+  kversion = builtins.elemAt (lib.splitString "-" version) 0;
+in buildLinux (args // {
+  inherit version;
+
+  src = fetchurl {
+    url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz";
+    sha256 = "1s0yc1138sglbm4vyizl4r7hnc1l7nykdjp4063ad67yayr2ylv2";
+  };
+
+  kernelPatches = let rt-patch = {
+    name = "rt";
+    patch = fetchurl {
+      url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
+      sha256 = "0ia8rx0615x0z2s4ppw1244crg7c5ak07c9n3wbnz7y8bk8hyxws";
+    };
+  }; in [ rt-patch ] ++ lib.remove rt-patch kernelPatches;
+
+  structuredExtraConfig = with lib.kernel; {
+    PREEMPT_RT = yes;
+    # Fix error: unused option: PREEMPT_RT.
+    EXPERT = yes; # PREEMPT_RT depends on it (in kernel/Kconfig.preempt)
+    # Fix error: option not set correctly: PREEMPT_VOLUNTARY (wanted 'y', got 'n').
+    PREEMPT_VOLUNTARY = lib.mkForce no; # PREEMPT_RT deselects it.
+    # Fix error: unused option: RT_GROUP_SCHED.
+    RT_GROUP_SCHED = lib.mkForce (option no); # Removed by sched-disable-rt-group-sched-on-rt.patch.
+  } // structuredExtraConfig;
+
+  extraMeta = extraMeta // {
+    inherit branch;
+  };
+} // argsOverride)
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
index 456913c5e6d1..81dcb5d4563b 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
@@ -1,13 +1,14 @@
-{ stdenv, buildPackages, fetchgit, fetchpatch, perl, buildLinux, ... } @ args:
+{ stdenv, buildPackages, fetchFromGitHub, fetchpatch, perl, buildLinux, ... } @ args:
 
 buildLinux (args // {
-  version = "5.3.2020.04.04";
-  modDirVersion = "5.3.0";
+  version = "5.8.0-2020.09.07";
+  modDirVersion = "5.8.0";
 
-  src = fetchgit {
-    url = "https://evilpiepirate.org/git/bcachefs.git";
-    rev = "a27d7265e75f6d65c2b972ce4ac27abfc153c230";
-    sha256 = "0wnjl4xs7073d5ipcsplv5qpcxb7zpfqd5gqvh3mhqc5j3qn816x";
+  src = fetchFromGitHub {
+    owner = "koverstreet";
+    repo = "bcachefs";
+    rev = "fb2821e72648f35d3cff61ac26041d634fd1dacf";
+    sha256 = "0f9hx6fz27rm8h1lk9868v727klvyzcbw6hcgm5mypbfq1nqirdy";
   };
 
   extraConfig = "BCACHEFS_FS m";
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix
new file mode 100644
index 000000000000..ce90893586aa
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, buildLinux, ... } @ args:
+
+let
+  version = "5.8.10";
+in
+
+buildLinux (args // {
+  modDirVersion = "${version}-zen1";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "zen-kernel";
+    repo = "zen-kernel";
+    rev = "v${version}-zen1";
+    sha256 = "1mm4x2amnpwixvi7q8pj9my75b08ps2mafgz4j2iszpylkdzi53d";
+  };
+
+  extraMeta = {
+    branch = "5.8/master";
+    maintainers = with stdenv.lib.maintainers; [ atemu ];
+  };
+
+} // (args.argsOverride or {}))
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/update-rt.sh b/nixpkgs/pkgs/os-specific/linux/kernel/update-rt.sh
new file mode 100755
index 000000000000..bcfa494d7e7a
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/update-rt.sh
@@ -0,0 +1,77 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+# To update all rt kernels run: ./update-rt.sh
+
+# To update just one ./linux-rt-5.X.nix run: ./update-rt.sh ./linux-rt-5.X.nix
+
+# To add a new kernel branch 5.Y run: ./update-rt.sh ./linux-rt-5.Y.nix
+# (with nonexistent .nix file) and update all-packages.nix.
+
+# To commit run with: env COMMIT=1
+
+mirror=https://kernel.org/pub/linux/kernel
+
+main() {
+    if [ $# -ge 1 ]; then
+        update-if-needed "$1"
+    else
+        update-all-if-needed
+    fi
+}
+
+update-all-if-needed() {
+    for f in "$(dirname "$0")"/linux-rt-*.nix; do
+        update-if-needed "$f"
+    done
+}
+
+file-version() {
+    file="$1" # e.g. ./linux-rt-5.4.nix
+    if [ -e "$file" ]; then
+        grep ' version = ' "$file" | grep -o '[0-9].[^"]*'
+    fi
+}
+
+latest-rt-version() {
+    branch="$1" # e.g. 5.4
+    curl -sL "$mirror/projects/rt/$branch/sha256sums.asc" |
+        sed -ne '/.patch.xz/ { s/.*patch-\(.*\).patch.xz/\1/; p; q }'
+}
+
+update-if-needed() {
+    file="$1" # e.g. ./linux-rt-5.4.nix (created if does not exist)
+    branch=$(basename "$file" .nix) # e.g. linux-rt-5.4
+    branch=${branch#linux-rt-} # e.g. 5.4
+    cur=$(file-version "$file") # e.g. 5.4.59-rt36 or empty
+    new=$(latest-rt-version "$branch") # e.g. 5.4.61-rt37
+    kversion=${new%-*} # e.g. 5.4.61
+    major=${branch%.*} # e.g 5
+    nixattr="linux-rt_${branch/./_}"
+    if [ "$new" = "$cur" ]; then
+        echo "$nixattr: $cur (up-to-date)"
+        return
+    fi
+    khash=$(nix-prefetch-url "$mirror/v${major}.x/linux-${kversion}.tar.xz")
+    phash=$(nix-prefetch-url "$mirror/projects/rt/${branch}/older/patch-${new}.patch.xz")
+    if [ "$cur" ]; then
+        msg="$nixattr: $cur -> $new"
+    else
+        msg="$nixattr: init at $new"
+        prev=$(ls "$(dirname "$0")"/linux-rt-*.nix | tail -1)
+        cp "$prev" "$file"
+        cur=$(file-version "$file")
+    fi
+    echo "$msg"
+    sed -i "$file" \
+        -e "s/$cur/$new/" \
+        -e "s|kernel/v[0-9]*|kernel/v$major|" \
+        -e "1,/.patch.xz/ s/sha256 = .*/sha256 = \"$khash\";/" \
+        -e "1,/.patch.xz/! s/sha256 = .*/sha256 = \"$phash\";/"
+    if [ "${COMMIT:-}" ]; then
+        git add "$file"
+        git commit -m "$msg"
+    fi
+}
+
+return 2>/dev/null || main "$@"
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/update.sh b/nixpkgs/pkgs/os-specific/linux/kernel/update.sh
index 55fdce06c973..560edced36ea 100755
--- a/nixpkgs/pkgs/os-specific/linux/kernel/update.sh
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/update.sh
@@ -58,6 +58,9 @@ ls $NIXPKGS/pkgs/os-specific/linux/kernel | while read FILE; do
   echo "Updated $OLDVER -> $V"
 done
 
+# Update linux-rt
+COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/update-rt.sh
+
 # Update linux-libre
 COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/update-libre.sh
 
diff --git a/nixpkgs/pkgs/os-specific/linux/klibc/default.nix b/nixpkgs/pkgs/os-specific/linux/klibc/default.nix
index a92970726dca..55faa216a12c 100644
--- a/nixpkgs/pkgs/os-specific/linux/klibc/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/klibc/default.nix
@@ -9,11 +9,11 @@ in
 
 stdenv.mkDerivation rec {
   pname = "klibc";
-  version = "2.0.7";
+  version = "2.0.8";
 
   src = fetchurl {
     url = "mirror://kernel/linux/libs/klibc/2.0/klibc-${version}.tar.xz";
-    sha256 = "08li3aj9bvzabrih98jdxi3m19h85cp53s8cr7cqad42r8vjdvxb";
+    sha256 = "0dmlkhnn5q8fc6rkzsisir4chkzmmiq6xkjmvyvf0g7yihwz2j2f";
   };
 
   patches = [ ./no-reinstall-kernel-headers.patch ];
diff --git a/nixpkgs/pkgs/os-specific/linux/klibc/shrunk.nix b/nixpkgs/pkgs/os-specific/linux/klibc/shrunk.nix
index b5b9783c6e7d..8b79940ed78c 100644
--- a/nixpkgs/pkgs/os-specific/linux/klibc/shrunk.nix
+++ b/nixpkgs/pkgs/os-specific/linux/klibc/shrunk.nix
@@ -22,7 +22,5 @@ stdenv.mkDerivation {
   ''; # */
   allowedReferences = ["out"];
 
-  meta = {
-    platforms = stdenv.lib.platforms.linux;
-  };
+  inherit (klibc) meta;
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix b/nixpkgs/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix
index e14e190cd7c5..17f34f9bbd79 100644
--- a/nixpkgs/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix
@@ -34,5 +34,6 @@ in stdenv.mkDerivation {
     homepage = "https://packages.ubuntu.com/source/zesty/kmod";
     description = "Linux kernel module blacklists from Ubuntu";
     platforms = platforms.linux;
+    license = with licenses; [ gpl2Plus lgpl21Plus ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/kmod-debian-aliases/default.nix b/nixpkgs/pkgs/os-specific/linux/kmod-debian-aliases/default.nix
index f0f413317277..23d323f84b8f 100644
--- a/nixpkgs/pkgs/os-specific/linux/kmod-debian-aliases/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kmod-debian-aliases/default.nix
@@ -14,10 +14,11 @@ stdenv.mkDerivation rec {
     cp aliases.conf $out
   '';
 
-  meta = {
+  meta = with lib; {
     homepage = "https://packages.debian.org/source/sid/kmod";
     description = "Linux configuration file for modprobe";
-    maintainers = with lib.maintainers; [ mathnerd314 ];
-    platforms = with lib.platforms; linux;
+    maintainers = with maintainers; [ mathnerd314 ];
+    platforms = with platforms; linux;
+    license = with licenses; [ gpl2Plus lgpl21Plus ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/kmod/default.nix b/nixpkgs/pkgs/os-specific/linux/kmod/default.nix
index de025b436f54..805b8a32aedd 100644
--- a/nixpkgs/pkgs/os-specific/linux/kmod/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kmod/default.nix
@@ -8,11 +8,11 @@ let
 
 in stdenv.mkDerivation rec {
   pname = "kmod";
-  version = "26";
+  version = "27";
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/kernel/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "17dvrls70nr3b3x1wm8pwbqy4r8a5c20m0dhys8mjhsnpg425fsp";
+    sha256 = "035wzfzjx4nwidk747p8n085mgkvy531ppn16krrajx2dkqzply1";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ];
@@ -24,7 +24,7 @@ in stdenv.mkDerivation rec {
     "--with-modulesdirs=${modulesDirs}"
   ] ++ lib.optional withStatic "--enable-static";
 
-  patches = [ ./module-dir.patch ]
+  patches = [ ./module-dir.patch ./no-name-field.patch ]
     ++ lib.optional stdenv.isDarwin ./darwin.patch
     ++ lib.optional withStatic ./enable-static.patch;
 
@@ -38,8 +38,16 @@ in stdenv.mkDerivation rec {
   '';
 
   meta = with stdenv.lib; {
-    homepage = "https://www.kernel.org/pub/linux/utils/kernel/kmod/";
     description = "Tools for loading and managing Linux kernel modules";
+    longDescription = ''
+      kmod is a set of tools to handle common tasks with Linux kernel modules
+      like insert, remove, list, check properties, resolve dependencies and
+      aliases. These tools are designed on top of libkmod, a library that is
+      shipped with kmod.
+    '';
+    homepage = "https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/";
+    downloadPage = "https://www.kernel.org/pub/linux/utils/kernel/kmod/";
+    changelog = "https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/plain/NEWS?h=v${version}";
     license = licenses.lgpl21;
     platforms = platforms.unix;
   };
diff --git a/nixpkgs/pkgs/os-specific/linux/kmod/no-name-field.patch b/nixpkgs/pkgs/os-specific/linux/kmod/no-name-field.patch
new file mode 100644
index 000000000000..282f59e55e52
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/kmod/no-name-field.patch
@@ -0,0 +1,24 @@
+
+---
+ tools/modinfo.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tools/modinfo.c b/tools/modinfo.c
+index 0231bb0..7b2259e 100644
+--- a/tools/modinfo.c
++++ b/tools/modinfo.c
+@@ -178,7 +178,10 @@ static int modinfo_do(struct kmod_module *mod)
+ 	is_builtin = (filename == NULL);
+ 
+ 	if (is_builtin) {
+-		printf("%-16s%s%c", "name:", kmod_module_get_name(mod), separator);
++		if (field == NULL || field != NULL && streq(field, "name")){
++			printf("%-16s%s%c", "name:",
++			       kmod_module_get_name(mod), separator);
++		}
+ 		filename = "(builtin)";
+ 	}
+ 
+-- 
+2.28.0
+
diff --git a/nixpkgs/pkgs/os-specific/linux/kmscon/default.nix b/nixpkgs/pkgs/os-specific/linux/kmscon/default.nix
index a79f762a8a21..29f99629df87 100644
--- a/nixpkgs/pkgs/os-specific/linux/kmscon/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kmscon/default.nix
@@ -1,5 +1,6 @@
 { stdenv
-, fetchurl
+, fetchFromGitHub
+, autoreconfHook
 , libtsm
 , systemd
 , libxkbcommon
@@ -13,32 +14,32 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "kmscon-8";
-
-  src = fetchurl {
-    url = "https://www.freedesktop.org/software/kmscon/releases/${name}.tar.xz";
-    sha256 = "0axfwrp3c8f4gb67ap2sqnkn75idpiw09s35wwn6kgagvhf1rc0a";
+  pname = "kmscon";
+  version = "unstable-2018-09-07";
+
+  src = fetchFromGitHub {
+    owner = "Aetf";
+    repo = "kmscon";
+    rev = "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc";
+    sha256 = "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87";
   };
 
   buildInputs = [
+    libGLU libGL
+    libdrm
     libtsm
-    systemd
     libxkbcommon
-    libdrm
-    libGLU libGL
+    libxslt
     pango
     pixman
-    pkgconfig
-    docbook_xsl
-    libxslt
+    systemd
   ];
 
-  patches = [ ./kmscon-8-glibc-2.26.patch ];
-
-  # FIXME: Remove as soon as kmscon > 8 comes along.
-  postPatch = ''
-    sed -i -e 's/libsystemd-daemon libsystemd-login/libsystemd/g' configure
-  '';
+  nativeBuildInputs = [
+    autoreconfHook
+    docbook_xsl
+    pkgconfig
+  ];
 
   configureFlags = [
     "--enable-multi-seat"
@@ -49,10 +50,10 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "KMS/DRM based System Console";
     homepage = "http://www.freedesktop.org/wiki/Software/kmscon/";
-    license = stdenv.lib.licenses.mit;
-    platforms = stdenv.lib.platforms.linux;
+    license = licenses.mit;
+    platforms = platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/kmscon/kmscon-8-glibc-2.26.patch b/nixpkgs/pkgs/os-specific/linux/kmscon/kmscon-8-glibc-2.26.patch
deleted file mode 100644
index b70a750180e2..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/kmscon/kmscon-8-glibc-2.26.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/src/pty.c b/src/pty.c
-index 3494104..1443f4a 100644
---- a/src/pty.c
-+++ b/src/pty.c
-@@ -299,7 +299,7 @@ static void setup_child(int master, struct winsize *ws)
- 	if (ret)
- 		log_warn("cannot reset blocked signals: %m");
- 
--	for (i = 1; i < SIGUNUSED; ++i)
-+	for (i = 1; i < SIGSYS; ++i)
- 		signal(i, SIG_DFL);
- 
- 	ret = grantpt(master);
-diff --git a/src/uterm_vt.c b/src/uterm_vt.c
-index af377f5..fbe9e76 100644
---- a/src/uterm_vt.c
-+++ b/src/uterm_vt.c
-@@ -40,6 +40,7 @@
- #include <sys/ioctl.h>
- #include <sys/signalfd.h>
- #include <sys/stat.h>
-+#include <sys/sysmacros.h>
- #include <termios.h>
- #include <time.h>
- #include <unistd.h>
diff --git a/nixpkgs/pkgs/os-specific/linux/libaio/default.nix b/nixpkgs/pkgs/os-specific/linux/libaio/default.nix
index 63d446319d6f..ac000976a680 100644
--- a/nixpkgs/pkgs/os-specific/linux/libaio/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libaio/default.nix
@@ -1,19 +1,14 @@
 { stdenv, fetchurl, fetchpatch }:
 
 stdenv.mkDerivation rec {
-  version = "0.3.110";
+  version = "0.3.111";
   pname = "libaio";
 
   src = fetchurl {
-    url = "https://fedorahosted.org/releases/l/i/libaio/${pname}-${version}.tar.gz";
-    sha256 = "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0";
+    url = "https://pagure.io/libaio/archive/${pname}-${version}/${pname}-${pname}-${version}.tar.gz";
+    sha256 = "1fih2y2js0dl9qshpyb14m0nnxlms2527shgcxg0hnbflv5igg76";
   };
 
-  patches = [ (fetchpatch {
-    url = "https://pagure.io/libaio/c/da47c32b2ff39e52fbed1622c34b86bc88d7c217.patch";
-    sha256 = "1kqpiswjn549s3w3m89bw5qkl7bw5pvq6gp5cdzd926ymlgivj5c";
-  }) ];
-
   postPatch = ''
     patchShebangs harness
 
diff --git a/nixpkgs/pkgs/os-specific/linux/libbpf/default.nix b/nixpkgs/pkgs/os-specific/linux/libbpf/default.nix
index aefb5ff6835c..68ccef6529c3 100644
--- a/nixpkgs/pkgs/os-specific/linux/libbpf/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libbpf/default.nix
@@ -1,20 +1,36 @@
 { stdenv, fetchFromGitHub, pkgconfig
 , libelf, zlib
+, fetchpatch
 }:
 
 with builtins;
 
 stdenv.mkDerivation rec {
   pname = "libbpf";
-  version = "0.0.8";
+  version = "0.1.0";
 
   src = fetchFromGitHub {
-    owner = "libbpf";
-    repo = "libbpf";
-    rev = "v${version}";
-    sha256 = "02vbpg9v5sjcw7ihximy63cjmz82q5izkp91i44m1qp6qj5qn4sr";
+    owner  = "libbpf";
+    repo   = "libbpf";
+    rev    = "v${version}";
+    sha256 = "1wi3a795jq0smqg1c5ml2ghai47n1m5ijmch017wscybx4jdlynv";
   };
 
+  patches = [
+    (fetchpatch { # included upstream for > 0.1.0
+      name = "link-zlib.patch";
+      url = "https://github.com/libbpf/libbpf/commit/8b14cb43ff837.diff";
+      sha256 = "17mvjrs7s727drz013a8qlyj0345ldi2kph6pazcmxv6kl1qrz2z";
+    })
+  ];
+  patchFlags = "-p2";
+  # https://github.com/libbpf/libbpf/pull/201#issuecomment-689174740
+  postPatch = ''
+    substituteInPlace ../scripts/check-reallocarray.sh \
+      --replace 'mktemp /tmp/' 'mktemp ' \
+      --replace '/bin/rm' 'rm'
+  '';
+
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ libelf zlib ];
 
@@ -22,11 +38,6 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
   makeFlags = [ "PREFIX=$(out)" ];
 
-  patchPhase = ''
-    substituteInPlace ../scripts/check-reallocarray.sh \
-      --replace '/bin/rm' 'rm'
-  '';
-
   # FIXME: Multi-output requires some fixes to the way the pkgconfig file is
   # constructed (it gets put in $out instead of $dev for some reason, with
   # improper paths embedded). Don't enable it for now.
@@ -37,7 +48,7 @@ stdenv.mkDerivation rec {
     description = "Upstream mirror of libbpf";
     homepage    = "https://github.com/libbpf/libbpf";
     license     = with licenses; [ lgpl21 /* or */ bsd2 ];
-    maintainers = with maintainers; [ thoughtpolice ];
+    maintainers = with maintainers; [ thoughtpolice vcunat ];
     platforms   = platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/libfabric/default.nix b/nixpkgs/pkgs/os-specific/linux/libfabric/default.nix
index 40f92f38d164..52de79e1f2df 100644
--- a/nixpkgs/pkgs/os-specific/linux/libfabric/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libfabric/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   pname = "libfabric";
-  version = "1.10.1";
+  version = "1.11.0";
 
   enableParallelBuilding = true;
 
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     owner = "ofiwg";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0nf5x4v9rhyd67r6f6q3dw4sraaja8jfdkhhg9g8x41czmx4d456";
+    sha256 = "1wgn6gsiy64rb76i46dsqlvp687lwqzxwg5lgj1y5y7lyqbq96wp";
   };
 
   nativeBuildInputs = [ pkgconfig autoreconfHook ] ;
diff --git a/nixpkgs/pkgs/os-specific/linux/libvolume_id/default.nix b/nixpkgs/pkgs/os-specific/linux/libvolume_id/default.nix
index e54dee10c1d4..98ddc50e2e48 100644
--- a/nixpkgs/pkgs/os-specific/linux/libvolume_id/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libvolume_id/default.nix
@@ -1,8 +1,8 @@
 {stdenv, fetchurl}:
-   
+
 stdenv.mkDerivation {
   name = "libvolume_id-0.81.1";
-   
+
   src = fetchurl {
     url = "https://www.marcuscom.com/downloads/libvolume_id-0.81.1.tar.bz2";
     sha256 = "029z04vdxxsl8gycm9whcljhv6dy4b12ybsxdb99jr251gl1ifs5";
@@ -18,7 +18,8 @@ stdenv.mkDerivation {
     cp -f libvolume_id.so.0 $out/lib/
   ";
 
-  meta = {
-    platforms = stdenv.lib.platforms.linux;
+  meta = with stdenv.lib; {
+    platforms = platforms.linux;
+    license = licenses.gpl2;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix b/nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix
index 84a0f4a10d5f..79048064eccb 100644
--- a/nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix
@@ -3,11 +3,11 @@
 
 stdenv.mkDerivation rec {
   pname = "linuxptp";
-  version = "2.0";
+  version = "3.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/linuxptp/${pname}-${version}.tgz";
-    sha256 = "0zcw8nllla06451r7bfsa31q4z8jj56j67i07l1azm473r0dj90a";
+    sha256 = "11aps4bc0maihldlb2d0yh2fnj6x4vwjad337kszyny74akyqk6p";
   };
 
   postPatch = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/lockdep/default.nix b/nixpkgs/pkgs/os-specific/linux/lockdep/default.nix
index 74abd12868d5..2e9003c3f926 100644
--- a/nixpkgs/pkgs/os-specific/linux/lockdep/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/lockdep/default.nix
@@ -1,16 +1,47 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, bash, flex, bison, valgrind }:
 
 stdenv.mkDerivation rec {
   pname = "lockdep";
-  version = "4.1.2";
-  fullver = "4.1.2";
 
+  # it would be nice to be able to pick a kernel version in sync with something
+  # else we already ship, but it seems userspace lockdep isn't very well maintained
+  # and appears broken in many kernel releases
+  version = "5.0.21";
+  fullver = "5.0.21";
   src = fetchurl {
-    url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1mdyjhnzhh254cblahqmpsk226z006z6sm9dmwvg6jlhpsw4cjhy";
+    url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
+    sha256 = "1my2m9hvnvdrvzcg0fgqgaga59y2cd5zlpv7xrfj2nn98sjhglwq";
   };
 
-  preConfigure = "cd tools/lib/lockdep";
+  # ensure *this* kernel's userspace-headers are picked up before we
+  # fall back to those in glibc, as they will be from a mismatched
+  # kernel version
+  postPatch = ''
+    substituteInPlace tools/lib/lockdep/Makefile \
+      --replace 'CONFIG_INCLUDES =' $'CONFIG_INCLUDES = -I../../../usr/include\n#'
+  '';
+
+  nativeBuildInputs = [ flex bison ];
+
+  buildPhase = ''
+    make defconfig
+    make headers_install
+    cd tools/lib/lockdep
+    make
+  '';
+
+  doCheck = true;
+  checkInputs = [ valgrind ];
+  checkPhase = ''
+    # there are more /bin/bash references than just shebangs
+    for f in lockdep run_tests.sh tests/*.sh; do
+      substituteInPlace $f \
+        --replace '/bin/bash' '${bash}/bin/bash'
+    done
+
+    ./run_tests.sh
+  '';
+
   installPhase = ''
     mkdir -p $out/bin $out/lib $out/include
 
diff --git a/nixpkgs/pkgs/os-specific/linux/lvm2/default.nix b/nixpkgs/pkgs/os-specific/linux/lvm2/default.nix
index 8db4be94e4ed..7bbd1768c043 100644
--- a/nixpkgs/pkgs/os-specific/linux/lvm2/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/lvm2/default.nix
@@ -1,48 +1,72 @@
-{ stdenv, fetchgit, fetchpatch, pkgconfig, systemd, udev, utillinux, libuuid
+{ stdenv
+, fetchpatch
+, fetchurl
+, pkgconfig
+, utillinux
+, libuuid
 , thin-provisioning-tools, libaio
-, enable_dmeventd ? false }:
+, enableCmdlib ? false
+, enableDmeventd ? false
+, udev ? null
+, nixosTests
+}:
 
-let
-  version = "2.03.01";
-in
+# configure: error: --enable-dmeventd requires --enable-cmdlib to be used as well
+assert enableDmeventd -> enableCmdlib;
 
-stdenv.mkDerivation {
-  pname = "lvm2";
-  inherit version;
+stdenv.mkDerivation rec {
+  pname = "lvm2" + stdenv.lib.optionalString enableDmeventd "with-dmeventd";
+  version = "2.03.10";
 
-  src = fetchgit {
-    url = "git://sourceware.org/git/lvm2.git";
-    rev = "v${builtins.replaceStrings [ "." ] [ "_" ] version}";
-    sha256 = "0jlaswf1srdxiqpgpp97j950ddjds8z0kr4pbwmal2za2blrgvbl";
+  src = fetchurl {
+    url = "https://mirrors.kernel.org/sourceware/lvm2/LVM2.${version}.tgz";
+    sha256 = "1l0fkn9abrgk5mfn6jfh9qhdr86b59l1c5pk6lp8jh0491d69las";
   };
 
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ udev libuuid thin-provisioning-tools libaio ];
+
   configureFlags = [
     "--disable-readline"
-    "--enable-udev_rules"
-    "--enable-udev_sync"
     "--enable-pkgconfig"
-    "--enable-cmdlib"
-  ] ++ stdenv.lib.optional enable_dmeventd " --enable-dmeventd"
-  ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "--with-default-locking-dir=/run/lock/lvm"
+    "--with-default-run-dir=/run/lvm"
+    "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
+  ] ++ stdenv.lib.optionals (!enableCmdlib) [
+    "--bindir=${placeholder "bin"}/bin"
+    "--sbindir=${placeholder "bin"}/bin"
+    "--libdir=${placeholder "lib"}/lib"
+  ] ++ stdenv.lib.optional enableCmdlib "--enable-cmdlib"
+  ++ stdenv.lib.optionals enableDmeventd [
+    "--enable-dmeventd"
+    "--with-dmeventd-pidfile=/run/dmeventd/pid"
+    "--with-default-dm-run-dir=/run/dmeventd"
+  ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
     "ac_cv_func_malloc_0_nonnull=yes"
     "ac_cv_func_realloc_0_nonnull=yes"
+  ] ++
+  stdenv.lib.optionals (udev != null) [
+    "--enable-udev_rules"
+    "--enable-udev_sync"
   ];
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ udev libuuid thin-provisioning-tools libaio ];
+  preConfigure = ''
+    sed -i /DEFAULT_SYS_DIR/d Makefile.in
+    sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in
+    substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \
+      --replace /usr/bin/udevadm /run/current-system/systemd/bin/udevadm
+    # https://github.com/lvmteam/lvm2/issues/36
+    substituteInPlace udev/69-dm-lvm-metad.rules.in \
+      --replace "(BINDIR)/systemd-run" /run/current-system/systemd/bin/systemd-run
 
-  preConfigure =
-    ''
-      sed -i /DEFAULT_SYS_DIR/d Makefile.in
-      sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in
-    '' + stdenv.lib.optionalString (systemd != null) ''
-      substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \
-        --replace /usr/bin/udevadm ${systemd}/bin/udevadm
-    '';
+    substituteInPlace make.tmpl.in --replace "@systemdsystemunitdir@" "$out/lib/systemd/system"
+    substituteInPlace libdm/make.tmpl.in --replace "@systemdsystemunitdir@" "$out/lib/systemd/system"
+  '';
+
+  postConfigure = ''
+    sed -i 's|^#define LVM_CONFIGURE_LINE.*$|#define LVM_CONFIGURE_LINE "<removed>"|g' ./include/configure.h
+  '';
 
-  # https://github.com/NixOS/nixpkgs/pull/52597
-  # gcc: error: ../../device_mapper/libdevice-mapper.a: No such file or directory
-  enableParallelBuilding = false;
 
   patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
     (fetchpatch {
@@ -64,30 +88,41 @@ stdenv.mkDerivation {
 
   doCheck = false; # requires root
 
+  makeFlags = stdenv.lib.optionals (udev != null) [
+    "SYSTEMD_GENERATOR_DIR=$(out)/lib/systemd/system-generators"
+  ];
+
   # To prevent make install from failing.
   installFlags = [ "OWNER=" "GROUP=" "confdir=$(out)/etc" ];
 
   # Install systemd stuff.
-  #installTargets = "install install_systemd_generators install_systemd_units install_tmpfiles_configuration";
-
-  postInstall =
-    ''
-      substituteInPlace $out/lib/udev/rules.d/13-dm-disk.rules \
-        --replace $out/sbin/blkid ${utillinux}/sbin/blkid
-    '' + stdenv.lib.optionalString (systemd != null) ''
-      # Systemd stuff
-      mkdir -p $out/etc/systemd/system $out/lib/systemd/system-generators
-      cp scripts/blk_availability_systemd_red_hat.service $out/etc/systemd/system
-      cp scripts/lvm2_activation_generator_systemd_red_hat $out/lib/systemd/system-generators
-    '';
+  installTargets = [ "install" ] ++ stdenv.lib.optionals (udev != null) [
+    "install_systemd_generators"
+    "install_systemd_units"
+    "install_tmpfiles_configuration"
+  ];
+
+  # only split bin and lib out from out if cmdlib isn't enabled
+  outputs = [
+    "out"
+    "dev"
+    "man"
+  ] ++ stdenv.lib.optionals (enableCmdlib != true) [
+    "bin"
+    "lib"
+  ];
+
+  postInstall = stdenv.lib.optionalString (enableCmdlib != true) ''
+    moveToOutput lib/libdevmapper.so $lib
+  '';
+
+  passthru.tests.installer = nixosTests.installer.lvm;
 
   meta = with stdenv.lib; {
     homepage = "http://sourceware.org/lvm2/";
     description = "Tools to support Logical Volume Management (LVM) on Linux";
     platforms = platforms.linux;
     license = with licenses; [ gpl2 bsd2 lgpl21 ];
-    maintainers = with maintainers; [raskin];
-    inherit version;
-    downloadPage = "ftp://sources.redhat.com/pub/lvm2/";
+    maintainers = with maintainers; [ raskin ajs124 ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/lvm2/default.upstream b/nixpkgs/pkgs/os-specific/linux/lvm2/default.upstream
deleted file mode 100644
index 1e5aaf5ab5cf..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/lvm2/default.upstream
+++ /dev/null
@@ -1,4 +0,0 @@
-url ftp://sources.redhat.com/pub/lvm2/
-version_link '[.]tgz$'
-version '.*[^0-9.][^.]*[.]([0-9.]+)[.].*' '\1'
-do_overwrite () { do_overwrite_just_version; }
diff --git a/nixpkgs/pkgs/os-specific/linux/lxc/default.nix b/nixpkgs/pkgs/os-specific/linux/lxc/default.nix
index cc25f90f2481..21c1eede9d7a 100644
--- a/nixpkgs/pkgs/os-specific/linux/lxc/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/lxc/default.nix
@@ -9,11 +9,11 @@
 with stdenv.lib;
 stdenv.mkDerivation rec {
   pname = "lxc";
-  version = "4.0.2";
+  version = "4.0.4";
 
   src = fetchurl {
     url = "https://linuxcontainers.org/downloads/lxc/lxc-${version}.tar.gz";
-    sha256 = "1c2wbbcvs58slyq0skxizx61q1lb4yvak28x4gzsbzh3yg6nscya";
+    sha256 = "15frszz5am9bnr8vh1zpg89x0xigcfm19jax0z16cazd42xahr9w";
   };
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/os-specific/linux/lxcfs/default.nix b/nixpkgs/pkgs/os-specific/linux/lxcfs/default.nix
index 4011b3885625..bcc8614bc6ab 100644
--- a/nixpkgs/pkgs/os-specific/linux/lxcfs/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/lxcfs/default.nix
@@ -4,13 +4,14 @@
 
 with stdenv.lib;
 stdenv.mkDerivation rec {
-  name = "lxcfs-4.0.3";
+  pname = "lxcfs";
+  version = "4.0.5";
 
   src = fetchFromGitHub {
     owner = "lxc";
     repo = "lxcfs";
-    rev = name;
-    sha256 = "0v6c5vc3i1l4sy4iamzdqvwibj6xr1lna4w1hxkn3s6jggcbxwca";
+    rev = "lxcfs-${version}";
+    sha256 = "12mk9hgqzzh1874389lrpvldlp87qxxa1sxzk5zr0d0n1857am5y";
   };
 
   nativeBuildInputs = [ pkgconfig help2man autoreconfHook ];
@@ -40,8 +41,9 @@ stdenv.mkDerivation rec {
   '';
 
   meta = {
-    homepage = "https://linuxcontainers.org/lxcfs";
     description = "FUSE filesystem for LXC";
+    homepage = "https://linuxcontainers.org/lxcfs";
+    changelog = "https://linuxcontainers.org/lxcfs/news/";
     license = licenses.asl20;
     platforms = platforms.linux;
     maintainers = with maintainers; [ mic92 fpletz ];
diff --git a/nixpkgs/pkgs/os-specific/linux/microcode/amd.nix b/nixpkgs/pkgs/os-specific/linux/microcode/amd.nix
index a1a37db9dd6f..135187c9a108 100644
--- a/nixpkgs/pkgs/os-specific/linux/microcode/amd.nix
+++ b/nixpkgs/pkgs/os-specific/linux/microcode/amd.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation {
 
   meta = with stdenv.lib; {
     description = "AMD Processor microcode patch";
-    homepage = "http://www.amd64.org/support/microcode.html";
+    homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
     license = licenses.unfreeRedistributableFirmware;
     platforms = platforms.linux;
   };
diff --git a/nixpkgs/pkgs/os-specific/linux/mmc-utils/default.nix b/nixpkgs/pkgs/os-specific/linux/mmc-utils/default.nix
index 61ad327c3942..6a9f807947d4 100644
--- a/nixpkgs/pkgs/os-specific/linux/mmc-utils/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/mmc-utils/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation {
   pname = "mmc-utils";
-  version = "2018-12-14";
+  version = "2019-10-04";
 
   src = fetchgit {
     url = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git";
-    rev = "aef913e31b659462fe6b9320d241676cba97f67b";
-    sha256 = "1mak9rqjp6yvqk2h5hfil5a9gfx138h62n3cryckfbhr6fmaylm7";
+    rev = "73d6c59af8d1bcedf5de4aa1f5d5b7f765f545f5";
+    sha256 = "18a7qm86gavg15gv4h6xfnapgq24v4dyvhwfp53lkssxyhjbli0z";
   };
 
   makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/multipath-tools/default.nix b/nixpkgs/pkgs/os-specific/linux/multipath-tools/default.nix
index d60b4a9a549d..02853f6497fc 100644
--- a/nixpkgs/pkgs/os-specific/linux/multipath-tools/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/multipath-tools/default.nix
@@ -10,8 +10,13 @@ stdenv.mkDerivation rec {
     sha256 = "1mgjylklh1cx8px8ffgl12kyc0ln3445vbabd2sy8chq31rpiiq8";
   };
 
+  patches = [
+    # fix build with json-c 0.14 https://www.redhat.com/archives/dm-devel/2020-May/msg00261.html
+    ./json-c-0.14.patch
+  ];
+
   postPatch = ''
-    substituteInPlace libmultipath/Makefile --replace /usr/include/libdevmapper.h ${lvm2}/include/libdevmapper.h
+    substituteInPlace libmultipath/Makefile --replace /usr/include/libdevmapper.h ${stdenv.lib.getDev lvm2}/include/libdevmapper.h
     sed -i -re '
       s,^( *#define +DEFAULT_MULTIPATHDIR\>).*,\1 "'"$out/lib/multipath"'",
     ' libmultipath/defaults.h
diff --git a/nixpkgs/pkgs/os-specific/linux/multipath-tools/json-c-0.14.patch b/nixpkgs/pkgs/os-specific/linux/multipath-tools/json-c-0.14.patch
new file mode 100644
index 000000000000..d5fee4248830
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/multipath-tools/json-c-0.14.patch
@@ -0,0 +1,21 @@
+diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h
+index ac85b63f..b1a6ddea 100644
+--- a/libdmmp/libdmmp_private.h
++++ b/libdmmp/libdmmp_private.h
+@@ -30,6 +30,7 @@
+ #include <stdint.h>
+ #include <string.h>
+ #include <assert.h>
++#include <stdbool.h>
+ #include <json.h>
+ 
+ #include "libdmmp/libdmmp.h"
+@@ -82,7 +83,7 @@ static out_type func_name(struct dmmp_context *ctx, const char *var_name) { \
+ do { \
+ 	json_type j_type = json_type_null; \
+ 	json_object *j_obj_tmp = NULL; \
+-	if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE) { \
++	if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != true) { \
+ 		_error(ctx, "Invalid JSON output from multipathd IPC: " \
+ 		       "key '%s' not found", key); \
+ 		rc = DMMP_ERR_IPC_ERROR; \
diff --git a/nixpkgs/pkgs/os-specific/linux/musl/default.nix b/nixpkgs/pkgs/os-specific/linux/musl/default.nix
index 422ad5c1cb50..67d08454a844 100644
--- a/nixpkgs/pkgs/os-specific/linux/musl/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/musl/default.nix
@@ -35,11 +35,11 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "musl";
-  version = "1.1.24";
+  version = "1.2.0";
 
   src = fetchurl {
     url    = "https://www.musl-libc.org/releases/${pname}-${version}.tar.gz";
-    sha256 = "18r2a00k82hz0mqdvgm7crzc7305l36109c0j9yjmkxj2alcjw0k";
+    sha256 = "1s6lix02k1ijm4nmhzpmwzk5w6xfkhn70nvvk8zjs51r24cpppn6";
   };
 
   enableParallelBuilding = true;
diff --git a/nixpkgs/pkgs/os-specific/linux/mwprocapture/default.nix b/nixpkgs/pkgs/os-specific/linux/mwprocapture/default.nix
index acb4676a3f51..c5f293011db3 100644
--- a/nixpkgs/pkgs/os-specific/linux/mwprocapture/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/mwprocapture/default.nix
@@ -15,11 +15,11 @@ let
 in
 stdenv.mkDerivation rec {
   name = "mwprocapture-1.2.${version}-${kernel.version}";
-  version = "4054";
+  version = "4177";
 
   src = fetchurl {
     url = "http://www.magewell.com/files/drivers/ProCaptureForLinux_${version}.tar.gz";
-    sha256 = "0ylx75jcwlqds8w6lm11nxdlzxvy7xlz4rka2k5d6gmqa5fv19c2";
+    sha256 = "1nf51w9yixpvr767k49sfdb9n9rv5qc72f5yki1mkghbmabw7vys";
   };
 
   nativeBuildInputs = [ kernel.moduleBuildDependencies ];
diff --git a/nixpkgs/pkgs/os-specific/linux/netatop/default.nix b/nixpkgs/pkgs/os-specific/linux/netatop/default.nix
index 93bb1316d20d..e433fd1e9f33 100644
--- a/nixpkgs/pkgs/os-specific/linux/netatop/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/netatop/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, kernel, zlib }:
 
 let
-  version = "2.0";
+  version = "3.1";
 in
 
 stdenv.mkDerivation {
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://www.atoptool.nl/download/netatop-${version}.tar.gz";
-    sha256 = "03n248p1l3ps7gj2hdlcbrb1fsw1zcmgzypj4j4l4rynjjh7qvf6";
+    sha256 = "0qjw8glfdmngfvbn1w63q128vxdz2jlabw13y140ga9i5ibl6vvk";
   };
 
   buildInputs = [ zlib ];
@@ -24,6 +24,7 @@ stdenv.mkDerivation {
         -e s,/usr,$out, \
         -e /init.d/d \
         -e /depmod/d \
+        -e /netatop.service/d \
         Makefile
   '';
 
diff --git a/nixpkgs/pkgs/os-specific/linux/nftables/default.nix b/nixpkgs/pkgs/os-specific/linux/nftables/default.nix
index 34f899977d1a..9ec42ad66b06 100644
--- a/nixpkgs/pkgs/os-specific/linux/nftables/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nftables/default.nix
@@ -10,12 +10,12 @@
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  version = "0.9.3";
+  version = "0.9.6";
   pname = "nftables";
 
   src = fetchurl {
     url = "https://netfilter.org/projects/nftables/files/${pname}-${version}.tar.bz2";
-    sha256 = "0y6vbqp6x8w165q65h4n9sba1406gaz0d4744gqszbm7w9f92swm";
+    sha256 = "0vmn6xwqa1nq6crfxshh049b199d0aj6hfgin7k068xhibzgvmk8";
   };
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/os-specific/linux/numworks-udev-rules/50-numworks-calculator.rules b/nixpkgs/pkgs/os-specific/linux/numworks-udev-rules/50-numworks-calculator.rules
new file mode 100644
index 000000000000..ab07de99718b
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/numworks-udev-rules/50-numworks-calculator.rules
@@ -0,0 +1,2 @@
+SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="a291", TAG+="uaccess"
+SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="df11", TAG+="uaccess"
diff --git a/nixpkgs/pkgs/os-specific/linux/numworks-udev-rules/default.nix b/nixpkgs/pkgs/os-specific/linux/numworks-udev-rules/default.nix
new file mode 100644
index 000000000000..4a123b202730
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/numworks-udev-rules/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "numworks-udev-rules";
+  version = "unstable-2020-08-31";
+
+  udevRules = ./50-numworks-calculator.rules;
+  dontUnpack = true;
+
+  installPhase = ''
+    install -Dm 644 "${udevRules}" "$out/lib/udev/rules.d/50-numworks-calculator.rules"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Udev rules for Numworks calculators";
+    homepage = "https://numworks.com";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ shamilton ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/numworks-udev-rules/update.sh b/nixpkgs/pkgs/os-specific/linux/numworks-udev-rules/update.sh
new file mode 100755
index 000000000000..3949f6fd8f41
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/numworks-udev-rules/update.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+wget -O 50-numworks-calculator.rules "https://workshop.numworks.com/files/drivers/linux/50-numworks-calculator.rules"
diff --git a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix
index e195bf587eed..7c37fcf231fc 100644
--- a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -22,31 +22,42 @@ rec {
   # Policy: use the highest stable version as the default (on our master).
   stable = if stdenv.hostPlatform.system == "x86_64-linux"
     then generic {
-      version = "440.82";
-      sha256_64bit = "13km9800skyraa0s312fc4hwyw5pzb0jfkrv1yg6anppyan1bm7d";
-      settingsSha256 = "15psxvd65wi6hmxmd2vvsp2v0m07axw613hb355nh15r1dpkr3ma";
-      persistencedSha256 = "13izz9p2kg9g38gf57g3s2sw7wshp1i9m5pzljh9v82c4c22x1fw";
+      version = "450.66";
+      sha256_64bit = "1a6va0gvbzpkyza693v2ml1is4xbv8wxasqk0zd5y7rxin94c1ms";
+      settingsSha256 = "0mkgs91gx7xb7f24xkq9fl7i8d4l7s0wr9a44b1gm1vkw82fm7lj";
+      persistencedSha256 = "02id8cg8fba7c1j4m6vj4gp2mv39lz2k557kdjw8lszcpw6f1fhh";
     }
     else legacy_390;
 
   # No active beta right now
   beta = stable;
 
+  # Vulkan developer beta driver
+  vulkan_beta = generic {
+    version = "450.56.11";
+    persistencedVersion = "450.57";
+    settingsVersion = "450.57";
+    sha256_64bit = "1k64h8sp4rf6kc7liypznjgkmxi67njy1s8xy2r341fhl62pl010";
+    settingsSha256 = "1clbj9a3kv3j8jg35c197gd7b3f9f9f4h9ll5hlax95hdg12lgan";
+    persistencedSha256 = "17747z1fsbiznfsmahxmz8kmhwwcjanpfih60v5mwzk63gy4i3d5";
+    url = "https://developer.nvidia.com/vulkan-beta-4505611-linux";
+  };
+
   # Last one supporting x86
   legacy_390 = generic {
-    version = "390.132";
-    sha256_32bit = "0xgjywzkmmm6a5gby67l2kx0gn7bcxksv4wam0sqym6l1s7v5bai";
-    sha256_64bit = "0qgzsajrc3xkf2jjkwip3la0f2ixp45f76nmz5cphvzrb7k2slxn";
-    settingsSha256 = "07nylqzhldq1gr40q7x5424p2aml3qqnvl2zvnpzc65x2way34v6";
-    persistencedSha256 = "0vab5rj9b1n9yl9674q7i88w1i5p8nhvrwsayn7i1vh4wp3m840r";
+    version = "390.138";
+    sha256_32bit = "0y3qjygl0kfz9qs0rp9scn1k3l8ym9dib7wpkyh5gs4klcip7xkv";
+    sha256_64bit = "0rnnb5l4i8s76vlg6yvlrxhm2x9wdqw7k5hgf4fyaa3cr3k1kysz";
+    settingsSha256 = "0ad6hwl56nvbdv9g85lw7ywadqvc2gaq9x6d2vjcia9kg4vrmfqx";
+    persistencedSha256 = "15jciyq6i3pz1g67xzqlwmc62v3xswzhjcqmfcdndvlvhcibsimr";
   };
 
   legacy_340 = generic {
-    version = "340.107";
-    sha256_32bit = "0mh83affz6bim26ws7kkwwcfj2s6vkdy4d45hifsbshr82qd52wd";
-    sha256_64bit = "0pv9yv3x0kg9hfkmc50xb54ahxkbnyy2vyy4hj2h0s6m9sb5kqz3";
-    settingsSha256 = "1zf0fy9jj6ipm5vk153swpixqm75iricmx7x49pmr97kzyczaxa7";
-    persistencedSha256 = "0v225jkiqk9rma6whxs1a4fyr4haa75bvi52ss3vsyn62zzl24na";
+    version = "340.108";
+    sha256_32bit = "1jkwa1phf0x4sgw8pvr9d6krmmr3wkgwyygrxhdazwyr2bbalci0";
+    sha256_64bit = "06xp6c0sa7v1b82gf0pq0i5p0vdhmm3v964v0ypw36y0nzqx8wf6";
+    settingsSha256 = "0zm29jcf0mp1nykcravnzb5isypm8l8mg2gpsvwxipb7nk1ivy34";
+    persistencedSha256 = "1ax4xn3nmxg1y6immq933cqzw6cj04x93saiasdc0kjlv0pvvnkn";
     useGLVND = false;
 
     patches = [ ./vm_operations_struct-fault.patch ];
diff --git a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix
index 1d73ab8171a2..8a9e340a20a2 100644
--- a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix
@@ -1,8 +1,11 @@
 { version
+, url ? null
 , sha256_32bit ? null
 , sha256_64bit
 , settingsSha256
+, settingsVersion ? version
 , persistencedSha256
+, persistencedVersion ? version
 , useGLVND ? true
 , useProfiles ? true
 , preferGtk2 ? false
@@ -11,7 +14,7 @@
 , prePatch ? ""
 , patches ? []
 , broken ? false
-}:
+}@args:
 
 { stdenv, callPackage, pkgs, pkgsi686Linux, fetchurl
 , kernel ? null, perl, nukeReferences
@@ -19,6 +22,9 @@
   # nvidia-settings).  Used to support 32-bit binaries on 64-bit
   # Linux.
   libsOnly ? false
+, # don't include the bundled 32-bit libraries on 64-bit platforms,
+  # even if it’s in downloaded binary
+  disable32Bit ? false
 }:
 
 with stdenv.lib;
@@ -30,7 +36,7 @@ assert ! versionOlder version "391" -> stdenv.hostPlatform.system == "x86_64-lin
 let
   nameSuffix = optionalString (!libsOnly) "-${kernel.version}";
   pkgSuffix = optionalString (versionOlder version "304") "-pkg0";
-  i686bundled = versionAtLeast version "391";
+  i686bundled = versionAtLeast version "391" && !disable32Bit;
 
   libPathFor = pkgs: pkgs.lib.makeLibraryPath [ pkgs.libdrm pkgs.xorg.libXext pkgs.xorg.libX11
     pkgs.xorg.libXv pkgs.xorg.libXrandr pkgs.xorg.libxcb pkgs.zlib pkgs.stdenv.cc.cc ];
@@ -43,12 +49,12 @@ let
     src =
       if stdenv.hostPlatform.system == "x86_64-linux" then
         fetchurl {
-          url = "https://download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}${pkgSuffix}.run";
+          url = args.url or "https://download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}${pkgSuffix}.run";
           sha256 = sha256_64bit;
         }
       else if stdenv.hostPlatform.system == "i686-linux" then
         fetchurl {
-          url = "https://download.nvidia.com/XFree86/Linux-x86/${version}/NVIDIA-Linux-x86-${version}${pkgSuffix}.run";
+          url = args.url or "https://download.nvidia.com/XFree86/Linux-x86/${version}/NVIDIA-Linux-x86-${version}${pkgSuffix}.run";
           sha256 = sha256_32bit;
         }
       else throw "nvidia-x11 does not support platform ${stdenv.hostPlatform.system}";
@@ -86,13 +92,14 @@ let
         withGtk3 = !preferGtk2;
       };
       persistenced = mapNullable (hash: callPackage (import ./persistenced.nix self hash) { }) persistencedSha256;
+      inherit persistencedVersion settingsVersion;
     };
 
     meta = with stdenv.lib; {
       homepage = "https://www.nvidia.com/object/unix.html";
       description = "X.org driver and kernel module for NVIDIA graphics cards";
       license = licenses.unfreeRedistributable;
-      platforms = [ "i686-linux" "x86_64-linux" ];
+      platforms = [ "x86_64-linux" ] ++ optionals (!i686bundled) [ "i686-linux" ];
       maintainers = with maintainers; [ baracoder ];
       priority = 4; # resolves collision with xorg-server's "lib/xorg/modules/extensions/libglx.so"
       inherit broken;
diff --git a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/persistenced.nix b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/persistenced.nix
index de36ad06c60c..ff2792ac315d 100644
--- a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/persistenced.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/persistenced.nix
@@ -2,14 +2,14 @@ nvidia_x11: sha256:
 
 { stdenv, fetchFromGitHub, m4 }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "nvidia-persistenced";
-  inherit (nvidia_x11) version;
+  version = nvidia_x11.persistencedVersion;
 
   src = fetchFromGitHub {
     owner = "NVIDIA";
     repo = "nvidia-persistenced";
-    rev = nvidia_x11.version;
+    rev = nvidia_x11.persistencedVersion;
     inherit sha256;
   };
 
diff --git a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/settings.nix b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/settings.nix
index b1250e56ee06..fbddd7b7fa21 100644
--- a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/settings.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/settings.nix
@@ -9,13 +9,13 @@ let
   src = fetchFromGitHub {
     owner = "NVIDIA";
     repo = "nvidia-settings";
-    rev = nvidia_x11.version;
+    rev = nvidia_x11.settingsVersion;
     inherit sha256;
   };
 
   libXNVCtrl = stdenv.mkDerivation {
     pname = "libXNVCtrl";
-    inherit (nvidia_x11) version;
+    version = nvidia_x11.settingsVersion;
     inherit src;
 
     buildInputs = [ libXrandr libXext ];
@@ -42,7 +42,7 @@ in
 
 stdenv.mkDerivation {
   pname = "nvidia-settings";
-  inherit (nvidia_x11) version;
+  version = nvidia_x11.settingsVersion;
   inherit src;
 
   nativeBuildInputs = [ pkgconfig m4 ];
diff --git a/nixpkgs/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix b/nixpkgs/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix
new file mode 100644
index 000000000000..3247e8c4eda5
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, buildGoModule
+, fetchFromGitHub
+, go-md2man
+, installShellFiles
+, pkg-config
+, bcc
+, libseccomp
+}:
+
+buildGoModule rec {
+  pname = "oci-seccomp-bpf-hook";
+  version = "1.2.0";
+  src = fetchFromGitHub {
+    owner = "containers";
+    repo = "oci-seccomp-bpf-hook";
+    rev = "v${version}";
+    sha256 = "143x4daixzhhhpli1l14r7dr7dn3q42w8dddr16jzhhwighsirqw";
+  };
+  vendorSha256 = null;
+  doCheck = false;
+
+  outputs = [ "out" "man" ];
+  nativeBuildInputs = [
+    go-md2man
+    installShellFiles
+    pkg-config
+  ];
+  buildInputs = [
+    bcc
+    libseccomp
+  ];
+
+  buildPhase = ''
+    make
+  '';
+
+  postBuild = ''
+    substituteInPlace oci-seccomp-bpf-hook.json --replace HOOK_BIN_DIR "$out/bin"
+  '';
+
+  installPhase = ''
+    install -Dm755 bin/* -t $out/bin
+    install -Dm644 oci-seccomp-bpf-hook.json -t $out
+    installManPage docs/*.[1-9]
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/containers/oci-seccomp-bpf-hook";
+    description = ''
+      OCI hook to trace syscalls and generate a seccomp profile
+    '';
+    license = licenses.asl20;
+    maintainers = with maintainers; [ saschagrunert ];
+    platforms = platforms.linux;
+    badPlatforms = [ "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/open-iscsi/default.nix b/nixpkgs/pkgs/os-specific/linux/open-iscsi/default.nix
index 43859dc9af3a..01bbd9a9cc16 100644
--- a/nixpkgs/pkgs/os-specific/linux/open-iscsi/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/open-iscsi/default.nix
@@ -4,7 +4,7 @@
 
 stdenv.mkDerivation rec {
   pname = "open-iscsi";
-  version = "2.1.1";
+  version = "2.1.2";
 
   nativeBuildInputs = [ autoconf automake gettext libtool perl pkgconf ];
   buildInputs = [ kmod openisns.lib openssl systemd utillinux ];
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     owner = "open-iscsi";
     repo = "open-iscsi";
     rev = version;
-    sha256 = "1xa3mbid9mkajp8mr8jx6cymv0kd7yqs96jvff54n6wb9qhn9qll";
+    sha256 = "0fazf2ighj0akrvcj3jm3kd6wl9lgznvr38g6icwfkqk7bykjkam";
   };
 
   DESTDIR = "$(out)";
diff --git a/nixpkgs/pkgs/os-specific/linux/openvswitch/default.nix b/nixpkgs/pkgs/os-specific/linux/openvswitch/default.nix
index f0fb0a834ffe..33b252a02254 100644
--- a/nixpkgs/pkgs/os-specific/linux/openvswitch/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/openvswitch/default.nix
@@ -8,12 +8,12 @@ let
   _kernel = kernel;
   pythonEnv = python3.withPackages (ps: with ps; [ six ]);
 in stdenv.mkDerivation rec {
-  version = "2.13.0";
+  version = "2.14.0";
   pname = "openvswitch";
 
   src = fetchurl {
     url = "https://www.openvswitch.org/releases/${pname}-${version}.tar.gz";
-    sha256 = "0cd5vmfr6zwgcnkwys6rag6cmz68v0librpaplianv734xs74pyx";
+    sha256 = "0q52k6mq1jfsv0ix55mjd5ljlalhklhqfrma3l61dzhgihmfawa1";
   };
 
   kernel = optional (_kernel != null) _kernel.dev;
diff --git a/nixpkgs/pkgs/os-specific/linux/pam_gnupg/default.nix b/nixpkgs/pkgs/os-specific/linux/pam_gnupg/default.nix
new file mode 100644
index 000000000000..84135f2492aa
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/pam_gnupg/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pam, gnupg }:
+
+stdenv.mkDerivation rec {
+  pname = "pam_gnupg";
+  version = "0.1";
+
+  src = fetchFromGitHub {
+    owner = "cruegge";
+    repo = "pam-gnupg";
+    rev = "v${version}";
+    sha256 = "0b70mazyvcbg6xyqllm62rwhbz0y94pcy202db1qyy4w8466bhsw";
+  };
+
+  configureFlags = [
+    "--with-moduledir=${placeholder "out"}/lib/security"
+  ];
+
+  buildInputs = [ pam gnupg ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with stdenv.lib; {
+    description = "Unlock GnuPG keys on login";
+    longDescription = ''
+      A PAM module that hands over your login password to gpg-agent. This can
+      be useful if you are using a GnuPG-based password manager like pass.
+    '';
+    homepage = "https://github.com/cruegge/pam-gnupg";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ mtreca ];
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/pam_p11/default.nix b/nixpkgs/pkgs/os-specific/linux/pam_p11/default.nix
new file mode 100644
index 000000000000..d5336cc9f4ce
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/pam_p11/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkg-config, openssl, libp11, pam }:
+
+stdenv.mkDerivation rec {
+  pname = "pam_p11";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "OpenSC";
+    repo = "pam_p11";
+    rev = "pam_p11-${version}";
+    sha256 = "1caidy18rq5zk82d51x8vwidmkhwmanf3qm25x1yrdlbhxv6m7lk";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ pam openssl libp11 ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/OpenSC/pam_p11";
+    description = "Authentication with PKCS#11 modules";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ sb0 ];
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/pcm/default.nix b/nixpkgs/pkgs/os-specific/linux/pcm/default.nix
index f8f0d165d74b..3c49e53d8008 100644
--- a/nixpkgs/pkgs/os-specific/linux/pcm/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/pcm/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub }:
 
 stdenv.mkDerivation rec {
-  version = "202005";
+  version = "202008";
   pname = "pcm";
 
   src = fetchFromGitHub {
     owner = "opcm";
     repo = "pcm";
     rev = version;
-    sha256 = "10dyjgbxb263i64p4zfvy6xjb2hp7wg2k6ygsr8ikjawllxp8m01";
+    sha256 = "1paxwq0p39vp2ma0rg7dkalc3r28wzj77sm3alavvk2vxgvxi0ig";
   };
 
   installPhase = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/piper/default.nix b/nixpkgs/pkgs/os-specific/linux/piper/default.nix
index 0da972316788..641c8b8ba81f 100644
--- a/nixpkgs/pkgs/os-specific/linux/piper/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/piper/default.nix
@@ -4,7 +4,7 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "piper";
-  version = "0.5";
+  version = "0.5.1";
 
   format = "other";
 
@@ -12,7 +12,7 @@ python3.pkgs.buildPythonApplication rec {
     owner  = "libratbag";
     repo   = "piper";
     rev    =  version;
-    sha256 = "00vrcsbsv2477l1ncpyzc61lhxgac84dsgr3sjs8qxw3nh1gaasv";
+    sha256 = "1nfjnsiwg2rs6gkjsxzhr2708i6di149dgwq3cf6l12rxqpb8arj";
   };
 
   nativeBuildInputs = [ meson ninja gettext pkgconfig wrapGAppsHook desktop-file-utils appstream-glib gobject-introspection ];
diff --git a/nixpkgs/pkgs/os-specific/linux/powerstat/default.nix b/nixpkgs/pkgs/os-specific/linux/powerstat/default.nix
index dd3b24dd19a2..6020139ad4b4 100644
--- a/nixpkgs/pkgs/os-specific/linux/powerstat/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/powerstat/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "powerstat";
-  version = "0.02.23";
+  version = "0.02.24";
   
   src = fetchurl {
     url = "https://kernel.ubuntu.com/~cking/tarballs/${pname}/${pname}-${version}.tar.gz";
-    sha256 = "1yj8ja0hw92wscazxh9vr3qdz24wpw2fgd3w7w088srfzg2aqf3a";
+    sha256 = "0yrc1xi9flxn2mvmzp0b0vd0md5z4p8fd4y8bszc67xy12qiqy0j";
   };
   
   installFlags = [ "DESTDIR=${placeholder "out"}" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/powertop/default.nix b/nixpkgs/pkgs/os-specific/linux/powertop/default.nix
index bcac7ab63c0a..4bf318d743ea 100644
--- a/nixpkgs/pkgs/os-specific/linux/powertop/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/powertop/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "powertop";
-  version = "2.10";
+  version = "2.13";
 
   src = fetchurl {
-    url = "https://01.org/sites/default/files/downloads/${pname}-v${version}.tar.gz";
-    sha256 = "0xaazqccyd42v2q532dxx40nqhb9sfsa6cyx8641rl57mfg4bdyk";
+    url = "https://01.org/sites/default/files/downloads/${pname}-${version}.tar.gz";
+    sha256 = "0y1ixw8v17fdb1ima0zshrd0rh4zxdh10r93nrrvq6d4lhn9jpx6";
   };
 
   outputs = [ "out" "man" ];
@@ -20,10 +20,7 @@ stdenv.mkDerivation rec {
       url = "https://git.alpinelinux.org/aports/plain/main/powertop/strerror_r.patch?id=3b9214d436f1611f297b01f72469d66bfe729d6e";
       sha256 = "1kzddhcrb0n2iah4lhgxwwy4mkhq09ch25jjngyq6pdj6pmfkpfw";
     }
-  ) ++ [
-    # Fix vertical scrolling, see: https://lists.01.org/pipermail/powertop/2019-March/002046.html
-    ./fix-vertical-scrolling.patch
-  ];
+  );
 
   postPatch = ''
     substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe"
diff --git a/nixpkgs/pkgs/os-specific/linux/powertop/fix-vertical-scrolling.patch b/nixpkgs/pkgs/os-specific/linux/powertop/fix-vertical-scrolling.patch
deleted file mode 100644
index b9b3fdbaf343..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/powertop/fix-vertical-scrolling.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/display.cpp b/src/display.cpp
-index 07227c5..7b3a7a2 100644
---- a/src/display.cpp
-+++ b/src/display.cpp
-@@ -244,7 +244,7 @@ void cursor_down(void)
- 	w = tab_windows[tab_names[current_tab]];
- 	if (w) {
- 		if (w->ypad_pos < 1000) {
--			if (tab_names[current_tab] == "Tunables" || "WakeUp") {
-+			if (tab_names[current_tab] == "Tunables" || tab_names[current_tab] == "WakeUp") {
- 		                if ((w->cursor_pos + 7) >= LINES) { 
- 					prefresh(w->win, ++w->ypad_pos, w->xpad_pos, 
- 						1, 0, LINES - 3, COLS - 1);
diff --git a/nixpkgs/pkgs/os-specific/linux/r8125/default.nix b/nixpkgs/pkgs/os-specific/linux/r8125/default.nix
index a837b2261380..8cdf11f80add 100644
--- a/nixpkgs/pkgs/os-specific/linux/r8125/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/r8125/default.nix
@@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
   pname = "r8125";
   # On update please verify (using `diff -r`) that the source matches the
   # realtek version.
-  version = "9.003.02";
+  version = "9.003.05";
 
   # This is a mirror. The original website[1] doesn't allow non-interactive
   # downloads, instead emailing you a download link.
@@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "ibmibmibm";
     repo = "r8125";
-    rev = "${version}";
-    sha256 = "09ip17x8nhcpxkkhyyawkmd10n73j2ffh1i2nmsr7l3jfq7f9zac";
+    rev = version;
+    sha256 = "016vh997xjs01si0zzs572vgflq3czxd0v4m7h1m3qxcv2cvq7i0";
   };
 
   hardeningDisable = [ "pic" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/rdma-core/default.nix b/nixpkgs/pkgs/os-specific/linux/rdma-core/default.nix
index a9cf7fe03b4a..59a7125aad6d 100644
--- a/nixpkgs/pkgs/os-specific/linux/rdma-core/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/rdma-core/default.nix
@@ -4,7 +4,7 @@
 } :
 
 let
-  version = "29.0";
+  version = "31.0";
 
 in stdenv.mkDerivation {
   pname = "rdma-core";
@@ -14,7 +14,7 @@ in stdenv.mkDerivation {
     owner = "linux-rdma";
     repo = "rdma-core";
     rev = "v${version}";
-    sha256 = "03r7jbhw64siyrna9mz0qzppfzp8ilwi7iqdkxgyy33rndncqqnq";
+    sha256 = "0qr8a25ylmkwfgyj519zvl74q16bhf4895xjich2r98rl2yg0qdl";
   };
 
   nativeBuildInputs = [ cmake pkgconfig pandoc docutils makeWrapper ];
diff --git a/nixpkgs/pkgs/os-specific/linux/rfkill/default.nix b/nixpkgs/pkgs/os-specific/linux/rfkill/default.nix
deleted file mode 100644
index 10d46a84821f..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/rfkill/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ stdenv, fetchurl }:
-
-stdenv.mkDerivation rec {
-  name = "rfkill-0.5";
-
-  src = fetchurl {
-    url = "mirror://kernel/software/network/rfkill/${name}.tar.bz2";
-    sha256 = "01zs7p9kd92pxgcgwl5w46h3iyx4acfg6m1j5fgnflsaa350q5iy";
-  };
-
-  makeFlags = [ "PREFIX=$(out)" ];
-
-  meta = with stdenv.lib; {
-    homepage = "http://wireless.kernel.org/en/users/Documentation/rfkill";
-    description = "A tool to query, enable and disable wireless devices";
-    platforms = platforms.linux;
-    maintainers = [ maintainers.eelco ];
-    license = licenses.isc;
-  };
-}
diff --git a/nixpkgs/pkgs/os-specific/linux/rfkill/udev.nix b/nixpkgs/pkgs/os-specific/linux/rfkill/udev.nix
index 3ee112126ac6..a24c947673de 100644
--- a/nixpkgs/pkgs/os-specific/linux/rfkill/udev.nix
+++ b/nixpkgs/pkgs/os-specific/linux/rfkill/udev.nix
@@ -47,9 +47,10 @@ in stdenv.mkDerivation {
     cp ${rfkillHook} "$out/bin/rfkill-hook.sh"
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = "http://wireless.kernel.org/en/users/Documentation/rfkill";
     description = "Rules+hook for udev to catch rfkill state changes";
-    platforms = stdenv.lib.platforms.linux;
+    platforms = platforms.linux;
+    license = licenses.mit;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/roccat-tools/default.nix b/nixpkgs/pkgs/os-specific/linux/roccat-tools/default.nix
index 5c4848980a94..f8a1b836a6c6 100644
--- a/nixpkgs/pkgs/os-specific/linux/roccat-tools/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/roccat-tools/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchurl, cmake, pkgconfig, gettext
 , dbus, dbus-glib, libgaminggear, libgudev, lua
+, harfbuzz
 }:
 
 stdenv.mkDerivation rec {
@@ -32,6 +33,8 @@ stdenv.mkDerivation rec {
     "-DLIBDIR=lib"
   ];
 
+  NIX_CFLAGS_COMPILE = [ "-I${harfbuzz.dev}/include/harfbuzz" ];
+
   meta = {
     description = "Tools to configure ROCCAT devices";
     homepage = "http://roccat.sourceforge.net/";
diff --git a/nixpkgs/pkgs/os-specific/linux/rtl8192eu/default.nix b/nixpkgs/pkgs/os-specific/linux/rtl8192eu/default.nix
index 909a972efa38..c6527ac285d2 100644
--- a/nixpkgs/pkgs/os-specific/linux/rtl8192eu/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/rtl8192eu/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, kernel }:
+{ stdenv, lib, fetchFromGitHub, kernel, bc }:
 
 with lib;
 
@@ -6,19 +6,21 @@ let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wi
 
 in stdenv.mkDerivation rec {
   name = "rtl8192eu-${kernel.version}-${version}";
-  version = "4.4.1.20190319";
+  version = "4.4.1.20200620";
 
   src = fetchFromGitHub {
     owner = "Mange";
     repo = "rtl8192eu-linux-driver";
-    rev = "0a7199b";
-    sha256 = "0xxb8z7fd997ny53bgmf95hyqsmwjplbj6fry0rf65k9x9nggx71";
+    rev = "925ac2be34dd608a7ca42daebf9713f0c1bcec74";
+    sha256 = "159vg0scq47wnn600karpgzx3naaiyl1rg8608c8d28nhm62gvjz";
   };
 
   hardeningDisable = [ "pic" ];
 
   nativeBuildInputs = kernel.moduleBuildDependencies;
 
+  buildInputs = [ bc ];
+
   makeFlags = [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
 
   enableParallelBuilding = true;
diff --git a/nixpkgs/pkgs/os-specific/linux/rtl8821ce/default.nix b/nixpkgs/pkgs/os-specific/linux/rtl8821ce/default.nix
index 4be462991223..ae6586262a5c 100644
--- a/nixpkgs/pkgs/os-specific/linux/rtl8821ce/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/rtl8821ce/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchFromGitHub, kernel, bc }:
 stdenv.mkDerivation rec {
   name = "rtl8821ce-${kernel.version}-${version}";
-  version = "5.2.5_1.26055.20180108";
+  version = "5.5.2_34066.20200325";
 
   src = fetchFromGitHub {
     owner = "tomaspinho";
     repo = "rtl8821ce";
-    rev = "ab6154e150bbc7d12b0525d4cc1298ae196e45de";
-    sha256 = "1my0hidqnv4s7hi5897m81pq0sjw05np0g27hlkg9fwb83b5kzsg";
+    rev = "8d7edbe6a78fd79cfab85d599dad9dc34138abd1";
+    sha256 = "1hsf8lqjnkrkvk0gps8yb3lx72mvws6xbgkbdmgdkz7qdxmha8bp";
   };
 
   hardeningDisable = [ "pic" ];
@@ -32,6 +32,6 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/tomaspinho/rtl8821ce";
     license = licenses.gpl2;
     platforms = platforms.linux;
-    maintainers = [ maintainers.hhm ];
+    maintainers = with maintainers; [ hhm samuelgrf ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/rtl8821cu/default.nix b/nixpkgs/pkgs/os-specific/linux/rtl8821cu/default.nix
new file mode 100644
index 000000000000..62ea8aaaab5e
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/rtl8821cu/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, kernel, bc }:
+stdenv.mkDerivation rec {
+  name = "rtl8821cu-${kernel.version}-${version}";
+  version = "unstable-2020-05-16";
+
+  src = fetchFromGitHub {
+    owner = "brektrou";
+    repo = "rtl8821cu";
+    rev = "5c510c9f14352fed4906a10921040b9e46b58346";
+    sha256 = "1n74h1m3l2dj35caswaghzcjwcv5qlv3gj6j1rqdddbyg5khl4ag";
+  };
+
+  hardeningDisable = [ "pic" ];
+
+  nativeBuildInputs = [ bc ];
+  buildInputs = kernel.moduleBuildDependencies;
+
+  prePatch = ''
+    substituteInPlace ./Makefile \
+      --replace /lib/modules/ "${kernel.dev}/lib/modules/" \
+      --replace '$(shell uname -r)' "${kernel.modDirVersion}" \
+      --replace /sbin/depmod \# \
+      --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
+  '';
+
+  preInstall = ''
+    mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Realtek rtl8821cu driver";
+    homepage = "https://github.com/brektrou/rtl8821CU";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.contrun ];
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/rtlwifi_new/default.nix b/nixpkgs/pkgs/os-specific/linux/rtlwifi_new/default.nix
index 403f0a400107..78e5510ad17e 100644
--- a/nixpkgs/pkgs/os-specific/linux/rtlwifi_new/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/rtlwifi_new/default.nix
@@ -7,9 +7,10 @@ let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wi
 in stdenv.mkDerivation rec {
   pname = "rtlwifi_new";
   version = "2019-08-21";
+  # When updating see https://github.com/lwfinger/rtl8723be/issues/17#issuecomment-657326751
 
   src = fetchFromGitHub {
-    owner = "lwfinger";
+    owner = "rtlwifi-linux";
     repo = "rtlwifi_new";
     rev = "a108e3de87c2ed30b71c3c4595b79ab7a2f9e348";
     sha256 = "15kjs9i9vvmn1cdzccd5cljf3m45r4ssm65klkj2fdkf3kljj38k";
diff --git a/nixpkgs/pkgs/os-specific/linux/sd-switch/default.nix b/nixpkgs/pkgs/os-specific/linux/sd-switch/default.nix
new file mode 100644
index 000000000000..7cbad8d6df3b
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/sd-switch/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitLab, rustPlatform, pkg-config, dbus }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "sd-switch";
+  version = "0.2.0";
+
+  src = fetchFromGitLab {
+    owner = "rycee";
+    repo = pname;
+    rev = version;
+    sha256 = "1bhks4ma3sn95bsszs6lj9cwfr8zgmja0hqfp8xr5iq77ww2p6k3";
+  };
+
+  cargoSha256 = "0lskxakzh3yji0rzk8jcfz1sv4j19b5kmdsaj7401m5w84s1cbjw";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ dbus ];
+
+  meta = with stdenv.lib; {
+    description = "A systemd unit switcher for Home Manager";
+    homepage = "https://gitlab.com/rycee/sd-switch";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ rycee ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/smemstat/default.nix b/nixpkgs/pkgs/os-specific/linux/smemstat/default.nix
index 6693b3799482..64525052af20 100644
--- a/nixpkgs/pkgs/os-specific/linux/smemstat/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/smemstat/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   pname = "smemstat";
-  version = "0.02.07";
+  version = "0.02.08";
   src = fetchurl {
     url = "https://kernel.ubuntu.com/~cking/tarballs/smemstat/smemstat-${version}.tar.xz";
-    sha256 = "09i5n1zjw45qrfbc2vglh1xk1jwqnc91bgsq7bkp29d9dpfpzhdc";
+    sha256 = "1agigvkv1868cskivzrwyiixl658x5bv7xpz4xjc8mlii4maivpp";
   };
   buildInputs = [ ncurses ];
   installFlags = [ "DESTDIR=$(out)" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/sysdig/default.nix b/nixpkgs/pkgs/os-specific/linux/sysdig/default.nix
index 59577eb8d519..bef9231385a0 100644
--- a/nixpkgs/pkgs/os-specific/linux/sysdig/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/sysdig/default.nix
@@ -5,13 +5,13 @@
 with stdenv.lib;
 stdenv.mkDerivation rec {
   pname = "sysdig";
-  version = "0.26.7";
+  version = "0.27.0";
 
   src = fetchFromGitHub {
     owner = "draios";
     repo = "sysdig";
     rev = version;
-    sha256 = "09m6j2cl70jxb0k4ydsgrida381bipf0v026xz661152cy23r3ff";
+    sha256 = "0lpp271g0749sx7qgpwl6myi0kgfpsxk1kc4yp3r9k1pynv8bq1b";
   };
 
   nativeBuildInputs = [ cmake perl ];
diff --git a/nixpkgs/pkgs/os-specific/linux/sysklogd/default.nix b/nixpkgs/pkgs/os-specific/linux/sysklogd/default.nix
index c8378f2a0cbc..f93e9012e05d 100644
--- a/nixpkgs/pkgs/os-specific/linux/sysklogd/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/sysklogd/default.nix
@@ -21,8 +21,9 @@ stdenv.mkDerivation {
 
   preInstall = "mkdir -p $out/share/man/man5/ $out/share/man/man8/ $out/sbin";
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "A system logging daemon";
-    platforms = stdenv.lib.platforms.linux;
+    platforms = platforms.linux;
+    license = licenses.gpl2;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/syslinux/default.nix b/nixpkgs/pkgs/os-specific/linux/syslinux/default.nix
index edb951dae3da..28681aed5640 100644
--- a/nixpkgs/pkgs/os-specific/linux/syslinux/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/syslinux/default.nix
@@ -22,9 +22,15 @@ stdenv.mkDerivation {
       url = mkURL "fa1349f1" "0002-gfxboot-menu-label.patch";
       sha256 = "06ifgzbpjj4picpj17zgprsfi501zf4pp85qjjgn29i5rs291zni";
     })
-    (fetchpatch {
-      url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/0005-gnu-efi-version-compatibility.patch?h=packages/syslinux";
-      sha256 = "0fbqz56hj8az8ws26m39hyp3l5fvcbzvzdddqz3x6n56hzdpz1p6";
+    (fetchurl {
+      url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/0005-gnu-efi-version-compatibility.patch?id=821c3da473d1399d930d5b4a086e46a4179eaa45";
+      name = "0005-gnu-efi-version-compatibility.patch";
+      sha256 = "1mz2idg8cwn0mvd3jixxynhkn7rhmi5fp8cc8zznh5f0ysfra446";
+    })
+    (fetchurl {
+      url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/0025-reproducible-build.patch?id=821c3da473d1399d930d5b4a086e46a4179eaa45";
+      name = "0025-reproducible-build.patch";
+      sha256 = "0qk6wc6z3648828y3961pn4pi7xhd20a6fqn6z1mnj22bbvzcxls";
     })
     (fetchurl {
       # mbr.bin: too big (452 > 440)
@@ -70,6 +76,7 @@ stdenv.mkDerivation {
     "DATADIR=$(out)/share"
     "MANDIR=$(out)/share/man"
     "PERL=perl"
+    "HEXDATE=0x00000000"
   ]
     ++ stdenv.lib.optionals stdenv.hostPlatform.isi686 [ "bios" "efi32" ];
 
diff --git a/nixpkgs/pkgs/os-specific/linux/system76-acpi/default.nix b/nixpkgs/pkgs/os-specific/linux/system76-acpi/default.nix
new file mode 100644
index 000000000000..b7c0e27669da
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/system76-acpi/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchFromGitHub, kernel }:
+let
+  version = "1.0.1";
+  sha256 = "0jmm9h607f7k20yassm6af9mh5l00yih5248wwv4i05bd68yw3p5";
+in
+stdenv.mkDerivation {
+  name = "system76-acpi-module-${version}-${kernel.version}";
+
+  passthru.moduleName = "system76_acpi";
+
+  src = fetchFromGitHub {
+    owner = "pop-os";
+    repo = "system76-acpi-dkms";
+    rev = version;
+    inherit sha256;
+  };
+
+  hardeningDisable = [ "pic" ];
+
+  nativeBuildInputs = kernel.moduleBuildDependencies;
+
+  buildFlags = [
+    "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
+  ];
+
+  installPhase = ''
+    install -D system76_acpi.ko $out/lib/modules/${kernel.modDirVersion}/misc/system76_acpi.ko
+    mkdir -p $out/lib/udev/hwdb.d
+    mv lib/udev/hwdb.d/* $out/lib/udev/hwdb.d
+  '';
+
+  meta = with stdenv.lib; {
+    maintainers = [ maintainers.khumba ];
+    license = [ licenses.gpl2Only ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    broken = versionOlder kernel.version "4.14";
+    description = "System76 ACPI Driver (DKMS)";
+    homepage = "https://github.com/pop-os/system76-acpi-dkms";
+    longDescription = ''
+      This provides the system76_acpi in-tree driver for systems missing it.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/system76-io/default.nix b/nixpkgs/pkgs/os-specific/linux/system76-io/default.nix
new file mode 100644
index 000000000000..dac1e2db1e38
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/system76-io/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, kernel }:
+let
+  version = "1.0.1";
+  sha256 = "0qkgkkjy1isv6ws6hrcal75dxjz98rpnvqbm7agdcc6yv0c17wwh";
+in
+stdenv.mkDerivation {
+  name = "system76-io-module-${version}-${kernel.version}";
+
+  passthru.moduleName = "system76_io";
+
+  src = fetchFromGitHub {
+    owner = "pop-os";
+    repo = "system76-io-dkms";
+    rev = version;
+    inherit sha256;
+  };
+
+  hardeningDisable = [ "pic" ];
+
+  nativeBuildInputs = kernel.moduleBuildDependencies;
+
+  buildFlags = [
+    "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
+  ];
+
+  installPhase = ''
+    install -D system76-io.ko $out/lib/modules/${kernel.modDirVersion}/misc/system76-io.ko
+  '';
+
+  meta = with stdenv.lib; {
+    maintainers = [ maintainers.khumba ];
+    license = [ licenses.gpl2Plus ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    broken = versionOlder kernel.version "4.14";
+    description = "DKMS module for controlling System76 I/O board";
+    homepage = "https://github.com/pop-os/system76-io-dkms";
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/system76/default.nix b/nixpkgs/pkgs/os-specific/linux/system76/default.nix
new file mode 100644
index 000000000000..02eca1d5bbd5
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/system76/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchFromGitHub, kernel }:
+let
+  version = "1.0.9";
+  sha256 = "0i4825y2vd679kdjv30ifzj1i1066d3x37z4lgk39hx16993k162";
+in
+stdenv.mkDerivation {
+  name = "system76-module-${version}-${kernel.version}";
+
+  passthru.moduleName = "system76";
+
+  src = fetchFromGitHub {
+    owner = "pop-os";
+    repo = "system76-dkms";
+    rev = version;
+    inherit sha256;
+  };
+
+  hardeningDisable = [ "pic" ];
+
+  nativeBuildInputs = kernel.moduleBuildDependencies;
+
+  buildFlags = [
+    "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
+  ];
+
+  installPhase = ''
+    install -D system76.ko $out/lib/modules/${kernel.modDirVersion}/misc/system76.ko
+    mkdir -p $out/lib/udev/hwdb.d
+    mv lib/udev/hwdb.d/* $out/lib/udev/hwdb.d
+  '';
+
+  meta = with stdenv.lib; {
+    maintainers = [ maintainers.khumba ];
+    license = [ licenses.gpl2Plus ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    broken = versionOlder kernel.version "4.14";
+    description = "System76 DKMS driver";
+    homepage = "https://github.com/pop-os/system76-dkms";
+    longDescription = ''
+      The System76 DKMS driver. On newer System76 laptops, this driver controls
+      some of the hotkeys and allows for custom fan control.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch
index c88d0eeeff2b..390e7f9f09b3 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch
@@ -1,4 +1,4 @@
-From b873e4c0de3e24f2ec9370e5a217247217e90587 Mon Sep 17 00:00:00 2001
+From 54fb14592fc41752c3cd26552c974dd1ad4b9e73 Mon Sep 17 00:00:00 2001
 From: Eelco Dolstra <eelco.dolstra@logicblox.com>
 Date: Tue, 8 Jan 2013 15:46:30 +0100
 Subject: [PATCH 01/18] Start device units for uninitialised encrypted devices
@@ -13,7 +13,7 @@ unit.  (However, this ignores the fsck unit, so it's not perfect...)
  1 file changed, 4 deletions(-)
 
 diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in
-index c34b606216..3ab8c1c3fe 100644
+index 1c60eec587..b2486da130 100644
 --- a/rules.d/99-systemd.rules.in
 +++ b/rules.d/99-systemd.rules.in
 @@ -17,10 +17,6 @@ SUBSYSTEM=="ubi", TAG+="systemd"
@@ -28,5 +28,5 @@ index c34b606216..3ab8c1c3fe 100644
  SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}!="crypto_LUKS", SYMLINK+="gpt-auto-root"
  SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}=="crypto_LUKS", SYMLINK+="gpt-auto-root-luks"
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch
index 4f94cb465d4e..9bb69092ca4e 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch
@@ -1,4 +1,4 @@
-From bdd3ff777dd8253ff5732118dd6de0fa9a9b95fe Mon Sep 17 00:00:00 2001
+From d52880eeae09aaacd308430499f55810157b1a6d Mon Sep 17 00:00:00 2001
 From: Eelco Dolstra <eelco.dolstra@logicblox.com>
 Date: Fri, 12 Apr 2013 13:16:57 +0200
 Subject: [PATCH 02/18] Don't try to unmount /nix or /nix/store
@@ -7,18 +7,18 @@ They'll still be remounted read-only.
 
 https://github.com/NixOS/nixos/issues/126
 ---
- src/core/mount.c      | 2 ++
- src/shutdown/umount.c | 2 ++
+ src/shared/fstab-util.c | 2 ++
+ src/shutdown/umount.c   | 2 ++
  2 files changed, 4 insertions(+)
 
-diff --git a/src/core/mount.c b/src/core/mount.c
-index 1c4aefd734..a5553226f8 100644
---- a/src/core/mount.c
-+++ b/src/core/mount.c
-@@ -412,6 +412,8 @@ static bool mount_is_extrinsic(Mount *m) {
- 
-         if (PATH_IN_SET(m->where,  /* Don't bother with the OS data itself */
-                         "/",       /* (strictly speaking redundant: should already be covered by the perpetual flag check above) */
+diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c
+index 806dda8475..0220741c91 100644
+--- a/src/shared/fstab-util.c
++++ b/src/shared/fstab-util.c
+@@ -40,6 +40,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) {
+         /* Don't bother with the OS data itself */
+         if (PATH_IN_SET(mount,
+                         "/",
 +                        "/nix",
 +                        "/nix/store",
                          "/usr",
@@ -38,5 +38,5 @@ index 8a5e80eeaa..fab35ed6f3 100644
                  || path_equal(path, "/usr")
  #endif
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch
index 73aab8dd91ca..5ee54f39b741 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch
@@ -1,4 +1,4 @@
-From c28b3b2e254433e93549ee6fe8c93b43ce455776 Mon Sep 17 00:00:00 2001
+From 794073e466a3b6c8e138f0e6d15c8d6465a1a4a9 Mon Sep 17 00:00:00 2001
 From: Eelco Dolstra <eelco.dolstra@logicblox.com>
 Date: Wed, 16 Apr 2014 10:59:28 +0200
 Subject: [PATCH 03/18] Fix NixOS containers
@@ -10,10 +10,10 @@ container, so checking early whether it exists will fail.
  1 file changed, 2 insertions(+)
 
 diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 734dee1130..a97b1a4bc9 100644
+index 3b9493f232..0117a9939d 100644
 --- a/src/nspawn/nspawn.c
 +++ b/src/nspawn/nspawn.c
-@@ -5018,6 +5018,7 @@ static int run(int argc, char *argv[]) {
+@@ -5122,6 +5122,7 @@ static int run(int argc, char *argv[]) {
                                  goto finish;
                          }
                  } else {
@@ -21,7 +21,7 @@ index 734dee1130..a97b1a4bc9 100644
                          const char *p, *q;
  
                          if (arg_pivot_root_new)
-@@ -5032,6 +5033,7 @@ static int run(int argc, char *argv[]) {
+@@ -5136,6 +5137,7 @@ static int run(int argc, char *argv[]) {
                                  r = -EINVAL;
                                  goto finish;
                          }
@@ -30,5 +30,5 @@ index 734dee1130..a97b1a4bc9 100644
  
          } else {
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0004-Look-for-fsck-in-the-right-place.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0004-Look-for-fsck-in-the-right-place.patch
index e10726a2cb1f..cdef28ad68ed 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0004-Look-for-fsck-in-the-right-place.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0004-Look-for-fsck-in-the-right-place.patch
@@ -1,4 +1,4 @@
-From baf52609ad18785aa1d2cd043185ae9438d59411 Mon Sep 17 00:00:00 2001
+From caa8dcfa87cf2e46a7a1cce9c16f929916cf9186 Mon Sep 17 00:00:00 2001
 From: Eelco Dolstra <eelco.dolstra@logicblox.com>
 Date: Thu, 1 May 2014 14:10:10 +0200
 Subject: [PATCH 04/18] Look for fsck in the right place
@@ -21,5 +21,5 @@ index 80f7107b9d..74e48a385f 100644
                  cmdline[i++] = "-T";
  
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0005-Add-some-NixOS-specific-unit-directories.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0005-Add-some-NixOS-specific-unit-directories.patch
index a9b60cbb2e20..95dd17531ab2 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0005-Add-some-NixOS-specific-unit-directories.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0005-Add-some-NixOS-specific-unit-directories.patch
@@ -1,4 +1,4 @@
-From 45f80155b7c2edb1e73c233283f1ab1582e1cfbe Mon Sep 17 00:00:00 2001
+From e5d73359928b79bd846bda29ce61fe276d8c0b76 Mon Sep 17 00:00:00 2001
 From: Eelco Dolstra <eelco.dolstra@logicblox.com>
 Date: Fri, 19 Dec 2014 14:46:17 +0100
 Subject: [PATCH 05/18] Add some NixOS-specific unit directories
@@ -10,51 +10,36 @@ persistent, mutable units (used for Dysnomia).
 
 Also, remove /usr and /lib as these don't exist on NixOS.
 ---
- src/core/systemd.pc.in   |  4 ++--
- src/shared/path-lookup.c | 18 +++++-------------
- 2 files changed, 7 insertions(+), 15 deletions(-)
+ src/basic/path-lookup.c | 20 +++++---------------
+ src/core/systemd.pc.in  |  5 +++--
+ 2 files changed, 8 insertions(+), 17 deletions(-)
 
-diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
-index 8331832c7a..bedb97115d 100644
---- a/src/core/systemd.pc.in
-+++ b/src/core/systemd.pc.in
-@@ -17,8 +17,8 @@ systemduserunitdir=${prefix}/lib/systemd/user
- systemduserpresetdir=${prefix}/lib/systemd/user-preset
- systemdsystemconfdir=${sysconfdir}/systemd/system
- systemduserconfdir=${sysconfdir}/systemd/user
--systemdsystemunitpath=${systemdsystemconfdir}:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:${systemdsystemunitdir}:/usr/lib/systemd/system:/lib/systemd/system
--systemduserunitpath=${systemduserconfdir}:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:${systemduserunitdir}:/usr/lib/systemd/user:/usr/share/systemd/user
-+systemdsystemunitpath=${systemdsystemconfdir}:/etc/systemd/system:/etc/systemd-mutable/system:/nix/var/nix/profiles/default/lib/systemd/system:/run/systemd/system:${systemdsystemunitdir}
-+systemduserunitpath=${systemduserconfdir}:/etc/systemd/user:/etc/systemd-mutable/user:/nix/var/nix/profiles/default/lib/systemd/user:/run/systemd/user:${systemduserunitdir}
- systemdsystemgeneratordir=${rootprefix}/lib/systemd/system-generators
- systemdusergeneratordir=${prefix}/lib/systemd/user-generators
- systemdsystemgeneratorpath=/run/systemd/system-generators:/etc/systemd/system-generators:/usr/local/lib/systemd/system-generators:${systemdsystemgeneratordir}
-diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
-index 48e0eec09a..a9d38f16d0 100644
---- a/src/shared/path-lookup.c
-+++ b/src/shared/path-lookup.c
-@@ -98,17 +98,14 @@ int xdg_user_data_dir(char **ret, const char *suffix) {
+diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
+index 52968dee34..bba2eb09b8 100644
+--- a/src/basic/path-lookup.c
++++ b/src/basic/path-lookup.c
+@@ -94,17 +94,14 @@ int xdg_user_data_dir(char **ret, const char *suffix) {
  }
  
  static const char* const user_data_unit_paths[] = {
 -        "/usr/local/lib/systemd/user",
 -        "/usr/local/share/systemd/user",
-         USER_DATA_UNIT_PATH,
+         USER_DATA_UNIT_DIR,
 -        "/usr/lib/systemd/user",
 -        "/usr/share/systemd/user",
          NULL
  };
  
  static const char* const user_config_unit_paths[] = {
-         USER_CONFIG_UNIT_PATH,
+         USER_CONFIG_UNIT_DIR,
          "/etc/systemd/user",
 +        "/etc/systemd-mutable/user",
          NULL
  };
  
-@@ -604,15 +601,14 @@ int lookup_paths_init(
+@@ -616,15 +613,14 @@ int lookup_paths_init(
                                          persistent_config,
-                                         SYSTEM_CONFIG_UNIT_PATH,
+                                         SYSTEM_CONFIG_UNIT_DIR,
                                          "/etc/systemd/system",
 +                                        "/etc/systemd-mutable/system",
 +                                        "/nix/var/nix/profiles/default/lib/systemd/system",
@@ -70,9 +55,9 @@ index 48e0eec09a..a9d38f16d0 100644
                                          STRV_IFNOTNULL(generator_late));
                          break;
  
-@@ -628,14 +624,12 @@ int lookup_paths_init(
+@@ -640,14 +636,12 @@ int lookup_paths_init(
                                          persistent_config,
-                                         USER_CONFIG_UNIT_PATH,
+                                         USER_CONFIG_UNIT_DIR,
                                          "/etc/systemd/user",
 +                                        "/etc/systemd-mutable/user",
 +                                        "/nix/var/nix/profiles/default/lib/systemd/user",
@@ -82,26 +67,58 @@ index 48e0eec09a..a9d38f16d0 100644
 -                                        "/usr/local/share/systemd/user",
 -                                        "/usr/share/systemd/user",
 -                                        "/usr/local/lib/systemd/user",
-                                         USER_DATA_UNIT_PATH,
+                                         USER_DATA_UNIT_DIR,
 -                                        "/usr/lib/systemd/user",
                                          STRV_IFNOTNULL(generator_late));
                          break;
  
-@@ -824,14 +818,12 @@ char **generator_binary_paths(UnitFileScope scope) {
-         case UNIT_FILE_SYSTEM:
-                 return strv_new("/run/systemd/system-generators",
-                                 "/etc/systemd/system-generators",
--                                "/usr/local/lib/systemd/system-generators",
-                                 SYSTEM_GENERATOR_PATH);
+@@ -797,7 +791,6 @@ char **generator_binary_paths(UnitFileScope scope) {
+                 case UNIT_FILE_SYSTEM:
+                         add = strv_new("/run/systemd/system-generators",
+                                        "/etc/systemd/system-generators",
+-                                       "/usr/local/lib/systemd/system-generators",
+                                        SYSTEM_GENERATOR_DIR);
+                         break;
+ 
+@@ -805,7 +798,6 @@ char **generator_binary_paths(UnitFileScope scope) {
+                 case UNIT_FILE_USER:
+                         add = strv_new("/run/systemd/user-generators",
+                                        "/etc/systemd/user-generators",
+-                                       "/usr/local/lib/systemd/user-generators",
+                                        USER_GENERATOR_DIR);
+                         break;
+ 
+@@ -844,12 +836,10 @@ char **env_generator_binary_paths(bool is_system) {
+                 if (is_system)
+                         add = strv_new("/run/systemd/system-environment-generators",
+                                         "/etc/systemd/system-environment-generators",
+-                                        "/usr/local/lib/systemd/system-environment-generators",
+                                         SYSTEM_ENV_GENERATOR_DIR);
+                 else
+                         add = strv_new("/run/systemd/user-environment-generators",
+                                        "/etc/systemd/user-environment-generators",
+-                                       "/usr/local/lib/systemd/user-environment-generators",
+                                        USER_ENV_GENERATOR_DIR);
+ 
+                 if (!add)
+diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
+index 8424837824..b1c541bc52 100644
+--- a/src/core/systemd.pc.in
++++ b/src/core/systemd.pc.in
+@@ -38,10 +38,11 @@ systemdsystemconfdir=${systemd_system_conf_dir}
+ systemd_user_conf_dir=${sysconfdir}/systemd/user
+ systemduserconfdir=${systemd_user_conf_dir}
+ 
+-systemd_system_unit_path=${systemd_system_conf_dir}:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:${systemd_system_unit_dir}:/usr/lib/systemd/system:/lib/systemd/system
++systemd_system_unit_path=${systemd_system_conf_dir}:/etc/systemd/system:/etc/systemd-mutable/system:/nix/var/nix/profiles/default/lib/systemd/system:/run/systemd/system:${systemdsystemunitdir}
+ systemdsystemunitpath=${systemd_system_unit_path}
  
-         case UNIT_FILE_GLOBAL:
-         case UNIT_FILE_USER:
-                 return strv_new("/run/systemd/user-generators",
-                                 "/etc/systemd/user-generators",
--                                "/usr/local/lib/systemd/user-generators",
-                                 USER_GENERATOR_PATH);
+-systemd_user_unit_path=${systemd_user_conf_dir}:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:${systemd_user_unit_dir}:/usr/lib/systemd/user:/usr/share/systemd/user
++systemd_user_unit_path=${systemd_user_conf_dir}:/etc/systemd/user:/etc/systemd-mutable/user:/nix/var/nix/profiles/default/lib/systemd/user:/run/systemd/user:${systemduserunitdir}
++
+ systemduserunitpath=${systemd_user_unit_path}
  
-         default:
+ systemd_system_generator_dir=${root_prefix}/lib/systemd/system-generators
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0006-Get-rid-of-a-useless-message-in-user-sessions.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0006-Get-rid-of-a-useless-message-in-user-sessions.patch
index 0b57dc1f9c89..3e519e7fe73d 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0006-Get-rid-of-a-useless-message-in-user-sessions.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0006-Get-rid-of-a-useless-message-in-user-sessions.patch
@@ -1,4 +1,4 @@
-From d52058070c0c12bb05f82460f0b4b55678b724e9 Mon Sep 17 00:00:00 2001
+From 1a3de021d9b8da060a77af6e26d2b61bafefda74 Mon Sep 17 00:00:00 2001
 From: Eelco Dolstra <eelco.dolstra@logicblox.com>
 Date: Mon, 11 May 2015 15:39:38 +0200
 Subject: [PATCH 06/18] Get rid of a useless message in user sessions
@@ -13,10 +13,10 @@ in containers.
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/core/unit.c b/src/core/unit.c
-index 97e1b0004c..d3cc2ba9ec 100644
+index 2c09def06f..c70540e1a3 100644
 --- a/src/core/unit.c
 +++ b/src/core/unit.c
-@@ -2043,7 +2043,8 @@ static void unit_check_binds_to(Unit *u) {
+@@ -2150,7 +2150,8 @@ static void unit_check_binds_to(Unit *u) {
          }
  
          assert(other);
@@ -27,5 +27,5 @@ index 97e1b0004c..d3cc2ba9ec 100644
          /* A unit we need to run is gone. Sniff. Let's stop this. */
          r = manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, NULL, &error, NULL);
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0007-hostnamed-localed-timedated-disable-methods-that-cha.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0007-hostnamed-localed-timedated-disable-methods-that-cha.patch
index 5703c4f43fd4..b63a051ae075 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0007-hostnamed-localed-timedated-disable-methods-that-cha.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0007-hostnamed-localed-timedated-disable-methods-that-cha.patch
@@ -1,30 +1,20 @@
-From 409fc808794942ad1736c2cc74853d9792e4ad02 Mon Sep 17 00:00:00 2001
+From 6c12e0d2afe80563e692fc1f2f545a487c83418c Mon Sep 17 00:00:00 2001
 From: Gabriel Ebner <gebner@gebner.org>
 Date: Sun, 6 Dec 2015 14:26:36 +0100
 Subject: [PATCH 07/18] hostnamed, localed, timedated: disable methods that
  change system settings.
 
 ---
- src/hostname/hostnamed.c |  9 +++++++++
+ src/hostname/hostnamed.c |  6 ++++++
  src/locale/localed.c     |  9 +++++++++
  src/timedate/timedated.c | 10 ++++++++++
- 3 files changed, 28 insertions(+)
+ 3 files changed, 25 insertions(+)
 
 diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
-index 21f6471495..8c5af7619f 100644
+index 7f6607a527..b5a9388916 100644
 --- a/src/hostname/hostnamed.c
 +++ b/src/hostname/hostnamed.c
-@@ -422,6 +422,9 @@ static int method_set_hostname(sd_bus_message *m, void *userdata, sd_bus_error *
-         if (r < 0)
-                 return r;
- 
-+        return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
-+            "Changing system settings via systemd is not supported on NixOS.");
-+
-         if (isempty(name))
-                 name = c->data[PROP_STATIC_HOSTNAME];
- 
-@@ -478,6 +481,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
+@@ -626,6 +626,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
          if (r < 0)
                  return r;
  
@@ -33,8 +23,8 @@ index 21f6471495..8c5af7619f 100644
 +
          name = empty_to_null(name);
  
-         if (streq_ptr(name, c->data[PROP_STATIC_HOSTNAME]))
-@@ -535,6 +541,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess
+         context_read_etc_hostname(c);
+@@ -685,6 +688,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess
          if (r < 0)
                  return r;
  
@@ -43,12 +33,12 @@ index 21f6471495..8c5af7619f 100644
 +
          name = empty_to_null(name);
  
-         if (streq_ptr(name, c->data[prop]))
+         context_read_machine_info(c);
 diff --git a/src/locale/localed.c b/src/locale/localed.c
-index 09f16d25f4..c1cb87cef1 100644
+index 715ce5cac7..014f7dcf6c 100644
 --- a/src/locale/localed.c
 +++ b/src/locale/localed.c
-@@ -275,6 +275,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er
+@@ -317,6 +317,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er
          if (r < 0)
                  return r;
  
@@ -56,9 +46,9 @@ index 09f16d25f4..c1cb87cef1 100644
 +            "Changing system settings via systemd is not supported on NixOS.");
 +
          /* If single locale without variable name is provided, then we assume it is LANG=. */
-         if (strv_length(l) == 1 && !strchr(*l, '=')) {
-                 if (!locale_is_valid(*l))
-@@ -410,6 +413,9 @@ static int method_set_vc_keyboard(sd_bus_message *m, void *userdata, sd_bus_erro
+         if (strv_length(l) == 1 && !strchr(l[0], '=')) {
+                 if (!locale_is_valid(l[0]))
+@@ -432,6 +435,9 @@ static int method_set_vc_keyboard(sd_bus_message *m, void *userdata, sd_bus_erro
          if (r < 0)
                  return r;
  
@@ -68,7 +58,7 @@ index 09f16d25f4..c1cb87cef1 100644
          keymap = empty_to_null(keymap);
          keymap_toggle = empty_to_null(keymap_toggle);
  
-@@ -586,6 +592,9 @@ static int method_set_x11_keyboard(sd_bus_message *m, void *userdata, sd_bus_err
+@@ -606,6 +612,9 @@ static int method_set_x11_keyboard(sd_bus_message *m, void *userdata, sd_bus_err
          if (r < 0)
                  return r;
  
@@ -79,10 +69,10 @@ index 09f16d25f4..c1cb87cef1 100644
          model = empty_to_null(model);
          variant = empty_to_null(variant);
 diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
-index 5e2fb50d83..63865f557c 100644
+index c467b85477..3e78b2f575 100644
 --- a/src/timedate/timedated.c
 +++ b/src/timedate/timedated.c
-@@ -652,6 +652,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error *
+@@ -646,6 +646,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error *
          if (r < 0)
                  return r;
  
@@ -93,7 +83,7 @@ index 5e2fb50d83..63865f557c 100644
          if (!timezone_is_valid(z, LOG_DEBUG))
                  return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid or not installed time zone '%s'", z);
  
-@@ -731,6 +735,9 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error
+@@ -725,6 +729,9 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error
          if (r < 0)
                  return r;
  
@@ -103,7 +93,7 @@ index 5e2fb50d83..63865f557c 100644
          if (lrtc == c->local_rtc)
                  return sd_bus_reply_method_return(m, NULL);
  
-@@ -923,6 +930,9 @@ static int method_set_ntp(sd_bus_message *m, void *userdata, sd_bus_error *error
+@@ -917,6 +924,9 @@ static int method_set_ntp(sd_bus_message *m, void *userdata, sd_bus_error *error
          if (r < 0)
                  return r;
  
@@ -114,5 +104,5 @@ index 5e2fb50d83..63865f557c 100644
          if (r < 0)
                  return r;
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0008-Fix-hwdb-paths.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0008-Fix-hwdb-paths.patch
index a9bf9abee520..63bd03fcf38e 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0008-Fix-hwdb-paths.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0008-Fix-hwdb-paths.patch
@@ -1,4 +1,4 @@
-From b56fc7b6ae8014eb2f71924c89498f395a1a81bd Mon Sep 17 00:00:00 2001
+From 1e40be83eca9a831509ae764081c2252934478c3 Mon Sep 17 00:00:00 2001
 From: Nikolay Amiantov <ab@fmap.me>
 Date: Thu, 7 Jul 2016 02:47:13 +0300
 Subject: [PATCH 08/18] Fix hwdb paths
@@ -28,5 +28,5 @@ index b3febdbb31..eba00a5bc7 100644
  _public_ int sd_hwdb_new(sd_hwdb **ret) {
          _cleanup_(sd_hwdb_unrefp) sd_hwdb *hwdb = NULL;
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0009-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0009-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch
index 12a9dd5a77f6..dcdc0cd7ea01 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0009-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0009-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch
@@ -1,4 +1,4 @@
-From 4d304a321796db4de827aa39a149bea23d039214 Mon Sep 17 00:00:00 2001
+From 5e235e1f720f37fc5581b40c9a13d365368e74a8 Mon Sep 17 00:00:00 2001
 From: Nikolay Amiantov <ab@fmap.me>
 Date: Tue, 11 Oct 2016 13:12:08 +0300
 Subject: [PATCH 09/18] Change /usr/share/zoneinfo to /etc/zoneinfo
@@ -35,10 +35,10 @@ index 0f1652ee2e..71c4f95c2e 100644
      <literal>Etc/UTC</literal>. The resulting link should lead to the
      corresponding binary
 diff --git a/src/basic/time-util.c b/src/basic/time-util.c
-index 105584e2e7..5238f69931 100644
+index 15cc1b8851..d0abde5933 100644
 --- a/src/basic/time-util.c
 +++ b/src/basic/time-util.c
-@@ -1217,7 +1217,7 @@ int get_timezones(char ***ret) {
+@@ -1259,7 +1259,7 @@ int get_timezones(char ***ret) {
          n_allocated = 2;
          n_zones = 1;
  
@@ -47,7 +47,7 @@ index 105584e2e7..5238f69931 100644
          if (f) {
                  for (;;) {
                          _cleanup_free_ char *line = NULL;
-@@ -1312,7 +1312,7 @@ bool timezone_is_valid(const char *name, int log_level) {
+@@ -1354,7 +1354,7 @@ bool timezone_is_valid(const char *name, int log_level) {
          if (p - name >= PATH_MAX)
                  return false;
  
@@ -56,7 +56,7 @@ index 105584e2e7..5238f69931 100644
  
          fd = open(t, O_RDONLY|O_CLOEXEC);
          if (fd < 0) {
-@@ -1410,7 +1410,7 @@ int get_timezone(char **ret) {
+@@ -1452,7 +1452,7 @@ int get_timezone(char **ret) {
          if (r < 0)
                  return r; /* returns EINVAL if not a symlink */
  
@@ -66,10 +66,10 @@ index 105584e2e7..5238f69931 100644
                  return -EINVAL;
  
 diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
-index 901fbf0815..b57bdd8fbe 100644
+index a3f442518e..feff49e280 100644
 --- a/src/firstboot/firstboot.c
 +++ b/src/firstboot/firstboot.c
-@@ -431,7 +431,7 @@ static int process_timezone(void) {
+@@ -459,7 +459,7 @@ static int process_timezone(void) {
          if (isempty(arg_timezone))
                  return 0;
  
@@ -79,10 +79,10 @@ index 901fbf0815..b57bdd8fbe 100644
          (void) mkdir_parents(etc_localtime, 0755);
          if (symlink(e, etc_localtime) < 0)
 diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index a97b1a4bc9..aed60439e3 100644
+index 0117a9939d..d86445b40f 100644
 --- a/src/nspawn/nspawn.c
 +++ b/src/nspawn/nspawn.c
-@@ -1657,8 +1657,8 @@ static int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t u
+@@ -1699,8 +1699,8 @@ static int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t u
  static const char *timezone_from_path(const char *path) {
          return PATH_STARTSWITH_SET(
                          path,
@@ -94,10 +94,10 @@ index a97b1a4bc9..aed60439e3 100644
  
  static bool etc_writable(void) {
 diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
-index 63865f557c..8021a8b753 100644
+index 3e78b2f575..de5477a08f 100644
 --- a/src/timedate/timedated.c
 +++ b/src/timedate/timedated.c
-@@ -264,7 +264,7 @@ static int context_read_data(Context *c) {
+@@ -269,7 +269,7 @@ static int context_read_data(Context *c) {
  
          r = get_timezone(&t);
          if (r == -EINVAL)
@@ -106,7 +106,7 @@ index 63865f557c..8021a8b753 100644
          else if (r < 0)
                  log_warning_errno(r, "Failed to get target of /etc/localtime: %m");
  
-@@ -288,7 +288,7 @@ static int context_write_data_timezone(Context *c) {
+@@ -293,7 +293,7 @@ static int context_write_data_timezone(Context *c) {
  
          if (isempty(c->zone) || streq(c->zone, "UTC")) {
  
@@ -115,7 +115,7 @@ index 63865f557c..8021a8b753 100644
  
                          if (unlink("/etc/localtime") < 0 && errno != ENOENT)
                                  return -errno;
-@@ -296,9 +296,9 @@ static int context_write_data_timezone(Context *c) {
+@@ -301,9 +301,9 @@ static int context_write_data_timezone(Context *c) {
                          return 0;
                  }
  
@@ -128,5 +128,5 @@ index 63865f557c..8021a8b753 100644
                          return -ENOMEM;
  
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0010-localectl-use-etc-X11-xkb-for-list-x11.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0010-localectl-use-etc-X11-xkb-for-list-x11.patch
index 7e6453f2ddd3..50c2a1174dfb 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0010-localectl-use-etc-X11-xkb-for-list-x11.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0010-localectl-use-etc-X11-xkb-for-list-x11.patch
@@ -1,4 +1,4 @@
-From cb3f1ec1793cbf74c4b5663e038bd49ff4576192 Mon Sep 17 00:00:00 2001
+From 141d1d7acf5f018df86f0a5f7fbe49a8e928fd73 Mon Sep 17 00:00:00 2001
 From: Imuli <i@imu.li>
 Date: Wed, 19 Oct 2016 08:46:47 -0400
 Subject: [PATCH 10/18] localectl: use /etc/X11/xkb for list-x11-*
@@ -10,10 +10,10 @@ NixOS has an option to link the xkb data files to /etc/X11, but not to
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/locale/localectl.c b/src/locale/localectl.c
-index 6f2d37d222..7aa2310d48 100644
+index e0664de826..c521f33a2a 100644
 --- a/src/locale/localectl.c
 +++ b/src/locale/localectl.c
-@@ -286,7 +286,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
+@@ -277,7 +277,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
          } state = NONE, look_for;
          int r;
  
@@ -23,5 +23,5 @@ index 6f2d37d222..7aa2310d48 100644
                  return log_error_errno(errno, "Failed to open keyboard mapping list. %m");
  
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0011-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0011-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch
index 080cd4670e6f..8ad310984ed7 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0011-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0011-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch
@@ -1,4 +1,4 @@
-From 0ffb786d0e12a61899af448b1e4dd32a53ea5a8e Mon Sep 17 00:00:00 2001
+From db3946f465c0066fb1775a92c1fcc6450134904d Mon Sep 17 00:00:00 2001
 From: Franz Pletz <fpletz@fnordicwalking.de>
 Date: Sun, 11 Feb 2018 04:37:44 +0100
 Subject: [PATCH 11/18] build: don't create statedir and don't touch prefixdir
@@ -8,10 +8,10 @@ Subject: [PATCH 11/18] build: don't create statedir and don't touch prefixdir
  1 file changed, 3 deletions(-)
 
 diff --git a/meson.build b/meson.build
-index fc216d22da..078db3bb5d 100644
+index dbbddb68e2..bbeb23223d 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -3176,9 +3176,6 @@ install_data('LICENSE.GPL2',
+@@ -3369,9 +3369,6 @@ install_data('LICENSE.GPL2',
               'src/libsystemd/sd-bus/GVARIANT-SERIALIZATION',
               install_dir : docdir)
  
@@ -20,7 +20,7 @@ index fc216d22da..078db3bb5d 100644
 -
  ############################################################
  
- meson_check_help = find_program('tools/meson-check-help.sh')
+ check_help = find_program('tools/check-help.sh')
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0012-Install-default-configuration-into-out-share-factory.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0012-Install-default-configuration-into-out-share-factory.patch
index 2961a2ebe56f..0844f85763b3 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0012-Install-default-configuration-into-out-share-factory.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0012-Install-default-configuration-into-out-share-factory.patch
@@ -1,4 +1,4 @@
-From 3dbcdab1ba22c4eeca6d61718c09bcb9b5551764 Mon Sep 17 00:00:00 2001
+From 245af064c4d315d868cc12201b3663f61702cce3 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
 Date: Mon, 26 Feb 2018 14:25:57 +0000
 Subject: [PATCH 12/18] Install default configuration into $out/share/factory
@@ -31,10 +31,10 @@ store again, while having executables looking up files in /etc.
  17 files changed, 29 insertions(+), 26 deletions(-)
 
 diff --git a/hwdb.d/meson.build b/hwdb.d/meson.build
-index 4df6dabf89..02d8d69095 100644
+index 5c77387a26..6404bc01ba 100644
 --- a/hwdb.d/meson.build
 +++ b/hwdb.d/meson.build
-@@ -27,7 +27,7 @@ if conf.get('ENABLE_HWDB') == 1
+@@ -43,7 +43,7 @@ if conf.get('ENABLE_HWDB') == 1
                       install_dir : udevhwdbdir)
  
          meson.add_install_script('sh', '-c',
@@ -44,10 +44,10 @@ index 4df6dabf89..02d8d69095 100644
          meson.add_install_script('sh', '-c',
                                   'test -n "$DESTDIR" || @0@/systemd-hwdb update'
 diff --git a/meson.build b/meson.build
-index 078db3bb5d..6e1a6483fc 100644
+index bbeb23223d..1a9c56fad2 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -154,6 +154,9 @@ udevhwdbdir = join_paths(udevlibexecdir, 'hwdb.d')
+@@ -163,6 +163,9 @@ udevhwdbdir = join_paths(udevlibexecdir, 'hwdb.d')
  catalogdir = join_paths(prefixdir, 'lib/systemd/catalog')
  kernelinstalldir = join_paths(prefixdir, 'lib/kernel/install.d')
  factorydir = join_paths(datadir, 'factory')
@@ -57,7 +57,7 @@ index 078db3bb5d..6e1a6483fc 100644
  bootlibdir = join_paths(prefixdir, 'lib/systemd/boot/efi')
  testsdir = join_paths(prefixdir, 'lib/systemd/tests')
  systemdstatedir = join_paths(localstatedir, 'lib/systemd')
-@@ -2503,7 +2506,7 @@ if conf.get('ENABLE_BINFMT') == 1
+@@ -2651,7 +2654,7 @@ if conf.get('ENABLE_BINFMT') == 1
          meson.add_install_script('sh', '-c',
                                   mkdir_p.format(binfmtdir))
          meson.add_install_script('sh', '-c',
@@ -66,16 +66,16 @@ index 078db3bb5d..6e1a6483fc 100644
  endif
  
  if conf.get('ENABLE_REPART') == 1
-@@ -2604,7 +2607,7 @@ executable('systemd-sleep',
-            install_dir : rootlibexecdir)
+@@ -2767,7 +2770,7 @@ executable(
+         install_dir : rootlibexecdir)
  
  install_data('src/sleep/sleep.conf',
 -             install_dir : pkgsysconfdir)
 +             install_dir : factorypkgconfdir)
  
- exe = executable('systemd-sysctl',
-                  'src/sysctl/sysctl.c',
-@@ -2916,7 +2919,7 @@ if conf.get('HAVE_KMOD') == 1
+ public_programs += executable(
+         'systemd-sysctl',
+@@ -3101,7 +3104,7 @@ if conf.get('HAVE_KMOD') == 1
          meson.add_install_script('sh', '-c',
                                   mkdir_p.format(modulesloaddir))
          meson.add_install_script('sh', '-c',
@@ -83,8 +83,8 @@ index 078db3bb5d..6e1a6483fc 100644
 +                                 mkdir_p.format(join_paths(factoryconfdir, 'modules-load.d')))
  endif
  
- exe = executable('systemd-nspawn',
-@@ -3159,7 +3162,7 @@ install_subdir('factory/etc',
+ public_programs += executable(
+@@ -3352,7 +3355,7 @@ install_subdir('factory/etc',
                 install_dir : factorydir)
  
  install_data('xorg/50-systemd-user.sh',
@@ -94,10 +94,10 @@ index 078db3bb5d..6e1a6483fc 100644
               install_dir : modprobedir)
  install_data('LICENSE.GPL2',
 diff --git a/network/meson.build b/network/meson.build
-index 544dcf4387..1828c50863 100644
+index 99a650eac3..8105a4e48d 100644
 --- a/network/meson.build
 +++ b/network/meson.build
-@@ -10,7 +10,7 @@ if conf.get('ENABLE_NETWORKD') == 1
+@@ -11,7 +11,7 @@ if conf.get('ENABLE_NETWORKD') == 1
                       install_dir : networkdir)
  
          meson.add_install_script('sh', '-c',
@@ -107,10 +107,10 @@ index 544dcf4387..1828c50863 100644
  
  install_data('99-default.link',
 diff --git a/src/core/meson.build b/src/core/meson.build
-index 3586838f59..02ddf1a123 100644
+index fa95108523..60ee0e31c1 100644
 --- a/src/core/meson.build
 +++ b/src/core/meson.build
-@@ -179,8 +179,8 @@ libcore = static_library(
+@@ -183,8 +183,8 @@ libcore = static_library(
  systemd_sources = files('main.c')
  
  in_files = [['macros.systemd',   rpmmacrosdir],
@@ -121,7 +121,7 @@ index 3586838f59..02ddf1a123 100644
              ['systemd.pc',       pkgconfigdatadir],
              ['triggers.systemd', '']]
  
-@@ -212,6 +212,6 @@ meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
+@@ -216,6 +216,6 @@ meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
  meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
  meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
  
@@ -180,15 +180,16 @@ index 5796f77cac..75d975c260 100644
  if get_option('create-log-dirs')
          meson.add_install_script(
 diff --git a/src/kernel-install/meson.build b/src/kernel-install/meson.build
-index 261c3aaae4..dbc5e23513 100644
+index 9ae342dfba..65df666337 100644
 --- a/src/kernel-install/meson.build
 +++ b/src/kernel-install/meson.build
-@@ -11,4 +11,4 @@ install_data('00-entry-directory.install',
-              install_dir : kernelinstalldir)
+@@ -14,5 +14,5 @@ if want_kernel_install
+ 		install_dir : kernelinstalldir)
  
- meson.add_install_script('sh', '-c',
--                         mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))
-+                         mkdir_p.format(join_paths(factoryconfdir, 'kernel/install.d')))
+ 	meson.add_install_script('sh', '-c',
+-				mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))
++				mkdir_p.format(join_paths(factoryconfdir, 'kernel/install.d')))
+ endif
 diff --git a/src/login/meson.build b/src/login/meson.build
 index 0a7d3d5440..ff90149c1c 100644
 --- a/src/login/meson.build
@@ -203,10 +204,10 @@ index 0a7d3d5440..ff90149c1c 100644
          install_data('org.freedesktop.login1.conf',
                       install_dir : dbuspolicydir)
 diff --git a/src/network/meson.build b/src/network/meson.build
-index c1c02cfda1..1bfa79a03b 100644
+index b3a88d9910..be56d1e9d7 100644
 --- a/src/network/meson.build
 +++ b/src/network/meson.build
-@@ -201,7 +201,7 @@ if conf.get('ENABLE_NETWORKD') == 1
+@@ -229,7 +229,7 @@ if conf.get('ENABLE_NETWORKD') == 1
          endif
  
          install_data('networkd.conf',
@@ -227,10 +228,10 @@ index adbac24b54..e9dc88dfa2 100644
 +                     install_dir : factorypkgconfdir)
  endif
 diff --git a/src/resolve/meson.build b/src/resolve/meson.build
-index c4d8d4e5d9..f550c289a5 100644
+index 92b67b6333..ac5b9a0b0a 100644
 --- a/src/resolve/meson.build
 +++ b/src/resolve/meson.build
-@@ -170,7 +170,7 @@ if conf.get('ENABLE_RESOLVE') == 1
+@@ -168,7 +168,7 @@ if conf.get('ENABLE_RESOLVE') == 1
                  output : 'resolved.conf',
                  configuration : substs)
          install_data(resolved_conf,
@@ -253,10 +254,10 @@ index e5c118c8db..19235df9ca 100644
                       install_dir : dbuspolicydir)
          install_data('org.freedesktop.timesync1.service',
 diff --git a/src/udev/meson.build b/src/udev/meson.build
-index 173b10be50..82638cf5a9 100644
+index aa23b07090..ad004d803a 100644
 --- a/src/udev/meson.build
 +++ b/src/udev/meson.build
-@@ -187,7 +187,7 @@ foreach prog : [['ata_id/ata_id.c'],
+@@ -186,7 +186,7 @@ foreach prog : [['ata_id/ata_id.c'],
  endforeach
  
  install_data('udev.conf',
@@ -265,7 +266,7 @@ index 173b10be50..82638cf5a9 100644
  
  configure_file(
          input : 'udev.pc.in',
-@@ -196,7 +196,7 @@ configure_file(
+@@ -195,7 +195,7 @@ configure_file(
          install_dir : pkgconfigdatadir == 'no' ? '' : pkgconfigdatadir)
  
  meson.add_install_script('sh', '-c',
@@ -285,10 +286,10 @@ index 3f072e3db7..bd9f843eba 100644
 -                         mkdir_p.format(join_paths(sysconfdir, 'sysctl.d')))
 +                         mkdir_p.format(join_paths(factoryconfdir, 'sysctl.d')))
 diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build
-index e77f46d06b..04d2ef621d 100644
+index 0a9582d8b9..3c56ca7d83 100644
 --- a/tmpfiles.d/meson.build
 +++ b/tmpfiles.d/meson.build
-@@ -57,5 +57,5 @@ endforeach
+@@ -58,5 +58,5 @@ endforeach
  if enable_tmpfiles
          meson.add_install_script(
                  'sh', '-c',
@@ -296,7 +297,7 @@ index e77f46d06b..04d2ef621d 100644
 +                mkdir_p.format(join_paths(factoryconfdir, 'tmpfiles.d')))
  endif
 diff --git a/units/meson.build b/units/meson.build
-index ea91f0cc9e..8622054ca5 100644
+index aa2ed115ea..12e2925226 100644
 --- a/units/meson.build
 +++ b/units/meson.build
 @@ -323,7 +323,7 @@ install_data('user-.slice.d/10-defaults.conf',
@@ -309,5 +310,5 @@ index ea91f0cc9e..8622054ca5 100644
                           join_paths(dbussystemservicedir, 'org.freedesktop.systemd1.service'),
                           join_paths(dbussessionservicedir, 'org.freedesktop.systemd1.service'))
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch
index 5aa397afe8e6..a15220fd3f93 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch
@@ -1,4 +1,4 @@
-From 0b0510aa72cf8026f34f300efa3f150f45971404 Mon Sep 17 00:00:00 2001
+From bfaa53731ffe984c93c5321099d1341b5059f029 Mon Sep 17 00:00:00 2001
 From: Andreas Rammhold <andreas@rammhold.de>
 Date: Fri, 2 Nov 2018 21:15:42 +0100
 Subject: [PATCH 13/18] inherit systemd environment when calling generators.
@@ -16,10 +16,10 @@ executables that are being called from managers.
  1 file changed, 8 insertions(+), 3 deletions(-)
 
 diff --git a/src/core/manager.c b/src/core/manager.c
-index 25afdbea04..7afd5e5a37 100644
+index 41e0d73736..d02de06f09 100644
 --- a/src/core/manager.c
 +++ b/src/core/manager.c
-@@ -3896,9 +3896,14 @@ static int manager_run_generators(Manager *m) {
+@@ -4095,9 +4095,14 @@ static int manager_run_generators(Manager *m) {
          argv[4] = NULL;
  
          RUN_WITH_UMASK(0022)
@@ -38,5 +38,5 @@ index 25afdbea04..7afd5e5a37 100644
  
  finish:
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0014-add-rootprefix-to-lookup-dir-paths.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0014-add-rootprefix-to-lookup-dir-paths.patch
index 91c091baa9e7..dca7b5591d29 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0014-add-rootprefix-to-lookup-dir-paths.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0014-add-rootprefix-to-lookup-dir-paths.patch
@@ -1,4 +1,4 @@
-From 4bd20cf0450455e2f9831b09ba91811ba3d58961 Mon Sep 17 00:00:00 2001
+From d8b93ef32f3b95a6ce6548a8ad1504a485ffbe81 Mon Sep 17 00:00:00 2001
 From: Andreas Rammhold <andreas@rammhold.de>
 Date: Thu, 9 May 2019 11:15:22 +0200
 Subject: [PATCH 14/18] add rootprefix to lookup dir paths
@@ -34,5 +34,5 @@ index 970654a1ad..bb261040f8 100644
  #define CONF_PATHS(n)                           \
          CONF_PATHS_USR(n)                       \
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0015-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0015-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch
index 2bc75e279282..1bd9e23d25c2 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0015-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0015-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch
@@ -1,4 +1,4 @@
-From f23a1e00de028048a2a21d322493039cce7ee214 Mon Sep 17 00:00:00 2001
+From b3bc0aa899c51d19edfb53af2b00dde64123ab06 Mon Sep 17 00:00:00 2001
 From: Nikolay Amiantov <ab@fmap.me>
 Date: Thu, 25 Jul 2019 20:45:55 +0300
 Subject: [PATCH 15/18] systemd-shutdown: execute scripts in
@@ -10,10 +10,10 @@ This is needed for NixOS to use such scripts as systemd directory is immutable.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c
-index 15e6c1799e..412bdefe74 100644
+index 06c9710c6e..dadcc3117d 100644
 --- a/src/shutdown/shutdown.c
 +++ b/src/shutdown/shutdown.c
-@@ -298,7 +298,7 @@ int main(int argc, char *argv[]) {
+@@ -312,7 +312,7 @@ int main(int argc, char *argv[]) {
          _cleanup_free_ char *cgroup = NULL;
          char *arguments[3], *watchdog_device;
          int cmd, r, umount_log_level = LOG_INFO;
@@ -23,5 +23,5 @@ index 15e6c1799e..412bdefe74 100644
          /* The log target defaults to console, but the original systemd process will pass its log target in through a
           * command line argument, which will override this default. Also, ensure we'll never log to the journal or
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0016-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0016-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
index 97f63c02c380..d99c7ecc96c1 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0016-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0016-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
@@ -1,4 +1,4 @@
-From 758b8211e6e76524d62a2e0ffcf37dcf55e3be87 Mon Sep 17 00:00:00 2001
+From 2679210f4ce804713bf1d244ac0fb8ac7b9b1e5f Mon Sep 17 00:00:00 2001
 From: Nikolay Amiantov <ab@fmap.me>
 Date: Thu, 25 Jul 2019 20:46:58 +0300
 Subject: [PATCH 16/18] systemd-sleep: execute scripts in
@@ -10,10 +10,10 @@ This is needed for NixOS to use such scripts as systemd directory is immutable.
  1 file changed, 1 insertion(+)
 
 diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
-index fbfddc0262..d2530b9421 100644
+index 7029352ca5..6d9c636872 100644
 --- a/src/sleep/sleep.c
 +++ b/src/sleep/sleep.c
-@@ -178,6 +178,7 @@ static int execute(char **modes, char **states) {
+@@ -182,6 +182,7 @@ static int execute(char **modes, char **states) {
          };
          static const char* const dirs[] = {
                  SYSTEM_SLEEP_PATH,
@@ -22,5 +22,5 @@ index fbfddc0262..d2530b9421 100644
          };
  
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0017-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0017-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch
index 2a0bb0103f54..f45e4edd8e84 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0017-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0017-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch
@@ -1,4 +1,4 @@
-From ce9fe2249c91fdfb224eaffce63e3dbdb4a5c25d Mon Sep 17 00:00:00 2001
+From 561b0cc9a1faed5729d6f701304a65c2968394ec Mon Sep 17 00:00:00 2001
 From: Florian Klink <flokli@flokli.de>
 Date: Sat, 7 Mar 2020 22:40:27 +0100
 Subject: [PATCH 17/18] kmod-static-nodes.service: Update ConditionFileNotEmpty
@@ -23,5 +23,5 @@ index 0971edf9ec..87105a87b9 100644
  [Service]
  Type=oneshot
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0018-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0018-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
index 08b2fa056f8b..a964aeede76b 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0018-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0018-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
@@ -1,4 +1,4 @@
-From 55b69fc1b5441e3aff8f1ab684ba8eed3718a32d Mon Sep 17 00:00:00 2001
+From 0d9d7c03054babdbd1fa5f6f266b56e8c96e9ba5 Mon Sep 17 00:00:00 2001
 From: Florian Klink <flokli@flokli.de>
 Date: Sun, 8 Mar 2020 01:05:54 +0100
 Subject: [PATCH 18/18] path-util.h: add placeholder for DEFAULT_PATH_NORMAL
@@ -29,5 +29,5 @@ index 30031fca8e..d97145539a 100644
  #if HAVE_SPLIT_USR
  #  define DEFAULT_PATH DEFAULT_PATH_SPLIT_USR
 -- 
-2.26.2
+2.27.0
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix b/nixpkgs/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
deleted file mode 100644
index 3fd8ff07f425..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ systemd, cryptsetup }:
-
-systemd.overrideAttrs (p: {
-  version = p.version;
-  name = "systemd-cryptsetup-generator-${p.version}";
-
-  buildInputs = p.buildInputs ++ [ cryptsetup ];
-  outputs = [ "out" ];
-
-  buildPhase = ''
-    ninja systemd-cryptsetup systemd-cryptsetup-generator
-  '';
-
-  # As ninja install is not used here, the rpath needs to be manually fixed.
-  # Otherwise the resulting binary doesn't properly link against systemd-shared.so
-  postFixup = ''
-    for prog in `find $out -type f -executable`; do
-      (patchelf --print-needed $prog | grep 'libsystemd-shared-.*\.so' > /dev/null) && (
-        patchelf --set-rpath `patchelf --print-rpath $prog`:"$out/lib/systemd" $prog
-      ) || true
-    done
-    # test it's OK
-    "$out"/lib/systemd/systemd-cryptsetup
-  '';
-
-  installPhase = ''
-    mkdir -p $out/lib/systemd/
-    cp systemd-cryptsetup $out/lib/systemd/systemd-cryptsetup
-    cp src/shared/*.so $out/lib/systemd/
-
-    mkdir -p $out/lib/systemd/system-generators/
-    cp systemd-cryptsetup-generator $out/lib/systemd/system-generators/systemd-cryptsetup-generator
-  '';
-})
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/default.nix b/nixpkgs/pkgs/os-specific/linux/systemd/default.nix
index 3235fb3b95cd..54060b156f26 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, intltool, gperf, libcap
-, curl, kmod, gnupg, gnutar, xz, pam, acl, libuuid, m4, utillinux, libffi
+{ stdenv, lib, fetchFromGitHub, pkgconfig, intltool, gperf, libcap
+, curl, kmod, gnupg, gnutar, xz, pam, acl, libuuid, m4, e2fsprogs, utillinux, libffi
 , glib, kbd, libxslt, coreutils, libgcrypt, libgpgerror, libidn2, libapparmor
-, audit, lz4, bzip2, libmicrohttpd, pcre2
+, audit, lz4, bzip2, pcre2
 , linuxHeaders ? stdenv.cc.libc.linuxHeaders
 , iptables, gnu-efi, bashInteractive
 , gettext, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45
@@ -9,6 +9,7 @@
 , patchelf
 , substituteAll
 , getent
+, cryptsetup, lvm2
 , buildPackages
 , perl
 , withSelinux ? false, libselinux
@@ -16,33 +17,24 @@
 , withKexectools ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) kexectools.meta.platforms, kexectools
 }:
 
-let gnupg-minimal = gnupg.override {
-  enableMinimal = true;
-  guiSupport = false;
-  pcsclite = null;
-  sqlite = null;
-  pinentry = null;
-  adns = null;
-  gnutls = null;
-  libusb1 = null;
-  openldap = null;
-  readline = null;
-  zlib = null;
-  bzip2 = null;
-};
+let
+  version = "246";
 in stdenv.mkDerivation {
-  version = "245.5";
+  inherit version;
   pname = "systemd";
 
-  # When updating, use https://github.com/systemd/systemd-stable tree, not the development one!
-  # Also fresh patches should be cherry-picked from that tree to our current one.
+  # We use systemd/systemd-stable for src, and ship NixOS-specific patches inside nixpkgs directly
+  # This has proven to be less error-prone than the previous systemd fork.
   src = fetchFromGitHub {
     owner = "systemd";
     repo = "systemd-stable";
-    rev = "9a506b7e9291d997a920af9ac299e7b834368119";
-    sha256 = "19qd92hjlsljr6x5mbw1l2vdzz5y9hy7y7g0dwgpfifb0lwkxqbr";
+    rev = "v${version}";
+    sha256 = "0zrkyxrh5rm45f2l1rnjyv229bcyzawfw7c63jqxwix75px60dyw";
   };
 
+  # If these need to be regenerated, `git am path/to/00*.patch` them into a
+  # systemd worktree, rebase to the more recent systemd version, and export the
+  # patches again via `git format-patch v${version}`.
   patches = [
     ./0001-Start-device-units-for-uninitialised-encrypted-devic.patch
     ./0002-Don-t-try-to-unmount-nix-or-nix-store.patch
@@ -75,7 +67,7 @@ in stdenv.mkDerivation {
       "find_program('${stdenv.cc.bintools.targetPrefix}objcopy'"
   '';
 
-  outputs = [ "out" "lib" "man" "dev" ];
+  outputs = [ "out" "man" "dev" ];
 
   nativeBuildInputs =
     [ pkgconfig intltool gperf libxslt gettext docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_45
@@ -89,8 +81,8 @@ in stdenv.mkDerivation {
     ];
   buildInputs =
     [ linuxHeaders libcap curl.dev kmod xz pam acl
-      /* cryptsetup */ libuuid glib libgcrypt libgpgerror libidn2
-      libmicrohttpd pcre2 ] ++
+      cryptsetup libuuid glib libgcrypt libgpgerror libidn2
+      pcre2 ] ++
       stdenv.lib.optional withKexectools kexectools ++
       stdenv.lib.optional withLibseccomp libseccomp ++
     [ libffi audit lz4 bzip2 libapparmor
@@ -105,7 +97,6 @@ in stdenv.mkDerivation {
     "-Ddbussystemservicedir=${placeholder "out"}/share/dbus-1/system-services"
     "-Dpamconfdir=${placeholder "out"}/etc/pam.d"
     "-Drootprefix=${placeholder "out"}"
-    "-Drootlibdir=${placeholder "lib"}/lib"
     "-Dpkgconfiglibdir=${placeholder "dev"}/lib/pkgconfig"
     "-Dpkgconfigdatadir=${placeholder "dev"}/share/pkgconfig"
     "-Dloadkeys-path=${kbd}/bin/loadkeys"
@@ -120,6 +111,7 @@ in stdenv.mkDerivation {
     "-Dhostnamed=true"
     "-Dnetworkd=true"
     "-Dportabled=false"
+    "-Dremote=false"
     "-Dsysusers=false"
     "-Dtimedated=true"
     "-Dtimesyncd=true"
@@ -175,12 +167,28 @@ in stdenv.mkDerivation {
     export LC_ALL="en_US.UTF-8";
     # FIXME: patch this in systemd properly (and send upstream).
     # already fixed in f00929ad622c978f8ad83590a15a765b4beecac9: (u)mount
-    for i in src/remount-fs/remount-fs.c src/core/mount.c src/core/swap.c src/fsck/fsck.c units/emergency.service.in units/rescue.service.in src/journal/cat.c src/shutdown/shutdown.c src/nspawn/nspawn.c src/shared/generator.c units/systemd-logind.service.in units/systemd-nspawn@.service.in; do
+    for i in \
+      src/core/mount.c \
+      src/core/swap.c \
+      src/cryptsetup/cryptsetup-generator.c \
+      src/fsck/fsck.c \
+      src/journal/cat.c \
+      src/nspawn/nspawn.c \
+      src/remount-fs/remount-fs.c \
+      src/shared/generator.c \
+      src/shutdown/shutdown.c \
+      units/emergency.service.in \
+      units/rescue.service.in \
+      units/systemd-logind.service.in \
+      units/systemd-nspawn@.service.in; \
+    do
       test -e $i
       substituteInPlace $i \
         --replace /usr/bin/getent ${getent}/bin/getent \
+        --replace /sbin/mkswap ${lib.getBin utillinux}/sbin/mkswap \
         --replace /sbin/swapon ${lib.getBin utillinux}/sbin/swapon \
         --replace /sbin/swapoff ${lib.getBin utillinux}/sbin/swapoff \
+        --replace /sbin/mke2fs ${lib.getBin e2fsprogs}/sbin/mke2fs \
         --replace /sbin/fsck ${lib.getBin utillinux}/sbin/fsck \
         --replace /bin/echo ${coreutils}/bin/echo \
         --replace /bin/cat ${coreutils}/bin/cat \
@@ -196,7 +204,7 @@ in stdenv.mkDerivation {
 
     # absolute paths to gpg & tar
     substituteInPlace src/import/pull-common.c \
-      --replace '"gpg"' '"${gnupg-minimal}/bin/gpg"'
+      --replace '"gpg"' '"${gnupg}/bin/gpg"'
     for file in src/import/{{export,import,pull}-tar,import-common}.c; do
       substituteInPlace $file \
         --replace '"tar"' '"${gnutar}/bin/tar"'
@@ -257,38 +265,10 @@ in stdenv.mkDerivation {
 
     # "kernel-install" shouldn't be used on NixOS.
     find $out -name "*kernel-install*" -exec rm {} \;
-
-    # Keep only libudev and libsystemd in the lib output.
-    mkdir -p $out/lib
-    mv $lib/lib/security $lib/lib/libnss* $out/lib/
   ''; # */
 
   enableParallelBuilding = true;
 
-  # On aarch64 we "leak" a reference to $out/lib/systemd/catalog in the lib
-  # output. The result of that is a dependency cycle between $out and $lib.
-  # Thus nix (rightfully) marks the build as failed. That reference originates
-  # from an array of strings (catalog_file_dirs) in systemd
-  # (src/src/journal/catalog.{c,h}).  The only consumer (as of v242) of the
-  # symbol is the main function of journalctl.  Still libsystemd.so contains
-  # the VALUE but not the symbol.  Systemd seems to be properly using function
-  # & data sections together with the linker flags to garbage collect unused
-  # sections (-Wl,--gc-sections).  For unknown reasons those flags do not
-  # eliminate the unused string constants, in this case on aarch64-linux. The
-  # hacky way is to just remove the reference after we finished compiling.
-  # Since it can not be used (there is no symbol to actually refer to it) there
-  # should not be any harm.  It is a bit odd and I really do not like starting
-  # these kind of hacks but there doesn't seem to be a straight forward way at
-  # this point in time.
-  # The reference will be replaced by the same reference the usual nukeRefs
-  # tooling uses.  The standard tooling can not / should not be uesd since it
-  # is a bit too excessive and could potentially do us some (more) harm.
-  postFixup = ''
-    nukedRef=$(echo $out | sed -e "s,$NIX_STORE/[^-]*-\(.*\),$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-\1,")
-    cat $lib/lib/libsystemd.so | perl -pe "s|$out/lib/systemd/catalog|$nukedRef/lib/systemd/catalog|" > $lib/lib/libsystemd.so.tmp
-    mv $lib/lib/libsystemd.so.tmp $(readlink -f $lib/lib/libsystemd.so)
-  '';
-
   # The interface version prevents NixOS from switching to an
   # incompatible systemd at runtime.  (Switching across reboots is
   # fine, of course.)  It should be increased whenever systemd changes
diff --git a/nixpkgs/pkgs/os-specific/linux/sysvinit/default.nix b/nixpkgs/pkgs/os-specific/linux/sysvinit/default.nix
index 0fc5acba4dac..5d081f2db825 100644
--- a/nixpkgs/pkgs/os-specific/linux/sysvinit/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/sysvinit/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, withoutInitTools ? false }:
 
-let version = "2.96"; in
+let version = "2.97"; in
 
 stdenv.mkDerivation {
   name = (if withoutInitTools then "sysvtools" else "sysvinit") + "-" + version;
 
   src = fetchurl {
     url = "mirror://savannah/sysvinit/sysvinit-${version}.tar.xz";
-    sha256 = "11xmcamvjmrw874zp0vc37hrqc4hz02i0iy8n4xa4dd25avjcbia";
+    sha256 = "042iyayyh3j28vfbypzn822b73r3nfmyn79f9mixigqrfn2rcn9d";
   };
 
   prePatch = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/targetcli/default.nix b/nixpkgs/pkgs/os-specific/linux/targetcli/default.nix
index 65d46ad34c16..94920c4012a4 100644
--- a/nixpkgs/pkgs/os-specific/linux/targetcli/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/targetcli/default.nix
@@ -1,17 +1,17 @@
-{ stdenv, python, fetchFromGitHub }:
+{ stdenv, python3, fetchFromGitHub }:
 
-python.pkgs.buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "targetcli";
-  version = "2.1.51";
+  version = "2.1.53";
 
   src = fetchFromGitHub {
     owner = "open-iscsi";
     repo = "${pname}-fb";
     rev = "v${version}";
-    sha256 = "07i9kyr525hlk32amzgycirwgwykdbjy5fmw6ji0nnhvk2jh4arn";
+    sha256 = "1qrq7y5hnghzbxgrxgl153n8jlhw31kqjbr93jsvlvhz5b3ci750";
   };
 
-  propagatedBuildInputs = with python.pkgs; [ configshell rtslib ];
+  propagatedBuildInputs = with python3.pkgs; [ configshell rtslib ];
 
   postInstall = ''
     install -D targetcli.8 -t $out/share/man/man8/
diff --git a/nixpkgs/pkgs/os-specific/linux/tiscamera/default.nix b/nixpkgs/pkgs/os-specific/linux/tiscamera/default.nix
index fb2773b4d3ad..f9196fc16864 100644
--- a/nixpkgs/pkgs/os-specific/linux/tiscamera/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/tiscamera/default.nix
@@ -2,7 +2,7 @@
 , stdenv
 , fetchFromGitHub
 , cmake
-, pkgconfig
+, pkg-config
 , pcre
 , tinyxml
 , libusb1
@@ -12,7 +12,6 @@
 , gst_all_1
 , libwebcam
 , libunwind
-, gstreamer
 , elfutils
 , orc
 , python3
@@ -32,7 +31,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [
     cmake
-    pkgconfig
+    pkg-config
   ];
 
   buildInputs = [
@@ -46,54 +45,37 @@ stdenv.mkDerivation rec {
     gst_all_1.gst-plugins-base
     libwebcam
     libunwind
-    gstreamer
     elfutils
     orc
     python3
     libuuid
   ];
 
-
   cmakeFlags = [
     "-DBUILD_ARAVIS=OFF" # For GigE support. Won't need it as our camera is usb.
     "-DBUILD_GST_1_0=ON"
     "-DBUILD_TOOLS=ON"
     "-DBUILD_V4L2=ON"
     "-DBUILD_LIBUSB=ON"
+    "-DTCAM_INSTALL_UDEV=${placeholder "out"}/lib/udev/rules.d"
+    "-DTCAM_INSTALL_UVCDYNCTRL=${placeholder "out"}/share/uvcdynctrl/data/199e"
+    "-DTCAM_INSTALL_GST_1_0=${placeholder "out"}/lib/gstreamer-1.0"
+    "-DTCAM_INSTALL_GIR=${placeholder "out"}/share/gir-1.0"
+    "-DTCAM_INSTALL_TYPELIB=${placeholder "out"}/lib/girepository-1.0"
+    "-DTCAM_INSTALL_SYSTEMD=${placeholder "out"}/etc/systemd/system"
+    # There are gobject introspection commands launched as part of the build. Those have a runtime
+    # dependency on `libtcam` (which itself is built as part of this build). In order to allow
+    # that, we set the dynamic linker's path to point on the build time location of the library.
+    "-DCMAKE_SKIP_BUILD_RPATH=OFF"
   ];
 
   postPatch = ''
-    substituteInPlace ./data/udev/80-theimagingsource-cameras.rules.in \
-      --replace "/usr/bin/uvcdynctrl" "${libwebcam}/bin/uvcdynctrl" \
-      --replace "/path/to/tiscamera/uvc-extensions" "$out/share/uvcdynctrl/data/199e"
-
     substituteInPlace ./src/BackendLoader.cpp \
       --replace '"libtcam-v4l2.so"' "\"$out/lib/tcam-0/libtcam-v4l2.so\"" \
       --replace '"libtcam-aravis.so"' "\"$out/lib/tcam-0/libtcam-aravis.so\"" \
       --replace '"libtcam-libusb.so"' "\"$out/lib/tcam-0/libtcam-libusb.so\""
   '';
 
-  preConfigure = ''
-    cmakeFlagsArray=(
-      $cmakeFlagsArray
-      "-DCMAKE_INSTALL_PREFIX=$out"
-      "-DTCAM_INSTALL_UDEV=$out/lib/udev/rules.d"
-      "-DTCAM_INSTALL_UVCDYNCTRL=$out/share/uvcdynctrl/data/199e"
-      "-DTCAM_INSTALL_GST_1_0=$out/lib/gstreamer-1.0"
-      "-DTCAM_INSTALL_GIR=$out/share/gir-1.0"
-      "-DTCAM_INSTALL_TYPELIB=$out/lib/girepository-1.0"
-      "-DTCAM_INSTALL_SYSTEMD=$out/etc/systemd/system"
-    )
-  '';
-
-
-  # There are gobject introspection commands launched as part of the build. Those have a runtime
-  # dependency on `libtcam` (which itself is built as part of this build). In order to allow
-  # that, we set the dynamic linker's path to point on the build time location of the library.
-  preBuild = ''
-    export LD_LIBRARY_PATH=$PWD/src''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
-  '';
-
   meta = with lib; {
     description = "The Linux sources and UVC firmwares for The Imaging Source cameras";
     homepage = "https://github.com/TheImagingSource/tiscamera";
diff --git a/nixpkgs/pkgs/os-specific/linux/turbostat/default.nix b/nixpkgs/pkgs/os-specific/linux/turbostat/default.nix
index 4207589aaff0..035dddcc4ec0 100644
--- a/nixpkgs/pkgs/os-specific/linux/turbostat/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/turbostat/default.nix
@@ -1,9 +1,10 @@
-{ stdenv, kernel }:
+{ stdenv, kernel, libcap }:
 
 stdenv.mkDerivation {
   pname = "turbostat";
   inherit (kernel) src version;
 
+  buildInputs = [ libcap ];
   makeFlags = [ "PREFIX=${placeholder "out"}" ];
 
   postPatch = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/undervolt/default.nix b/nixpkgs/pkgs/os-specific/linux/undervolt/default.nix
index 696625761b16..2f03ee8c8201 100644
--- a/nixpkgs/pkgs/os-specific/linux/undervolt/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/undervolt/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, python3Packages }:
 
 python3Packages.buildPythonApplication rec {
-  version = "0.2.11";
+  version = "0.3.0";
   pname = "undervolt";
 
   src = fetchFromGitHub {
     owner = "georgewhewell";
     repo = "undervolt";
     rev = version;
-    sha256 = "18mnf3x687qal7k8yk2sdxzgbyn3rqchgflbi1sksryznmksqqw5";
+    sha256 = "1aybk8vbb4745raz7rvpkk6b98xrdiwjhkpbv3kwsgsr9sj42lp0";
   };
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix b/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix
index aa23a162a929..ac6ad8a4bb76 100644
--- a/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix
@@ -3,11 +3,11 @@
 
 stdenv.mkDerivation rec {
   pname = "util-linux";
-  version = "2.35.1";
+  version = "2.36";
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/util-linux/v${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "1yfpy6bkab4jw61mpx48gfy24yrqp4a7arvpis8csrkk53fkxpnr";
+    sha256 = "1cg0m4psswg71v6wrqc2bngcw20fsp01vbijxdzvdf8kxdkiqjwy";
   };
 
   patches = [
diff --git a/nixpkgs/pkgs/os-specific/linux/v4l-utils/default.nix b/nixpkgs/pkgs/os-specific/linux/v4l-utils/default.nix
index c23c37aa56d0..2c9b395949aa 100644
--- a/nixpkgs/pkgs/os-specific/linux/v4l-utils/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/v4l-utils/default.nix
@@ -12,11 +12,11 @@ let
 # we need to use stdenv.mkDerivation in order not to pollute the libv4l’s closure with Qt
 in stdenv.mkDerivation rec {
   pname = "v4l-utils";
-  version = "1.18.1";
+  version = "1.20.0";
 
   src = fetchurl {
     url = "https://linuxtv.org/downloads/${pname}/${pname}-${version}.tar.bz2";
-    sha256 = "0hpkqm2bpg1ma2shjzcf6xsrpyjd8h5cakgh8a3iyh126wjl5z15";
+    sha256 = "1xr66y6w422hil6s7n8d61a2vhwh4im8l267amf41jvw7xqihqcm";
   };
 
   outputs = [ "out" ] ++ lib.optional withUtils "lib" ++ [ "dev" ];
@@ -41,6 +41,7 @@ in stdenv.mkDerivation rec {
 
   postPatch = ''
     patchShebangs utils/cec-ctl/msg2ctl.pl
+    patchShebangs utils/libcecutil/cec-gen.pl
   '';
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/os-specific/linux/wireguard/default.nix b/nixpkgs/pkgs/os-specific/linux/wireguard/default.nix
index 6af465da4731..b8b65fecafc2 100644
--- a/nixpkgs/pkgs/os-specific/linux/wireguard/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/wireguard/default.nix
@@ -7,11 +7,11 @@ assert stdenv.lib.versionOlder kernel.version "5.6";
 
 stdenv.mkDerivation rec {
   pname = "wireguard";
-  version = "1.0.20200611";
+  version = "1.0.20200908";
 
   src = fetchzip {
     url = "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-${version}.tar.xz";
-    sha256 = "0a8xsjxp8krmm2px07x9qw8nhvp5ispf4mnc6k59p0qp26qbva5d";
+    sha256 = "1nd2kc3c62907kxm1084dw7krd8xsy3hxydmcpz4jvk03vm5dnkg";
   };
 
   hardeningDisable = [ "pic" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/xf86-video-nested/default.nix b/nixpkgs/pkgs/os-specific/linux/xf86-video-nested/default.nix
index c117293d3ad1..f86393cba84d 100644
--- a/nixpkgs/pkgs/os-specific/linux/xf86-video-nested/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/xf86-video-nested/default.nix
@@ -20,10 +20,11 @@ stdenv.mkDerivation {
 
   CFLAGS = "-I${pixman}/include/pixman-1";
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = "https://cgit.freedesktop.org/xorg/driver/xf86-video-nested";
     description = "A driver to run Xorg on top of Xorg or something else";
-    maintainers = [ stdenv.lib.maintainers.goibhniu ];
-    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+    license = licenses.mit;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/xpadneo/default.nix b/nixpkgs/pkgs/os-specific/linux/xpadneo/default.nix
new file mode 100644
index 000000000000..5f1018969212
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/xpadneo/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchFromGitHub, kernel, bluez }:
+
+stdenv.mkDerivation rec {
+  pname = "xpadneo";
+  version = "0.8.3";
+
+  src = fetchFromGitHub {
+    owner = "atar-axis";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1g3ml7vq0dzwl9815c3l0i0qz3a7v8c376c6dqbfkbj2f1d43vqs";
+  };
+
+  setSourceRoot = ''
+    export sourceRoot=$(pwd)/source/hid-xpadneo/src
+  '';
+
+  postPatch = ''
+    # Set kernel module version
+    substituteInPlace hid-xpadneo.c \
+      --subst-var-by DO_NOT_CHANGE ${version}
+  '';
+
+  nativeBuildInputs = kernel.moduleBuildDependencies;
+  buildInputs = [ bluez ];
+
+  makeFlags = [
+    "-C"
+    "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
+    "M=$(sourceRoot)"
+  ];
+
+  buildFlags = [ "modules" ];
+  installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
+  installTargets = [ "modules_install" ];
+
+  meta = with stdenv.lib; {
+    description = "Advanced Linux driver for Xbox One wireless controllers";
+    homepage = "https://atar-axis.github.io/xpadneo";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/zenmonitor/default.nix b/nixpkgs/pkgs/os-specific/linux/zenmonitor/default.nix
index e9e0e82a0932..23acaaa3e231 100644
--- a/nixpkgs/pkgs/os-specific/linux/zenmonitor/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/zenmonitor/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "zenmonitor";
-  version = "1.4.0";
+  version = "1.4.2";
 
   src = fetchFromGitHub {
     owner = "ocerman";
     repo = "zenmonitor";
     rev = "v${version}";
-    sha256 = "1mn496iqfmhqsac7a5r0bdfddzrfiz6l34qiga0pip925g7hsm52";
+    sha256 = "0smv94vi36hziw42gasivyw25h5n1sgwwk1cv78id5g85w0kw246";
   };
 
   buildInputs = [ gtk3 ];
diff --git a/nixpkgs/pkgs/os-specific/linux/zenpower/default.nix b/nixpkgs/pkgs/os-specific/linux/zenpower/default.nix
index bc1d803bb100..43885027d9e7 100644
--- a/nixpkgs/pkgs/os-specific/linux/zenpower/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/zenpower/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "zenpower";
-  version = "0.1.10";
+  version = "0.1.12";
 
   src = fetchFromGitHub {
     owner = "ocerman";
     repo = "zenpower";
     rev = "v${version}";
-    sha256 = "1fqqaj7fq49yi2yip518036w80r9w7mkxpbkrxqzlydpma1x9v5m";
+    sha256 = "116yrw4ygh3fqwhniaqq0nps29pq87mi2q1375f1ylkfiak8n63a";
   };
 
   hardeningDisable = [ "pic" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/zfs/default.nix b/nixpkgs/pkgs/os-specific/linux/zfs/default.nix
index 56b36d4f3685..27e26b13a533 100644
--- a/nixpkgs/pkgs/os-specific/linux/zfs/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/zfs/default.nix
@@ -42,25 +42,27 @@ let
         inherit rev sha256;
       };
 
-      patches = [ ./BACKPORT-Linux-5.8-compat-__vmalloc.patch ] ++ extraPatches;
+      patches = extraPatches;
 
       postPatch = optionalString buildKernel ''
         patchShebangs scripts
         # The arrays must remain the same length, so we repeat a flag that is
         # already part of the command and therefore has no effect.
-        substituteInPlace ./module/zfs/zfs_ctldir.c --replace '"/usr/bin/env", "umount"' '"${utillinux}/bin/umount", "-n"' \
-                                                    --replace '"/usr/bin/env", "mount"'  '"${utillinux}/bin/mount", "-n"'
+        substituteInPlace ./module/${optionalString isUnstable "os/linux/"}zfs/zfs_ctldir.c \
+          --replace '"/usr/bin/env", "umount"' '"${utillinux}/bin/umount", "-n"' \
+          --replace '"/usr/bin/env", "mount"'  '"${utillinux}/bin/mount", "-n"'
       '' + optionalString buildUser ''
         substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount"             "${utillinux}/bin/umount" \
                                                       --replace "/bin/mount"              "${utillinux}/bin/mount"
-        substituteInPlace ./lib/libshare/nfs.c        --replace "/usr/sbin/exportfs"      "${
+        substituteInPlace ./lib/libshare/${optionalString isUnstable "os/linux/"}nfs.c --replace "/usr/sbin/exportfs" "${
           # We don't *need* python support, but we set it like this to minimize closure size:
           # If it's disabled by default, no need to enable it, even if we have python enabled
           # And if it's enabled by default, only change that if we explicitly disable python to remove python from the closure
           nfs-utils.override (old: { enablePython = old.enablePython or true && enablePython; })
         }/bin/exportfs"
         substituteInPlace ./config/user-systemd.m4    --replace "/usr/lib/modules-load.d" "$out/etc/modules-load.d"
-        substituteInPlace ./config/zfs-build.m4       --replace "\$sysconfdir/init.d"     "$out/etc/init.d"
+        substituteInPlace ./config/zfs-build.m4       --replace "\$sysconfdir/init.d"     "$out/etc/init.d" \
+                                                      --replace "/etc/default"            "$out/etc/default"
         substituteInPlace ./etc/zfs/Makefile.am       --replace "\$(sysconfdir)"          "$out/etc"
         substituteInPlace ./cmd/zed/Makefile.am       --replace "\$(sysconfdir)"          "$out/etc"
 
@@ -79,6 +81,13 @@ let
         substituteInPlace ./etc/systemd/system/Makefile.am \
           --replace '$(DESTDIR)$(systemdunitdir)' "$out"'$(DESTDIR)$(systemdunitdir)'
 
+        ${optionalString isUnstable ''
+        substituteInPlace ./contrib/initramfs/conf.d/Makefile.am \
+          --replace "/usr/share/initramfs-tools/conf.d" "$out/usr/share/initramfs-tools/conf.d"
+        substituteInPlace ./contrib/initramfs/conf-hooks.d/Makefile.am \
+          --replace "/usr/share/initramfs-tools/conf-hooks.d" "$out/usr/share/initramfs-tools/conf-hooks.d"
+        ''}
+
         substituteInPlace ./etc/systemd/system/zfs-share.service.in \
           --replace "/bin/rm " "${coreutils}/bin/rm "
 
@@ -190,6 +199,7 @@ in {
     version = "0.8.4";
 
     sha256 = "1hl4n900d24gl4vd65qdzq4m62b7bpvckldazcbd1xqcn8xhi6wp";
+    extraPatches = [ ./BACKPORT-Linux-5.8-compat-__vmalloc.patch ];
   };
 
   zfsUnstable = common {
@@ -197,9 +207,9 @@ in {
     # incompatibleKernelVersion = "4.19";
 
     # this package should point to a version / git revision compatible with the latest kernel release
-    version = "0.8.4";
+    version = "2.0.0-rc1";
 
-    sha256 = "1hl4n900d24gl4vd65qdzq4m62b7bpvckldazcbd1xqcn8xhi6wp";
+    sha256 = "0d1m5zwgqzfwbscvb60zvzkjgl5nkbvas22vjsyci3xygz0qwjsb";
     isUnstable = true;
   };
 }