about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/os-specific')
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh2
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-sdk/default.nix109
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-sdk/frameworks.nix228
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-sdk/print-reexports/default.nix17
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-sdk/print-reexports/main.c148
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix15
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix56
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix17
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix19
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix13
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/rpcgen-support-hyper-and-quad-types.patch66
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix5
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/cctools/port.nix170
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/darwin-stubs/default.nix20
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/discrete-scroll/default.nix1
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/libtapi/default.nix40
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/osx-cpu-temp/default.nix31
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/osxsnarf/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/reattach-to-user-namespace/default.nix12
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/spacebar/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/xcode/default.nix3
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/yabai/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/akvcam/default.nix31
-rw-r--r--nixpkgs/pkgs/os-specific/linux/alsa-lib/default.nix7
-rw-r--r--nixpkgs/pkgs/os-specific/linux/alsa-plugins/default.nix5
-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.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/android-udev-rules/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/apparmor/default.nix13
-rw-r--r--nixpkgs/pkgs/os-specific/linux/atop/default.nix20
-rw-r--r--nixpkgs/pkgs/os-specific/linux/autofs/default.nix7
-rw-r--r--nixpkgs/pkgs/os-specific/linux/batman-adv/version.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/bcc/default.nix12
-rw-r--r--nixpkgs/pkgs/os-specific/linux/bluez/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/bolt/default.nix60
-rw-r--r--nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/broadcom-sta/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/broadcom-sta/linux-5.9.patch184
-rw-r--r--nixpkgs/pkgs/os-specific/linux/btfs/default.nix8
-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.nix11
-rw-r--r--nixpkgs/pkgs/os-specific/linux/catfs/default.nix47
-rw-r--r--nixpkgs/pkgs/os-specific/linux/checksec/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cifs-utils/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/conntrack-tools/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cpuid/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cpuset/default.nix35
-rw-r--r--nixpkgs/pkgs/os-specific/linux/criu/default.nix12
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cshatag/default.nix32
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cshatag/deps.nix21
-rw-r--r--nixpkgs/pkgs/os-specific/linux/device-tree/raspberrypi.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/displaylink/99-displaylink.rules1
-rw-r--r--nixpkgs/pkgs/os-specific/linux/displaylink/default.nix32
-rw-r--r--nixpkgs/pkgs/os-specific/linux/displaylink/udev-installer.patch18
-rw-r--r--nixpkgs/pkgs/os-specific/linux/dpdk/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/dstat/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/dstat/fix_pluginpath.patch15
-rw-r--r--nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ell/0001-unit-test-dbus-pick-up-dbus-daemon-from-PATH.patch84
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ell/default.nix11
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ell/fix-dbus-tests.patch65
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ena/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/erofs-utils/default.nix25
-rw-r--r--nixpkgs/pkgs/os-specific/linux/eudev/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/evdi/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/eventstat/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/fatrace/default.nix21
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firejail/default.nix26
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firejail/fbuilder-call-firejail-on-path.patch11
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firejail/mount-nix-dir-on-overlay.patch27
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix14
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch33
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix42
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch42
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix14
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix51
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/default.nix16
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/tools.nix29
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/rtl8761b-firmware/default.nix29
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/sof-firmware/default.nix14
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/system76-firmware/default.nix8
-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/fuse/common.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/fuse/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/fwts/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix38
-rw-r--r--nixpkgs/pkgs/os-specific/linux/hdparm/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/i2c-tools/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iproute/default.nix7
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ipset/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iptables/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iputils/default.nix15
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iw/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iwd/default.nix15
-rw-r--r--nixpkgs/pkgs/os-specific/linux/jfbview/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix9
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/export-rt-sched-migrate.patch11
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/generic.nix9
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json36
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-4.14.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-4.19.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-4.4.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-4.9.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-5.10.nix (renamed from nixpkgs/pkgs/os-specific/linux/kernel/linux-5.7.nix)4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-5.4.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-5.9.nix (renamed from nixpkgs/pkgs/os-specific/linux/kernel/linux-5.8.nix)4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix5
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-lqx.nix25
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-mptcp-94.nix26
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-rpi.nix12
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix45
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix25
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/patches.nix12
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/rtl8761b-support.patch33
-rwxr-xr-xnixpkgs/pkgs/os-specific/linux/kernel/update-rt.sh2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/keyutils/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kmscon/default.nix1
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ldm/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libaio/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libbpf/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libcap-ng/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libcap/default.nix25
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libcap/no-shared-lib.patch22
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libevdevc/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libfabric/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libgestures/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libpsm2/default.nix9
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libratbag/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libselinux/default.nix20
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libsepol/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/light/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/lksctp-tools/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/lm-sensors/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/lvm2/default.nix2
-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/mcelog/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/mdadm/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/microcode/intel.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/musl/default.nix10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ndiswrapper/default.nix15
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ndiswrapper/no-sbin.patch6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nfs-utils/default.nix16
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nftables/default.nix7
-rw-r--r--nixpkgs/pkgs/os-specific/linux/numactl/default.nix4
-rwxr-xr-xnixpkgs/pkgs/os-specific/linux/nvidia-x11/builder.sh8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix33
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nvidia-x11/persistenced.nix10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nvidiabl/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nvme-cli/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/open-iscsi/default.nix12
-rw-r--r--nixpkgs/pkgs/os-specific/linux/openrazer/driver.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/openvswitch/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/openvswitch/lts.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pam/default.nix14
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pam_gnupg/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix47
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pam_mount/support_luks2.patch47
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/default.nix69
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/edcsa-crash-fix.patch53
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/multiple-key-files.patch12
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pam_u2f/default.nix11
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pcm/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pktgen/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pm-utils/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pmount/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/powertop/default.nix1
-rw-r--r--nixpkgs/pkgs/os-specific/linux/prl-tools/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/procps-ng/default.nix10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/psftools/default.nix24
-rw-r--r--nixpkgs/pkgs/os-specific/linux/r8168/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/radeontop/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/raspberrypi-eeprom/default.nix56
-rw-r--r--nixpkgs/pkgs/os-specific/linux/rdma-core/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/rtl8812au/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/rtl8821cu/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/rtl88x2bu/default.nix16
-rw-r--r--nixpkgs/pkgs/os-specific/linux/s6-linux-utils/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/schedtool/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/shadow/default.nix9
-rw-r--r--nixpkgs/pkgs/os-specific/linux/sssd/default.nix5
-rw-r--r--nixpkgs/pkgs/os-specific/linux/swapview/default.nix23
-rw-r--r--nixpkgs/pkgs/os-specific/linux/sysdig/default.nix43
-rw-r--r--nixpkgs/pkgs/os-specific/linux/syslinux/default.nix1
-rw-r--r--nixpkgs/pkgs/os-specific/linux/syslinux/gcc10.patch33
-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.patch10
-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.patch8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0005-Add-some-NixOS-specific-unit-directories.patch8
-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.patch16
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0008-Fix-hwdb-paths.patch6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0009-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch22
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0010-localectl-use-etc-X11-xkb-for-list-x11.patch6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0011-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0012-Install-default-configuration-into-out-share-factory.patch314
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0012-inherit-systemd-environment-when-calling-generators.patch (renamed from nixpkgs/pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch)10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0013-add-rootprefix-to-lookup-dir-paths.patch (renamed from nixpkgs/pkgs/os-specific/linux/systemd/0014-add-rootprefix-to-lookup-dir-paths.patch)8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0014-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch (renamed from nixpkgs/pkgs/os-specific/linux/systemd/0015-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch)8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0015-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch (renamed from nixpkgs/pkgs/os-specific/linux/systemd/0016-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch)10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0016-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch (renamed from nixpkgs/pkgs/os-specific/linux/systemd/0017-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch)8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0017-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch (renamed from nixpkgs/pkgs/os-specific/linux/systemd/0018-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch)8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0018-logind-seat-debus-show-CanMultiSession-again.patch26
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/0019-Revert-pkg-config-prefix-is-not-really-configurable-.patch72
-rw-r--r--nixpkgs/pkgs/os-specific/linux/systemd/default.nix304
-rw-r--r--nixpkgs/pkgs/os-specific/linux/tomb/default.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/trace-cmd/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/udisks/1-default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/udisks/2-default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/usbguard/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/usbip/default.nix5
-rw-r--r--nixpkgs/pkgs/os-specific/linux/util-linux/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/wireguard/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/xf86-input-cmt/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/xpadneo/default.nix9
-rw-r--r--nixpkgs/pkgs/os-specific/linux/zfs/BACKPORT-Linux-5.8-compat-__vmalloc.patch154
-rw-r--r--nixpkgs/pkgs/os-specific/linux/zfs/default.nix68
-rw-r--r--nixpkgs/pkgs/os-specific/linux/zsa-udev-rules/default.nix33
-rw-r--r--nixpkgs/pkgs/os-specific/solo5/default.nix58
235 files changed, 3042 insertions, 1886 deletions
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh b/nixpkgs/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh
index 86c241cd0f56..bbf9625e6557 100644
--- a/nixpkgs/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh
@@ -3,7 +3,7 @@ linkSystemCoreFoundationFramework() {
   # gross! many symbols (such as _OBJC_CLASS_$_NSArray) are defined in system CF, but not
   # in the opensource release
   # if the package needs private headers, we assume they also want to link with system CF
-  NIX_LDFLAGS+=" /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"
+  NIX_LDFLAGS+=" @out@/Library/Frameworks/CoreFoundation.framework/CoreFoundation"
 }
 
 preConfigureHooks+=(linkSystemCoreFoundationFramework)
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-sdk/default.nix b/nixpkgs/pkgs/os-specific/darwin/apple-sdk/default.nix
index 89c13d0b92d7..97523cf15a8d 100644
--- a/nixpkgs/pkgs/os-specific/darwin/apple-sdk/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-sdk/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, xar, cpio, pkgs, python3, pbzx, lib }:
+{ stdenv, fetchurl, xar, cpio, pkgs, python3, pbzx, lib, darwin-stubs, print-reexports }:
 
 let version = "10.12"; in
 
@@ -42,7 +42,12 @@ let
       rmdir System
 
       pushd lib
-      ln -s -L /usr/lib/libcups*.dylib .
+      cp ${darwin-stubs}/usr/lib/libcups*.tbd .
+      ln -s libcups.2.tbd      libcups.tbd
+      ln -s libcupscgi.1.tbd   libcupscgi.tbd
+      ln -s libcupsimage.2.tbd libcupsimage.tbd
+      ln -s libcupsmime.1.tbd  libcupsmime.tbd
+      ln -s libcupsppdc.1.tbd  libcupsppdc.tbd
       popd
     '';
 
@@ -53,6 +58,12 @@ let
     };
   };
 
+  mkFrameworkSubs = name: deps:
+  let
+    deps' = deps // { "${name}" = placeholder "out"; };
+    substArgs = lib.concatMap (x: [ "--subst-var-by" x deps'."${x}" ]) (lib.attrNames deps');
+  in lib.escapeShellArgs substArgs;
+
   framework = name: deps: stdenv.mkDerivation {
     name = "apple-framework-${name}";
 
@@ -63,11 +74,14 @@ let
 
     disallowedRequisites = [ sdk ];
 
+    nativeBuildInputs = [ print-reexports ];
+
+    extraTBDFiles = [];
+
     installPhase = ''
       linkFramework() {
         local path="$1"
         local nested_path="$1"
-        local dest="$out/Library/Frameworks/$path"
         if [ "$path" == "JavaNativeFoundation.framework" ]; then
           local nested_path="JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework"
         fi
@@ -80,21 +94,29 @@ let
           current=A
         fi
 
-        mkdir -p "$dest"
-        pushd "$dest" >/dev/null
+        local dest="$out/Library/Frameworks/$path"
 
-        # Keep track of if this is a child or a child rescue as with
-        # ApplicationServices in the 10.9 SDK
-        local isChild=0
+        mkdir -p "$dest/Versions/$current"
+        pushd "$dest/Versions/$current" >/dev/null
 
         if [ -d "${sdk.out}/Library/Frameworks/$nested_path/Versions/$current/Headers" ]; then
-          isChild=1
           cp -R "${sdk.out}/Library/Frameworks/$nested_path/Versions/$current/Headers" .
         elif [ -d "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current/Headers" ]; then
           current="$(readlink "/System/Library/Frameworks/$name.framework/Versions/Current")"
           cp -R "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current/Headers" .
         fi
-        ln -s -L "/System/Library/Frameworks/$nested_path/Versions/$current/$name"
+
+        local tbd_source=${darwin-stubs}/System/Library/Frameworks/$nested_path/Versions/$current
+        if [ "${name}" != "Kernel" ]; then
+          # The Kernel.framework has headers but no actual library component.
+          cp -v $tbd_source/*.tbd .
+        fi
+
+        if [ -d "$tbd_source/Libraries" ]; then
+          mkdir Libraries
+          cp -v $tbd_source/Libraries/*.tbd Libraries/
+        fi
+
         ln -s -L "/System/Library/Frameworks/$nested_path/Versions/$current/Resources"
 
         if [ -f "/System/Library/Frameworks/$nested_path/module.map" ]; then
@@ -110,17 +132,45 @@ let
           linkFramework "$childpath"
         done
 
-        if [ -d "$dest/Versions/$current" ]; then
-          mv $dest/Versions/$current/* .
-        fi
+        pushd ../.. >/dev/null
+        ln -s "$current" Versions/Current
+        ln -s Versions/Current/* .
+        popd >/dev/null
 
         popd >/dev/null
       }
 
       linkFramework "${name}.framework"
+
+      # linkFramework is recursive, the rest of the processing is not.
+
+      local tbd_source=${darwin-stubs}/System/Library/Frameworks/${name}.framework
+      for tbd in $extraTBDFiles; do
+        local tbd_dest_dir=$out/Library/Frameworks/${name}.framework/$(dirname "$tbd")
+        mkdir -p "$tbd_dest_dir"
+        cp -v "$tbd_source/$tbd" "$tbd_dest_dir"
+      done
+
+      # Fix and check tbd re-export references
+      find $out -name '*.tbd' | while read tbd; do
+        echo "Fixing re-exports in $tbd"
+        substituteInPlace "$tbd" ${mkFrameworkSubs name deps}
+
+        echo "Checking re-exports in $tbd"
+        print-reexports "$tbd" | while read target; do
+          local expected="''${target%.dylib}.tbd"
+          if ! [ -e "$expected" ]; then
+            echo -e "Re-export missing:\n\t$target\n\t(expected $expected)"
+            echo -e "While processing\n\t$tbd"
+            exit 1
+          else
+            echo "Re-exported target $target ok"
+          fi
+        done
+      done
     '';
 
-    propagatedBuildInputs = deps;
+    propagatedBuildInputs = builtins.attrValues deps;
 
     # don't use pure CF for dylibs that depend on frameworks
     setupHook = ./framework-setup-hook.sh;
@@ -139,6 +189,17 @@ let
       platforms   = platforms.darwin;
     };
   };
+
+  tbdOnlyFramework = name: { private ? true }: stdenv.mkDerivation {
+    name = "apple-framework-${name}";
+    dontUnpack = true;
+    installPhase = ''
+      mkdir -p $out/Library/Frameworks/
+      cp -r ${darwin-stubs}/System/Library/${lib.optionalString private "Private"}Frameworks/${name}.framework \
+        $out/Library/Frameworks
+      # NOTE there's no re-export checking here, this is probably wrong
+    '';
+  };
 in rec {
   libs = {
     xpc = stdenv.mkDerivation {
@@ -168,7 +229,8 @@ in rec {
       installPhase = ''
         mkdir -p $out/include $out/lib
         ln -s "${lib.getDev sdk}/include/Xplugin.h" $out/include/Xplugin.h
-        ln -s "/usr/lib/libXplugin.1.dylib" $out/lib/libXplugin.dylib
+        cp ${darwin-stubs}/usr/lib/libXplugin.1.tbd $out/lib
+        ln -s libXplugin.1.tbd $out/lib/libXplugin.tbd
       '';
     };
 
@@ -193,6 +255,10 @@ in rec {
       ];
     });
 
+    Carbon = stdenv.lib.overrideDerivation super.Carbon (drv: {
+      extraTBDFiles = [ "Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering.tbd" ];
+    });
+
     CoreFoundation = stdenv.lib.overrideDerivation super.CoreFoundation (drv: {
       setupHook = ./cf-setup-hook.sh;
     });
@@ -210,6 +276,10 @@ in rec {
       setupHook = ./private-frameworks-setup-hook.sh;
     });
 
+    IMServicePlugIn = stdenv.lib.overrideDerivation super.IMServicePlugIn (drv: {
+      extraTBDFiles = [ "Versions/A/Frameworks/IMServicePlugInSupport.framework/Versions/A/IMServicePlugInSupport.tbd" ];
+    });
+
     Security = stdenv.lib.overrideDerivation super.Security (drv: {
       setupHook = ./security-setup-hook.sh;
     });
@@ -228,7 +298,14 @@ in rec {
         cp ${lib.getDev sdk}/include/simd/*.h $out/include/simd/
       '';
     });
-  };
+
+    WebKit = stdenv.lib.overrideDerivation super.WebKit (drv: {
+      extraTBDFiles = [
+        "Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore.tbd"
+        "Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy.tbd"
+      ];
+    });
+  } // lib.genAttrs [ "ContactsPersistence" "UIFoundation" "GameCenter" ] (x: tbdOnlyFramework x {});
 
   bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix {
     inherit frameworks libs;
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/nixpkgs/pkgs/os-specific/darwin/apple-sdk/frameworks.nix
index 02e2421f3472..d3b00e6a6a68 100644
--- a/nixpkgs/pkgs/os-specific/darwin/apple-sdk/frameworks.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-sdk/frameworks.nix
@@ -5,123 +5,125 @@
 { frameworks, libs, libobjc, }:
 
 with frameworks; with libs; {
-  AGL                     = [ Carbon OpenGL ];
-  AVFoundation            = [ ApplicationServices CoreGraphics ];
-  AVKit                   = [];
-  Accounts                = [];
-  AddressBook             = [ Carbon ];
-  AppKit                  = [ AudioToolbox AudioUnit Foundation QuartzCore ];
-  AppKitScripting         = [];
-  AppleScriptKit          = [];
-  AppleScriptObjC         = [];
-  AudioToolbox            = [ CoreAudio CoreMIDI ];
-  AudioUnit               = [ AudioToolbox Carbon CoreAudio ];
-  AudioVideoBridging      = [ Foundation ];
-  Automator               = [];
-  CFNetwork               = [];
-  CalendarStore           = [];
-  Cocoa                   = [ AppKit ];
-  Collaboration           = [];
+  AGL                     = { inherit Carbon OpenGL; };
+  AVFoundation            = { inherit ApplicationServices CoreGraphics CoreMedia MediaToolbox; };
+  AVKit                   = {};
+  Accounts                = {};
+  AddressBook             = { inherit libobjc Carbon ContactsPersistence; };
+  AppKit                  = { inherit ApplicationServices AudioToolbox AudioUnit Foundation QuartzCore UIFoundation; };
+  AppKitScripting         = {};
+  AppleScriptKit          = {};
+  AppleScriptObjC         = {};
+  AudioToolbox            = { inherit CoreAudio CoreMIDI; };
+  AudioUnit               = { inherit AudioToolbox Carbon CoreAudio; };
+  AudioVideoBridging      = { inherit Foundation; };
+  Automator               = {};
+  CFNetwork               = {};
+  CalendarStore           = {};
+  Cocoa                   = { inherit AppKit CoreData; };
+  Collaboration           = {};
   # Impure version of CoreFoundation, this should not be used unless another
   # framework includes headers that are not available in the pure version.
-  CoreFoundation          = [];
-  CoreAudio               = [ IOKit ];
-  CoreAudioKit            = [ AudioUnit ];
-  CoreData                = [];
-  CoreGraphics            = [ Accelerate IOKit IOSurface SystemConfiguration ];
-  CoreImage               = [];
-  CoreLocation            = [];
-  CoreMIDI                = [];
-  CoreMIDIServer          = [];
-  CoreMedia               = [ ApplicationServices AudioToolbox AudioUnit CoreAudio CoreGraphics CoreVideo ];
-  CoreMediaIO             = [ CoreMedia ];
-  CoreText                = [ CoreGraphics ];
-  CoreVideo               = [ ApplicationServices CoreGraphics IOSurface OpenGL ];
-  CoreWLAN                = [ SecurityFoundation ];
-  DVDPlayback             = [];
-  DirectoryService        = [];
-  DiscRecording           = [ CoreServices IOKit ];
-  DiscRecordingUI         = [];
-  DiskArbitration         = [ IOKit ];
-  EventKit                = [];
-  ExceptionHandling       = [];
-  FWAUserLib              = [];
-  ForceFeedback           = [ IOKit ];
-  Foundation              = [ libobjc CoreFoundation Security ApplicationServices SystemConfiguration ];
-  GLKit                   = [];
-  GLUT                    = [ OpenGL ];
-  GSS                     = [];
-  GameController          = [];
-  GameKit                 = [ Foundation ];
-  Hypervisor              = [];
-  ICADevices              = [ Carbon IOBluetooth ];
-  IMServicePlugIn         = [];
-  IOBluetoothUI           = [ IOBluetooth ];
-  IOKit                   = [];
-  IOSurface               = [ IOKit xpc ];
-  ImageCaptureCore        = [];
-  ImageIO                 = [ CoreGraphics ];
-  InputMethodKit          = [ Carbon ];
-  InstallerPlugins        = [];
-  InstantMessage          = [];
-  JavaFrameEmbedding      = [];
-  JavaNativeFoundation    = [];
-  JavaRuntimeSupport      = [];
-  JavaScriptCore          = [];
-  Kerberos                = [];
-  Kernel                  = [ IOKit ];
-  LDAP                    = [];
-  LatentSemanticMapping   = [ Carbon ];
-  LocalAuthentication     = [];
-  MapKit                  = [];
-  MediaAccessibility      = [ CoreGraphics CoreText QuartzCore ];
-  MediaPlayer             = [];
-  MediaToolbox            = [ AudioToolbox AudioUnit CoreMedia ];
-  Metal                   = [];
-  MetalKit                = [ ModelIO Metal ];
-  ModelIO                 = [ ];
-  NetFS                   = [];
-  OSAKit                  = [ Carbon ];
-  OpenAL                  = [];
-  OpenCL                  = [ IOSurface OpenGL ];
-  OpenGL                  = [];
-  PCSC                    = [ CoreData ];
-  PreferencePanes         = [];
-  PubSub                  = [];
-  QTKit                   = [ CoreMediaIO CoreMedia MediaToolbox QuickTime VideoToolbox ];
-  QuickLook               = [ ApplicationServices ];
-  SceneKit                = [];
-  ScreenSaver             = [];
-  Scripting               = [];
-  ScriptingBridge         = [];
-  Security                = [ IOKit ];
-  SecurityFoundation      = [];
-  SecurityInterface       = [ Security ];
-  ServiceManagement       = [ Security ];
-  Social                  = [];
-  SpriteKit               = [];
-  StoreKit                = [];
-  SyncServices            = [];
-  SystemConfiguration     = [ Security ];
-  TWAIN                   = [ Carbon ];
-  Tcl                     = [];
-  VideoDecodeAcceleration = [ CoreVideo ];
-  VideoToolbox            = [ CoreMedia CoreVideo ];
-  WebKit                  = [ ApplicationServices Carbon JavaScriptCore OpenGL ];
+  CoreFoundation          = {};
+  CoreAudio               = { inherit IOKit; };
+  CoreAudioKit            = { inherit AudioUnit; };
+  CoreData                = {};
+  CoreGraphics            = { inherit Accelerate IOKit IOSurface SystemConfiguration; };
+  CoreImage               = {};
+  CoreLocation            = {};
+  CoreMIDI                = {};
+  CoreMIDIServer          = { inherit CoreMIDI; };
+  CoreMedia               = { inherit ApplicationServices AudioToolbox AudioUnit CoreAudio CoreGraphics CoreVideo; };
+  CoreMediaIO             = { inherit CoreMedia; };
+  CoreText                = { inherit CoreGraphics; };
+  CoreVideo               = { inherit ApplicationServices CoreGraphics IOSurface OpenGL; };
+  CoreWLAN                = { inherit SecurityFoundation; };
+  DVDPlayback             = {};
+  DirectoryService        = {};
+  DiscRecording           = { inherit libobjc CoreServices IOKit; };
+  DiscRecordingUI         = {};
+  DiskArbitration         = { inherit IOKit; };
+  EventKit                = {};
+  ExceptionHandling       = {};
+  FWAUserLib              = {};
+  ForceFeedback           = { inherit IOKit; };
+  Foundation              = { inherit libobjc CoreFoundation Security ApplicationServices SystemConfiguration; };
+  GLKit                   = {};
+  GLUT                    = { inherit OpenGL; };
+  GSS                     = {};
+  GameCenter              = {};
+  GameController          = {};
+  GameKit                 = { inherit Cocoa Foundation GameCenter GameController GameplayKit Metal MetalKit ModelIO SceneKit SpriteKit; };
+  GameplayKit             = {};
+  Hypervisor              = {};
+  ICADevices              = { inherit libobjc Carbon IOBluetooth; };
+  IMServicePlugIn         = {};
+  IOBluetoothUI           = { inherit IOBluetooth; };
+  IOKit                   = {};
+  IOSurface               = { inherit IOKit xpc; };
+  ImageCaptureCore        = {};
+  ImageIO                 = { inherit CoreGraphics; };
+  InputMethodKit          = { inherit Carbon; };
+  InstallerPlugins        = {};
+  InstantMessage          = {};
+  JavaFrameEmbedding      = {};
+  JavaNativeFoundation    = {};
+  JavaRuntimeSupport      = {};
+  JavaScriptCore          = { inherit libobjc; };
+  Kerberos                = {};
+  Kernel                  = { inherit IOKit; };
+  LDAP                    = {};
+  LatentSemanticMapping   = { inherit Carbon; };
+  LocalAuthentication     = {};
+  MapKit                  = {};
+  MediaAccessibility      = { inherit CoreGraphics CoreText QuartzCore; };
+  MediaPlayer             = {};
+  MediaToolbox            = { inherit AudioToolbox AudioUnit CoreMedia; };
+  Metal                   = {};
+  MetalKit                = { inherit ModelIO Metal; };
+  ModelIO                 = {};
+  NetFS                   = {};
+  OSAKit                  = { inherit Carbon; };
+  OpenAL                  = {};
+  OpenCL                  = { inherit IOSurface OpenGL; };
+  OpenGL                  = {};
+  PCSC                    = { inherit CoreData; };
+  PreferencePanes         = {};
+  PubSub                  = {};
+  QTKit                   = { inherit CoreMediaIO CoreMedia MediaToolbox QuickTime VideoToolbox; };
+  QuickLook               = { inherit ApplicationServices; };
+  SceneKit                = {};
+  ScreenSaver             = {};
+  Scripting               = {};
+  ScriptingBridge         = {};
+  Security                = { inherit IOKit; };
+  SecurityFoundation      = {};
+  SecurityInterface       = { inherit Security SecurityFoundation; };
+  ServiceManagement       = { inherit Security; };
+  Social                  = {};
+  SpriteKit               = {};
+  StoreKit                = {};
+  SyncServices            = {};
+  SystemConfiguration     = { inherit Security; };
+  TWAIN                   = { inherit Carbon; };
+  Tcl                     = {};
+  VideoDecodeAcceleration = { inherit CoreVideo; };
+  VideoToolbox            = { inherit CoreMedia CoreVideo; };
+  WebKit                  = { inherit libobjc ApplicationServices Carbon JavaScriptCore OpenGL; };
 
   # Umbrellas
-  Accelerate          = [ CoreWLAN IOBluetooth ];
-  ApplicationServices = [ CoreServices CoreText ImageIO ];
-  Carbon              = [ ApplicationServices CoreServices Foundation IOKit Security QuartzCore ];
-  CoreBluetooth       = [];
+  Accelerate          = { inherit CoreWLAN IOBluetooth; };
+  ApplicationServices = { inherit CoreGraphics CoreServices CoreText ImageIO; };
+  Carbon              = { inherit libobjc ApplicationServices CoreServices Foundation IOKit Security QuartzCore; };
+  CoreBluetooth       = {};
   # TODO: figure out which part of the umbrella depends on CoreFoundation and move it there.
-  CoreServices        = [ CFNetwork CoreFoundation CoreAudio CoreData DiskArbitration Security NetFS OpenDirectory ServiceManagement ];
-  IOBluetooth         = [ IOKit ];
-  JavaVM              = [];
-  OpenDirectory       = [];
-  Quartz              = [ QuickLook QTKit ];
-  QuartzCore          = [ ApplicationServices CoreVideo OpenCL CoreImage Metal ];
-  QuickTime           = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ];
+  CoreServices        = { inherit CFNetwork CoreFoundation CoreAudio CoreData DiskArbitration Security NetFS OpenDirectory ServiceManagement; };
+  IOBluetooth         = { inherit CoreBluetooth IOKit; };
+  JavaVM              = {};
+  OpenDirectory       = {};
+  Quartz              = { inherit QuartzCore QuickLook QTKit; };
+  QuartzCore          = { inherit libobjc ApplicationServices CoreVideo OpenCL CoreImage Metal; };
+  QuickTime           = { inherit ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore; };
 
-  vmnet = [];
+  vmnet = {};
 }
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-sdk/print-reexports/default.nix b/nixpkgs/pkgs/os-specific/darwin/apple-sdk/print-reexports/default.nix
new file mode 100644
index 000000000000..85e11096f06a
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-sdk/print-reexports/default.nix
@@ -0,0 +1,17 @@
+{ stdenv, libyaml }:
+
+stdenv.mkDerivation {
+  name = "print-reexports";
+  src = stdenv.lib.sourceFilesBySuffices ./. [".c"];
+
+  buildInputs = [ libyaml ];
+
+  buildPhase = ''
+    $CC -lyaml -o $name main.c
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv $name $out/bin
+  '';
+}
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-sdk/print-reexports/main.c b/nixpkgs/pkgs/os-specific/darwin/apple-sdk/print-reexports/main.c
new file mode 100644
index 000000000000..df46e3f18e89
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-sdk/print-reexports/main.c
@@ -0,0 +1,148 @@
+/**
+ * Display the list of re-exported libraries from a TAPI v2 .tbd file, one per
+ * line on stdout.
+ *
+ * TAPI files are the equivalent of library files for the purposes of linking.
+ * Like dylib files, they may re-export other libraries. In upstream usage
+ * these refer to the absolute paths of dylibs, and are resolved to .tbd files
+ * in combination with the syslibroot option. In nixpkgs, the .tbd files refer
+ * directly to other .tbd files without a syslibroot. Note that each .tbd file
+ * contains an install name, so the re-exported path does not affect the final
+ * result.
+ *
+ * In nixpkgs each framework is a distinct store path and some frameworks
+ * re-export other frameworks. The re-exported names are rewritten to refer to
+ * the store paths of dependencies via textual substitution. This utility is
+ * used to emit every file that is listed as a re-exported library, which
+ * allows the framework builder to verify their existence.
+ */
+
+#include <stdio.h>
+#include <sys/errno.h>
+#include <yaml.h>
+
+static yaml_node_t *get_mapping_entry(yaml_document_t *document, yaml_node_t *mapping, const char *name) {
+  if (!mapping) {
+    fprintf(stderr, "get_mapping_entry: mapping is null\n");
+    return NULL;
+  }
+
+  for (
+      yaml_node_pair_t *pair = mapping->data.mapping.pairs.start;
+      pair < mapping->data.mapping.pairs.top;
+      ++pair
+  ) {
+    yaml_node_t *key = yaml_document_get_node(document, pair->key);
+
+    if (!key) {
+      fprintf(stderr, "get_mapping_entry: key (%i) is null\n", pair->key);
+      return NULL;
+    }
+
+    if (key->type != YAML_SCALAR_NODE) {
+      fprintf(stderr, "get_mapping_entry: key is not a scalar\n");
+      return NULL;
+    }
+
+    if (strncmp((const char *)key->data.scalar.value, name, key->data.scalar.length) != 0) {
+      continue;
+    }
+
+    return yaml_document_get_node(document, pair->value);
+  }
+
+  return NULL;
+}
+
+static int emit_reexports(yaml_document_t *document) {
+  yaml_node_t *root = yaml_document_get_root_node(document);
+
+  yaml_node_t *exports = get_mapping_entry(document, root, "exports");
+
+  if (!exports) {
+    fprintf(stderr, "emit_reexports: no exports found\n");
+    return 0;
+  }
+
+  if (exports->type != YAML_SEQUENCE_NODE) {
+    fprintf(stderr, "emit_reexports, value is not a sequence\n");
+    return 0;
+  }
+
+  for (
+      yaml_node_item_t *export = exports->data.sequence.items.start;
+      export < exports->data.sequence.items.top;
+      ++export
+  ) {
+    yaml_node_t *export_node = yaml_document_get_node(document, *export);
+
+    yaml_node_t *reexports = get_mapping_entry(document, export_node, "re-exports");
+
+    if (!reexports) {
+      continue;
+    }
+
+    for (
+        yaml_node_item_t *reexport = reexports->data.sequence.items.start;
+        reexport < reexports->data.sequence.items.top;
+        ++reexport
+    ) {
+      yaml_node_t *val = yaml_document_get_node(document, *reexport);
+
+      if (val->type != YAML_SCALAR_NODE) {
+        fprintf(stderr, "item is not a scalar\n");
+        return 0;
+      }
+
+      fwrite(val->data.scalar.value, val->data.scalar.length, 1, stdout);
+      putchar('\n');
+    }
+  }
+
+  return 1;
+}
+
+int main(int argc, char **argv) {
+  int result = 0;
+
+  if (argc != 2) {
+    fprintf(stderr, "Invalid usage\n");
+    result = 2;
+    goto done;
+  }
+
+  FILE *f = fopen(argv[1], "r");
+  if (!f) {
+    perror("opening input file");
+    result = errno;
+    goto done;
+  }
+
+  yaml_parser_t yaml_parser;
+  if (!yaml_parser_initialize(&yaml_parser)) {
+    fprintf(stderr, "Failed to initialize yaml parser\n");
+    result = 1;
+    goto err_file;
+  }
+
+  yaml_parser_set_input_file(&yaml_parser, f);
+
+  yaml_document_t yaml_document;
+
+  if(!yaml_parser_load(&yaml_parser, &yaml_document)) {
+    fprintf(stderr, "Failed to load yaml file\n");
+    result = 1;
+    goto err_yaml;
+  }
+
+  emit_reexports(&yaml_document);
+
+err_yaml:
+  yaml_parser_delete(&yaml_parser);
+
+err_file:
+  fclose(f);
+
+done:
+  return result;
+}
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix
index 4b82209f176c..a945409ed7a0 100644
--- a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, appleDerivation, IOKitSrcs, xnu }:
+{ stdenv, appleDerivation, IOKitSrcs, xnu, darwin-stubs }:
 
 # Someday it'll make sense to split these out into their own packages, but today is not that day.
 appleDerivation {
@@ -14,12 +14,15 @@ appleDerivation {
   ];
 
   installPhase = ''
-    ###### IMPURITIES
     mkdir -p $out/Library/Frameworks/IOKit.framework
-    pushd $out/Library/Frameworks/IOKit.framework
-    ln -s /System/Library/Frameworks/IOKit.framework/IOKit
-    ln -s /System/Library/Frameworks/IOKit.framework/Resources
-    popd
+
+    ###### IMPURITIES
+    ln -s /System/Library/Frameworks/IOKit.framework/Resources \
+      $out/Library/Frameworks/IOKit.framework
+
+    ###### STUBS
+    cp ${darwin-stubs}/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit.tbd \
+      $out/Library/Frameworks/IOKit.framework
 
     ###### HEADERS
 
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
index 99d670028032..24526f05f062 100644
--- a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
@@ -1,7 +1,7 @@
 { stdenv, appleDerivation, cpio, xnu, Libc, Libm, libdispatch, cctools, Libinfo
 , dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto
 , copyfile, removefile, libresolv, Libnotify, libplatform, libpthread
-, mDNSResponder, launchd, libutil, hfs, darling }:
+, mDNSResponder, launchd, libutil, hfs, darling, darwin-stubs }:
 
 appleDerivation {
   dontBuild = true;
@@ -88,52 +88,18 @@ appleDerivation {
     # The startup object files
     cp ${Csu}/lib/* $out/lib
 
-    # We can't re-exported libsystem_c and libsystem_kernel directly,
-    # so we link against the central library here.
-    mkdir -p $out/lib/system
-    ld -macosx_version_min 10.7 -arch x86_64 -dylib \
-       -o $out/lib/system/libsystem_c.dylib \
-       /usr/lib/libSystem.dylib \
-       -reexported_symbols_list ${./system_c_symbols}
-
-    ld -macosx_version_min 10.7 -arch x86_64 -dylib \
-       -o $out/lib/system/libsystem_kernel.dylib \
-       /usr/lib/libSystem.dylib \
-       -reexported_symbols_list ${./system_kernel_symbols}
-
-    # The umbrella libSystem also exports some symbols,
-    # but we don't want to pull in everything from the other libraries.
-    ld -macosx_version_min 10.7 -arch x86_64 -dylib \
-       -o $out/lib/libSystem_internal.dylib \
-       /usr/lib/libSystem.dylib \
-       -reexported_symbols_list ${./system_symbols}
-
-    # We used to determine these impurely based on the host system, but then when we got some 10.12 Hydra boxes,
-    # one of them accidentally built this derivation, referenced libsystem_symptoms.dylib, which doesn't exist on
-    # 10.11, and then broke all subsequent builds on 10.11. By picking a 10.11 compatible subset of the libraries,
-    # we avoid scary impurity issues like that.
-    libs=$(cat ${./reexported_libraries} | grep -v '^#')
-
-    for i in $libs; do
-      if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then
-        args="$args -reexport_library $i"
-      fi
-    done
-
-    ld -macosx_version_min 10.7 -arch x86_64 -dylib \
-       -o $out/lib/libSystem.B.dylib \
-       -compatibility_version 1.0 \
-       -current_version 1226.10.1 \
-       -reexport_library $out/lib/system/libsystem_c.dylib \
-       -reexport_library $out/lib/system/libsystem_kernel.dylib \
-       -reexport_library $out/lib/libSystem_internal.dylib \
-       $args
+    cp -vr \
+      ${darwin-stubs}/usr/lib/libSystem.B.tbd \
+      ${darwin-stubs}/usr/lib/system \
+      $out/lib
 
-    ln -s libSystem.B.dylib $out/lib/libSystem.dylib
+    substituteInPlace $out/lib/libSystem.B.tbd \
+      --replace "/usr/lib/system/" "$out/lib/system/"
+    ln -s libSystem.B.tbd $out/lib/libSystem.tbd
 
     # Set up links to pretend we work like a conventional unix (Apple's design, not mine!)
     for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do
-      ln -s libSystem.dylib $out/lib/lib$name.dylib
+      ln -s libSystem.tbd $out/lib/lib$name.tbd
     done
 
     # This probably doesn't belong here, but we want to stay similar to glibc, which includes resolv internally...
@@ -144,13 +110,13 @@ appleDerivation {
     chmod +w $out/lib/libresolv.9.dylib
     install_name_tool \
       -id $out/lib/libresolv.9.dylib \
-      -change "$resolv_libSystem" $out/lib/libSystem.dylib \
+      -change "$resolv_libSystem" /usr/lib/libSystem.dylib \
       $out/lib/libresolv.9.dylib
     ln -s libresolv.9.dylib $out/lib/libresolv.dylib
   '';
 
   meta = with stdenv.lib; {
-    description = "The Mac OS libc/libSystem (impure symlinks to binaries with pure headers)";
+    description = "The Mac OS libc/libSystem (tapi library with pure headers)";
     maintainers = with maintainers; [ copumpkin gridaphobe ];
     platforms   = platforms.darwin;
     license     = licenses.apsl20;
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix
index e04142b8b11e..b819057f0c1a 100644
--- a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix
@@ -1,4 +1,4 @@
-{ appleDerivation }:
+{ appleDerivation, darwin-stubs }:
 
 appleDerivation {
   phases = [ "unpackPhase" "installPhase" ];
@@ -12,14 +12,15 @@ appleDerivation {
   ];
 
   installPhase = ''
-    ###### IMPURITIES
     mkdir -p $out/Library/Frameworks/Security.framework
-    pushd $out/Library/Frameworks/Security.framework
-    ln -s /System/Library/Frameworks/Security.framework/Security
-    ln -s /System/Library/Frameworks/Security.framework/Resources
-    ln -s /System/Library/Frameworks/Security.framework/PlugIns
-    ln -s /System/Library/Frameworks/Security.framework/XPCServices
-    popd
+
+    ###### IMPURITIES
+    ln -s /System/Library/Frameworks/Security.framework/{Resources,Plugins,XPCServices} \
+      $out/Library/Frameworks/Security.framework
+
+    ###### STUBS
+    cp ${darwin-stubs}/System/Library/Frameworks/Security.framework/Versions/A/Security.tbd \
+      $out/Library/Frameworks/Security.framework
 
     ###### HEADERS
 
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix
index 0cbd7d81b902..6113eed007e5 100644
--- a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix
@@ -3,27 +3,22 @@
 appleDerivation {
   # We can't just run the root build, because https://github.com/facebook/xcbuild/issues/264
 
+  patchPhase = ''
+    substituteInPlace adv_cmds.xcodeproj/project.pbxproj \
+      --replace '/usr/lib/libtermcap.dylib' 'libncurses.dylib'
+  '';
+
   # pkill requires special private headers that are unavailable in
   # NixPkgs. These ones are needed:
   #  - xpc/xpxc.h
   #  - os/base_private.h
   #  - _simple.h
   # We disable it here for now. TODO: build pkill inside adv_cmds
-
-  # We also disable locale here because of some issues with a missing
-  # "lstdc++".
-  patchPhase = ''
-    substituteInPlace adv_cmds.xcodeproj/project.pbxproj \
-      --replace "FD201DC214369B4200906237 /* pkill.c in Sources */," "" \
-      --replace "FDF278D60FC6204E00D7A3C6 /* locale.cc in Sources */," "" \
-      --replace '/usr/lib/libtermcap.dylib' 'libncurses.dylib'
-  '';
-
   buildPhase = ''
     targets=$(xcodebuild -list \
                 | awk '/Targets:/{p=1;print;next} p&&/^\s*$/{p=0};p' \
                 | tail -n +2 | sed 's/^[ \t]*//' \
-                | grep -v -e Desktop -e Embedded -e mklocale -e colldef)
+                | grep -v -e Desktop -e Embedded -e mklocale -e pkill -e pgrep -e colldef)
 
     for i in $targets; do
       xcodebuild SYMROOT=$PWD/Products OBJROOT=$PWD/Intermediates -target $i
@@ -34,7 +29,7 @@ appleDerivation {
   installPhase = ''
     for f in Products/Release/*; do
       if [ -f $f ]; then
-        install -D $file $out/bin/$(basename $f)
+        install -D $f $out/bin/$(basename $f)
       fi
     done
 
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix
index 21971ea2e284..cfd13b1b0498 100644
--- a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix
@@ -1,11 +1,18 @@
-{ stdenv, appleDerivation, xcbuildHook }:
+{ stdenv, appleDerivation, xcbuildHook, llvmPackages }:
 
 appleDerivation {
   nativeBuildInputs = [ xcbuildHook ];
 
-  patchPhase = ''
+  patches = [
+    # The following copied from
+    # https://github.com/Homebrew/homebrew-core/commit/712ed3e948868e17f96b7e59972b5f45d4faf688
+    # is needed to build libvirt.
+    ./rpcgen-support-hyper-and-quad-types.patch
+  ];
+
+  postPatch = ''
     substituteInPlace rpcgen/rpc_main.c \
-      --replace "/usr/bin/cpp" "${stdenv.cc}/bin/cpp"
+      --replace "/usr/bin/cpp" "${llvmPackages.clang-unwrapped}/bin/clang-cpp"
   '';
 
   # temporary install phase until xcodebuild has "install" support
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/rpcgen-support-hyper-and-quad-types.patch b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/rpcgen-support-hyper-and-quad-types.patch
new file mode 100644
index 000000000000..481cf0f3e055
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/rpcgen-support-hyper-and-quad-types.patch
@@ -0,0 +1,66 @@
+diff --git a/rpcgen/rpc_parse.c b/rpcgen/rpc_parse.c
+index 52edc9f..db0c1f1 100644
+--- a/rpcgen/rpc_parse.c
++++ b/rpcgen/rpc_parse.c
+@@ -580,6 +580,10 @@ get_type(prefixp, typep, dkind)
+		*typep = "long";
+		(void) peekscan(TOK_INT, &tok);
+		break;
++	case TOK_HYPER:
++		*typep = "int64_t";
++		(void) peekscan(TOK_INT, &tok);
++		break;
+	case TOK_VOID:
+		if (dkind != DEF_UNION && dkind != DEF_PROGRAM) {
+			error("voids allowed only inside union and program definitions with one argument");
+@@ -592,6 +596,7 @@ get_type(prefixp, typep, dkind)
+	case TOK_INT:
+	case TOK_FLOAT:
+	case TOK_DOUBLE:
++	case TOK_QUAD:
+	case TOK_BOOL:
+		*typep = tok.str;
+		break;
+@@ -622,6 +627,11 @@ unsigned_dec(typep)
+		*typep = "u_long";
+		(void) peekscan(TOK_INT, &tok);
+		break;
++	case TOK_HYPER:
++		get_token(&tok);
++		*typep = "u_int64_t";
++		(void) peekscan(TOK_INT, &tok);
++		break;
+	case TOK_INT:
+		get_token(&tok);
+		*typep = "u_int";
+diff --git a/rpcgen/rpc_scan.c b/rpcgen/rpc_scan.c
+index a8df441..4130107 100644
+--- a/rpcgen/rpc_scan.c
++++ b/rpcgen/rpc_scan.c
+@@ -419,8 +419,10 @@ static token symbols[] = {
+	{TOK_UNSIGNED, "unsigned"},
+	{TOK_SHORT, "short"},
+	{TOK_LONG, "long"},
++	{TOK_HYPER, "hyper"},
+	{TOK_FLOAT, "float"},
+	{TOK_DOUBLE, "double"},
++	{TOK_QUAD, "quadruple"},
+	{TOK_STRING, "string"},
+	{TOK_PROGRAM, "program"},
+	{TOK_VERSION, "version"},
+diff --git a/rpcgen/rpc_scan.h b/rpcgen/rpc_scan.h
+index bac2be4..e4c57c8 100644
+--- a/rpcgen/rpc_scan.h
++++ b/rpcgen/rpc_scan.h
+@@ -66,9 +66,11 @@ enum tok_kind {
+	TOK_INT,
+	TOK_SHORT,
+	TOK_LONG,
++	TOK_HYPER,
+	TOK_UNSIGNED,
+	TOK_FLOAT,
+	TOK_DOUBLE,
++	TOK_QUAD,
+	TOK_OPAQUE,
+	TOK_CHAR,
+	TOK_STRING,
\ No newline at end of file
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
index 0532c88b66b9..72ef086f5990 100644
--- a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
@@ -1,6 +1,6 @@
 { stdenv, appleDerivation, lib
-, enableStatic ? stdenv.targetPlatform.isiOS
-, enableShared ? !stdenv.targetPlatform.isiOS
+, enableStatic ? stdenv.hostPlatform.isStatic
+, enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
 appleDerivation {
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix
index a7cedaaea114..2fc4afa77d9f 100644
--- a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix
@@ -1,4 +1,4 @@
-{ appleDerivation }:
+{ appleDerivation, darwin-stubs }:
 
 appleDerivation {
   phases = [ "unpackPhase" "installPhase" ];
@@ -14,7 +14,8 @@ appleDerivation {
 
   installPhase = ''
     mkdir -p $out/include/objc $out/lib
-    ln -s /usr/lib/libobjc.dylib $out/lib/libobjc.dylib
+    cp ${darwin-stubs}/usr/lib/libobjc.A.tbd $out/lib/libobjc.A.tbd
+    ln -s libobjc.A.tbd $out/lib/libobjc.tbd
     cp runtime/OldClasses.subproj/List.h $out/include/objc/List.h
     cp runtime/NSObjCRuntime.h $out/include/objc/NSObjCRuntime.h
     cp runtime/NSObject.h $out/include/objc/NSObject.h
diff --git a/nixpkgs/pkgs/os-specific/darwin/cctools/port.nix b/nixpkgs/pkgs/os-specific/darwin/cctools/port.nix
index 0c25f225291e..64f1490a7a79 100644
--- a/nixpkgs/pkgs/os-specific/darwin/cctools/port.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/cctools/port.nix
@@ -17,92 +17,90 @@ in
 # Non-Darwin alternatives
 assert (!stdenv.hostPlatform.isDarwin) -> maloader != null;
 
-let
-  baseParams = rec {
-    name = "${targetPrefix}cctools-port";
-    version = "927.0.2";
-
-    src = fetchFromGitHub {
-      owner  = "tpoechtrager";
-      repo   = "cctools-port";
-      rev    = "8239a5211bcf07d6b9d359782e1a889ec1d7cce5";
-      sha256 = "0h8b1my0wf1jyjq63wbiqkl2clgxsf87f6i4fjhqs431fzlq8sac";
-    };
-
-    outputs = [ "out" "dev" "man" ];
-
-    nativeBuildInputs = [ autoconf automake libtool autoreconfHook installShellFiles ];
-    buildInputs = [ libuuid ]
-      ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]
-      ++ stdenv.lib.optional enableTapiSupport libtapi;
-
-    patches = [ ./ld-ignore-rpath-link.patch ./ld-rpath-nonfinal.patch ];
-
-    __propagatedImpureHostDeps = [
-      # As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them
-      "/usr/lib/libobjc.A.dylib"
-      "/usr/lib/libobjc.dylib"
+stdenv.mkDerivation {
+  pname = "${targetPrefix}cctools-port";
+  version = "949.0.1";
+
+  src = fetchFromGitHub {
+    owner  = "tpoechtrager";
+    repo   = "cctools-port";
+    rev    = "43f32a4c61b5ba7fde011e816136c550b1b3146f";
+    sha256 = "10yc5smiczzm62q6ijqccc58bwmfhc897f3bwa5i9j98csqsjj0k";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+
+  nativeBuildInputs = [ autoconf automake libtool autoreconfHook installShellFiles ];
+  buildInputs = [ libuuid ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]
+    ++ stdenv.lib.optional enableTapiSupport libtapi;
+
+  patches = [ ./ld-ignore-rpath-link.patch ./ld-rpath-nonfinal.patch ];
+
+  __propagatedImpureHostDeps = [
+    # As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them
+    "/usr/lib/libobjc.A.dylib"
+    "/usr/lib/libobjc.dylib"
+  ];
+
+  enableParallelBuilding = true;
+
+  # TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
+  configureFlags = [ "--disable-clang-as" ]
+    ++ stdenv.lib.optionals enableTapiSupport [
+      "--enable-tapi-support"
+      "--with-libtapi=${libtapi}"
     ];
 
-    enableParallelBuilding = true;
-
-    # TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
-    configurePlatforms = [ "build" "host" ]
-      ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
-    configureFlags = [ "--disable-clang-as" ]
-      ++ stdenv.lib.optionals enableTapiSupport [
-        "--enable-tapi-support"
-        "--with-libtapi=${libtapi}"
-      ];
-
-    postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
-      substituteInPlace cctools/Makefile.am --replace libobjc2 ""
-    '' + ''
-      sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp
-
-      # FIXME: there are far more absolute path references that I don't want to fix right now
-      substituteInPlace cctools/configure.ac \
-        --replace "-isystem /usr/local/include -isystem /usr/pkg/include" "" \
-        --replace "-L/usr/local/lib" "" \
-
-      substituteInPlace cctools/include/Makefile \
-        --replace "/bin/" ""
-
-      patchShebangs tools
-      sed -i -e 's/which/type -P/' tools/*.sh
-
-      # Workaround for https://www.sourceware.org/bugzilla/show_bug.cgi?id=11157
-      cat > cctools/include/unistd.h <<EOF
-      #ifdef __block
-      #  undef __block
-      #  include_next "unistd.h"
-      #  define __block __attribute__((__blocks__(byref)))
-      #else
-      #  include_next "unistd.h"
-      #endif
-      EOF
-
-      cd cctools
-    '';
-
-    preInstall = ''
-      pushd include
-      make DSTROOT=$out/include RC_OS=common install
-      popd
-
-      installManPage ar/ar.{1,5}
-    '';
-
-    passthru = {
-      inherit targetPrefix;
-    };
-
-    meta = {
-      broken = !stdenv.targetPlatform.isDarwin; # Only supports darwin targets
-      homepage = "http://www.opensource.apple.com/source/cctools/";
-      description = "MacOS Compiler Tools (cross-platform port)";
-      license = stdenv.lib.licenses.apsl20;
-      maintainers = with stdenv.lib.maintainers; [ matthewbauer ];
-    };
+  postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
+    substituteInPlace cctools/Makefile.am --replace libobjc2 ""
+  '' + ''
+    sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp
+
+    # FIXME: there are far more absolute path references that I don't want to fix right now
+    substituteInPlace cctools/configure.ac \
+      --replace "-isystem /usr/local/include -isystem /usr/pkg/include" "" \
+      --replace "-L/usr/local/lib" "" \
+
+    substituteInPlace cctools/include/Makefile \
+      --replace "/bin/" ""
+
+    patchShebangs tools
+    sed -i -e 's/which/type -P/' tools/*.sh
+
+    # Workaround for https://www.sourceware.org/bugzilla/show_bug.cgi?id=11157
+    cat > cctools/include/unistd.h <<EOF
+    #ifdef __block
+    #  undef __block
+    #  include_next "unistd.h"
+    #  define __block __attribute__((__blocks__(byref)))
+    #else
+    #  include_next "unistd.h"
+    #endif
+    EOF
+
+    cd cctools
+  '';
+
+  preInstall = ''
+    pushd include
+    make DSTROOT=$out/include RC_OS=common install
+    popd
+
+    installManPage ar/ar.{1,5}
+  '';
+
+  passthru = {
+    inherit targetPrefix;
+  };
+
+  meta = {
+    broken = !stdenv.targetPlatform.isDarwin; # Only supports darwin targets
+    homepage = "http://www.opensource.apple.com/source/cctools/";
+    description = "MacOS Compiler Tools (cross-platform port)";
+    license = stdenv.lib.licenses.apsl20;
+    maintainers = with stdenv.lib.maintainers; [ matthewbauer ];
   };
-in stdenv.mkDerivation baseParams
+}
diff --git a/nixpkgs/pkgs/os-specific/darwin/darwin-stubs/default.nix b/nixpkgs/pkgs/os-specific/darwin/darwin-stubs/default.nix
new file mode 100644
index 000000000000..f7f083e32f43
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/darwin/darwin-stubs/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  pname = "darwin-stubs";
+  version = "10.12";
+
+  src = fetchFromGitHub {
+    owner = "NixOS";
+    repo = "darwin-stubs";
+    rev = "80b3d4a57d3454c975eefd984c804dbd76f04ef2";
+    sha256 = "0sslg4rmskms8ixixv1gvnrvvvmn723vbfjj6mcn24fj2ncg38y7";
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir $out
+    cp -vr stubs/$version/* $out
+  '';
+}
diff --git a/nixpkgs/pkgs/os-specific/darwin/discrete-scroll/default.nix b/nixpkgs/pkgs/os-specific/darwin/discrete-scroll/default.nix
index e72402b77933..f38bf8d81322 100644
--- a/nixpkgs/pkgs/os-specific/darwin/discrete-scroll/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/discrete-scroll/default.nix
@@ -31,5 +31,6 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/emreyolcu/discrete-scroll";
     platforms = platforms.darwin;
     license = licenses.mit;
+    maintainers = with lib.maintainers; [ bb2020 ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/darwin/libtapi/default.nix b/nixpkgs/pkgs/os-specific/darwin/libtapi/default.nix
index 182d1db3bfd5..a6bc16d42f91 100644
--- a/nixpkgs/pkgs/os-specific/darwin/libtapi/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/libtapi/default.nix
@@ -1,30 +1,48 @@
-{ lib, stdenv, fetchFromGitHub, cmake, python3, clang_6 }:
+{ lib, stdenv, fetchFromGitHub, cmake, python3, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "libtapi";
+  version = "1000.10.8"; # determined by looking at VERSION.txt
 
-stdenv.mkDerivation {
-  name = "libtapi-1000.10.8";
   src = fetchFromGitHub {
     owner = "tpoechtrager";
     repo = "apple-libtapi";
-    rev = "cd9885b97fdff92cc41e886bba4a404c42fdf71b";
-    sha256 = "1a19h39a48agvnmal99n9j1fjadiqwib7hfzmn342wmgh9z3vk0g";
+    rev = "3cb307764cc5f1856c8a23bbdf3eb49dfc6bea48";
+    sha256 = "1zb10p6xkls8x7wsdwgy9c0v16z97rfkgidii9ffq5rfczgvrhjh";
   };
 
+  sourceRoot = "source/src/llvm";
+
   nativeBuildInputs = [ cmake python3 ];
-  buildInputs = [ clang_6.cc ];
 
+  # ncurses is required here to avoid a reference to bootstrap-tools, which is
+  # not allowed for the stdenv.
+  buildInputs = [ ncurses ];
+
+  cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=OFF" ];
+
+  # fixes: fatal error: 'clang/Basic/Diagnostic.h' file not found
+  # adapted from upstream
+  # https://github.com/tpoechtrager/apple-libtapi/blob/3cb307764cc5f1856c8a23bbdf3eb49dfc6bea48/build.sh#L58-L60
   preConfigure = ''
-    cd src/llvm
+    INCLUDE_FIX="-I $PWD/projects/clang/include"
+    INCLUDE_FIX+=" -I $PWD/build/projects/clang/include"
+
+    cmakeFlagsArray+=(-DCMAKE_CXX_FLAGS="$INCLUDE_FIX")
   '';
 
-  cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=OFF" ];
+  buildFlags = [ "clangBasic" "libtapi" ];
 
-  buildFlags = [ "libtapi" ];
+  installTargets = [ "install-libtapi" "install-tapi-headers" ];
 
-  installTarget = "install-libtapi";
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -id $out/lib/libtapi.dylib $out/lib/libtapi.dylib
+  '';
 
   meta = with lib; {
+    description = "Replaces the Mach-O Dynamic Library Stub files in Apple's SDKs to reduce the size";
+    homepage = "https://github.com/tpoechtrager/apple-libtapi";
     license = licenses.apsl20;
     maintainers = with maintainers; [ matthewbauer ];
   };
-
 }
diff --git a/nixpkgs/pkgs/os-specific/darwin/osx-cpu-temp/default.nix b/nixpkgs/pkgs/os-specific/darwin/osx-cpu-temp/default.nix
new file mode 100644
index 000000000000..1e8a56154f34
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/darwin/osx-cpu-temp/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub
+, IOKit
+}:
+
+stdenv.mkDerivation rec {
+  pname = "osx-cpu-temp";
+  version = "unstable-2020-12-04";
+
+  src = fetchFromGitHub rec {
+    name = "osx-cpu-temp-source";
+    owner = "lavoiesl";
+    repo = pname;
+    rev = "6ec951be449badcb7fb84676bbc2c521e600e844";
+    sha256 = "1nlibgr55bpln6jbdf8vqcp0fj9zv9343vflb7s9w0yh33fsbg9d";
+  };
+
+  buildInputs = [ IOKit ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp osx-cpu-temp $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Outputs current CPU temperature for OSX.";
+    homepage = "https://github.com/lavoiesl/osx-cpu-temp";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ virusdave ];
+    platforms = platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/darwin/osxsnarf/default.nix b/nixpkgs/pkgs/os-specific/darwin/osxsnarf/default.nix
index d9a0de6c7f16..e31271ed2b97 100644
--- a/nixpkgs/pkgs/os-specific/darwin/osxsnarf/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/osxsnarf/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   makeFlags = [ "prefix=${placeholder "out"}" ];
 
   meta = with lib; {
-    description = "A Plan 9-inspired way to share your OS X clipboard.";
+    description = "A Plan 9-inspired way to share your OS X clipboard";
     homepage = "https://github.com/eraserhd/osxsnarf";
     license = licenses.unlicense;
     platforms = platforms.darwin;
diff --git a/nixpkgs/pkgs/os-specific/darwin/reattach-to-user-namespace/default.nix b/nixpkgs/pkgs/os-specific/darwin/reattach-to-user-namespace/default.nix
index 768ca6cf9c97..685837768504 100644
--- a/nixpkgs/pkgs/os-specific/darwin/reattach-to-user-namespace/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/reattach-to-user-namespace/default.nix
@@ -1,12 +1,14 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchFromGitHub }:
 
 stdenv.mkDerivation rec {
   pname = "reattach-to-user-namespace";
-  version = "2.8";
+  version = "2.9";
 
-  src = fetchurl {
-    url = "https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/archive/v${version}.tar.gz";
-    sha256 = "0xxxdd26rcplhpvi2vy6crxadk3d1qkq4xry10lwq6dyya2jf6wb";
+  src = fetchFromGitHub {
+    owner = "ChrisJohnsen";
+    repo = "tmux-MacOSX-pasteboard";
+    rev = "v${version}";
+    sha256 = "1qgimh58hcx5f646gj2kpd36ayvrdkw616ad8cb3lcm11kg0ag79";
   };
 
   buildFlags = [ "ARCHES=x86_64" ];
diff --git a/nixpkgs/pkgs/os-specific/darwin/spacebar/default.nix b/nixpkgs/pkgs/os-specific/darwin/spacebar/default.nix
index 7af7e408223a..6d47499b8350 100644
--- a/nixpkgs/pkgs/os-specific/darwin/spacebar/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/spacebar/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "spacebar";
-  version = "1.1.1";
+  version = "1.2.1";
 
   src = fetchFromGitHub {
     owner = "cmacrae";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1x0wzm380nv81j26jqqg4y4dwanydnpdsca41ndw6xyj9zlv73f7";
+    sha256 = "0f5ddn3sx13rwwh0nfl784160s8ml3m5593d5fz2b1996aznzrsx";
   };
 
   buildInputs = [ Carbon Cocoa ScriptingBridge ];
diff --git a/nixpkgs/pkgs/os-specific/darwin/xcode/default.nix b/nixpkgs/pkgs/os-specific/darwin/xcode/default.nix
index 1144232fba21..34e3b2dfeeae 100644
--- a/nixpkgs/pkgs/os-specific/darwin/xcode/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/xcode/default.nix
@@ -53,5 +53,6 @@ in lib.makeExtensible (self: {
   xcode_10_2_1 = requireXcode "10.2.1" "11sdb54nr0x7kp987qq839x6k5gdx7vqdxjiy5xm5279n1n47bmg";
   xcode_10_3 = requireXcode "10.3" "1i628vfn6zad81fsz3zpc6z15chhskvyp8qnajp2wnpzvrwl6ngb";
   xcode_11 = requireXcode "11" "1r03j3kkp4blfp2kqpn538w3dx57ms930fj8apjkq6dk7fv3jcqh";
-  xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if stdenv.targetPlatform.useiOSPrebuilt then stdenv.targetPlatform.xcodeVer else "10.3")}";
+  xcode_11_3_1 = requireXcode "11.3.1" "1p6nicj91kr6ad3rmycahd1i7z4hj7ccjs93ixsiximjzaahx3q4";
+  xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if (stdenv.targetPlatform ? xcodeVer) then stdenv.targetPlatform.xcodeVer else "11.3.1")}";
 })
diff --git a/nixpkgs/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix b/nixpkgs/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix
index e8302a82555f..45e1f1eab4fa 100644
--- a/nixpkgs/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix
@@ -12,7 +12,7 @@
 
 let
 
-minSdkVersion = "9.0";
+minSdkVersion = targetPlatform.minSdkVersion or "9.0";
 
 iosPlatformArch = { parsed, ... }: {
   armv7a  = "armv7";
@@ -37,6 +37,10 @@ rec {
     bintools = binutils-unwrapped;
     extraBuildCommands = ''
       echo "-arch ${iosPlatformArch targetPlatform}" >> $out/nix-support/libc-ldflags
+    '' + stdenv.lib.optionalString (sdk.platform == "iPhoneSimulator") ''
+      echo "-platform_version ios-sim ${minSdkVersion} ${sdk.version}" >> $out/nix-support/libc-ldflags
+    '' + stdenv.lib.optionalString (sdk.platform == "iPhoneOS") ''
+      echo "-platform_version ios ${minSdkVersion} ${sdk.version}" >> $out/nix-support/libc-ldflags
     '';
   };
 
diff --git a/nixpkgs/pkgs/os-specific/darwin/yabai/default.nix b/nixpkgs/pkgs/os-specific/darwin/yabai/default.nix
index 742a3948707e..d4471da4781f 100644
--- a/nixpkgs/pkgs/os-specific/darwin/yabai/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/yabai/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "yabai";
-  version = "3.3.0";
+  version = "3.3.4";
 
   src = fetchFromGitHub {
     owner = "koekeishiya";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0y4idivqkmi3xsc8yjdzh1b15qzgyqlw7ifs26v3dc91lkjhfc4x";
+    sha256 = "1pvyjdxgy7yxxz4x87f8an0dlxvxbnmv5kya8hkzw2na453ihvab";
   };
 
   buildInputs = [ Carbon Cocoa ScriptingBridge xxd ];
diff --git a/nixpkgs/pkgs/os-specific/linux/akvcam/default.nix b/nixpkgs/pkgs/os-specific/linux/akvcam/default.nix
new file mode 100644
index 000000000000..9e7450775147
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/akvcam/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, kernel, qmake }:
+
+stdenv.mkDerivation rec {
+  pname = "akvcam";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "webcamoid";
+    repo = "akvcam";
+    rev = version;
+    sha256 = "ULEhfF+uC/NcVUGAtmP1+BnrcgRgftNS97nLp81avQ8=";
+  };
+
+  nativeBuildInputs = [ qmake ];
+
+  qmakeFlags = [
+    "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
+  ];
+
+  installPhase = ''
+    install -m644 -b -D src/akvcam.ko $out/lib/modules/${kernel.modDirVersion}/akvcam.ko
+  '';
+
+  meta = with lib; {
+    description = "Virtual camera driver for Linux";
+    homepage = "https://github.com/webcamoid/akvcam";
+    maintainers = with maintainers; [ freezeboy ];
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/alsa-lib/default.nix b/nixpkgs/pkgs/os-specific/linux/alsa-lib/default.nix
index 3c5427340baf..b1d85f2674cb 100644
--- a/nixpkgs/pkgs/os-specific/linux/alsa-lib/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/alsa-lib/default.nix
@@ -1,11 +1,12 @@
 { stdenv, fetchurl, alsa-ucm-conf, alsa-topology-conf }:
 
 stdenv.mkDerivation rec {
-  name = "alsa-lib-1.2.3";
+  pname = "alsa-lib";
+  version = "1.2.4";
 
   src = fetchurl {
-    url = "mirror://alsa/lib/${name}.tar.bz2";
-    sha256 = "13k7dx1g749z74rz71hs5j8z0pqdjgx7l69pn0vsy7jizhi0kw02";
+    url = "mirror://alsa/lib/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-91VL4aVs3/RotY/BwpuVtkhkxZADjdMJx6l4xxFpCPc=";
   };
 
   patches = [
diff --git a/nixpkgs/pkgs/os-specific/linux/alsa-plugins/default.nix b/nixpkgs/pkgs/os-specific/linux/alsa-plugins/default.nix
index a69d86c5c4d6..54d7ce6222a3 100644
--- a/nixpkgs/pkgs/os-specific/linux/alsa-plugins/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/alsa-plugins/default.nix
@@ -15,13 +15,14 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ alsaLib libogg ]
     ++ lib.optional (libpulseaudio != null) libpulseaudio
-    ++ lib.optional (libjack2 != null) libjack2;
+    # https://github.com/NixOS/nixpkgs/issues/96548
+    ++ lib.optional (libjack2 != null && (stdenv.buildPlatform == stdenv.hostPlatform)) libjack2;
 
   meta = with lib; {
     description = "Various plugins for ALSA";
     homepage = "http://alsa-project.org/";
     license = licenses.lgpl21;
-    maintainers = [maintainers.marcweber];
+    maintainers = [ maintainers.marcweber ];
     platforms = platforms.linux;
   };
 }
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 54340d017ade..4b6678d09b23 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.3";
+  version = "1.2.4";
 
   src = fetchurl {
     url = "mirror://alsa/lib/${name}.tar.bz2";
-    sha256 = "1zwxc9zhfcmyffjjbibzpdvf4kx7wv9g2zl6xz7y0d6srfr9jgw3";
+    sha256 = "01zdg6q4s6d01k39z96wi4vbhrfw1i2g4yi5dijwfk6a5vjfdq2m";
   };
 
   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 2a9f28c855a5..3ee800438175 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.3";
+  version = "1.2.4";
 
   src = fetchurl {
     url = "mirror://alsa/lib/${name}.tar.bz2";
-    sha256 = "000db5yla7dljidjbbwbiaxvc1a7wh1zpw694gipaymj9fh4vhhv";
+    sha256 = "0h6kzi1cfdqyxp4pwpqh5wb89c8s9wrgix315bvamffwfxf56frc";
   };
 
   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 91d7e05a882c..055927b7a31e 100644
--- a/nixpkgs/pkgs/os-specific/linux/alsa-utils/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/alsa-utils/default.nix
@@ -2,15 +2,15 @@
 
 stdenv.mkDerivation rec {
   pname = "alsa-utils";
-  version = "1.2.3";
+  version = "1.2.4";
 
   src = fetchurl {
     url = "mirror://alsa/utils/${pname}-${version}.tar.bz2";
-    sha256 = "1ai1z4kf91b1m3qrpwqkc1af5vm2fkdkknqv95xdwf19q94aw6gz";
+    sha256 = "09m4dnn4kplawprd2bl15nwa0b4r1brab3x44ga7f1fyk7aw5zwq";
   };
 
-  nativeBuildInputs = [ gettext makeWrapper ];
-  buildInputs = [ alsaLib ncurses libsamplerate fftw ];
+  nativeBuildInputs = [ gettext ];
+  buildInputs = [ makeWrapper alsaLib ncurses libsamplerate fftw ];
 
   configureFlags = [ "--disable-xmlto" "--with-udev-rules-dir=$(out)/lib/udev/rules.d" ];
 
diff --git a/nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix b/nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix
index 6eb74ca25f6b..896beaf3056e 100644
--- a/nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix
+++ b/nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix
@@ -36,7 +36,7 @@ stdenv.mkDerivation {
     homepage = "https://github.com/anbox/anbox-modules";
     license = licenses.gpl2;
     platforms = platforms.linux;
-    broken = (versionOlder kernel.version "4.4") || (kernel.features.grsecurity);
+    broken = (versionOlder kernel.version "4.4") || (kernel.features.grsecurity or false);
     maintainers = with maintainers; [ edwtjo ];
   };
 
diff --git a/nixpkgs/pkgs/os-specific/linux/android-udev-rules/default.nix b/nixpkgs/pkgs/os-specific/linux/android-udev-rules/default.nix
index 1cfa6b5856fe..b6fe86d1b26a 100644
--- a/nixpkgs/pkgs/os-specific/linux/android-udev-rules/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/android-udev-rules/default.nix
@@ -6,13 +6,13 @@
 
 stdenv.mkDerivation rec {
   pname = "android-udev-rules";
-  version = "20200410";
+  version = "20201003";
 
   src = fetchFromGitHub {
     owner = "M0Rf30";
     repo = "android-udev-rules";
     rev = version;
-    sha256 = "1ik9a0k9gkaw5a80m25pxx5yfiwq34ffb7iqhwicz4lwz5wsw8d3";
+    sha256 = "07s5fdjbk5q4km6gz9759ngdavrqdgbnkd2b7z9z5lqw1q0b2422";
   };
 
   installPhase = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/apparmor/default.nix b/nixpkgs/pkgs/os-specific/linux/apparmor/default.nix
index 0e10add55613..3ce310acf231 100644
--- a/nixpkgs/pkgs/os-specific/linux/apparmor/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/apparmor/default.nix
@@ -14,7 +14,7 @@
 
 let
   apparmor-series = "2.13";
-  apparmor-patchver = "4";
+  apparmor-patchver = "6";
   apparmor-version = apparmor-series + "." + apparmor-patchver;
 
   apparmor-meta = component: with stdenv.lib; {
@@ -27,19 +27,10 @@ let
 
   apparmor-sources = fetchurl {
     url = "https://launchpad.net/apparmor/${apparmor-series}/${apparmor-version}/+download/apparmor-${apparmor-version}.tar.gz";
-    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";
+    sha256 = "13xshy7905d9q9n8d8i0jmdi9m36wr525g4wlsp8k21n7yvvh9j4";
   };
 
   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"
diff --git a/nixpkgs/pkgs/os-specific/linux/atop/default.nix b/nixpkgs/pkgs/os-specific/linux/atop/default.nix
index 0d8392cbcd8a..7557497b959e 100644
--- a/nixpkgs/pkgs/os-specific/linux/atop/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/atop/default.nix
@@ -1,22 +1,24 @@
 {stdenv, fetchurl, zlib, ncurses}:
 
 stdenv.mkDerivation rec {
-  version = "2.4.0";
   pname = "atop";
+  version = "2.6.0";
 
   src = fetchurl {
     url = "https://www.atoptool.nl/download/atop-${version}.tar.gz";
-    sha256 = "0s9xlxlzz688a80zxld840zkrmzw998rdkkg6yc7ssq8fw50275y";
+    sha256 = "nsLKOlcWkvfvqglfmaUQZDK8txzCLNbElZfvBIEFj3I=";
   };
 
   buildInputs = [zlib ncurses];
 
   makeFlags = [
-    ''SCRPATH=$out/etc/atop''
-    ''LOGPATH=/var/log/atop''
-    ''INIPATH=$out/etc/rc.d/init.d''
-    ''CRNPATH=$out/etc/cron.d''
-    ''ROTPATH=$out/etc/logrotate.d''
+    "SCRPATH=$out/etc/atop"
+    "LOGPATH=/var/log/atop"
+    "INIPATH=$out/etc/rc.d/init.d"
+    "SYSDPATH=$out/lib/systemd/system"
+    "CRNPATH=$out/etc/cron.d"
+    "DEFPATH=$out/etc/default"
+    "ROTPATH=$out/etc/logrotate.d"
   ];
 
   preConfigure = ''
@@ -28,9 +30,9 @@ stdenv.mkDerivation rec {
     sed -e 's/chmod 04711/chmod 0711/g' -i Makefile
   '';
 
+  installTargets = [ "systemdinstall" ];
   preInstall = ''
     mkdir -p "$out"/{bin,sbin}
-    make systemdinstall $makeFlags
   '';
 
   meta = with stdenv.lib; {
@@ -42,7 +44,7 @@ stdenv.mkDerivation rec {
       Atop is an ASCII full-screen performance monitor that is capable of reporting the activity of all processes (even if processes have finished during the interval), daily logging of system and process activity for long-term analysis, highlighting overloaded system resources by using colors, etc. At regular intervals, it shows system-level activity related to the CPU, memory, swap, disks and network layers, and for every active process it shows the CPU utilization, memory growth, disk utilization, priority, username, state, and exit code.
     '';
     inherit version;
-    license = licenses.gpl2;
+    license = licenses.gpl2Plus;
     downloadPage = "http://atoptool.nl/downloadatop.php";
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/autofs/default.nix b/nixpkgs/pkgs/os-specific/linux/autofs/default.nix
index baf3cc6ad55e..ab78c590017f 100644
--- a/nixpkgs/pkgs/os-specific/linux/autofs/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/autofs/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, flex, bison, linuxHeaders, libtirpc, mount, umount, nfs-utils, e2fsprogs
-, libxml2, kerberos, kmod, openldap, sssd, cyrus_sasl, openssl }:
+, libxml2, kerberos, kmod, openldap, sssd, cyrus_sasl, openssl, rpcsvc-proto }:
 
 let
   version = "5.1.6";
@@ -28,13 +28,16 @@ in stdenv.mkDerivation {
     unset STRIP # Makefile.rules defines a usable STRIP only without the env var.
   '';
 
+  # configure script is not finding the right path
+  NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
+
   installPhase = ''
     make install SUBDIRS="lib daemon modules man" # all but samples
     #make install SUBDIRS="samples" # impure!
   '';
 
   buildInputs = [ linuxHeaders libtirpc libxml2 kerberos kmod openldap sssd
-                  openssl cyrus_sasl ];
+                  openssl cyrus_sasl rpcsvc-proto ];
 
   nativeBuildInputs = [ flex bison ];
 
diff --git a/nixpkgs/pkgs/os-specific/linux/batman-adv/version.nix b/nixpkgs/pkgs/os-specific/linux/batman-adv/version.nix
index e617881a570c..d93f8a6c46ed 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 = "2020.3";
+  version = "2020.4";
 
   sha256 = {
-    batman-adv = "0wrzh0k44zzjx2s5zj65hjkh4jm9y38qpis1s5cbx9cyj756slb5";
-    alfred = "13bvccz90pkjl09jyw68gj23pbrw9b05w1vhds9sjggwf3jkj5w2";
-    batctl = "0r2w2v4sy6wgr7mp9lc7yj9k4ldsbsm3425rjil7p0b17zmzf4rm";
+    batman-adv = "1cxr0zmn9nzisawkrfk0gzd9fx0pg6261c889kz47hwp4f545v6d";
+    alfred = "1ay69nifzghpbvy11fdca5cllkn852h6rg045lci4vzgqf7b2bd2";
+    batctl = "05rrpfbpdhxn5zgdps849qls2ifis6a94cjryb60d4y1nc2n0d7w";
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/bcc/default.nix b/nixpkgs/pkgs/os-specific/linux/bcc/default.nix
index de02ffb30a39..2bc705d4487a 100644
--- a/nixpkgs/pkgs/os-specific/linux/bcc/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/bcc/default.nix
@@ -6,11 +6,13 @@
 
 python.pkgs.buildPythonApplication rec {
   pname = "bcc";
-  version = "0.16.0";
+  version = "0.17.0";
+
+  disabled = !stdenv.isLinux;
 
   src = fetchurl {
     url = "https://github.com/iovisor/bcc/releases/download/v${version}/bcc-src-with-submodule.tar.gz";
-    sha256 = "sha256-ekVRyugpZOU1nr0N9kWCSoJTmtD2qGsn/DmWgK7XZ/c=";
+    sha256 = "sha256-aEy8WwtKGaf7GZOTK5IHhwzenqU2U+vpWrcNWMCGvMw=";
   };
   format = "other";
 
@@ -24,12 +26,6 @@ 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/bluez/default.nix b/nixpkgs/pkgs/os-specific/linux/bluez/default.nix
index 401ab39bca36..8e110fb13ace 100644
--- a/nixpkgs/pkgs/os-specific/linux/bluez/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/bluez/default.nix
@@ -19,11 +19,11 @@
   ];
 in stdenv.mkDerivation rec {
   pname = "bluez";
-  version = "5.54";
+  version = "5.55";
 
   src = fetchurl {
     url = "mirror://kernel/linux/bluetooth/${pname}-${version}.tar.xz";
-    sha256 = "1p2ncvjz6alr9n3l5wvq2arqgc7xjs6dqyar1l9jp0z8cfgapkb8";
+    sha256 = "124v9s4y1s7s6klx5vlmzpk1jlr4x84ch7r7scm7x2f42dqp2qw8";
   };
 
   buildInputs = [
diff --git a/nixpkgs/pkgs/os-specific/linux/bolt/default.nix b/nixpkgs/pkgs/os-specific/linux/bolt/default.nix
index 114a90129ac2..1508125695e7 100644
--- a/nixpkgs/pkgs/os-specific/linux/bolt/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/bolt/default.nix
@@ -1,28 +1,50 @@
-{ stdenv, meson, ninja, pkgconfig, fetchFromGitLab,
-  python3, umockdev, gobject-introspection, dbus,
-  asciidoc, libxml2, libxslt, docbook_xml_dtd_45, docbook_xsl,
-  glib, systemd, polkit
+{ stdenv
+, meson
+, ninja
+, pkgconfig
+, fetchFromGitLab
+, fetchpatch
+, python3
+, umockdev
+, gobject-introspection
+, dbus
+, asciidoc
+, libxml2
+, libxslt
+, docbook_xml_dtd_45
+, docbook_xsl
+, glib
+, systemd
+, polkit
 }:
 
 stdenv.mkDerivation rec {
   pname = "bolt";
-  version = "0.8";
+  version = "0.9";
 
   src = fetchFromGitLab {
     domain = "gitlab.freedesktop.org";
     owner = "bolt";
     repo = "bolt";
     rev = version;
-    sha256 = "1qamls0fll0qc27lqavf56hv1yj6v6n4ry90g7bcnwpvccmd82yd";
+    sha256 = "sha256-lcJE+bMK2S2GObHMy/Fu12WGb3T1HrWjsNyZPz4/f4E=";
   };
 
   nativeBuildInputs = [
-    meson ninja pkgconfig
-    asciidoc libxml2 libxslt docbook_xml_dtd_45 docbook_xsl
+    asciidoc
+    docbook_xml_dtd_45
+    docbook_xsl
+    libxml2
+    libxslt
+    meson
+    ninja
+    pkgconfig
   ] ++ stdenv.lib.optional (!doCheck) python3;
 
   buildInputs = [
-    glib systemd polkit
+    glib
+    polkit
+    systemd
   ];
 
   doCheck = true;
@@ -32,13 +54,25 @@ stdenv.mkDerivation rec {
   '';
 
   checkInputs = [
-    dbus umockdev gobject-introspection
+    dbus
+    gobject-introspection
+    umockdev
     (python3.withPackages
       (p: [ p.pygobject3 p.dbus-python p.python-dbusmock ]))
   ];
 
-  # meson install tries to create /var/lib/boltd
-  patches = [ ./0001-skip-mkdir.patch ];
+  patches = [
+    # meson install tries to create /var/lib/boltd
+    ./0001-skip-mkdir.patch
+
+    # https://github.com/NixOS/nixpkgs/issues/104429
+    # Upstream issue: https://gitlab.freedesktop.org/bolt/bolt/-/issues/167
+    (fetchpatch {
+      name = "disable-atime-tests.diff";
+      url = "https://gitlab.freedesktop.org/roberth/bolt/-/commit/1f672a7de2ebc4dd51590bb90f3b873a8ac0f4e6.diff";
+      sha256 = "134f5s6kjqs6612pwq5pm1miy58crn1kxbyyqhzjnzmf9m57fnc8";
+    })
+    ];
 
   postPatch = ''
     patchShebangs scripts tests
@@ -55,7 +89,7 @@ stdenv.mkDerivation rec {
     description = "Thunderbolt 3 device management daemon";
     homepage = "https://gitlab.freedesktop.org/bolt/bolt";
     license = licenses.lgpl21Plus;
-    maintainers = [ maintainers.callahad ];
+    maintainers = with maintainers; [ callahad ];
     platforms = platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix b/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix
index fc7c8ecba2da..9fbeda708e05 100644
--- a/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix
@@ -6,13 +6,13 @@
 
 stdenv.mkDerivation rec {
   pname = "bpftrace";
-  version = "0.11.0";
+  version = "0.11.4";
 
   src = fetchFromGitHub {
     owner  = "iovisor";
     repo   = "bpftrace";
     rev    = "refs/tags/v${version}";
-    sha256 = "02f2r731yj3fdc8341id1ksk4dma9rwm2765n2xgx2ldrrz5823y";
+    sha256 = "0y4qgm2cpccrsm20rnh92hqplddqsc5q5zhw9nqn2igm3h9i0z7h";
   };
 
   enableParallelBuilding = true;
diff --git a/nixpkgs/pkgs/os-specific/linux/broadcom-sta/default.nix b/nixpkgs/pkgs/os-specific/linux/broadcom-sta/default.nix
index ecaa3896044d..8e2271b9f7f0 100644
--- a/nixpkgs/pkgs/os-specific/linux/broadcom-sta/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/broadcom-sta/default.nix
@@ -37,6 +37,8 @@ stdenv.mkDerivation {
     ./linux-5.1.patch
     # source: https://salsa.debian.org/Herrie82-guest/broadcom-sta/-/commit/247307926e5540ad574a17c062c8da76990d056f
     ./linux-5.6.patch
+    # source: https://gist.github.com/joanbm/5c640ac074d27fd1d82c74a5b67a1290
+    ./linux-5.9.patch
     ./null-pointer-fix.patch
     ./gcc.patch
   ];
diff --git a/nixpkgs/pkgs/os-specific/linux/broadcom-sta/linux-5.9.patch b/nixpkgs/pkgs/os-specific/linux/broadcom-sta/linux-5.9.patch
new file mode 100644
index 000000000000..2a4e6fa89cc3
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/broadcom-sta/linux-5.9.patch
@@ -0,0 +1,184 @@
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 4b3298f..c45ad48 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -41,6 +41,7 @@
+ #include <wlioctl.h>
+ #include <proto/802.11.h>
+ #include <wl_cfg80211_hybrid.h>
++#include <wl_linux.h>
+ 
+ #define EVENT_TYPE(e) dtoh32((e)->event_type)
+ #define EVENT_FLAGS(e) dtoh16((e)->flags)
+@@ -442,30 +443,7 @@ static void key_endian_to_host(struct wl_wsec_key *key)
+ static s32
+ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
+ {
+-	struct ifreq ifr;
+-	struct wl_ioctl ioc;
+-	mm_segment_t fs;
+-	s32 err = 0;
+-
+-	BUG_ON(len < sizeof(int));
+-
+-	memset(&ioc, 0, sizeof(ioc));
+-	ioc.cmd = cmd;
+-	ioc.buf = arg;
+-	ioc.len = len;
+-	strcpy(ifr.ifr_name, dev->name);
+-	ifr.ifr_data = (caddr_t)&ioc;
+-
+-	fs = get_fs();
+-	set_fs(KERNEL_DS);
+-#if defined(WL_USE_NETDEV_OPS)
+-	err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#else
+-	err = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#endif
+-	set_fs(fs);
+-
+-	return err;
++	return wlc_ioctl_internal(dev, cmd, arg, len);
+ }
+ 
+ static s32
+diff --git a/src/wl/sys/wl_iw.c b/src/wl/sys/wl_iw.c
+index 9c3c74e..e346b15 100644
+--- a/src/wl/sys/wl_iw.c
++++ b/src/wl/sys/wl_iw.c
+@@ -37,6 +37,7 @@ typedef const struct si_pub	si_t;
+ 
+ #include <wl_dbg.h>
+ #include <wl_iw.h>
++#include <wl_linux.h>
+ 
+ extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,
+ 	uint32 reason, char* stringBuf, uint buflen);
+@@ -103,29 +104,7 @@ dev_wlc_ioctl(
+ 	int len
+ )
+ {
+-	struct ifreq ifr;
+-	wl_ioctl_t ioc;
+-	mm_segment_t fs;
+-	int ret;
+-
+-	memset(&ioc, 0, sizeof(ioc));
+-	ioc.cmd = cmd;
+-	ioc.buf = arg;
+-	ioc.len = len;
+-
+-	strcpy(ifr.ifr_name, dev->name);
+-	ifr.ifr_data = (caddr_t) &ioc;
+-
+-	fs = get_fs();
+-	set_fs(KERNEL_DS);
+-#if defined(WL_USE_NETDEV_OPS)
+-	ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#else
+-	ret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#endif
+-	set_fs(fs);
+-
+-	return ret;
++	return wlc_ioctl_internal(dev, cmd, arg, len);
+ }
+ 
+ static int
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index c990c70..5bb9480 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -1664,10 +1664,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+ 		goto done2;
+ 	}
+ 
+-	if (segment_eq(get_fs(), KERNEL_DS))
+-		buf = ioc.buf;
+-
+-	else if (ioc.buf) {
++	if (ioc.buf) {
+ 		if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
+ 			bcmerror = BCME_NORESOURCE;
+ 			goto done2;
+@@ -1688,7 +1685,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+ 	WL_UNLOCK(wl);
+ 
+ done1:
+-	if (ioc.buf && (ioc.buf != buf)) {
++	if (ioc.buf) {
+ 		if (copy_to_user(ioc.buf, buf, ioc.len))
+ 			bcmerror = BCME_BADADDR;
+ 		MFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN));
+@@ -1701,6 +1698,39 @@ done2:
+ 	return (OSL_ERROR(bcmerror));
+ }
+ 
++int
++wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len)
++{
++	wl_info_t *wl;
++	wl_if_t *wlif;
++	int bcmerror;
++
++	if (!dev)
++		return -ENETDOWN;
++
++	wl = WL_INFO(dev);
++	wlif = WL_DEV_IF(dev);
++	if (wlif == NULL || wl == NULL || wl->dev == NULL)
++		return -ENETDOWN;
++
++	bcmerror = 0;
++
++	WL_TRACE(("wl%d: wlc_ioctl_internal: cmd 0x%x\n", wl->pub->unit, cmd));
++
++	WL_LOCK(wl);
++	if (!capable(CAP_NET_ADMIN)) {
++		bcmerror = BCME_EPERM;
++	} else {
++		bcmerror = wlc_ioctl(wl->wlc, cmd, buf, len, wlif->wlcif);
++	}
++	WL_UNLOCK(wl);
++
++	ASSERT(VALID_BCMERROR(bcmerror));
++	if (bcmerror != 0)
++		wl->pub->bcmerror = bcmerror;
++	return (OSL_ERROR(bcmerror));
++}
++
+ static struct net_device_stats*
+ wl_get_stats(struct net_device *dev)
+ {
+diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h
+index 5b1048e..c8c1f41 100644
+--- a/src/wl/sys/wl_linux.h
++++ b/src/wl/sys/wl_linux.h
+@@ -22,6 +22,7 @@
+ #define _wl_linux_h_
+ 
+ #include <wlc_types.h>
++#include <wlc_pub.h>
+ 
+ typedef struct wl_timer {
+ 	struct timer_list 	timer;
+@@ -187,6 +188,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id, struct pt_regs *ptregs);
+ extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
+ extern void wl_free(wl_info_t *wl);
+ extern int  wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
++extern int wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len);
+ extern struct net_device * wl_netdev_get(wl_info_t *wl);
+ 
+ #endif 
+diff --git a/src/wl/sys/wlc_pub.h b/src/wl/sys/wlc_pub.h
+index 53a98b8..2b5a029 100644
+--- a/src/wl/sys/wlc_pub.h
++++ b/src/wl/sys/wlc_pub.h
+@@ -24,6 +24,7 @@
+ 
+ #include <wlc_types.h>
+ #include <wlc_utils.h>
++#include <siutils.h>
+ #include "proto/802.11.h"
+ #include "proto/bcmevent.h"
+ 
diff --git a/nixpkgs/pkgs/os-specific/linux/btfs/default.nix b/nixpkgs/pkgs/os-specific/linux/btfs/default.nix
index b4107e8ba001..6d919ce57d4f 100644
--- a/nixpkgs/pkgs/os-specific/linux/btfs/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/btfs/default.nix
@@ -1,20 +1,20 @@
 { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
-, python3, boost, fuse, libtorrentRasterbar, curl }:
+, python3, boost, fuse, libtorrent-rasterbar, curl }:
 
 stdenv.mkDerivation rec {
   pname = "btfs";
-  version = "2.22";
+  version = "2.23";
 
   src = fetchFromGitHub {
     owner  = "johang";
     repo   = pname;
     rev    = "v${version}";
-    sha256 = "1z88bk1z4sns3jdn56x83mvh06snxg0lr5h4v0c24lzlf5wbdifz";
+    sha256 = "1cfjhyn9cjyyxyd0f08b2ra258pzkljwvkj0iwrjpd0nrbl6wkq5";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
   buildInputs = [
-    boost fuse libtorrentRasterbar curl python3
+    boost fuse libtorrent-rasterbar curl python3
   ];
 
   meta = with stdenv.lib; {
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
deleted file mode 100644
index 029333b57e4d..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/busybox/0001-Fix-build-with-glibc-2.31.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-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
deleted file mode 100644
index d11cd670d5e8..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/busybox/0001-wget-implement-TLS-verification-with-ENABLE_FEATURE_.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-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 599754129b43..99909e6262ef 100644
--- a/nixpkgs/pkgs/os-specific/linux/busybox/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/busybox/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, buildPackages, fetchurl, fetchFromGitLab
-, enableStatic ? false
+, enableStatic ? stdenv.hostPlatform.isStatic
 , enableMinimal ? false
 # Allow forcing musl without switching stdenv itself, e.g. for our bootstrapping:
 # nix build -f pkgs/top-level/release.nix stdenvBootstrapTools.x86_64-linux.dist
@@ -48,17 +48,14 @@ let
 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";
+  name = "busybox-1.32.0";
 
   # Note to whoever is updating busybox: please verify that:
   # nix-build pkgs/stdenv/linux/make-bootstrap-tools.nix -A test
   # still builds after the update.
   src = fetchurl {
     url = "https://busybox.net/downloads/${name}.tar.bz2";
-    sha256 = "1659aabzp8w4hayr4z8kcpbk2z1q2wqhw7i1yb0l72b45ykl1yfh";
+    sha256 = "w12H8dBLKxU9M8J1wmMuQNOIqI8ZqecXJ+C7v/Uf5ok=";
   };
 
   hardeningDisable = [ "format" "pie" ]
@@ -66,8 +63,6 @@ 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 .";
diff --git a/nixpkgs/pkgs/os-specific/linux/catfs/default.nix b/nixpkgs/pkgs/os-specific/linux/catfs/default.nix
new file mode 100644
index 000000000000..0ca585fab47b
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/catfs/default.nix
@@ -0,0 +1,47 @@
+{ lib, rustPlatform, fetchFromGitHub
+, fetchpatch
+, fuse
+, pkg-config
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "catfs";
+  version = "unstable-2020-03-21";
+
+  src = fetchFromGitHub {
+    owner = "kahing";
+    repo = pname;
+    rev = "daa2b85798fa8ca38306242d51cbc39ed122e271";
+    sha256 = "0zca0c4n2p9s5kn8c9f9lyxdf3df88a63nmhprpgflj86bh8wgf5";
+  };
+
+  cargoSha256 = "0v6lxwj4vcph32np68awpncafvf1dwcik9a2asa0lkb7kmfdjsjk";
+
+  cargoPatches = [
+    # update cargo lock
+    (fetchpatch {
+      url = "https://github.com/kahing/catfs/commit/f838c1cf862cec3f1d862492e5be82b6dbe16ac5.patch";
+      sha256 = "1r1p0vbr3j9xyj9r1ahipg4acii3m4ni4m9mp3avbi1rfgzhblhw";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ fuse ];
+
+  # require fuse module to be active to run tests
+  # instead, run command
+  doCheck = false;
+  doInstallCheck = true;
+  installCheckPhase = ''
+    $out/bin/catfs --help > /dev/null
+  '';
+
+  meta = with lib; {
+    description = "Caching filesystem written in Rust";
+    homepage = "https://github.com/kahing/catfs";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ jonringer ];
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/checksec/default.nix b/nixpkgs/pkgs/os-specific/linux/checksec/default.nix
index 5a66e536956f..eb33aedd1d49 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.3";
+  version = "2.4.0";
 
   src = fetchFromGitHub {
     owner = "slimm609";
     repo = "checksec.sh";
     rev = version;
-    sha256 = "0hw8bd7dj71m1ml9zvfab2j87jacs542z7a89nziapckmg6kmh6f";
+    sha256 = "1gbbq85d3g3mnm3xvgvi2085aba7qc3cmsbwn76al50ax1518j2q";
   };
 
   patches = [ ./0001-attempt-to-modprobe-config-before-checking-kernel.patch ];
diff --git a/nixpkgs/pkgs/os-specific/linux/cifs-utils/default.nix b/nixpkgs/pkgs/os-specific/linux/cifs-utils/default.nix
index ad136b811df8..11544d946662 100644
--- a/nixpkgs/pkgs/os-specific/linux/cifs-utils/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/cifs-utils/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, autoreconfHook, docutils, pkgconfig
+{ stdenv, lib, fetchurl, autoreconfHook, docutils, pkgconfig
 , kerberos, keyutils, pam, talloc }:
 
 stdenv.mkDerivation rec {
@@ -14,6 +14,12 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ kerberos keyutils pam talloc ];
 
+  configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    # AC_FUNC_MALLOC is broken on cross builds.
+    "ac_cv_func_malloc_0_nonnull=yes"
+    "ac_cv_func_realloc_0_nonnull=yes"
+  ];
+
   makeFlags = [ "root_sbindir=$(out)/sbin" ];
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/os-specific/linux/conntrack-tools/default.nix b/nixpkgs/pkgs/os-specific/linux/conntrack-tools/default.nix
index 80785015e766..43306e51166b 100644
--- a/nixpkgs/pkgs/os-specific/linux/conntrack-tools/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/conntrack-tools/default.nix
@@ -1,6 +1,8 @@
 { fetchurl, stdenv, flex, bison, pkgconfig, libmnl, libnfnetlink
 , libnetfilter_conntrack, libnetfilter_queue, libnetfilter_cttimeout
-, libnetfilter_cthelper, systemd }:
+, libnetfilter_cthelper, systemd
+, libtirpc
+}:
 
 stdenv.mkDerivation rec {
   pname = "conntrack-tools";
@@ -13,7 +15,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     libmnl libnfnetlink libnetfilter_conntrack libnetfilter_queue
-    libnetfilter_cttimeout libnetfilter_cthelper systemd
+    libnetfilter_cttimeout libnetfilter_cthelper systemd libtirpc
   ];
   nativeBuildInputs = [ flex bison pkgconfig ];
 
diff --git a/nixpkgs/pkgs/os-specific/linux/cpuid/default.nix b/nixpkgs/pkgs/os-specific/linux/cpuid/default.nix
index df0017eadc1f..3f57d0c70380 100644
--- a/nixpkgs/pkgs/os-specific/linux/cpuid/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/cpuid/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   pname = "cpuid";
-  version = "20200427";
+  version = "20201006";
 
   src = fetchurl {
     name = "${pname}-${version}.src.tar.gz";
     url = "http://etallen.com/cpuid/${pname}-${version}.src.tar.gz";
-    sha256 = "1m31238z2ya8f8pzpyklwp0ksf5xicqrw1z941hhhx913wzldaf1";
+    sha256 = "19jnkh57f979b78ak5mpxmdvnkgc33r55cw9shgd2hc380b3zi8k";
   };
 
   # For pod2man during the build process.
diff --git a/nixpkgs/pkgs/os-specific/linux/cpuset/default.nix b/nixpkgs/pkgs/os-specific/linux/cpuset/default.nix
index 0a9b38f2888b..9e775de62f58 100644
--- a/nixpkgs/pkgs/os-specific/linux/cpuset/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/cpuset/default.nix
@@ -1,27 +1,44 @@
 { stdenv
 , fetchFromGitHub
-, python2Packages
+, fetchpatch
+, pythonPackages
 }:
 
-python2Packages.buildPythonApplication rec {
+pythonPackages.buildPythonApplication rec {
   pname = "cpuset";
-  version = "1.5.8";
+  version = "1.6";
 
-  propagatedBuildInputs = [ ];
+  propagatedBuildInputs = with pythonPackages; [
+    configparser
+    future
+  ];
+
+  # https://github.com/lpechacek/cpuset/pull/36
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/MawKKe/cpuset/commit/a4b6b275d0a43d2794ab9e82922d3431aeea9903.patch";
+      sha256 = "1mi1xrql81iczl67s4dk2rm9r1mk36qhsa19wn7zgryf95krsix2";
+    })
+  ];
 
   makeFlags = [ "prefix=$(out)" ];
 
   src = fetchFromGitHub {
-    owner = "wykurz";
+    owner = "lpechacek";
     repo = "cpuset";
     rev = "v${version}";
-    sha256 = "19fl2sn470yrnm2q508giggjwy5b6r2gd94gvwfbdlhf0r9dsbbm";
+    sha256 = "0ig0ml2zd5542d0989872vmy7cs3qg7nxwa93k42bdkm50amhar4";
   };
 
+  checkPhase = ''
+    cd t
+    make
+  '';
+
   meta = with stdenv.lib; {
-    description = "Cpuset is a Python application that forms a wrapper around the standard Linux filesystem calls to make using the cpusets facilities in the Linux kernel easier.";
-    homepage    = "https://github.com/wykurz/cpuset";
+    description = "Python application that forms a wrapper around the standard Linux filesystem calls to make using the cpusets facilities in the Linux kernel easier";
+    homepage    = "https://github.com/lpechacek/cpuset";
     license     = licenses.gpl2;
-    maintainers = with maintainers; [ wykurz ];
+    maintainers = with maintainers; [ thiagokokada wykurz ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/criu/default.nix b/nixpkgs/pkgs/os-specific/linux/criu/default.nix
index 462658396c8a..abc11a4a5f06 100644
--- a/nixpkgs/pkgs/os-specific/linux/criu/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/criu/default.nix
@@ -1,19 +1,20 @@
 { stdenv, lib, fetchurl, protobuf, protobufc, asciidoc, iptables
 , xmlto, docbook_xsl, libpaper, libnl, libcap, libnet, pkgconfig
-, which, python, makeWrapper, docbook_xml_dtd_45 }:
+, which, python3, makeWrapper, docbook_xml_dtd_45 }:
 
 stdenv.mkDerivation rec {
   pname = "criu";
-  version = "3.14";
+  version = "3.15";
 
   src = fetchurl {
     url    = "https://download.openvz.org/criu/${pname}-${version}.tar.bz2";
-    sha256 = "1jrr3v99g18gc0hriz0avq6ccdvyya0j6wwz888sdsc4icc30gzn";
+    sha256 = "09d0j24x0cyc7wkgi7cnxqgfjk7kbdlm79zxpj8d356sa3rw2z24";
   };
 
   enableParallelBuilding = true;
-  nativeBuildInputs = [ pkgconfig docbook_xsl which makeWrapper docbook_xml_dtd_45 ];
-  buildInputs = [ protobuf protobufc asciidoc xmlto libpaper libnl libcap libnet python iptables ];
+  nativeBuildInputs = [ pkgconfig docbook_xsl which makeWrapper docbook_xml_dtd_45 python3 python3.pkgs.wrapPython ];
+  buildInputs = [ protobuf protobufc asciidoc xmlto libpaper libnl libcap libnet iptables ];
+  propagatedBuildInputs = with python3.pkgs; [ python python3.pkgs.protobuf ];
 
   postPatch = ''
     substituteInPlace ./Documentation/Makefile --replace "2>/dev/null" ""
@@ -39,6 +40,7 @@ stdenv.mkDerivation rec {
   postFixup = ''
     wrapProgram $out/bin/criu \
       --prefix PATH : ${lib.makeBinPath [ iptables ]}
+    wrapPythonPrograms
   '';
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix b/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix
index caa22b4df3ec..aa5c124ea600 100644
--- a/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix
@@ -3,13 +3,13 @@
 
 stdenv.mkDerivation rec {
   pname = "cryptsetup";
-  version = "2.3.3";
+  version = "2.3.4";
 
   outputs = [ "out" "dev" "man" ];
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/cryptsetup/v2.3/${pname}-${version}.tar.xz";
-    sha256 = "1pw2bq4nv2z3xyycckxkbp7dp9kkp2n6bspna3plryg277z4zjiv";
+    sha256 = "0wrpz2fzbsszmsgxxbssxjgylpyiindh24z8g13m2fxmjsxyw5lx";
   };
 
   # Disable 4 test cases that fail in a sandbox
diff --git a/nixpkgs/pkgs/os-specific/linux/cshatag/default.nix b/nixpkgs/pkgs/os-specific/linux/cshatag/default.nix
new file mode 100644
index 000000000000..bc1b7f7ecf54
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/cshatag/default.nix
@@ -0,0 +1,32 @@
+{ lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  pname = "cshatag";
+  version = "2019-12-03";
+
+  goPackagePath = "github.com/rfjakob/cshatag";
+  goDeps = ./deps.nix;
+
+  src = fetchFromGitHub {
+    owner = "rfjakob";
+    repo = pname;
+    rev = "b169f0a9dd35a7381774eb176d4badf64d403560";
+    sha256 = "16kam3w75avh8khkk6jfdnxwggz2pw6ccv6v7d064j0fbb9y8x0v";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" "GITVERSION=${version}" ];
+
+  postInstall = ''
+    # Install man page
+    cd go/src/${goPackagePath}
+    make install $makeFlags
+  '';
+
+  meta = with lib; {
+    description = "A tool to detect silent data corruption";
+    homepage = "https://github.com/rfjakob/cshatag";
+    license = licenses.mit;
+    platforms = platforms.linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/cshatag/deps.nix b/nixpkgs/pkgs/os-specific/linux/cshatag/deps.nix
new file mode 100644
index 000000000000..6daad9856782
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/cshatag/deps.nix
@@ -0,0 +1,21 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
+[
+  {
+    goPackagePath = "github.com/pkg/xattr";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pkg/xattr";
+      rev = "d304131d5e58ca76d8b31ceefbb0c85c7b2d2a36";
+      sha256 = "0bxskiai283zfra13z5f7q7f77zz2cgswaj6l6jr2nwnc3l5m80i";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev = "201ba4db2418b54b698efb4d8082dcb504617cdb";
+      sha256 = "1cqaiwp19kl38g4d6brfhi32822rhnh2q8x1j0i6yg7a8dzfvbz6";
+    };
+  }
+]
diff --git a/nixpkgs/pkgs/os-specific/linux/device-tree/raspberrypi.nix b/nixpkgs/pkgs/os-specific/linux/device-tree/raspberrypi.nix
index 5a0d5710392b..93dad5ef3271 100644
--- a/nixpkgs/pkgs/os-specific/linux/device-tree/raspberrypi.nix
+++ b/nixpkgs/pkgs/os-specific/linux/device-tree/raspberrypi.nix
@@ -31,7 +31,7 @@ stdenvNoCC.mkDerivation {
     overlays = "${raspberrypifw}/share/raspberrypi/boot/overlays";
   };
   meta = with stdenvNoCC.lib; {
-    inherit (raspberrypifw.meta) platforms homepage license;
+    inherit (raspberrypifw.meta) homepage license;
     description = "DTBs for the Raspberry Pi";
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/displaylink/99-displaylink.rules b/nixpkgs/pkgs/os-specific/linux/displaylink/99-displaylink.rules
new file mode 100644
index 000000000000..ceeb658a415a
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/displaylink/99-displaylink.rules
@@ -0,0 +1 @@
+ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="17e9", ATTR{bInterfaceClass}=="ff", ATTR{bInterfaceProtocol}=="03", TAG+="systemd", ENV{SYSTEMD_WANTS}="dlm.service"
diff --git a/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix b/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix
index 3db9a7d3005c..5e60d68bc2bb 100644
--- a/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix
@@ -1,15 +1,24 @@
-{ stdenv, lib, unzip, utillinux,
-  libusb1, evdi, systemd, makeWrapper, requireFile, substituteAll }:
-
+{ stdenv
+, lib
+, unzip
+, util-linux
+, libusb1
+, evdi
+, systemd
+, makeWrapper
+, requireFile
+, substituteAll
+}:
 let
   arch =
     if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
     else if stdenv.hostPlatform.system == "i686-linux" then "x86"
     else throw "Unsupported architecture";
   bins = "${arch}-ubuntu-1604";
-  libPath = lib.makeLibraryPath [ stdenv.cc.cc utillinux libusb1 evdi ];
+  libPath = lib.makeLibraryPath [ stdenv.cc.cc util-linux libusb1 evdi ];
 
-in stdenv.mkDerivation rec {
+in
+stdenv.mkDerivation rec {
   pname = "displaylink";
   version = "5.3.1.34";
 
@@ -39,20 +48,11 @@ in stdenv.mkDerivation rec {
     ./displaylink-driver-${version}.run --target . --noexec --nodiskspace
   '';
 
-  patches = [ (substituteAll {
-    src = ./udev-installer.patch;
-    inherit systemd;
-  })];
-
   installPhase = ''
-    sed -i "s,/opt/displaylink/udev.sh,$out/lib/udev/displaylink.sh,g" udev-installer.sh
-    ( source udev-installer.sh
-      mkdir -p $out/lib/udev/rules.d
-      main systemd "$out/lib/udev/rules.d/99-displaylink.rules" "$out/lib/udev/displaylink.sh"
-    )
-
     install -Dt $out/lib/displaylink *.spkg
     install -Dm755 ${bins}/DisplayLinkManager $out/bin/DisplayLinkManager
+    mkdir -p $out/lib/udev/rules.d
+    cp ${./99-displaylink.rules} $out/lib/udev/rules.d/99-displaylink.rules
     patchelf \
       --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
       --set-rpath ${libPath} \
diff --git a/nixpkgs/pkgs/os-specific/linux/displaylink/udev-installer.patch b/nixpkgs/pkgs/os-specific/linux/displaylink/udev-installer.patch
deleted file mode 100644
index 880c073fbcf6..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/displaylink/udev-installer.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/udev-installer.sh	2018-12-09 12:05:53.772318942 +0100
-+++ b/udev-installer.sh	2018-12-09 12:06:19.939947629 +0100
-@@ -21,12 +21,12 @@
-   cat <<'EOF'
- start_service()
- {
--  systemctl start displaylink-driver
-+  /run/current-system/systemd/bin/systemctl start --no-block dlm
- }
- 
- stop_service()
- {
--  systemctl stop displaylink-driver
-+  /run/current-system/systemd/bin/systemctl stop dlm
- }
- 
- EOF
-
diff --git a/nixpkgs/pkgs/os-specific/linux/dpdk/default.nix b/nixpkgs/pkgs/os-specific/linux/dpdk/default.nix
index aacbc3cdfbe2..efe578c596b1 100644
--- a/nixpkgs/pkgs/os-specific/linux/dpdk/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/dpdk/default.nix
@@ -43,7 +43,7 @@ in stdenv.mkDerivation rec {
 
   mesonFlags = [
     "-Denable_docs=true"
-    "-Denable_kmods=${if mod then "true" else "false"}"
+    "-Denable_kmods=${lib.boolToString mod}"
   ]
   ++ lib.optional (!shared) "-Ddefault_library=static"
   ++ lib.optional stdenv.isx86_64 "-Dmachine=nehalem"
diff --git a/nixpkgs/pkgs/os-specific/linux/dstat/default.nix b/nixpkgs/pkgs/os-specific/linux/dstat/default.nix
index 2e235e27f364..6d2d8eb75b00 100644
--- a/nixpkgs/pkgs/os-specific/linux/dstat/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/dstat/default.nix
@@ -12,6 +12,8 @@ python2Packages.buildPythonApplication rec {
 
   propagatedBuildInputs = with python2Packages; [ python-wifi ];
 
+  patches = [ ./fix_pluginpath.patch ];
+
   makeFlags = [ "prefix=$(out)" ];
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/os-specific/linux/dstat/fix_pluginpath.patch b/nixpkgs/pkgs/os-specific/linux/dstat/fix_pluginpath.patch
new file mode 100644
index 000000000000..06d7793da47e
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/dstat/fix_pluginpath.patch
@@ -0,0 +1,15 @@
+diff --git a/dstat b/dstat
+index 3ac7087..c5f089d 100755
+--- a/dstat
++++ b/dstat
+@@ -66,9 +66,7 @@ if sys.version_info < (2, 3):
+ 
+ pluginpath = [
+     os.path.expanduser('~/.dstat/'),                                # home + /.dstat/
+-    os.path.abspath(os.path.dirname(sys.argv[0])) + '/plugins/',    # binary path + /plugins/
+-    '/usr/share/dstat/',
+-    '/usr/local/share/dstat/',
++    os.path.abspath(os.path.dirname(sys.argv[0])) + '/../share/dstat/', # binary path + /../share/dstat/
+ ]
+ 
+ class Options:
diff --git a/nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix b/nixpkgs/pkgs/os-specific/linux/earlyoom/default.nix
index 575da8aca732..1eecacad60c0 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.1";
+  version = "1.6.2";
 
   src = fetchFromGitHub {
     owner = "rfjakob";
     repo = "earlyoom";
     rev = "v${version}";
-    sha256 = "1cn0bgbgiq69i8mk8zxly1f7j01afm82g672qzccz6swsi2637j4";
+    sha256 = "16iyn51xlrsbshc7p5xl2338yyfzknaqc538sa7mamgccqwgyvvq";
   };
 
   nativeBuildInputs = stdenv.lib.optionals withManpage [ pandoc installShellFiles ];
diff --git a/nixpkgs/pkgs/os-specific/linux/ell/0001-unit-test-dbus-pick-up-dbus-daemon-from-PATH.patch b/nixpkgs/pkgs/os-specific/linux/ell/0001-unit-test-dbus-pick-up-dbus-daemon-from-PATH.patch
new file mode 100644
index 000000000000..c2d844edecd1
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/ell/0001-unit-test-dbus-pick-up-dbus-daemon-from-PATH.patch
@@ -0,0 +1,84 @@
+From 55d499f4cd5667c04c21f7201d7f10484e187907 Mon Sep 17 00:00:00 2001
+From: Florian Klink <flokli@flokli.de>
+Date: Sun, 27 Dec 2020 13:03:12 +0100
+Subject: [PATCH] unit/test-dbus: pick up dbus-daemon from $PATH
+
+This allows running the unit tests in environments where `dbus-daemon`
+isn't in /usr/bin, but in $PATH.
+
+Signed-off-by: Florian Klink <flokli@flokli.de>
+---
+ unit/test-dbus-message-fds.c | 4 ++--
+ unit/test-dbus-properties.c  | 4 ++--
+ unit/test-dbus.c             | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/unit/test-dbus-message-fds.c b/unit/test-dbus-message-fds.c
+index 6f68bae..4b5662e 100644
+--- a/unit/test-dbus-message-fds.c
++++ b/unit/test-dbus-message-fds.c
+@@ -51,7 +51,7 @@ static bool start_dbus_daemon(void)
+ 	char *prg_envp[1];
+ 	pid_t pid;
+ 
+-	prg_argv[0] = "/usr/bin/dbus-daemon";
++	prg_argv[0] = "dbus-daemon";
+ 	prg_argv[1] = "--nopidfile";
+ 	prg_argv[2] = "--nofork";
+ 	prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
+@@ -68,7 +68,7 @@ static bool start_dbus_daemon(void)
+ 	}
+ 
+ 	if (pid == 0) {
+-		execve(prg_argv[0], prg_argv, prg_envp);
++		execvpe(prg_argv[0], prg_argv, prg_envp);
+ 		exit(EXIT_SUCCESS);
+ 	}
+ 
+diff --git a/unit/test-dbus-properties.c b/unit/test-dbus-properties.c
+index b435062..049f0f4 100644
+--- a/unit/test-dbus-properties.c
++++ b/unit/test-dbus-properties.c
+@@ -49,7 +49,7 @@ static bool start_dbus_daemon(void)
+ 	char *prg_envp[1];
+ 	pid_t pid;
+ 
+-	prg_argv[0] = "/usr/bin/dbus-daemon";
++	prg_argv[0] = "dbus-daemon";
+ 	prg_argv[1] = "--nopidfile";
+ 	prg_argv[2] = "--nofork";
+ 	prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
+@@ -66,7 +66,7 @@ static bool start_dbus_daemon(void)
+ 	}
+ 
+ 	if (pid == 0) {
+-		execve(prg_argv[0], prg_argv, prg_envp);
++		execvpe(prg_argv[0], prg_argv, prg_envp);
+ 		exit(EXIT_SUCCESS);
+ 	}
+ 
+diff --git a/unit/test-dbus.c b/unit/test-dbus.c
+index 67f0a7b..582847e 100644
+--- a/unit/test-dbus.c
++++ b/unit/test-dbus.c
+@@ -45,7 +45,7 @@ static void start_dbus_daemon(void)
+ 	char *prg_envp[1];
+ 	pid_t pid;
+ 
+-	prg_argv[0] = "/usr/bin/dbus-daemon";
++	prg_argv[0] = "dbus-daemon";
+ 	prg_argv[1] = "--nopidfile";
+ 	prg_argv[2] = "--nofork";
+ 	prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
+@@ -62,7 +62,7 @@ static void start_dbus_daemon(void)
+ 	}
+ 
+ 	if (pid == 0) {
+-		execve(prg_argv[0], prg_argv, prg_envp);
++		execvpe(prg_argv[0], prg_argv, prg_envp);
+ 		exit(EXIT_SUCCESS);
+ 	}
+ 
+-- 
+2.29.2
+
diff --git a/nixpkgs/pkgs/os-specific/linux/ell/default.nix b/nixpkgs/pkgs/os-specific/linux/ell/default.nix
index 9faeb831b4b2..c6aed21cd8e8 100644
--- a/nixpkgs/pkgs/os-specific/linux/ell/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/ell/default.nix
@@ -7,18 +7,19 @@
 
 stdenv.mkDerivation rec {
   pname = "ell";
-  version = "0.33";
+  version = "0.35";
 
   outputs = [ "out" "dev" ];
 
   src = fetchgit {
-     url = "https://git.kernel.org/pub/scm/libs/${pname}/${pname}.git";
-     rev = version;
-     sha256 = "0li788l57m2ic1i33fag4nnblqghbwqjyqkgppi8s2sifcvswfbw";
+    url = "https://git.kernel.org/pub/scm/libs/${pname}/${pname}.git";
+    rev = version;
+    sha256 = "16z7xwlrpx1bsr2y1rgxxxixzwc84cwn2g557iqxhwsxfzy6q3dk";
   };
 
   patches = [
-    ./fix-dbus-tests.patch
+    # Sent upstream in https://lists.01.org/hyperkitty/list/ell@lists.01.org/thread/SQEZAIS2LZXSXGTXOW3GTAM5ZPXRLTN4/
+    ./0001-unit-test-dbus-pick-up-dbus-daemon-from-PATH.patch
   ];
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/os-specific/linux/ell/fix-dbus-tests.patch b/nixpkgs/pkgs/os-specific/linux/ell/fix-dbus-tests.patch
deleted file mode 100644
index b494ba8b43c9..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/ell/fix-dbus-tests.patch
+++ /dev/null
@@ -1,65 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -140,6 +140,7 @@
- ell_libell_private_la_SOURCES = $(ell_libell_la_SOURCES)
- 
- AM_CFLAGS = -fvisibility=hidden -DUNITDIR=\""$(top_srcdir)/unit/"\" \
-+				-DDBUS_DAEMON=\""$(DBUS_DAEMONDIR)/dbus-daemon"\" \
- 				-DCERTDIR=\""$(top_builddir)/unit/"\"
- 
- pkgconfigdir = $(libdir)/pkgconfig
---- a/configure.ac
-+++ b/configure.ac
-@@ -14,6 +14,8 @@
- 
- AC_PREFIX_DEFAULT(/usr/local)
- 
-+PKG_PROG_PKG_CONFIG
-+
- COMPILER_FLAGS
- 
- AC_LANG_C
-@@ -131,6 +133,10 @@
- 	AC_CHECK_PROG(have_xxd, [xxd], [yes], [no])
- fi
- 
-+PKG_CHECK_MODULES(DBUS, dbus-1, dummy=yes,
-+			AC_MSG_ERROR(D-Bus is required for running tests))
-+PKG_CHECK_VAR(DBUS_DAEMONDIR, dbus-1, daemondir)
-+
- AM_CONDITIONAL(DBUS_TESTS, test "${little_endian}" = "yes")
- AM_CONDITIONAL(CERT_TESTS, test "${have_openssl}" = "yes")
- 
---- a/unit/test-dbus-message-fds.c
-+++ b/unit/test-dbus-message-fds.c
-@@ -51,7 +51,7 @@
- 	char *prg_envp[1];
- 	pid_t pid;
- 
--	prg_argv[0] = "/usr/bin/dbus-daemon";
-+	prg_argv[0] = DBUS_DAEMON;
- 	prg_argv[1] = "--nopidfile";
- 	prg_argv[2] = "--nofork";
- 	prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
---- a/unit/test-dbus-properties.c
-+++ b/unit/test-dbus-properties.c
-@@ -48,7 +48,7 @@
- 	char *prg_envp[1];
- 	pid_t pid;
- 
--	prg_argv[0] = "/usr/bin/dbus-daemon";
-+	prg_argv[0] = DBUS_DAEMON;
- 	prg_argv[1] = "--nopidfile";
- 	prg_argv[2] = "--nofork";
- 	prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
---- a/unit/test-dbus.c
-+++ b/unit/test-dbus.c
-@@ -45,7 +45,7 @@
- 	char *prg_envp[1];
- 	pid_t pid;
- 
--	prg_argv[0] = "/usr/bin/dbus-daemon";
-+	prg_argv[0] = DBUS_DAEMON;
- 	prg_argv[1] = "--nopidfile";
- 	prg_argv[2] = "--nofork";
- 	prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
diff --git a/nixpkgs/pkgs/os-specific/linux/ena/default.nix b/nixpkgs/pkgs/os-specific/linux/ena/default.nix
index a3935d0069e3..2f06e99b3e13 100644
--- a/nixpkgs/pkgs/os-specific/linux/ena/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/ena/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, kernel }:
 
 stdenv.mkDerivation rec {
-  version = "2.2.7";
+  version = "2.3.0";
   name = "ena-${version}-${kernel.version}";
 
   src = fetchFromGitHub {
     owner = "amzn";
     repo = "amzn-drivers";
     rev = "ena_linux_${version}";
-    sha256 = "1ap100xh5wrdvy5h2ydcy6rqcklb4fz6xxs33ad3j9yx3h1ixj2d";
+    sha256 = "sha256-ho6yKCgYo3p50leQUCmzNO/3wqzSzs27Eash3AWBaiE=";
   };
 
   hardeningDisable = [ "pic" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/erofs-utils/default.nix b/nixpkgs/pkgs/os-specific/linux/erofs-utils/default.nix
new file mode 100644
index 000000000000..21ad77f234a9
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/erofs-utils/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchgit, autoreconfHook, pkgconfig, fuse, libuuid, lz4 }:
+
+stdenv.mkDerivation rec {
+  pname = "erofs-utils";
+  version = "1.2";
+  outputs = [ "out" "man" ];
+
+  src = fetchgit {
+    url =
+      "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git";
+    rev = "v" + version;
+    sha256 = "07hvijq2hsn3gg1kb8abrfk23n83j57yx8kyv4wqgwhhvd30myjc";
+  };
+
+  buildInputs = [ autoreconfHook pkgconfig fuse libuuid lz4 ];
+
+  configureFlags = [ "--enable-fuse" ];
+
+  meta = with stdenv.lib; {
+    description = "Userspace utilities for linux-erofs file system";
+    license = with licenses; [ gpl2 ];
+    maintainers = with maintainers; [ ehmry ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/eudev/default.nix b/nixpkgs/pkgs/os-specific/linux/eudev/default.nix
index d087a9e2e26d..696dfd275c74 100644
--- a/nixpkgs/pkgs/os-specific/linux/eudev/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/eudev/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, pkgconfig, glib, gperf, utillinux, kmod}:
+{stdenv, fetchurl, pkgconfig, glib, gperf, util-linux, kmod}:
 let
   s = # Generated upstream information
   rec {
@@ -11,7 +11,7 @@ let
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [
-    glib gperf utillinux kmod
+    glib gperf util-linux kmod
   ];
 in
 stdenv.mkDerivation {
diff --git a/nixpkgs/pkgs/os-specific/linux/evdi/default.nix b/nixpkgs/pkgs/os-specific/linux/evdi/default.nix
index 119ba22ca264..986bb402e57f 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-20200416";
+  version = "v1.7.2";
 
   src = fetchFromGitHub {
     owner = "DisplayLink";
     repo = pname;
-    rev = "dc595db636845aef39490496bc075f6bf067106c";
-    sha256 = "1yrny6jj9403z0rxbd3nxf49xc4w0rfpl7xsq03pq32pb3vlbqw7";
+    rev = version;
+    sha256 = "074j0xh037n8mc4isihfz9lap57wvxaxib32pvy6jhjl3wyik632";
   };
 
   nativeBuildInputs = kernel.moduleBuildDependencies;
diff --git a/nixpkgs/pkgs/os-specific/linux/eventstat/default.nix b/nixpkgs/pkgs/os-specific/linux/eventstat/default.nix
index ca4984257212..6eaa58f353a1 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.10";
+  version = "0.04.11";
   src = fetchzip {
     url = "https://kernel.ubuntu.com/~cking/tarballs/eventstat/eventstat-${version}.tar.gz";
-    sha256 = "0rmg49m56qxji7gwci03pkk4f4hnaq1n2x1348dqkaf5zs5nhi6b";
+    sha256 = "0hsi5w8dmqwwdahnqvs83bam3j1cagw1ggm06d35dfwy5xknc5i4";
   };
   buildInputs = [ ncurses ];
   installFlags = [ "DESTDIR=$(out)" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/fatrace/default.nix b/nixpkgs/pkgs/os-specific/linux/fatrace/default.nix
index 69d1afad8a68..62767f682785 100644
--- a/nixpkgs/pkgs/os-specific/linux/fatrace/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/fatrace/default.nix
@@ -1,12 +1,18 @@
-{ stdenv, fetchurl, python3, which }:
+{ stdenv
+, fetchFromGitHub
+, python3
+, which
+}:
 
 stdenv.mkDerivation rec {
   pname = "fatrace";
-  version = "0.13";
+  version = "0.16.1";
 
-  src = fetchurl {
-    url = "https://launchpad.net/fatrace/trunk/${version}/+download/${pname}-${version}.tar.bz2";
-    sha256 = "0hrh45bpzncw0jkxw3x2smh748r65k2yxvfai466043bi5q0d2vx";
+  src = fetchFromGitHub {
+    owner = "martinpitt";
+    repo = pname;
+    rev = version;
+    sha256 = "0lxfqin2bw9235yah8ylb4p8lc3755050sjg30z3gy7bab0lfyg9";
   };
 
   buildInputs = [ python3 which ];
@@ -14,16 +20,13 @@ stdenv.mkDerivation rec {
   postPatch = ''
     substituteInPlace power-usage-report \
       --replace "'which'" "'${which}/bin/which'"
-
-    # Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror.
-    sed 1i'#include <sys/sysmacros.h>' -i fatrace.c
   '';
 
   makeFlags = [ "PREFIX=$(out)" ];
 
   meta = with stdenv.lib; {
     description = "Report system-wide file access events";
-    homepage = "https://launchpad.net/fatrace/";
+    homepage = "https://github.com/martinpitt/fatrace";
     license = licenses.gpl3Plus;
     longDescription = ''
       fatrace reports file access events from all running processes.
diff --git a/nixpkgs/pkgs/os-specific/linux/firejail/default.nix b/nixpkgs/pkgs/os-specific/linux/firejail/default.nix
index 272b8612d7a7..a3be5484a047 100644
--- a/nixpkgs/pkgs/os-specific/linux/firejail/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/firejail/default.nix
@@ -1,12 +1,12 @@
-{stdenv, fetchurl, fetchpatch, which, nixosTests}:
+{stdenv, fetchurl, fetchpatch, which, xdg-dbus-proxy, nixosTests}:
 let
   s = # Generated upstream information
   rec {
     baseName="firejail";
-    version="0.9.62";
+    version="0.9.64";
     name="${baseName}-${version}";
     url="mirror://sourceforge/firejail/firejail/firejail-${version}.tar.xz";
-    sha256="1q2silgy882fl61p5qa9f9jqkxcqnwa71jig3c729iahx4f0hs05";
+    sha256="1zgjwy2k57nx0r63fzr15gijah098ig0bll66jd615vc9q3snfz5";
   };
   buildInputs = [
     which
@@ -21,16 +21,12 @@ stdenv.mkDerivation {
   };
 
   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";
-    })
+    # Adds the /nix directory when using an overlay.
+    # Required to run any programs under this mode.
+    ./mount-nix-dir-on-overlay.patch
+    # By default fbuilder hardcodes the firejail binary to the install path.
+    # On NixOS the firejail binary is a setuid wrapper available in $PATH.
+    ./fbuilder-call-firejail-on-path.patch
   ];
 
   prePatch = ''
@@ -38,6 +34,10 @@ stdenv.mkDerivation {
     substituteInPlace etc/firejail.config --replace \
       '# follow-symlink-as-user yes' \
       'follow-symlink-as-user no'
+
+    # Fix the path to 'xdg-dbus-proxy' hardcoded in the 'common.h' file
+    substituteInPlace src/include/common.h \
+      --replace '/usr/bin/xdg-dbus-proxy' '${xdg-dbus-proxy}/bin/xdg-dbus-proxy'
   '';
 
   preConfigure = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/firejail/fbuilder-call-firejail-on-path.patch b/nixpkgs/pkgs/os-specific/linux/firejail/fbuilder-call-firejail-on-path.patch
new file mode 100644
index 000000000000..6016891655b1
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/firejail/fbuilder-call-firejail-on-path.patch
@@ -0,0 +1,11 @@
+--- a/src/fbuilder/build_profile.c
++++ b/src/fbuilder/build_profile.c
+@@ -67,7 +67,7 @@
+ 		errExit("asprintf");
+ 
+ 	char *cmdlist[] = {
+-	  BINDIR "/firejail",
++	  "firejail",
+ 	  "--quiet",
+ 	  "--noprofile",
+ 	  "--caps.drop=all",
diff --git a/nixpkgs/pkgs/os-specific/linux/firejail/mount-nix-dir-on-overlay.patch b/nixpkgs/pkgs/os-specific/linux/firejail/mount-nix-dir-on-overlay.patch
new file mode 100644
index 000000000000..685314f90758
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/firejail/mount-nix-dir-on-overlay.patch
@@ -0,0 +1,27 @@
+--- a/src/firejail/fs.c
++++ b/src/firejail/fs.c
+@@ -1143,6 +1143,16 @@
+ 		errExit("mounting /dev");
+ 	fs_logger("whitelist /dev");
+ 
++	// mount-bind /nix
++	if (arg_debug)
++		printf("Mounting /nix\n");
++	char *nix;
++	if (asprintf(&nix, "%s/nix", oroot) == -1)
++		errExit("asprintf");
++	if (mount("/nix", nix, NULL, MS_BIND|MS_REC, NULL) < 0)
++		errExit("mounting /nix");
++	fs_logger("whitelist /nix");
++
+ 	// mount-bind run directory
+ 	if (arg_debug)
+ 		printf("Mounting /run\n");
+@@ -1201,6 +1211,7 @@
+ 	free(odiff);
+ 	free(owork);
+ 	free(dev);
++	free(nix);
+ 	free(run);
+ 	free(tmp);
+ }
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
index e480b449007a..caa675951e15 100644
--- a/nixpkgs/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
@@ -1,13 +1,13 @@
-{ stdenv, fetchgit, lib }:
+{ stdenvNoCC, fetchgit, lib }:
 
-stdenv.mkDerivation rec {
+stdenvNoCC.mkDerivation rec {
   pname = "firmware-linux-nonfree";
-  version = "2020-05-19";
+  version = "2020-12-18";
 
   src = fetchgit {
     url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
     rev = lib.replaceStrings ["-"] [""] version;
-    sha256 = "13yrpgfqxp5l457p3s1c61is410nv0kv6picx9r0m8h1b0v6aym3";
+    sha256 = "1rb5b3fzxk5bi6kfqp76q1qszivi0v1kdz1cwj2llp5sd9ns03b5";
   };
 
   installFlags = [ "DESTDIR=$(out)" ];
@@ -17,11 +17,11 @@ stdenv.mkDerivation rec {
 
   outputHashMode = "recursive";
   outputHashAlgo = "sha256";
-  outputHash = "0pjl70nwarnknxah8vikb051c75mkg25a5m4h3344cw86x8hcx10";
+  outputHash = "1p7vn2hfwca6w69jhw5zq70w44ji8mdnibm1z959aalax6ndy146";
 
-  meta = with stdenv.lib; {
+  meta = with stdenvNoCC.lib; {
     description = "Binary firmware collection packaged by kernel.org";
-    homepage = "http://packages.debian.org/sid/firmware-linux-nonfree";
+    homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
     license = licenses.unfreeRedistributableFirmware;
     platforms = platforms.linux;
     maintainers = with maintainers; [ fpletz ];
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch
index a727e5f4a85b..dce4af69aa20 100644
--- a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch
@@ -1,5 +1,5 @@
 diff --git a/data/meson.build b/data/meson.build
-index bb749fd4..b611875b 100644
+index 14454458..12a798c0 100644
 --- a/data/meson.build
 +++ b/data/meson.build
 @@ -17,7 +17,7 @@ endif
@@ -73,10 +73,10 @@ index 826a3c1d..b78db663 100644
 +  install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
  )
 diff --git a/meson.build b/meson.build
-index 87ea67e5..3a4374db 100644
+index a6fb55dd..aedb7530 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -175,6 +175,12 @@ endif
+@@ -183,6 +183,12 @@ endif
  mandir = join_paths(prefix, get_option('mandir'))
  localedir = join_paths(prefix, get_option('localedir'))
  
@@ -90,19 +90,16 @@ index 87ea67e5..3a4374db 100644
  gio = dependency('gio-2.0', version : '>= 2.45.8')
  giounix = dependency('gio-unix-2.0', version : '>= 2.45.8', required: false)
 diff --git a/meson_options.txt b/meson_options.txt
-index 3da9b6c4..6c80275b 100644
+index 0a0e2853..198ae930 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -24,6 +24,7 @@ option('plugin_coreboot', type : 'boolean', value : true, description : 'enable
- option('systemd', type : 'boolean', value : true, description : 'enable systemd support')
- option('systemdunitdir', type: 'string', value: '', description: 'Directory for systemd units')
- option('elogind', type : 'boolean', value : false, description : 'enable elogind support')
+@@ -1,3 +1,4 @@
 +option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation')
- option('tests', type : 'boolean', value : true, description : 'enable tests')
- option('udevdir', type: 'string', value: '', description: 'Directory for udev rules')
- option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules')
+ option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type')
+ option('agent', type : 'boolean', value : true, description : 'enable the fwupd agent')
+ option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support')
 diff --git a/plugins/ata/meson.build b/plugins/ata/meson.build
-index 8444bb8a..fa4a8ad1 100644
+index f32b97fe..679ccc7b 100644
 --- a/plugins/ata/meson.build
 +++ b/plugins/ata/meson.build
 @@ -7,7 +7,7 @@ install_data([
@@ -126,10 +123,10 @@ index ed4eee70..76dbdb1d 100644
 +  install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
  )
 diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build
-index 25fc5c7d..77eb9a83 100644
+index 92762791..08bb37ea 100644
 --- a/plugins/redfish/meson.build
 +++ b/plugins/redfish/meson.build
-@@ -27,7 +27,7 @@ shared_module('fu_plugin_redfish',
+@@ -26,7 +26,7 @@ shared_module('fu_plugin_redfish',
  )
  
  install_data(['redfish.conf'],
@@ -139,10 +136,10 @@ index 25fc5c7d..77eb9a83 100644
  
  if get_option('tests')
 diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build
-index 06ab34ee..297a9182 100644
+index 6b2368fb..2bd06fed 100644
 --- a/plugins/thunderbolt/meson.build
 +++ b/plugins/thunderbolt/meson.build
-@@ -46,7 +46,7 @@ executable('tbtfwucli',
+@@ -31,7 +31,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt',
  )
  
  install_data(['thunderbolt.conf'],
@@ -152,10 +149,10 @@ index 06ab34ee..297a9182 100644
  # we use functions from 2.52 in the tests
  if get_option('tests') and umockdev.found() and gio.version().version_compare('>= 2.52')
 diff --git a/plugins/uefi/meson.build b/plugins/uefi/meson.build
-index 5838cecc..9ba3d5cd 100644
+index 2d1b2d22..c4217a72 100644
 --- a/plugins/uefi/meson.build
 +++ b/plugins/uefi/meson.build
-@@ -101,7 +101,7 @@ if get_option('man')
+@@ -97,7 +97,7 @@ if get_option('man')
  endif
  
  install_data(['uefi.conf'],
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix
index d502d049ace4..eb984d54c783 100644
--- a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix
@@ -2,7 +2,7 @@
 
 { stdenv
 , fetchurl
-, fetchpatch
+, fetchFromGitHub
 , substituteAll
 , gtk-doc
 , pkg-config
@@ -14,8 +14,7 @@
 , gusb
 , sqlite
 , libarchive
-, glib-networking
-, libsoup
+, curl
 , help2man
 , libjcat
 , libxslt
@@ -88,7 +87,7 @@ let
 
   self = stdenv.mkDerivation rec {
     pname = "fwupd";
-    version = "1.4.6";
+    version = "1.5.3";
 
     # libfwupd goes to lib
     # daemon, plug-ins and libfwupdplugin go to out
@@ -97,7 +96,7 @@ let
 
     src = fetchurl {
       url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
-      sha256 = "AKG5stioIveQc7ooYb/2UoOaBzbPUFzYk8tZK0rzvK0=";
+      sha256 = "005y5wicmm6f2v8i9m3axx7ivgj3z8mbqps4v9m71bsqmq298j86";
     };
 
     patches = [
@@ -145,14 +144,13 @@ let
       gusb
       sqlite
       libarchive
-      libsoup
+      curl
       elfutils
       gnu-efi
       libgudev
       colord
       libjcat
       libuuid
-      glib-networking
       json-glib
       umockdev
       bash-completion
@@ -169,6 +167,11 @@ let
     mesonFlags = [
       "-Dgtkdoc=true"
       "-Dplugin_dummy=true"
+      # We are building the official releases.
+      "-Dsupported_build=true"
+      # Would dlopen libsoup to preserve compatibility with clients linking against older fwupd.
+      # https://github.com/fwupd/fwupd/commit/173d389fa59d8db152a5b9da7cc1171586639c97
+      "-Dsoup_session_compat=false"
       "-Dudevdir=lib/udev"
       "-Dsystemd_root_prefix=${placeholder "out"}"
       "-Dinstalled_test_prefix=${placeholder "installedTests"}"
@@ -229,6 +232,19 @@ let
       addToSearchPath XDG_DATA_DIRS "${shared-mime-info}/share"
     '';
 
+    postInstall =
+      let
+        testFw = fetchFromGitHub {
+          owner = "fwupd";
+          repo = "fwupd-test-firmware";
+          rev = "42b62c62dc85ecfb8e38099fe5de0625af87a722";
+          sha256 = "XUpxE003DZSeLJMtyV5UN5CNHH89/nEVKpCbMStm91Q=";
+        };
+      in ''
+        # These files have weird licenses so they are shipped separately.
+        cp --recursive --dereference "${testFw}/installed-tests/tests" "$installedTests/libexec/installed-tests/fwupd"
+      '';
+
     preFixup = let
       binPath = [
         efibootmgr
@@ -254,6 +270,8 @@ let
       done
     '';
 
+    separateDebugInfo = true;
+
     passthru = {
       filesInstalledToEtc = [
         "fwupd/ata.conf"
@@ -277,8 +295,8 @@ let
         "fwupd/remotes.d/dell-esrt.conf"
       ];
 
-      # BlacklistPlugins key in fwupd/daemon.conf
-      defaultBlacklistedPlugins = [
+      # DisabledPlugins key in fwupd/daemon.conf
+      defaultDisabledPlugins = [
         "test"
         "invalid"
       ];
@@ -302,9 +320,9 @@ let
 
           config = configparser.RawConfigParser()
           config.read('${self}/etc/fwupd/daemon.conf')
-          package_blacklisted_plugins = config.get('fwupd', 'BlacklistPlugins').rstrip(';').split(';')
-          passthru_blacklisted_plugins = ${listToPy passthru.defaultBlacklistedPlugins}
-          assert package_blacklisted_plugins == passthru_blacklisted_plugins, f'Default blacklisted plug-ins in the package {package_blacklisted_plugins} do not match those listed in passthru.defaultBlacklistedPlugins {passthru_blacklisted_plugins}'
+          package_disabled_plugins = config.get('fwupd', 'DisabledPlugins').rstrip(';').split(';')
+          passthru_disabled_plugins = ${listToPy passthru.defaultDisabledPlugins}
+          assert package_disabled_plugins == passthru_disabled_plugins, f'Default disabled plug-ins in the package {package_disabled_plugins} do not match those listed in passthru.defaultDisabledPlugins {passthru_disabled_plugins}'
 
           pathlib.Path(os.getenv('out')).touch()
         '';
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch
index 432056cbe7fe..d8f1a533b824 100644
--- a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch
@@ -1,3 +1,5 @@
+diff --git a/data/device-tests/hardware.py b/data/device-tests/hardware.py
+index 7f1e1907..10fee1b8 100755
 --- a/data/device-tests/hardware.py
 +++ b/data/device-tests/hardware.py
 @@ -1,4 +1,4 @@
@@ -6,25 +8,41 @@
  # pylint: disable=wrong-import-position,too-many-locals,unused-argument,wrong-import-order
  #
  # Copyright (C) 2017 Richard Hughes <richard@hughsie.com>
+diff --git a/data/installed-tests/meson.build b/data/installed-tests/meson.build
+index adadbcdd..1b51bb9c 100644
 --- a/data/installed-tests/meson.build
 +++ b/data/installed-tests/meson.build
-@@ -1,4 +1,4 @@
--installed_test_datadir = join_paths(datadir, 'installed-tests', 'fwupd')
-+installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', 'fwupd')
- 
- con2 = configuration_data()
- con2.set('installedtestsdir', installed_test_datadir)
-@@ -52,5 +52,5 @@ configure_file(
+@@ -65,5 +65,5 @@ configure_file(
    output : 'fwupd-tests.conf',
    configuration : con2,
    install: true,
 -  install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
 +  install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'remotes.d'),
  )
+diff --git a/meson.build b/meson.build
+index 772b7bbe..f59302cd 100644
+--- a/meson.build
++++ b/meson.build
+@@ -177,8 +177,8 @@ else
+   datadir = join_paths(prefix, get_option('datadir'))
+   sysconfdir = join_paths(prefix, get_option('sysconfdir'))
+   localstatedir = join_paths(prefix, get_option('localstatedir'))
+-  installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name())
+-  installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name())
++  installed_test_bindir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
++  installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
+ endif
+ mandir = join_paths(prefix, get_option('mandir'))
+ localedir = join_paths(prefix, get_option('localedir'))
+diff --git a/meson_options.txt b/meson_options.txt
+index 0a0e2853..5f68d78b 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -1,3 +1,4 @@
-+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
- option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type')
- option('agent', type : 'boolean', value : true, description : 'enable the fwupd agent')
- option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support')
+@@ -25,6 +26,7 @@ option('plugin_coreboot', type : 'boolean', value : true, description : 'enable
+ option('systemd', type : 'boolean', value : true, description : 'enable systemd support')
+ option('systemd_root_prefix', type: 'string', value: '', description: 'Directory to base systemd’s installation directories on')
+ option('elogind', type : 'boolean', value : false, description : 'enable elogind support')
++option('installed_test_prefix', type: 'string', description: 'Prefix for installed tests')
+ option('tests', type : 'boolean', value : true, description : 'enable tests')
+ option('tpm', type : 'boolean', value : true, description : 'enable TPM support')
+ option('udevdir', type: 'string', value: '', description: 'Directory for udev rules')
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix
index 233386847649..1a432eb768c9 100644
--- a/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix
@@ -2,22 +2,22 @@
 
 stdenv.mkDerivation {
   pname = "raspberrypi-wireless-firmware";
-  version = "2019-08-16";
+  version = "2020-12-01";
 
   srcs = [
     (fetchFromGitHub {
       name = "bluez-firmware";
       owner = "RPi-Distro";
       repo = "bluez-firmware";
-      rev = "96eefffcccc725425fd83be5e0704a5c32b79e54";
-      sha256 = "05h57gcxhb2c84h99cyxxx4mzi6kd5fm8pjqkz3nq5vs3nv8cqhr";
+      rev = "1e4ee0c05bae10002124b56c0e44bb9ac6581ddc";
+      sha256 = "10n6ibr3ra71f4hlvbpy8csjlgrapawxrr6jmijn470vkcqcpq27";
     })
     (fetchFromGitHub {
       name = "firmware-nonfree";
       owner = "RPi-Distro";
       repo = "firmware-nonfree";
-      rev = "130cb86fa30cafbd575d38865fa546350d4c5f9c";
-      sha256 = "0jmhgbpldzz8n8lncpzwfl5ym8zgss05y952rfpwcf9v5c7vgabx";
+      rev = "b66ab26cebff689d0d3257f56912b9bb03c20567";
+      sha256 = "0cffgsp0w7vv7ylpymdddx0bl9dx3pl7snlh30p4rr9srmn8869f";
     })
   ];
 
@@ -41,10 +41,10 @@ stdenv.mkDerivation {
 
   outputHashMode = "recursive";
   outputHashAlgo = "sha256";
-  outputHash = "1r4alf1fbj6vkkf54d0anm47ymb6gn2ykl4a2hhd34b0hnf1dnhn";
+  outputHash = "17k9y499kjc4zv7ivnsfrgfibwj0ldr3sqdgia4dackbr70jfg2h";
 
   meta = with stdenv.lib; {
-    description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3 and Zero W";
+    description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3+ and Zero W";
     homepage = "https://github.com/RPi-Distro/firmware-nonfree";
     license = licenses.unfreeRedistributableFirmware;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix b/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix
new file mode 100644
index 000000000000..2f2d0081fffb
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig }:
+
+let
+  inherit (stdenv.lib) optionals;
+in
+stdenv.mkDerivation {
+  pname = "raspberrypi-armstubs";
+  version = "2020-10-08";
+
+  src = fetchFromGitHub {
+    owner = "raspberrypi";
+    repo = "tools";
+    rev = "fc0e73c13865450e95edd046200e42a6e52d8256";
+    sha256 = "1g6ikpjcrm5x0rk5aiwjdd8grf997qkvgamcrdxy6k9ln746h25s";
+  };
+
+  NIX_CFLAGS_COMPILE = [
+    "-march=armv8-a+crc"
+  ];
+
+  preConfigure = ''
+    cd armstubs
+  '';
+
+  makeFlags = [
+    "CC8=${stdenv.cc.targetPrefix}cc"
+    "LD8=${stdenv.cc.targetPrefix}ld"
+    "OBJCOPY8=${stdenv.cc.targetPrefix}objcopy"
+    "OBJDUMP8=${stdenv.cc.targetPrefix}objdump"
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "LD=${stdenv.cc.targetPrefix}ld"
+    "OBJCOPY=${stdenv.cc.targetPrefix}objcopy"
+    "OBJDUMP=${stdenv.cc.targetPrefix}objdump"
+  ]
+  ++ optionals (stdenv.isAarch64) [ "armstub8.bin" "armstub8-gic.bin" ]
+  ++ optionals (stdenv.isAarch32) [ "armstub7.bin" "armstub8-32.bin" "armstub8-32-gic.bin" ]
+  ;
+
+  installPhase = ''
+    mkdir -vp $out/
+    cp -v *.bin $out/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Firmware related ARM stubs for the Raspberry Pi";
+    homepage = https://github.com/raspberrypi/tools;
+    license = licenses.bsd3;
+    platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
+    maintainers = with maintainers; [ samueldr ];
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/default.nix
index 77a284446366..b5fa3909c3b1 100644
--- a/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/default.nix
@@ -1,14 +1,15 @@
-{ stdenv, fetchFromGitHub }:
+{ stdenvNoCC, fetchFromGitHub }:
 
-stdenv.mkDerivation rec {
+stdenvNoCC.mkDerivation rec {
+  # NOTE: this should be updated with linux_rpi
   pname = "raspberrypi-firmware";
-  version = "1.20200601";
+  version = "1.20201201";
 
   src = fetchFromGitHub {
     owner = "raspberrypi";
     repo = "firmware";
     rev = version;
-    sha256 = "1vm038f9digwg8gdxl2bypzlip3ycjb6bl56274gh5i9abl6wjvf";
+    sha256 = "09yha3k72yqx29rwnv2j2zm73lzc4jgmcbmcc6yrl1i07x84lx3n";
   };
 
   installPhase = ''
@@ -16,11 +17,14 @@ stdenv.mkDerivation rec {
     cp -R boot/* $out/share/raspberrypi/boot
   '';
 
-  meta = with stdenv.lib; {
+  dontConfigure = true;
+  dontBuild = true;
+  dontFixup = true;
+
+  meta = with stdenvNoCC.lib; {
     description = "Firmware for the Raspberry Pi board";
     homepage = "https://github.com/raspberrypi/firmware";
     license = licenses.unfreeRedistributableFirmware; # See https://github.com/raspberrypi/firmware/blob/master/boot/LICENCE.broadcom
-    platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
     maintainers = with maintainers; [ dezgeg tavyc ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/tools.nix b/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/tools.nix
deleted file mode 100644
index 6c4d49e4e240..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/firmware/raspberrypi/tools.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ stdenv, fetchFromGitHub, cmake, pkgconfig }:
-
-stdenv.mkDerivation {
-  pname = "raspberrypi-tools";
-  version = "2020-05-28";
-
-  src = fetchFromGitHub {
-    owner = "raspberrypi";
-    repo = "userland";
-    rev = "f97b1af1b3e653f9da2c1a3643479bfd469e3b74";
-    sha256 = "1r7n05rv96hqjq0rn0qzchmfqs0j7vh3p8jalgh66s6l0vms5mwy";
-  };
-
-  nativeBuildInputs = [ cmake pkgconfig ];
-
-  preConfigure = ''
-    cmakeFlagsArray+=("-DVMCS_INSTALL_PREFIX=$out")
-  '' + stdenv.lib.optionalString stdenv.isAarch64 ''
-    cmakeFlagsArray+=("-DARM64=1")
-  '';
-
-  meta = with stdenv.lib; {
-    description = "Userland tools for the Raspberry Pi board";
-    homepage = "https://github.com/raspberrypi/userland";
-    license = licenses.bsd3;
-    platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
-    maintainers = with maintainers; [ dezgeg tavyc ];
-  };
-}
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/rtl8761b-firmware/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/rtl8761b-firmware/default.nix
new file mode 100644
index 000000000000..4418722c7c45
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/rtl8761b-firmware/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  name = "rtl8761b-firmware";
+
+  src = fetchFromGitHub {
+    owner = "Realtek-OpenSource";
+    repo = "android_hardware_realtek";
+    rev = "rtk1395";
+    sha256 = "sha256-vd9sZP7PGY+cmnqVty3sZibg01w8+UNinv8X85B+dzc=";
+  };
+
+  installPhase = ''
+    install -D -pm644 \
+      bt/rtkbt/Firmware/BT/rtl8761b_fw \
+      $out/lib/firmware/rtl_bt/rtl8761b_fw.bin
+
+    install -D -pm644 \
+      bt/rtkbt/Firmware/BT/rtl8761b_config \
+      $out/lib/firmware/rtl_bt/rtl8761b_config.bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Firmware for Realtek RTL8761b";
+    license = licenses.unfreeRedistributableFirmware;
+    maintainers = with maintainers; [ edibopp ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/sof-firmware/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/sof-firmware/default.nix
index a9fc44e48cc8..684d638ce29f 100644
--- a/nixpkgs/pkgs/os-specific/linux/firmware/sof-firmware/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/sof-firmware/default.nix
@@ -3,24 +3,22 @@
 with stdenv.lib;
 stdenv.mkDerivation rec {
   pname = "sof-firmware";
-  version = "1.5.1";
+  version = "1.6";
 
   src = fetchFromGitHub {
     owner = "thesofproject";
     repo = "sof-bin";
-    rev = "ae61d2778b0a0f47461a52da0d1f191f651e0763";
-    sha256 = "0j6bpwz49skvdvian46valjw4anwlrnkq703n0snkbngmq78prba";
+    rev = "cbdec6963b2c2d58b0080955d3c11b96ff4c92f0";
+    sha256 = "0la2pw1zpv50cywiqcfb00cxqvjc73drxwjchyzi54l508817nxh";
   };
 
   phases = [ "unpackPhase" "installPhase" ];
 
   installPhase = ''
-    mkdir -p $out/lib/firmware/intel
+    mkdir -p $out/lib/firmware
 
-    sed -i 's/ROOT=.*$/ROOT=$out/g' go.sh
-    sed -i 's/VERSION=.*$/VERSION=v${version}/g' go.sh
-
-    ./go.sh
+    patchShebangs go.sh
+    ROOT=$out SOF_VERSION=v${version} ./go.sh
   '';
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/system76-firmware/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
index 40598abac921..3ca8f41be7c6 100644
--- a/nixpkgs/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
@@ -2,13 +2,13 @@
 rustPlatform.buildRustPackage rec {
   pname = "system76-firmware";
   # Check Makefile when updating, make sure postInstall matches make install
-  version = "1.0.17";
+  version = "1.0.20";
 
   src = fetchFromGitHub {
     owner = "pop-os";
     repo = pname;
     rev = version;
-    sha256 = "0cnrskfk3sam90lfpgsraqs4bx9yz8rxhwfs8rxdri04lakxgghg";
+    sha256 = "0yjv3a8r01ks91gc33rdwqmw52cqqwhq9f3rvw2xv3h8cqa5hfz0";
   };
 
   nativeBuildInputs = [ pkgconfig makeWrapper ];
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
 
   cargoBuildFlags = [ "--workspace" ];
 
-  cargoSha256 = "06jrmxy68glcmbn9px29wc0s8pqdn26iy4jn3c246dapv1zvbb4s";
+  cargoSha256 = "1ivn3i6kpnswiipqw5s67p6gsz3y6an0ahf6vwz7dlw2xaha0xbx";
 
   # Purposefully don't install systemd unit file, that's for NixOS
   postInstall = ''
@@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec {
   '';
 
   meta = {
-    description = "Tools for managing firmware updates for system76 devices.";
+    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 ];
diff --git a/nixpkgs/pkgs/os-specific/linux/fnotifystat/default.nix b/nixpkgs/pkgs/os-specific/linux/fnotifystat/default.nix
index f01c96259a80..baa92decd9fc 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.06";
+  version = "0.02.07";
   src = fetchurl {
     url = "https://kernel.ubuntu.com/~cking/tarballs/fnotifystat/fnotifystat-${version}.tar.gz";
-    sha256 = "1mr2qzh8r8qq7haz4qgci2k5lcrcy493fm0m3ri40a81vaajfniy";
+    sha256 = "0ipfg2gymbgx7bqlx1sq5p2y89k5j18iqnb0wa27n5s3kh9sh8w0";
   };
   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 d42091085baf..09c9c660285e 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.15";
+  version = "0.02.16";
   src = fetchurl {
     url = "https://kernel.ubuntu.com/~cking/tarballs/forkstat/forkstat-${version}.tar.xz";
-    sha256 = "11dvg7bbklpfywx6i6vb29vvc28pbfk3mff0g18n5imxvzsd7jxs";
+    sha256 = "1rrzvlws9725dy2jq5k4zfv669ngrb2klhla6wvir8nwh53jms4w";
   };
   installFlags = [ "DESTDIR=$(out)" ];
   postInstall = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/fuse/common.nix b/nixpkgs/pkgs/os-specific/linux/fuse/common.nix
index 2010be53c2d8..b40bd84cbb8d 100644
--- a/nixpkgs/pkgs/os-specific/linux/fuse/common.nix
+++ b/nixpkgs/pkgs/os-specific/linux/fuse/common.nix
@@ -1,7 +1,7 @@
 { version, sha256Hash }:
 
 { stdenv, fetchFromGitHub, fetchpatch
-, fusePackages, utillinux, gettext
+, fusePackages, util-linux, gettext
 , meson, ninja, pkg-config
 , autoreconfHook
 , python3Packages, which
@@ -54,16 +54,12 @@ in stdenv.mkDerivation rec {
     # $PATH, so it should also work on non-NixOS systems.
     export NIX_CFLAGS_COMPILE="-DFUSERMOUNT_DIR=\"/run/wrappers/bin\""
 
-    sed -e 's@/bin/@${utillinux}/bin/@g' -i lib/mount_util.c
+    sed -e 's@/bin/@${util-linux}/bin/@g' -i lib/mount_util.c
     '' + (if isFuse3 then ''
       # The configure phase will delete these files (temporary workaround for
       # ./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 8c342743dfce..0ed6f54a1dcc 100644
--- a/nixpkgs/pkgs/os-specific/linux/fuse/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/fuse/default.nix
@@ -1,8 +1,8 @@
-{ callPackage, utillinux }:
+{ callPackage, util-linux }:
 
 let
   mkFuse = args: callPackage (import ./common.nix args) {
-    inherit utillinux;
+    inherit util-linux;
   };
 in {
   fuse_2 = mkFuse {
@@ -11,7 +11,7 @@ in {
   };
 
   fuse_3 = mkFuse {
-    version = "3.9.4";
-    sha256Hash = "1j11niqw3p94yd6mfdrkdra0nic8a38fc179y5h9yz81q39m2f3b";
+    version = "3.10.1";
+    sha256Hash = "0bb22mac8m0z6qp0s6g4r0x4aj6gc19pfyqr6sdy4hkpwxicgmaf";
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/fwts/default.nix b/nixpkgs/pkgs/os-specific/linux/fwts/default.nix
index 5de0eea0beac..58d4bdbae855 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.08.00";
+  version = "20.09.00";
 
   src = fetchzip {
     url = "http://fwts.ubuntu.com/release/${pname}-V${version}.tar.gz";
-    sha256 = "098vxj5sd2nm88jmj6cxzcvid8w81m8fxdz881iki0pi7ysixa5q";
+    sha256 = "1vzzlb7xdrk8rhi27jdw9baskild4dmk7g5d0hhfh6z3fx4lfhgk";
     stripRoot = false;
   };
 
diff --git a/nixpkgs/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix b/nixpkgs/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix
new file mode 100644
index 000000000000..dd2979b58712
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, fetchFromGitHub
+, kernel
+, kmod
+}:
+
+let
+  kerneldir = "lib/modules/${kernel.modDirVersion}";
+in stdenv.mkDerivation rec {
+  pname = "gcadapter-oc-kmod";
+  version = "1.4";
+
+  src = fetchFromGitHub {
+    owner = "HannesMann";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1nqhj3vqq9rnj37cnm2c4867mnxkr8di3i036shcz44h9qmy9d40";
+  };
+
+  nativeBuildInputs = kernel.moduleBuildDependencies;
+
+  makeFlags = [
+    "KERNEL_SOURCE_DIR=${kernel.dev}/${kerneldir}/build"
+    "INSTALL_MOD_PATH=$(out)"
+  ];
+
+  installPhase = ''
+    install -D {,$out/${kerneldir}/extra/}gcadapter_oc.ko
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter";
+    homepage = "https://github.com/HannesMann/gcadapter-oc-kmod";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ r-burns ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/hdparm/default.nix b/nixpkgs/pkgs/os-specific/linux/hdparm/default.nix
index 99464b67db1e..012cfb7e6032 100644
--- a/nixpkgs/pkgs/os-specific/linux/hdparm/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/hdparm/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "hdparm-9.58";
+  pname = "hdparm";
+  version = "9.60";
 
   src = fetchurl {
-    url = "mirror://sourceforge/hdparm/${name}.tar.gz";
-    sha256 = "03z1qm8zbgpxagk3994lvp24yqsshjibkwg05v9p3q1w7y48xrws";
-
+    url = "mirror://sourceforge/hdparm/hdparm-${version}.tar.gz";
+    sha256 = "1k1mcv7naiacw1y6bdd1adnjfiq1kkx2ivsadjwmlkg4fff775w3";
   };
 
   preBuild = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/i2c-tools/default.nix b/nixpkgs/pkgs/os-specific/linux/i2c-tools/default.nix
index 3a00dbefa635..d1dc94290fab 100644
--- a/nixpkgs/pkgs/os-specific/linux/i2c-tools/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/i2c-tools/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "i2c-tools";
-  version = "4.1";
+  version = "4.2";
 
   src = fetchurl {
     url = "https://www.kernel.org/pub/software/utils/i2c-tools/${pname}-${version}.tar.xz";
-    sha256 = "1m97hpwqfaqjl9xvr4pvz2vdrsdvxbcn0nnx8pamnyc3s7pikcjp";
+    sha256 = "1mmc1n8awl3winyrp1rcxg94vjsx9dc1y7gj7y88blc2f2ydmwip";
   };
 
   buildInputs = [ perl ];
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 bba3549daf67..7b8c2197d706 100644
--- a/nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/intel-compute-runtime/default.nix
@@ -11,13 +11,13 @@
 
 stdenv.mkDerivation rec {
   pname = "intel-compute-runtime";
-  version = "20.33.17675";
+  version = "20.34.17727";
 
   src = fetchFromGitHub {
     owner = "intel";
     repo = "compute-runtime";
     rev = version;
-    sha256 = "1ckzspf05skdrjh947gv96finxbv5dpgc84hppm5pdsp5q70iyxp";
+    sha256 = "19scbbr6jf3yp2v7z8xyzzm01g44jym7xfkf1dz64d5nhvjw6ig5";
   };
 
   nativeBuildInputs = [ cmake pkgconfig ];
@@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     homepage    = "https://github.com/intel/compute-runtime";
-    description = "Intel Graphics Compute Runtime for OpenCL. Replaces Beignet for Gen8 (Broadwell) and beyond.";
+    description = "Intel Graphics Compute Runtime for OpenCL. Replaces Beignet for Gen8 (Broadwell) and beyond";
     license     = licenses.mit;
     platforms   = platforms.linux;
     maintainers = with maintainers; [ gloaming ];
diff --git a/nixpkgs/pkgs/os-specific/linux/iproute/default.nix b/nixpkgs/pkgs/os-specific/linux/iproute/default.nix
index a9fcf455ee43..55fa6b36de27 100644
--- a/nixpkgs/pkgs/os-specific/linux/iproute/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iproute/default.nix
@@ -5,19 +5,16 @@
 
 stdenv.mkDerivation rec {
   pname = "iproute2";
-  version = "5.8.0";
+  version = "5.10.0";
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/net/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "0vk4vickrpahdhl3zazr2qn2bf99v5549ncirjpwiy4h0a4izkfg";
+    sha256 = "1sakmhvh40gh4x55vzgy6cyvizqkhqalcfpvs6r0c14w62p38jm5";
   };
 
   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/ipset/default.nix b/nixpkgs/pkgs/os-specific/linux/ipset/default.nix
index 2c433ba8c29a..647e5e3597df 100644
--- a/nixpkgs/pkgs/os-specific/linux/ipset/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/ipset/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "ipset";
-  version = "7.6";
+  version = "7.9";
 
   src = fetchurl {
     url = "http://ipset.netfilter.org/${pname}-${version}.tar.bz2";
-    sha256 = "1ny2spcm6bmpj8vnazssg99k59impr7n84jzkdmdjly1m7548z8f";
+    sha256 = "02mkp7vmsh609dcp02xi290sxmsgq2fsch3875dxkwfxkrl16p5p";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/nixpkgs/pkgs/os-specific/linux/iptables/default.nix b/nixpkgs/pkgs/os-specific/linux/iptables/default.nix
index c9c342ad7682..97c93db50b8a 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.5";
+  version = "1.8.6";
   pname = "iptables";
 
   src = fetchurl {
     url = "https://www.netfilter.org/projects/${pname}/files/${pname}-${version}.tar.bz2";
-    sha256 = "02a3575ypdpg6a2x752mhk3f7h1381ymkq1n0gss6fp6292xfmyl";
+    sha256 = "0rvp0k8a72h2snrdx48cfn75bfa0ycrd2xl3kjysbymq7q6gxx50";
   };
 
   nativeBuildInputs = [ pkgconfig pruneLibtoolFiles flex bison ];
diff --git a/nixpkgs/pkgs/os-specific/linux/iputils/default.nix b/nixpkgs/pkgs/os-specific/linux/iputils/default.nix
index e12c44888a0b..3bb653ebcf78 100644
--- a/nixpkgs/pkgs/os-specific/linux/iputils/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iputils/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchFromGitHub
+{ stdenv, fetchFromGitHub, fetchpatch
 , meson, ninja, pkgconfig, gettext, libxslt, docbook_xsl_ns
-, libcap, systemd, libidn2
+, libcap, libidn2
 }:
 
 with stdenv.lib;
@@ -22,18 +22,27 @@ in stdenv.mkDerivation rec {
     sha256 = "1jhbcz75a4ij1myyyi110ma1d8d5hpm3scz9pyw7js6qym50xvh4";
   };
 
+  patches = [
+    # Proposed upstream patch to reduce dependency on systemd: https://github.com/iputils/iputils/pull/297
+    (fetchpatch {
+      url = "https://github.com/iputils/iputils/commit/13d6aefd57fd471ecad06e19073dcc44608dff5e.patch";
+      sha256 = "1n62zxmzp7hgz9qapbbpqv3fxqvc3qyd2a73jhp357x6by84kj49";
+    })
+  ];
+
   mesonFlags = [
     "-DBUILD_RARPD=true"
     "-DBUILD_TRACEROUTE6=true"
     "-DBUILD_TFTPD=true"
     "-DNO_SETCAP_OR_SUID=true"
     "-Dsystemdunitdir=etc/systemd/system"
+    "-DINSTALL_SYSTEMD_UNITS=true"
   ]
     # 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 systemd ]
+  buildInputs = [ libcap ]
     ++ optional (!stdenv.hostPlatform.isMusl) libidn2;
 
   meta = {
diff --git a/nixpkgs/pkgs/os-specific/linux/iw/default.nix b/nixpkgs/pkgs/os-specific/linux/iw/default.nix
index cbd19b7da8b4..f0097e37a99d 100644
--- a/nixpkgs/pkgs/os-specific/linux/iw/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iw/default.nix
@@ -1,15 +1,15 @@
-{ stdenv, fetchurl, pkgconfig, libnl }:
+{ stdenv, fetchurl, pkg-config, libnl }:
 
 stdenv.mkDerivation rec {
   pname = "iw";
-  version = "5.8";
+  version = "5.9";
 
   src = fetchurl {
     url = "https://www.kernel.org/pub/software/network/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "1d1dfynrzh52zdia1l23ajv4q5wixgffnc1gkz05qrxnn2n4p75m";
+    sha256 = "1wp1ky1v353qqy5fnrk67apgzsap53jkr7pmghk3czpbk880ffi9";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ libnl ];
 
   makeFlags = [ "PREFIX=${placeholder "out"}" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/iwd/default.nix b/nixpkgs/pkgs/os-specific/linux/iwd/default.nix
index adf37a1b71b6..0cbd7ff3a3ad 100644
--- a/nixpkgs/pkgs/os-specific/linux/iwd/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iwd/default.nix
@@ -13,15 +13,16 @@
 
 stdenv.mkDerivation rec {
   pname = "iwd";
-  version = "1.9";
+  version = "1.10";
 
   src = fetchgit {
     url = "https://git.kernel.org/pub/scm/network/wireless/iwd.git";
     rev = version;
-    sha256 = "193wa13i2prfz1zr7nvwbgrxgacms57zj1n7x28yy5hmm3nnwbrd";
+    sha256 = "0gzpdgfwzlqj2n3amf2zhi2hlpa412878yphgx79y6b5gn1y1lm2";
   };
 
-  outputs = [ "out" "man" ];
+  outputs = [ "out" "man" ]
+    ++ stdenv.lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "test";
 
   nativeBuildInputs = [
     autoreconfHook
@@ -38,7 +39,9 @@ stdenv.mkDerivation rec {
 
   checkInputs = [ openssl ];
 
-  pythonPath = [
+  # wrapPython wraps the scripts in $test. They pull in gobject-introspection,
+  # which doesn't cross-compile.
+  pythonPath = stdenv.lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
     python3Packages.dbus-python
     python3Packages.pygobject3
   ];
@@ -61,10 +64,12 @@ stdenv.mkDerivation rec {
   doCheck = true;
 
   postInstall = ''
-    cp -a test/* $out/bin/
     mkdir -p $out/share
     cp -a doc $out/share/
     cp -a README AUTHORS TODO $out/share/doc/
+  '' + stdenv.lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
+    mkdir -p $test/bin
+    cp -a test/* $test/bin/
   '';
 
   preFixup = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/jfbview/default.nix b/nixpkgs/pkgs/os-specific/linux/jfbview/default.nix
index f8e211fb289f..7984e2678070 100644
--- a/nixpkgs/pkgs/os-specific/linux/jfbview/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/jfbview/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub
-, freetype, harfbuzz, jbig2dec, libjpeg, libX11, mupdf, ncurses, openjpeg
+, freetype, harfbuzz, jbig2dec, libjpeg, libX11, mupdf_1_17, ncurses, openjpeg
 , openssl
 
 , imageSupport ? true, imlib2 ? null }:
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
   hardeningDisable = [ "format" ];
 
   buildInputs = [
-    freetype harfbuzz jbig2dec libjpeg libX11 mupdf ncurses openjpeg
+    freetype harfbuzz jbig2dec libjpeg libX11 mupdf_1_17 ncurses openjpeg
     openssl
   ] ++ stdenv.lib.optionals imageSupport [
     imlib2
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix b/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix
index 59656f54db28..284ef472d049 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix
@@ -69,12 +69,12 @@ let
 in {
   inherit makeLinuxHeaders;
 
-  linuxHeaders = let version = "5.5"; in
+  linuxHeaders = let version = "5.9.8"; in
     makeLinuxHeaders {
       inherit version;
       src = fetchurl {
         url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
-        sha256 = "0c131fi6s7vgvka1c0597vnvcmwn1pp968rci5kq64iwj3pd9yx6";
+        sha256 = "19l67gzk97higd2cbggipcb0wi21pv0ag0mc4qh6cqk564xp6mkn";
       };
       patches = [
          ./no-relocs.patch # for building x86 kernel headers on non-ELF platforms
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix b/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix
index 8bd5d0212044..2f81444f78fe 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix
@@ -132,6 +132,7 @@ let
       IP_MROUTE_MULTIPLE_TABLES   = yes;
       IP_MULTICAST                = yes;
       IP_MULTIPLE_TABLES          = yes;
+      IPV6                        = yes;
       IPV6_ROUTER_PREF            = yes;
       IPV6_ROUTE_INFO             = yes;
       IPV6_OPTIMISTIC_DAD         = yes;
@@ -774,6 +775,8 @@ let
       X86_CHECK_BIOS_CORRUPTION = yes;
       X86_MCE                   = yes;
 
+      RAS = yes; # Needed for EDAC support
+
       # Our initrd init uses shebang scripts, so can't be modular.
       BINFMT_SCRIPT = yes;
       # For systemd-binfmt
@@ -816,6 +819,12 @@ let
 
       # See comments on https://github.com/NixOS/nixpkgs/commit/9b67ea9106102d882f53d62890468071900b9647
       CRYPTO_AEGIS128_SIMD = whenAtLeast "5.4" no;
+
+      # Distros should configure the default as a kernel option.
+      # We previously defined it on the kernel command line as cma=
+      # The kernel command line will override a platform-specific configuration from its device tree.
+      # https://github.com/torvalds/linux/blob/856deb866d16e29bd65952e0289066f6078af773/kernel/dma/contiguous.c#L35-L44
+      CMA_SIZE_MBYTES = freeform "32";
     };
   };
 in
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/export-rt-sched-migrate.patch b/nixpkgs/pkgs/os-specific/linux/kernel/export-rt-sched-migrate.patch
new file mode 100644
index 000000000000..1d8ed6f712cb
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/export-rt-sched-migrate.patch
@@ -0,0 +1,11 @@
+Export linux-rt (PREEMPT_RT) specific symbols needed by ZFS.
+(Regular kernel provides them static inline in linux/preempt.h.)
+
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -1812 +1812 @@ void migrate_disable(void)
+-EXPORT_SYMBOL_GPL(migrate_disable);
++EXPORT_SYMBOL(migrate_disable);
+@@ -1843 +1843 @@ void migrate_enable(void)
+-EXPORT_SYMBOL_GPL(migrate_enable);
++EXPORT_SYMBOL(migrate_enable);
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/generic.nix b/nixpkgs/pkgs/os-specific/linux/kernel/generic.nix
index cab11cc87ae2..dd3050a93eef 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/generic.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/generic.nix
@@ -45,6 +45,11 @@
                        stdenv.hostPlatform != stdenv.buildPlatform
 , extraMeta ? {}
 
+, isXen      ? features.xen_dom0 or false
+, isZen      ? false
+, isLibre    ? false
+, isHardened ? false
+
 # easy overrides to stdenv.hostPlatform.platform members
 , autoModules ? stdenv.hostPlatform.platform.kernelAutoModules
 , preferBuiltin ? stdenv.hostPlatform.platform.kernelPreferBuiltin or false
@@ -175,7 +180,9 @@ let
 
   passthru = {
     features = kernelFeatures;
-    inherit commonStructuredConfig;
+    inherit commonStructuredConfig isXen isZen isHardened isLibre;
+    kernelOlder = lib.versionOlder version;
+    kernelAtLeast = lib.versionAtLeast version;
     passthru = kernel.passthru // (removeAttrs passthru [ "passthru" ]);
   };
 
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json b/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json
index ca353ae9227d..00c0bb0d5d3c 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json
@@ -1,27 +1,27 @@
 {
     "4.14": {
-        "name": "linux-hardened-4.14.197.a.patch",
-        "sha256": "171bgi7pw64v8byqmplafnyx26h1yrxhci9b12ndjyfg91fkhw31",
-        "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.14.197.a/linux-hardened-4.14.197.a.patch"
+        "name": "linux-hardened-4.14.213.a.patch",
+        "sha256": "0lkjgg6cbsaiypxij7p00q3y094qf0h172hc2p7wgy39777b45a7",
+        "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.14.213.a/linux-hardened-4.14.213.a.patch"
     },
     "4.19": {
-        "name": "linux-hardened-4.19.144.a.patch",
-        "sha256": "0vs48h3zcir6s72rnvkjxvjl6cscfaigwji00q940v7lgqyq8lvl",
-        "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.144.a/linux-hardened-4.19.144.a.patch"
+        "name": "linux-hardened-4.19.164.a.patch",
+        "sha256": "0fzv2sjmf0dmhzp58yr4ggzi3pxbjjhbhmav46pv98rbdm2vjwvk",
+        "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.164.a/linux-hardened-4.19.164.a.patch"
     },
-    "5.4": {
-        "name": "linux-hardened-5.4.67.a.patch",
-        "sha256": "0jpjc1magvlhfwrx43n68xcxxk1g5w2g0rvp92n7yli0db97k1bm",
-        "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.67.a/linux-hardened-5.4.67.a.patch"
+    "5.10": {
+        "name": "linux-hardened-5.10.4.a.patch",
+        "sha256": "0apnmcis41vz5k74g1ssq0apwxzhl6zg31nyjbplilm3b068a1h4",
+        "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.4.a/linux-hardened-5.10.4.a.patch"
     },
-    "5.7": {
-        "name": "linux-hardened-5.7.19.a.patch",
-        "sha256": "1lydlh499aj3ck5cnv8q2271y4klvp17zm7j7qni16am14bld936",
-        "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.7.19.a/linux-hardened-5.7.19.a.patch"
+    "5.4": {
+        "name": "linux-hardened-5.4.86.a.patch",
+        "sha256": "0j1wr6d42rbxd66vhsp9l3lp3nv0p1j0cpir9pxshd8w9zlbdy88",
+        "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.86.a/linux-hardened-5.4.86.a.patch"
     },
-    "5.8": {
-        "name": "linux-hardened-5.8.11.a.patch",
-        "sha256": "0cbmlwfzh9ppcvih437sp832rkhr7dfhx97drnkz4gysfyiyh07l",
-        "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.8.11.a/linux-hardened-5.8.11.a.patch"
+    "5.9": {
+        "name": "linux-hardened-5.9.16.a.patch",
+        "sha256": "024wdzc9bwgr4nd4z0l6bazcl35jczhsmdl2lb26bvffjwg207rw",
+        "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.9.16.a/linux-hardened-5.9.16.a.patch"
     }
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.14.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.14.nix
index e0c370c59466..aff68e1efa70 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.14.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.14.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "4.14.199";
+  version = "4.14.213";
 
   # modDirVersion needs to be x.y.z, will automatically add .0 if needed
   modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1yflafb0n783igghk6d392pk6lbk3p2w7y01ams08f1b4qm47wq2";
+    sha256 = "079axkl14jp8lz30h21q4gmhmjw6zf5ycmxji65kgcgyg7dwwyzx";
   };
 } // (args.argsOverride or {}))
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.19.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.19.nix
index aebded8cb739..d37fa3c19144 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.19.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.19.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "4.19.147";
+  version = "4.19.164";
 
   # modDirVersion needs to be x.y.z, will automatically add .0 if needed
   modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "19nnx61v7c0102ik1rjan0kdsj8av8v7iqz5vm3v3kjllmjmvr2x";
+    sha256 = "1amafhydq934a04pizc5w4h4y4ny982zn33yrz7q0h2d6sskmyp5";
   };
 } // (args.argsOverride or {}))
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.4.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.4.nix
index c6f9b6ddb47c..744f35e3ea8b 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.4.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.4.nix
@@ -1,11 +1,11 @@
 { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.4.237";
+  version = "4.4.249";
   extraMeta.branch = "4.4";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1q6hwjwvlsikgr8b04l7v2jia2wyqxgbli6i7y20aq49h13ap2qk";
+    sha256 = "04pb4vgia6zaindf6804gq9jn3mhmy01yijqmpi79sh9rlqzzh1i";
   };
 } // (args.argsOverride or {}))
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.9.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.9.nix
index c6d29d2d8a52..bf044f73246d 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.9.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.9.nix
@@ -1,11 +1,11 @@
 { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.9.237";
+  version = "4.9.249";
   extraMeta.branch = "4.9";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "07w6mwgh7i3bvg1w3w5i9kgxjmvqr7cv7nzrmx7j9p6cq295gv41";
+    sha256 = "0kjcw0vgga9msgqnipgg028v3rcc5am2d094v3hqkkjvzyb8dwxi";
   };
 } // (args.argsOverride or {}))
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.7.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.10.nix
index 4f721d8b0e4d..abe28da81269 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.7.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.10.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "5.7.19";
+  version = "5.10.4";
 
   # modDirVersion needs to be x.y.z, will automatically add .0 if needed
   modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
-    sha256 = "1rwzp51ddlkdzanj6i8jqj5yh0njpzn7ly4r8nnzwkdfp5465721";
+    sha256 = "1v2nbpp21c3fkw23dgrrfznnnlvi0538kj8wrlb2m6g94rn3jklh";
   };
 } // (args.argsOverride or {}))
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.4.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.4.nix
index 046007c58e64..a5db9e7f6d1f 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.4.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.4.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "5.4.67";
+  version = "5.4.86";
 
   # modDirVersion needs to be x.y.z, will automatically add .0 if needed
   modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
-    sha256 = "196avi0950qrd0lxdpdsl6lxa51f20sz476mcl1i5islbnfbsxf1";
+    sha256 = "12qf7gza94s4f7smi3dk6i6hqcz0fbc64ghapan57fgpdvybadpb";
   };
 } // (args.argsOverride or {}))
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.8.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.9.nix
index d9567b20e03e..39cc9c56c5fc 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.8.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.9.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "5.8.11";
+  version = "5.9.16";
 
   # modDirVersion needs to be x.y.z, will automatically add .0 if needed
   modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
-    sha256 = "0jy0yrrixzql9dlk9305w98pja2pm6ijrdbai326595pnk740n9y";
+    sha256 = "11mbnjvb5d5gwbrwlkqvzpg1ij4m19l5wr3wca9iiyg5i2papmxh";
   };
 } // (args.argsOverride or {}))
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix
index ba37c71d1345..a272bd286f32 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args:
+{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, libelf, util-linux, ... } @ args:
 
 buildLinux (args // rec {
   version = "4.14.165-172";
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix
index d3ea80ecb22d..a84828aa0c1a 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 = "17624";
-    sha256 = "0gs3mpiffny408l9kdrxpj48axarfb2fxvcw4w8zsz5wr7yig0n2";
+    rev = "17812";
+    sha256 = "150rh6qakyfzr6afzchf7c05z0dvc39gj0rpfb4ggr7xqpzhxrcc";
   }
 , ...
 }:
@@ -17,6 +17,7 @@ let
 in linux.override {
   argsOverride = {
     modDirVersion = "${linux.modDirVersion}-gnu";
+    isLibre = true;
 
     src = stdenv.mkDerivation {
       name = "${linux.name}-libre-src";
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-lqx.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-lqx.nix
new file mode 100644
index 000000000000..f27043789797
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-lqx.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, buildLinux, linux_zen, ... } @ args:
+
+let
+  version = "5.9.16";
+in
+
+buildLinux (args // {
+  modDirVersion = "${version}-lqx1";
+  inherit version;
+  isZen = true;
+
+  src = fetchFromGitHub {
+    owner = "zen-kernel";
+    repo = "zen-kernel";
+    rev = "v${version}-lqx1";
+    sha256 = "0ljvqf91nxpql98z75bicg5y3nzkm41rq5b0rm1kcnsk0ji829ps";
+  };
+
+  extraMeta = {
+    branch = "5.9/master";
+    maintainers = with stdenv.lib.maintainers; [ atemu ];
+    description = linux_zen.meta.description + " (Same as linux_zen but less aggressive release schedule)";
+  };
+
+} // (args.argsOverride or {}))
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-mptcp-94.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-mptcp-94.nix
deleted file mode 100644
index e53c3ceb5c46..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-mptcp-94.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, structuredExtraConfig ? {}, ... } @ args:
-let
-  mptcpVersion = "0.94.6";
-  modDirVersion = "4.14.127";
-in
-buildLinux ({
-  version = "${modDirVersion}-mptcp_v${mptcpVersion}";
-  inherit modDirVersion;
-
-  extraMeta = {
-    branch = "4.4";
-    maintainers = with stdenv.lib.maintainers; [ teto layus ];
-  };
-
-  src = fetchFromGitHub {
-    owner = "multipath-tcp";
-    repo = "mptcp";
-    rev = "v${mptcpVersion}";
-    sha256 = "071cx9205wpzhi5gc2da79w2abs3czd60jg0xml7j1szc5wl4yfn";
-  };
-
-  structuredExtraConfig = stdenv.lib.mkMerge [
-    (import ./mptcp-config.nix { inherit stdenv; })
-    structuredExtraConfig
-  ];
-} // args)
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-rpi.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rpi.nix
index a3d2bfd4836c..176c2180f359 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-rpi.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rpi.nix
@@ -1,8 +1,9 @@
 { stdenv, lib, buildPackages, fetchFromGitHub, perl, buildLinux, rpiVersion, ... } @ args:
 
 let
-  modDirVersion = "4.19.118";
-  tag = "1.20200601";
+  # NOTE: raspberrypifw & raspberryPiWirelessFirmware should be updated with this
+  modDirVersion = "5.4.79";
+  tag = "1.20201201";
 in
 lib.overrideDerivation (buildLinux (args // {
   version = "${modDirVersion}-${tag}";
@@ -12,7 +13,7 @@ lib.overrideDerivation (buildLinux (args // {
     owner = "raspberrypi";
     repo = "linux";
     rev = "raspberrypi-kernel_${tag}-1";
-    sha256 = "11jzsmnd1qry2ir9vmsv0nfdzjpgkn5yab5ylxcz406plc073anp";
+    sha256 = "093p5kh5f27djkhbcw371w079lhhihvg3s4by3wzsd40di4fcgn9";
   };
 
   defconfig = {
@@ -22,6 +23,11 @@ lib.overrideDerivation (buildLinux (args // {
     "4" = "bcm2711_defconfig";
   }.${toString rpiVersion};
 
+  extraConfig = ''
+    # ../drivers/pci/controller/pcie-altera.c:679:8: error: too few arguments to function 'devm_of_pci_get_host_bridge_resources'
+    PCIE_ALTERA n
+  '';
+
   features = {
     efiBootStub = false;
   } // (args.features or {});
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix
new file mode 100644
index 000000000000..07a74c107711
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix
@@ -0,0 +1,45 @@
+{ lib, buildLinux, fetchurl
+, kernelPatches ? [ ]
+, structuredExtraConfig ? {}
+, extraMeta ? {}
+, argsOverride ? {}
+, ... } @ args:
+
+let
+  version = "5.10.1-rt20"; # updated by ./update-rt.sh
+  branch = lib.versions.majorMinor version;
+  kversion = builtins.elemAt (lib.splitString "-" version) 0;
+in buildLinux (args // {
+  inherit version;
+
+  # modDirVersion needs a patch number, change X.Y-rtZ to X.Y.0-rtZ.
+  modDirVersion = if (builtins.match "[^.]*[.][^.]*-.*" version) == null then version
+    else lib.replaceStrings ["-"] [".0-"] version;
+
+  src = fetchurl {
+    url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz";
+    sha256 = "0p2fl7kl4ckphq17xir7n7vgrzlhbdqmyd2yyp4yilwvih9625pd";
+  };
+
+  kernelPatches = let rt-patch = {
+    name = "rt";
+    patch = fetchurl {
+      url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
+      sha256 = "0z8ljfcn908hzjl11fkmwrx2r7j0hcgpx07g21ag162qrn6g5qby";
+    };
+  }; 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.4.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix
index f58f08ca913d..25e3172b0f3a 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix
@@ -6,7 +6,7 @@
 , ... } @ args:
 
 let
-  version = "5.4.66-rt38"; # updated by ./update-rt.sh
+  version = "5.4.84-rt47"; # updated by ./update-rt.sh
   branch = lib.versions.majorMinor version;
   kversion = builtins.elemAt (lib.splitString "-" version) 0;
 in buildLinux (args // {
@@ -14,14 +14,14 @@ in buildLinux (args // {
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz";
-    sha256 = "1cnsrz21kcf0h7krpv9p1a7n59mybr5ii0jdi3yc3x3lcwvk06gz";
+    sha256 = "058mhczv6whjwxn7jjh1c6n5zrqjdnvbl2mp7jkfrg6frpvgr189";
   };
 
   kernelPatches = let rt-patch = {
     name = "rt";
     patch = fetchurl {
       url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
-      sha256 = "1w0v5wl5fhxl5axd4701dljxhv9rywpgiix3yv7l6i3c5b8iw1zi";
+      sha256 = "0nccxf9l9ycvb782f48zrbl59vi674qq7yjyaks97440pgyd1jg0";
     };
   }; in [ rt-patch ] ++ lib.remove rt-patch kernelPatches;
 
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 81dcb5d4563b..dd9ce3e080a3 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
@@ -1,14 +1,14 @@
 { stdenv, buildPackages, fetchFromGitHub, fetchpatch, perl, buildLinux, ... } @ args:
 
 buildLinux (args // {
-  version = "5.8.0-2020.09.07";
-  modDirVersion = "5.8.0";
+  version = "5.9.0-2020.11.20";
+  modDirVersion = "5.9.0";
 
   src = fetchFromGitHub {
     owner = "koverstreet";
     repo = "bcachefs";
-    rev = "fb2821e72648f35d3cff61ac26041d634fd1dacf";
-    sha256 = "0f9hx6fz27rm8h1lk9868v727klvyzcbw6hcgm5mypbfq1nqirdy";
+    rev = "6a505b63ed3003faf5000f19fd08bbd477d93fbc";
+    sha256 = "1rf34gzv9npafp1c3i6lymk3b0gnqp4rb0wl33pw6yrpgnsry3cc";
   };
 
   extraConfig = "BCACHEFS_FS m";
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix
index 3a96013abdf9..ac84e70bae48 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix
@@ -3,15 +3,15 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "5.9-rc6";
-  extraMeta.branch = "5.9";
+  version = "5.11-rc1";
+  extraMeta.branch = "5.11";
 
   # modDirVersion needs to be x.y.z, will always add .0
   modDirVersion = if (modDirVersionArg == null) then builtins.replaceStrings ["-"] [".0-"] version else modDirVersionArg;
 
   src = fetchurl {
     url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
-    sha256 = "1zg93k1fl73qd46kbvz2y4ahsm208d63dj89jdlnb64gfpppf373";
+    sha256 = "sha256-nPJpz058khWE83QV9ITylTXjimBBw7SQwg7WBjWA7H0=";
   };
 
   # Should the testing kernels ever be built on Hydra?
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix
index ce90893586aa..dc28f37338bd 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix
@@ -1,23 +1,25 @@
 { stdenv, fetchFromGitHub, buildLinux, ... } @ args:
 
 let
-  version = "5.8.10";
+  version = "5.10.1";
 in
 
 buildLinux (args // {
   modDirVersion = "${version}-zen1";
   inherit version;
+  isZen = true;
 
   src = fetchFromGitHub {
     owner = "zen-kernel";
     repo = "zen-kernel";
     rev = "v${version}-zen1";
-    sha256 = "1mm4x2amnpwixvi7q8pj9my75b08ps2mafgz4j2iszpylkdzi53d";
+    sha256 = "1c77x53ixyn64b4qq6br6ckicmjs316c8k08yfxibmhv72av1wcp";
   };
 
   extraMeta = {
-    branch = "5.8/master";
-    maintainers = with stdenv.lib.maintainers; [ atemu ];
+    branch = "5.10/master";
+    maintainers = with stdenv.lib.maintainers; [ atemu andresilva ];
+    description = "Built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads.";
   };
 
 } // (args.argsOverride or {}))
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix b/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix
index 92dc334135ad..9edc0ced4120 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -34,6 +34,13 @@ in {
   randstructSeed ? "",
   # Use defaultMeta // extraMeta
   extraMeta ? {},
+
+  # for module compatibility
+  isXen      ? features.xen_dom0 or false,
+  isZen      ? false,
+  isLibre    ? false,
+  isHardened ? false,
+
   # Whether to utilize the controversial import-from-derivation feature to parse the config
   allowImportFromDerivation ? false,
   # ignored
@@ -86,6 +93,9 @@ let
       passthru = {
         inherit version modDirVersion config kernelPatches configfile
           moduleBuildDependencies stdenv;
+        inherit isXen isZen isHardened isLibre;
+        kernelOlder = stdenv.lib.versionOlder version;
+        kernelAtLeast = stdenv.lib.versionAtLeast version;
       };
 
       inherit src;
@@ -103,6 +113,13 @@ let
             sed -i "$mf" -e 's|/usr/bin/||g ; s|/bin/||g ; s|/sbin/||g'
         done
         sed -i Makefile -e 's|= depmod|= ${buildPackages.kmod}/bin/depmod|'
+
+        # Don't include a (random) NT_GNU_BUILD_ID, to make the build more deterministic.
+        # This way kernels can be bit-by-bit reproducible depending on settings
+        # (e.g. MODULE_SIG and SECURITY_LOCKDOWN_LSM need to be disabled).
+        # See also https://kernelnewbies.org/BuildId
+        sed -i Makefile -e 's|--build-id|--build-id=none|'
+
         sed -i scripts/ld-version.sh -e "s|/usr/bin/awk|${buildPackages.gawk}/bin/awk|"
       '';
 
@@ -233,10 +250,10 @@ let
         rm -fR drivers
 
         # Keep all headers
-        find .  -type f -name '*.h' -print0 | xargs -0 chmod u-w
+        find .  -type f -name '*.h' -print0 | xargs -0 -r chmod u-w
 
         # Keep linker scripts (they are required for out-of-tree modules on aarch64)
-        find .  -type f -name '*.lds' -print0 | xargs -0 chmod u-w
+        find .  -type f -name '*.lds' -print0 | xargs -0 -r chmod u-w
 
         # Keep root and arch-specific Makefiles
         chmod u-w Makefile
@@ -246,7 +263,7 @@ let
         chmod u-w -R scripts
 
         # Delete everything not kept
-        find . -type f -perm -u=w -print0 | xargs -0 rm
+        find . -type f -perm -u=w -print0 | xargs -0 -r rm
 
         # Delete empty directories
         find -empty -type d -delete
@@ -292,7 +309,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches
   nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr ]
       ++ optional  (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools
       ++ optional  (stdenv.lib.versionAtLeast version "4.14" && stdenv.lib.versionOlder version "5.8") libelf
-      # Removed utillinuxMinimal since it should not be a dependency.
+      # Removed util-linuxMinimal since it should not be a dependency.
       ++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]
       ++ optional  (stdenv.lib.versionAtLeast version "5.2")  cpio
       ++ optional  (stdenv.lib.versionAtLeast version "5.8")  elfutils
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/patches.nix b/nixpkgs/pkgs/os-specific/linux/kernel/patches.nix
index 8ce1ac2b587c..23c01d041921 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/patches.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/patches.nix
@@ -76,6 +76,13 @@
     };
   };
 
+  # Adapted for Linux 5.4 from:
+  # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=04896832c94aae4842100cafb8d3a73e1bed3a45
+  rtl8761b_support =
+    { name = "rtl8761b-support";
+      patch = ./rtl8761b-support.patch;
+    };
+
   export_kernel_fpu_functions = {
     "4.14" = {
       name = "export_kernel_fpu_functions";
@@ -87,6 +94,11 @@
     };
   };
 
+  export-rt-sched-migrate = {
+    name = "export-rt-sched-migrate";
+    patch = ./export-rt-sched-migrate.patch;
+  };
+
   # patches from https://lkml.org/lkml/2019/7/15/1748
   mac_nvme_t2 = rec {
     name = "mac_nvme_t2";
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/rtl8761b-support.patch b/nixpkgs/pkgs/os-specific/linux/kernel/rtl8761b-support.patch
new file mode 100644
index 000000000000..b6d80d5bc8d3
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/rtl8761b-support.patch
@@ -0,0 +1,33 @@
+diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
+index 67f4bc21e7c5..3a9afc905f24 100644
+--- a/drivers/bluetooth/btrtl.c
++++ b/drivers/bluetooth/btrtl.c
+@@ -130,12 +130,19 @@  static const struct id_table ic_id_table[] = {
+ 	  .cfg_name = "rtl_bt/rtl8821c_config" },
+
+ 	/* 8761A */
+-	{ IC_MATCH_FL_LMPSUBV, RTL_ROM_LMP_8761A, 0x0,
++	{ IC_INFO(RTL_ROM_LMP_8761A, 0xa),
+ 	  .config_needed = false,
+ 	  .has_rom_version = true,
+ 	  .fw_name  = "rtl_bt/rtl8761a_fw.bin",
+ 	  .cfg_name = "rtl_bt/rtl8761a_config" },
+
++	/* 8761B */
++	{ IC_INFO(RTL_ROM_LMP_8761A, 0xb),
++	  .config_needed = false,
++	  .has_rom_version = true,
++	  .fw_name  = "rtl_bt/rtl8761b_fw.bin",
++	  .cfg_name = "rtl_bt/rtl8761b_config" },
++
+	/* 8822C with USB interface */
+	{ IC_INFO(RTL_ROM_LMP_8822B, 0xc),
+	  .config_needed = false,
+@@ -251,6 +258,7 @@  static int rtlbt_parse_firmware(struct hci_dev *hdev,
+ 		{ RTL_ROM_LMP_8723B, 9 },	/* 8723D */
+ 		{ RTL_ROM_LMP_8821A, 10 },	/* 8821C */
+ 		{ RTL_ROM_LMP_8822B, 13 },	/* 8822C */
++		{ RTL_ROM_LMP_8761A, 14 },	/* 8761B */
+ 	};
+
+ 	min_size = sizeof(struct rtl_epatch_header) + sizeof(extension_sig) + 3;
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/update-rt.sh b/nixpkgs/pkgs/os-specific/linux/kernel/update-rt.sh
index bcfa494d7e7a..4cbd45524a86 100755
--- a/nixpkgs/pkgs/os-specific/linux/kernel/update-rt.sh
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/update-rt.sh
@@ -58,7 +58,7 @@ update-if-needed() {
         msg="$nixattr: $cur -> $new"
     else
         msg="$nixattr: init at $new"
-        prev=$(ls "$(dirname "$0")"/linux-rt-*.nix | tail -1)
+        prev=$(ls -v "$(dirname "$0")"/linux-rt-*.nix | tail -1)
         cp "$prev" "$file"
         cur=$(file-version "$file")
     fi
diff --git a/nixpkgs/pkgs/os-specific/linux/keyutils/default.nix b/nixpkgs/pkgs/os-specific/linux/keyutils/default.nix
index 553b0b87f414..fe9cb46fb8a9 100644
--- a/nixpkgs/pkgs/os-specific/linux/keyutils/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/keyutils/default.nix
@@ -7,11 +7,11 @@
 
 stdenv.mkDerivation rec {
   pname = "keyutils";
-  version = "1.6.1";
+  version = "1.6.3";
 
   src = fetchurl {
     url = "https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/snapshot/${pname}-${version}.tar.gz";
-    sha256 = "0mzmw8c7gqmqaxm3sa0xki8ycjla47xxhqg0yh17pl00d7ydqw9w";
+    sha256 = "sha256-ph1XBhNq5MBb1I+GGGvP29iN2L1RB+Phlckkz8Gzm7Q=";
   };
 
   patches = [
@@ -23,9 +23,13 @@ stdenv.mkDerivation rec {
     ./conf-symlink.patch
   ];
 
+  makeFlags = stdenv.lib.optionals stdenv.hostPlatform.isStatic "NO_SOLIB=1";
+
   BUILDDATE = "1970-01-01";
   outputs = [ "out" "lib" "dev" ];
 
+  enableParallelBuilding = true;
+
   installFlags = [
     "ETCDIR=$(out)/etc"
     "BINDIR=$(out)/bin"
diff --git a/nixpkgs/pkgs/os-specific/linux/kmscon/default.nix b/nixpkgs/pkgs/os-specific/linux/kmscon/default.nix
index 29f99629df87..8b01fe94d4c7 100644
--- a/nixpkgs/pkgs/os-specific/linux/kmscon/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kmscon/default.nix
@@ -54,6 +54,7 @@ stdenv.mkDerivation rec {
     description = "KMS/DRM based System Console";
     homepage = "http://www.freedesktop.org/wiki/Software/kmscon/";
     license = licenses.mit;
+    maintainers = with maintainers; [ omasanori ];
     platforms = platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/ldm/default.nix b/nixpkgs/pkgs/os-specific/linux/ldm/default.nix
index bbc341caf11f..352ce5353377 100644
--- a/nixpkgs/pkgs/os-specific/linux/ldm/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/ldm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, udev, utillinux, mountPath ? "/media/" }:
+{ stdenv, fetchgit, udev, util-linux, mountPath ? "/media/" }:
 
 assert mountPath != "";
 
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
     sha256 = "0lxfypnbamfx6p9ar5k9wra20gvwn665l4pp2j4vsx4yi5q7rw2n";
   };
 
-  buildInputs = [ udev utillinux ];
+  buildInputs = [ udev util-linux ];
 
   postPatch = ''
     substituteInPlace ldm.c \
diff --git a/nixpkgs/pkgs/os-specific/linux/libaio/default.nix b/nixpkgs/pkgs/os-specific/linux/libaio/default.nix
index ac000976a680..b9aa6b5de56c 100644
--- a/nixpkgs/pkgs/os-specific/linux/libaio/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libaio/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, fetchpatch }:
 
 stdenv.mkDerivation rec {
-  version = "0.3.111";
+  version = "0.3.112";
   pname = "libaio";
 
   src = fetchurl {
     url = "https://pagure.io/libaio/archive/${pname}-${version}/${pname}-${pname}-${version}.tar.gz";
-    sha256 = "1fih2y2js0dl9qshpyb14m0nnxlms2527shgcxg0hnbflv5igg76";
+    sha256 = "0wi2myh191sja13qj3claxhpfkngvy10x30f78hm9cxzkfr97kxp";
   };
 
   postPatch = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/libbpf/default.nix b/nixpkgs/pkgs/os-specific/linux/libbpf/default.nix
index 68ccef6529c3..948b8aab9afd 100644
--- a/nixpkgs/pkgs/os-specific/linux/libbpf/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libbpf/default.nix
@@ -7,13 +7,13 @@ with builtins;
 
 stdenv.mkDerivation rec {
   pname = "libbpf";
-  version = "0.1.0";
+  version = "0.1.1";
 
   src = fetchFromGitHub {
     owner  = "libbpf";
     repo   = "libbpf";
     rev    = "v${version}";
-    sha256 = "1wi3a795jq0smqg1c5ml2ghai47n1m5ijmch017wscybx4jdlynv";
+    sha256 = "0ilnnm4q22f8fagwp8kb37licy4ks861i2iqh2djsypqhnxvx3fv";
   };
 
   patches = [
diff --git a/nixpkgs/pkgs/os-specific/linux/libcap-ng/default.nix b/nixpkgs/pkgs/os-specific/linux/libcap-ng/default.nix
index c9b061fe03bf..27f4ddcce18d 100644
--- a/nixpkgs/pkgs/os-specific/linux/libcap-ng/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libcap-ng/default.nix
@@ -6,11 +6,11 @@ stdenv.mkDerivation rec {
   pname = "libcap-ng";
   # When updating make sure to test that the version with
   # all of the python bindings still works
-  version = "0.7.10";
+  version = "0.8";
 
   src = fetchurl {
     url = "${meta.homepage}/${pname}-${version}.tar.gz";
-    sha256 = "1gzzy12agfa9ddipdf72h9y68zqqnvsjjylv4vnq6hj4w2safk58";
+    sha256 = "08cy59iassiwbmfxa5v0kb374r80290vv32f5q1mnip11av26kgi";
   };
 
   nativeBuildInputs = [ swig ];
diff --git a/nixpkgs/pkgs/os-specific/linux/libcap/default.nix b/nixpkgs/pkgs/os-specific/linux/libcap/default.nix
index 174f1be99dba..ab78a3a33d8f 100644
--- a/nixpkgs/pkgs/os-specific/linux/libcap/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libcap/default.nix
@@ -1,26 +1,34 @@
-{ stdenv, buildPackages, fetchurl, attr, perl, pam }:
+{ stdenv, lib, buildPackages, fetchurl, attr, perl
+, usePam ? !isStatic, pam ? null
+, isStatic ? stdenv.hostPlatform.isStatic
+}:
+
+assert usePam -> pam != null;
 
 stdenv.mkDerivation rec {
   pname = "libcap";
-  version = "2.27";
+  version = "2.44";
 
   src = fetchurl {
     url = "mirror://kernel/linux/libs/security/linux-privs/libcap2/${pname}-${version}.tar.xz";
-    sha256 = "0sj8kidl7qgf2qwxcbw1vadnlb30y4zvjzxswsmfdghq04npkhfs";
+    sha256 = "1qf80lifygbnxwvqjf8jz5j24n6fqqx4ixnkbf76xs2vrmcq664j";
   };
 
-  outputs = [ "out" "dev" "lib" "man" "doc" "pam" ];
+  patches = lib.optional isStatic ./no-shared-lib.patch;
+
+  outputs = [ "out" "dev" "lib" "man" "doc" ]
+    ++ lib.optional usePam "pam";
 
   depsBuildBuild = [ buildPackages.stdenv.cc ];
   nativeBuildInputs = [ perl ];
 
-  buildInputs = [ pam ];
+  buildInputs = lib.optional usePam pam;
 
   propagatedBuildInputs = [ attr ];
 
   makeFlags = [
     "lib=lib"
-    "PAM_CAP=yes"
+    "PAM_CAP=${if usePam then "yes" else "no"}"
     "BUILD_CC=$(CC_FOR_BUILD)"
     "CC:=$(CC)"
   ];
@@ -44,16 +52,17 @@ stdenv.mkDerivation rec {
   installFlags = [ "RAISE_SETFCAP=no" ];
 
   postInstall = ''
-    rm "$lib"/lib/*.a
+    ${lib.optionalString (!isStatic) ''rm "$lib"/lib/*.a''}
     mkdir -p "$doc/share/doc/${pname}-${version}"
     cp License "$doc/share/doc/${pname}-${version}/"
-  '' + stdenv.lib.optionalString (pam != null) ''
+  '' + stdenv.lib.optionalString usePam ''
     mkdir -p "$pam/lib/security"
     mv "$lib"/lib/security "$pam/lib"
   '';
 
   meta = {
     description = "Library for working with POSIX capabilities";
+    homepage = "https://sites.google.com/site/fullycapable";
     platforms = stdenv.lib.platforms.linux;
     license = stdenv.lib.licenses.bsd3;
   };
diff --git a/nixpkgs/pkgs/os-specific/linux/libcap/no-shared-lib.patch b/nixpkgs/pkgs/os-specific/linux/libcap/no-shared-lib.patch
new file mode 100644
index 000000000000..73dc7de063d4
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/libcap/no-shared-lib.patch
@@ -0,0 +1,22 @@
+diff --git a/libcap/Makefile b/libcap/Makefile
+index de6a28d..7e4d8ac 100644
+--- a/libcap/Makefile
++++ b/libcap/Makefile
+@@ -22,7 +22,7 @@ MAJLIBNAME=$(LIBNAME).$(VERSION)
+ MINLIBNAME=$(MAJLIBNAME).$(MINOR)
+ GPERF_OUTPUT = _caps_output.gperf
+ 
+-all: $(MINLIBNAME) $(STACAPLIBNAME) pcs $(STAPSXLIBNAME)
++all: $(STACAPLIBNAME) pcs $(STAPSXLIBNAME)
+ 
+ pcs: libcap.pc libpsx.pc
+ 
+@@ -93,7 +93,7 @@ cap_test: cap_test.c libcap.h
+ test: cap_test
+ 	./cap_test
+ 
+-install: install-static install-shared
++install: install-static
+ 
+ install-static: install-static-cap install-static-psx
+ 
diff --git a/nixpkgs/pkgs/os-specific/linux/libevdevc/default.nix b/nixpkgs/pkgs/os-specific/linux/libevdevc/default.nix
index e3dfbd3d6c22..372f110f3471 100644
--- a/nixpkgs/pkgs/os-specific/linux/libevdevc/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libevdevc/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
   makeFlags = [ "DESTDIR=$(out)" "LIBDIR=/lib" ];
 
   meta = with stdenv.lib; {
-    description = "ChromiumOS libevdev. Renamed to avoid conflicts with the standard libevdev found in Linux distros.";
+    description = "ChromiumOS libevdev. Renamed to avoid conflicts with the standard libevdev found in Linux distros";
     license = licenses.bsd3;
     platforms = platforms.linux;
     homepage = "https://chromium.googlesource.com/chromiumos/platform/libevdev/";
diff --git a/nixpkgs/pkgs/os-specific/linux/libfabric/default.nix b/nixpkgs/pkgs/os-specific/linux/libfabric/default.nix
index 52de79e1f2df..1911391c935c 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.11.0";
+  version = "1.11.1";
 
   enableParallelBuilding = true;
 
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     owner = "ofiwg";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1wgn6gsiy64rb76i46dsqlvp687lwqzxwg5lgj1y5y7lyqbq96wp";
+    sha256 = "17qq96mlfhbkbmsvbazhxzkjnh6x37xlh3r0ngp0rfqbl05z2pcr";
   };
 
   nativeBuildInputs = [ pkgconfig autoreconfHook ] ;
diff --git a/nixpkgs/pkgs/os-specific/linux/libgestures/default.nix b/nixpkgs/pkgs/os-specific/linux/libgestures/default.nix
index 4c51525727af..46d25df31b9f 100644
--- a/nixpkgs/pkgs/os-specific/linux/libgestures/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libgestures/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
   makeFlags = [ "DESTDIR=$(out)" "LIBDIR=/lib" ];
 
   meta = with stdenv.lib; {
-    description = "ChromiumOS libgestures modified to compile for Linux.";
+    description = "ChromiumOS libgestures modified to compile for Linux";
     license = licenses.bsd3;
     platforms = platforms.linux;
     homepage = "https://chromium.googlesource.com/chromiumos/platform/gestures";
diff --git a/nixpkgs/pkgs/os-specific/linux/libpsm2/default.nix b/nixpkgs/pkgs/os-specific/linux/libpsm2/default.nix
index b9e41380da8c..501453b88216 100644
--- a/nixpkgs/pkgs/os-specific/linux/libpsm2/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libpsm2/default.nix
@@ -2,8 +2,7 @@
 
 stdenv.mkDerivation rec {
   pname = "libpsm2";
-  version = "11.2.156";
-  ifs_version = "10_10_2_0_44";
+  version = "11.2.185";
 
   preConfigure= ''
     export UDEVDIR=$out/etc/udev
@@ -14,7 +13,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ numactl pkgconfig ];
 
-  installFlags = [ 
+  installFlags = [
     "DESTDIR=$(out)"
     "UDEVDIR=/etc/udev"
     "LIBPSM2_COMPAT_CONF_DIR=/etc"
@@ -23,8 +22,8 @@ stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "intel";
     repo = "opa-psm2";
-    rev = "IFS_RELEASE_${ifs_version}";
-    sha256 = "0ckrfzih1ga9yvximxjdh0z05kn9l858ykqiblv18w6ka3gra1xz";
+    rev = "PSM2_${version}";
+    sha256 = "062hg4r6gz7pla9df70nqs5i2a3mp1wszmp4l0g771fykhhrxsjg";
   };
 
   postInstall = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/libratbag/default.nix b/nixpkgs/pkgs/os-specific/linux/libratbag/default.nix
index 48ee5d16c5c0..e9f090255f92 100644
--- a/nixpkgs/pkgs/os-specific/linux/libratbag/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libratbag/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libratbag";
-  version = "0.14";
+  version = "0.15";
 
   src = fetchFromGitHub {
     owner  = "libratbag";
     repo   = "libratbag";
     rev    = "v${version}";
-    sha256 = "1fpwp2sj8mf98bqasq2h8qwgprxi7k3iw33gcfid3d1lbyiacw0x";
+    sha256 = "0z6ps5aqwjmbdvahs80fh9cdgcvp4q4w3kfycmzv4kzgzihjki7b";
   };
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/os-specific/linux/libselinux/default.nix b/nixpkgs/pkgs/os-specific/linux/libselinux/default.nix
index 741c51e2233b..4dfd6a3f2cd6 100644
--- a/nixpkgs/pkgs/os-specific/linux/libselinux/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libselinux/default.nix
@@ -1,26 +1,26 @@
 { stdenv, fetchurl, pcre, pkgconfig, libsepol
-, enablePython ? true, swig ? null, python ? null
+, enablePython ? true, swig ? null, python3 ? null
 , fts
 }:
 
-assert enablePython -> swig != null && python != null;
+assert enablePython -> swig != null && python3 != null;
 
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
   pname = "libselinux";
-  version = "2.9";
+  version = "3.0";
   inherit (libsepol) se_release se_url;
 
   outputs = [ "bin" "out" "dev" "man" ] ++ optional enablePython "py";
 
   src = fetchurl {
     url = "${se_url}/${se_release}/libselinux-${version}.tar.gz";
-    sha256 = "14r69mgmz7najf9wbizvp68q56mqx4yjbkxjlbcqg5a47s3wik0v";
+    sha256 = "0cr4p0qkr4qd5z1x677vwhz6mlz55kxyijwi2dmrvbhxcw7v78if";
   };
 
-  nativeBuildInputs = [ pkgconfig ] ++ optionals enablePython [ swig python ];
-  buildInputs = [ libsepol pcre fts ] ++ optionals enablePython [ python ];
+  nativeBuildInputs = [ pkgconfig ] ++ optionals enablePython [ swig python3 ];
+  buildInputs = [ libsepol pcre fts ] ++ optionals enablePython [ python3 ];
 
   # drop fortify here since package uses it by default, leading to compile error:
   # command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
@@ -35,14 +35,18 @@ stdenv.mkDerivation rec {
     "MAN3DIR=$(man)/share/man/man3"
     "MAN5DIR=$(man)/share/man/man5"
     "MAN8DIR=$(man)/share/man/man8"
-    "PYTHON=${python.pythonForBuild}/bin/python"
-    "PYTHONLIBDIR=$(py)/${python.sitePackages}"
+    "PYTHON=${python3.pythonForBuild}/bin/python"
+    "PYTHONLIBDIR=$(py)/${python3.sitePackages}"
     "SBINDIR=$(bin)/sbin"
     "SHLIBDIR=$(out)/lib"
 
     "LIBSEPOLA=${stdenv.lib.getLib libsepol}/lib/libsepol.a"
   ];
 
+  preInstall = ''
+    mkdir -p $py/${python3.sitePackages}/selinux
+  '';
+
   installTargets = [ "install" ] ++ optional enablePython "install-pywrap";
 
   meta = removeAttrs libsepol.meta ["outputsToInstall"] // {
diff --git a/nixpkgs/pkgs/os-specific/linux/libsepol/default.nix b/nixpkgs/pkgs/os-specific/linux/libsepol/default.nix
index 497961af11b4..3592ba1637c1 100644
--- a/nixpkgs/pkgs/os-specific/linux/libsepol/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/libsepol/default.nix
@@ -2,15 +2,15 @@
 
 stdenv.mkDerivation rec {
   pname = "libsepol";
-  version = "2.9";
-  se_release = "20190315";
+  version = "3.0";
+  se_release = "20191204";
   se_url = "https://github.com/SELinuxProject/selinux/releases/download";
 
   outputs = [ "bin" "out" "dev" "man" ];
 
   src = fetchurl {
     url = "${se_url}/${se_release}/libsepol-${version}.tar.gz";
-    sha256 = "0p8x7w73jn1nysx1d7416wqrhbi0r6isrjxib7jf68fi72q14jx3";
+    sha256 = "0ygb6dh5lng91xs6xiqf5v0nxa68qmjc787p0s5h9w89364f2yjv";
   };
 
   nativeBuildInputs = [ flex ];
diff --git a/nixpkgs/pkgs/os-specific/linux/light/default.nix b/nixpkgs/pkgs/os-specific/linux/light/default.nix
index 45af4e7ae8e4..b465b2243e1b 100644
--- a/nixpkgs/pkgs/os-specific/linux/light/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/light/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchFromGitHub, autoreconfHook, coreutils }:
 
 stdenv.mkDerivation rec {
-  version = "1.2.1";
+  version = "1.2.2";
   pname = "light";
   src = fetchFromGitHub {
     owner = "haikarainen";
     repo = "light";
     rev = "v${version}";
-    sha256 = "0zrjipd392bzjvxx0rjrb0cgi0ix1d83fwgw1mcy8kc4d16cgyjg";
+    sha256 = "1a70zcf88ifsnwll486aicjnh48zisdf8f7vi34ihw61kdadsq9s";
   };
 
   configureFlags = [ "--with-udev" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix b/nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix
index 79048064eccb..c836cfe5c433 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 = "3.0";
+  version = "3.1";
 
   src = fetchurl {
     url = "mirror://sourceforge/linuxptp/${pname}-${version}.tgz";
-    sha256 = "11aps4bc0maihldlb2d0yh2fnj6x4vwjad337kszyny74akyqk6p";
+    sha256 = "0zff502w3nlycgv2ad8cy8nd0hqf34kzpzcygi7prp0lrw8mp3zm";
   };
 
   postPatch = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/lksctp-tools/default.nix b/nixpkgs/pkgs/os-specific/linux/lksctp-tools/default.nix
index bef74cd33ba4..6ddf4db562b7 100644
--- a/nixpkgs/pkgs/os-specific/linux/lksctp-tools/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/lksctp-tools/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
   };
 
   meta = with stdenv.lib; {
-    description = "Linux Kernel Stream Control Transmission Protocol Tools.";
+    description = "Linux Kernel Stream Control Transmission Protocol Tools";
     homepage = "http://lksctp.sourceforge.net/";
     license = with licenses; [ gpl2 lgpl21 ]; # library is lgpl21
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/os-specific/linux/lm-sensors/default.nix b/nixpkgs/pkgs/os-specific/linux/lm-sensors/default.nix
index 82ac626d7c91..fa71d1fd1551 100644
--- a/nixpkgs/pkgs/os-specific/linux/lm-sensors/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/lm-sensors/default.nix
@@ -18,8 +18,12 @@ stdenv.mkDerivation rec {
   buildInputs = [ perl ]
    ++ stdenv.lib.optional sensord rrdtool;
 
-  makeFlags = [ "PREFIX=${placeholder "out"}" "ETCDIR=${placeholder "out"}/etc" ]
-    ++ stdenv.lib.optional sensord "PROG_EXTRA=sensord";
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "ETCDIR=${placeholder "out"}/etc"
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "AR=${stdenv.cc.targetPrefix}ar"
+  ] ++ stdenv.lib.optional sensord "PROG_EXTRA=sensord";
 
   meta = with stdenv.lib; {
     homepage = "https://hwmon.wiki.kernel.org/lm_sensors";
diff --git a/nixpkgs/pkgs/os-specific/linux/lvm2/default.nix b/nixpkgs/pkgs/os-specific/linux/lvm2/default.nix
index 7bbd1768c043..6f1290cf0705 100644
--- a/nixpkgs/pkgs/os-specific/linux/lvm2/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/lvm2/default.nix
@@ -2,7 +2,7 @@
 , fetchpatch
 , fetchurl
 , pkgconfig
-, utillinux
+, util-linux
 , libuuid
 , thin-provisioning-tools, libaio
 , enableCmdlib ? false
diff --git a/nixpkgs/pkgs/os-specific/linux/lxc/default.nix b/nixpkgs/pkgs/os-specific/linux/lxc/default.nix
index 21c1eede9d7a..ade4299eaa7a 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.4";
+  version = "4.0.5";
 
   src = fetchurl {
     url = "https://linuxcontainers.org/downloads/lxc/lxc-${version}.tar.gz";
-    sha256 = "15frszz5am9bnr8vh1zpg89x0xigcfm19jax0z16cazd42xahr9w";
+    sha256 = "1976l9308rx1ria1gazasypk5rmmf5jiqdh54dfrws5bslbdcb5g";
   };
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/os-specific/linux/lxcfs/default.nix b/nixpkgs/pkgs/os-specific/linux/lxcfs/default.nix
index bcc8614bc6ab..8fdb72e060f7 100644
--- a/nixpkgs/pkgs/os-specific/linux/lxcfs/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/lxcfs/default.nix
@@ -1,17 +1,17 @@
 { config, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, help2man, fuse
-, utillinux, makeWrapper
+, util-linux, makeWrapper
 , enableDebugBuild ? config.lxcfs.enableDebugBuild or false }:
 
 with stdenv.lib;
 stdenv.mkDerivation rec {
   pname = "lxcfs";
-  version = "4.0.5";
+  version = "4.0.6";
 
   src = fetchFromGitHub {
     owner = "lxc";
     repo = "lxcfs";
     rev = "lxcfs-${version}";
-    sha256 = "12mk9hgqzzh1874389lrpvldlp87qxxa1sxzk5zr0d0n1857am5y";
+    sha256 = "1fp2q4y3ql4xd2lp4bpcl8s6xryr5xbb56da9d20w2cdr2d0lwyv";
   };
 
   nativeBuildInputs = [ pkgconfig help2man autoreconfHook ];
@@ -30,9 +30,9 @@ stdenv.mkDerivation rec {
   installFlags = [ "SYSTEMD_UNIT_DIR=\${out}/lib/systemd" ];
 
   postInstall = ''
-    # `mount` hook requires access to the `mount` command from `utillinux`:
+    # `mount` hook requires access to the `mount` command from `util-linux`:
     wrapProgram "$out/share/lxcfs/lxc.mount.hook" \
-      --prefix PATH : "${utillinux}/bin"
+      --prefix PATH : "${util-linux}/bin"
   '';
 
   postFixup = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/mcelog/default.nix b/nixpkgs/pkgs/os-specific/linux/mcelog/default.nix
index 9ead1f6ad4bd..2e97f9da1eae 100644
--- a/nixpkgs/pkgs/os-specific/linux/mcelog/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/mcelog/default.nix
@@ -1,14 +1,14 @@
-{ stdenv, fetchFromGitHub, utillinux }:
+{ stdenv, fetchFromGitHub, util-linux }:
 
 stdenv.mkDerivation rec {
   pname = "mcelog";
-  version = "169";
+  version = "173";
 
   src = fetchFromGitHub {
     owner  = "andikleen";
     repo   = "mcelog";
     rev    = "v${version}";
-    sha256 = "0ghkwfaky026qwj6hmcvz2w2hm8qqj3ysbkxxi603vslmwj56chv";
+    sha256 = "1ili11kqacn6jkjpk11vhycgygdl92mymgb1sx22lcwq2x0d248m";
   };
 
   postPatch = ''
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
     substituteInPlace Makefile --replace '"unknown"' '"${version}"'
 
     for i in triggers/*; do
-      substituteInPlace $i --replace 'logger' '${utillinux}/bin/logger'
+      substituteInPlace $i --replace 'logger' '${util-linux}/bin/logger'
     done
   '';
 
diff --git a/nixpkgs/pkgs/os-specific/linux/mdadm/default.nix b/nixpkgs/pkgs/os-specific/linux/mdadm/default.nix
index 6a71196157b7..2fbe05557a2f 100644
--- a/nixpkgs/pkgs/os-specific/linux/mdadm/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/mdadm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, utillinux, coreutils, fetchurl, groff, system-sendmail }:
+{ stdenv, util-linux, coreutils, fetchurl, groff, system-sendmail }:
 
 stdenv.mkDerivation rec {
   name = "mdadm-4.1";
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
         -e 's@/usr/sbin/sendmail@${system-sendmail}/bin/sendmail@' -i Makefile
     sed -i \
         -e 's@/usr/bin/basename@${coreutils}/bin/basename@g' \
-        -e 's@BINDIR/blkid@${utillinux}/bin/blkid@g' \
+        -e 's@BINDIR/blkid@${util-linux}/bin/blkid@g' \
         *.rules
   '';
 
diff --git a/nixpkgs/pkgs/os-specific/linux/microcode/intel.nix b/nixpkgs/pkgs/os-specific/linux/microcode/intel.nix
index 475288a0b6f6..50055102dbbe 100644
--- a/nixpkgs/pkgs/os-specific/linux/microcode/intel.nix
+++ b/nixpkgs/pkgs/os-specific/linux/microcode/intel.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "microcode-intel";
-  version = "20200616";
+  version = "20201118";
 
   src = fetchFromGitHub {
     owner = "intel";
     repo = "Intel-Linux-Processor-Microcode-Data-Files";
     rev = "microcode-${version}";
-    sha256 = "13jrs8hwh7dhjjb9kncb8lk199afaxglkh1cfisl6zca1h36g563";
+    sha256 = "1xs3f2rbfqnpz9qs7a1kl363qdyb8fybmmyd37v573clqf7l4lgg";
   };
 
   nativeBuildInputs = [ iucode-tool libarchive ];
diff --git a/nixpkgs/pkgs/os-specific/linux/musl/default.nix b/nixpkgs/pkgs/os-specific/linux/musl/default.nix
index 67d08454a844..63d8114ac77a 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.2.0";
+  version = "1.2.1";
 
   src = fetchurl {
     url    = "https://www.musl-libc.org/releases/${pname}-${version}.tar.gz";
-    sha256 = "1s6lix02k1ijm4nmhzpmwzk5w6xfkhn70nvvk8zjs51r24cpppn6";
+    sha256 = "0jz8fzwgvfyjgxjbpw35ixdglp2apqjvp8m386f6yr4zacc6xbv8";
   };
 
   enableParallelBuilding = true;
@@ -62,6 +62,12 @@ stdenv.mkDerivation rec {
       url = "https://raw.githubusercontent.com/openwrt/openwrt/87606e25afac6776d1bbc67ed284434ec5a832b4/toolchain/musl/patches/300-relative.patch";
       sha256 = "0hfadrycb60sm6hb6by4ycgaqc9sgrhh42k39v8xpmcvdzxrsq2n";
     })
+    # wcsnrtombs destination buffer overflow, remove >= 1.2.2
+    (fetchurl {
+      name = "CVE-2020-28928.patch";
+      url = "https://www.openwall.com/lists/oss-security/2020/11/20/4/1";
+      sha256 = "077n2p165504nz9di6n8y5421591r3lsbcxgih8z26l6mvkhcs2h";
+    })
   ];
   CFLAGS = [ "-fstack-protector-strong" ]
     ++ lib.optional stdenv.hostPlatform.isPower "-mlong-double-64";
diff --git a/nixpkgs/pkgs/os-specific/linux/ndiswrapper/default.nix b/nixpkgs/pkgs/os-specific/linux/ndiswrapper/default.nix
index 34c77bc3e6a7..92da7f6fb828 100644
--- a/nixpkgs/pkgs/os-specific/linux/ndiswrapper/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/ndiswrapper/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchFromGitHub, kernel, perl, kmod, libelf }:
+{ stdenv, fetchurl, kernel, perl, kmod, libelf }:
 let
-  version = "1.62-pre";
+  version = "1.63";
 in
 stdenv.mkDerivation {
   name = "ndiswrapper-${version}-${kernel.version}";
@@ -14,7 +14,6 @@ stdenv.mkDerivation {
   kernel = kernel.dev;
 
   buildPhase = "
-    cd ndiswrapper
     echo make KBUILD=$(echo \$kernel/lib/modules/*/build);
     echo -n $kernel/lib/modules/*/build > kbuild_path
     export PATH=${kmod}/sbin:$PATH
@@ -30,12 +29,9 @@ stdenv.mkDerivation {
     patchShebangs $out/sbin
   '';
 
-  # should we use unstable?
-  src = fetchFromGitHub {
-    owner = "pgiri";
-    repo = "ndiswrapper";
-    rev = "5e29f6a9d41df949b435066c173e3b1947f179d3";
-    sha256 = "0sprrmxxkf170bmh1nz9xw00gs89dddr84djlf666bn5bhy6jffi";
+  src = fetchurl {
+    url = "mirror://sourceforge/ndiswrapper/files/stable/ndiswrapper-${version}.tar.gz";
+    sha256 = "1v6b66jhisl110jfl00hm43lmnrav32vs39d85gcbxrjqnmcx08g";
   };
 
   buildInputs = [ perl libelf ];
@@ -45,5 +41,6 @@ stdenv.mkDerivation {
     homepage = "https://sourceforge.net/projects/ndiswrapper";
     license = "GPL";
     platforms = [ "i686-linux" "x86_64-linux" ];
+    broken = stdenv.lib.versionAtLeast kernel.version "5.8";
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/ndiswrapper/no-sbin.patch b/nixpkgs/pkgs/os-specific/linux/ndiswrapper/no-sbin.patch
index 34965540d248..373965fb0853 100644
--- a/nixpkgs/pkgs/os-specific/linux/ndiswrapper/no-sbin.patch
+++ b/nixpkgs/pkgs/os-specific/linux/ndiswrapper/no-sbin.patch
@@ -1,7 +1,5 @@
-diff --git a/ndiswrapper/driver/Makefile b/ndiswrapper/driver/Makefile
-index bf42f7bc..ad23aa2d 100644
---- a/ndiswrapper/driver/Makefile
-+++ b/ndiswrapper/driver/Makefile
+--- a/driver/Makefile
++++ b/driver/Makefile
 @@ -191,7 +191,7 @@ clean:
  	rm -rf .tmp_versions
  
diff --git a/nixpkgs/pkgs/os-specific/linux/nfs-utils/default.nix b/nixpkgs/pkgs/os-specific/linux/nfs-utils/default.nix
index 719ded4d70fa..63a1a0d8f966 100644
--- a/nixpkgs/pkgs/os-specific/linux/nfs-utils/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nfs-utils/default.nix
@@ -1,27 +1,27 @@
-{ stdenv, fetchurl, fetchpatch, lib, pkgconfig, utillinux, libcap, libtirpc, libevent
+{ stdenv, fetchurl, fetchpatch, lib, pkgconfig, util-linux, libcap, libtirpc, libevent
 , sqlite, kerberos, kmod, libuuid, keyutils, lvm2, systemd, coreutils, tcp_wrappers
-, python3, buildPackages, nixosTests
+, python3, buildPackages, nixosTests, rpcsvc-proto
 , enablePython ? true
 }:
 
 let
-  statdPath = lib.makeBinPath [ systemd utillinux coreutils ];
+  statdPath = lib.makeBinPath [ systemd util-linux coreutils ];
 in
 
 stdenv.mkDerivation rec {
   pname = "nfs-utils";
-  version = "2.4.1";
+  version = "2.5.1";
 
   src = fetchurl {
     url = "https://kernel.org/pub/linux/utils/nfs-utils/${version}/${pname}-${version}.tar.xz";
-    sha256 = "0dkp11a7i01c378ri68bf6k56z27kz8zzvpqm7mip6s7jkd4l9w5";
+    sha256 = "1i1h3n2m35q9ixs1i2qf1rpjp10cipa3c25zdf1xj1vaw5q8270g";
   };
 
   # libnfsidmap is built together with nfs-utils from the same source,
   # put it in the "lib" output, and the headers in "dev"
   outputs = [ "out" "dev" "lib" "man" ];
 
-  nativeBuildInputs = [ pkgconfig buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ pkgconfig buildPackages.stdenv.cc rpcsvc-proto ];
 
   buildInputs = [
     libtirpc libcap libevent sqlite lvm2
@@ -45,8 +45,8 @@ stdenv.mkDerivation rec {
       "--with-systemd=${placeholder "out"}/etc/systemd/system"
       "--enable-libmount-mount"
       "--with-pluginpath=${placeholder "lib"}/lib/libnfsidmap" # this installs libnfsidmap
-    ]
-    ++ lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen";
+      "--with-rpcgen=${buildPackages.rpcsvc-proto}/bin/rpcgen"
+    ];
 
   patches = lib.optionals stdenv.hostPlatform.isMusl [
     (fetchpatch {
diff --git a/nixpkgs/pkgs/os-specific/linux/nftables/default.nix b/nixpkgs/pkgs/os-specific/linux/nftables/default.nix
index 9ec42ad66b06..c5879fcc0214 100644
--- a/nixpkgs/pkgs/os-specific/linux/nftables/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nftables/default.nix
@@ -10,17 +10,17 @@
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  version = "0.9.6";
+  version = "0.9.7";
   pname = "nftables";
 
   src = fetchurl {
     url = "https://netfilter.org/projects/nftables/files/${pname}-${version}.tar.bz2";
-    sha256 = "0vmn6xwqa1nq6crfxshh049b199d0aj6hfgin7k068xhibzgvmk8";
+    sha256 = "1c1c2475nifncv0ng8z77h2dpanlsx0bhqm15k00jb3a6a68lszy";
   };
 
   nativeBuildInputs = [
     pkgconfig bison file flex
-    asciidoc docbook_xml_dtd_45 docbook_xsl findXMLCatalogs libxslt 
+    asciidoc docbook_xml_dtd_45 docbook_xsl findXMLCatalogs libxslt
   ];
 
   buildInputs = [
@@ -45,5 +45,6 @@ stdenv.mkDerivation rec {
     homepage = "https://netfilter.org/projects/nftables/";
     license = licenses.gpl2;
     platforms = platforms.linux;
+    maintainers = with maintainers; [ izorkin ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/numactl/default.nix b/nixpkgs/pkgs/os-specific/linux/numactl/default.nix
index 8505fbc750f3..6e16ecabba2d 100644
--- a/nixpkgs/pkgs/os-specific/linux/numactl/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/numactl/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "numactl";
-  version = "2.0.13";
+  version = "2.0.14";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    sha256 = "08xj0n27qh0ly8hjallnx774gicz15nfq0yyxz8zhgy6pq8l33vv";
+    sha256 = "0hahpdp5xqy9cbg251bdxqkml341djn2h856g435h4ngz63sr9fs";
   };
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/builder.sh b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/builder.sh
index dbe18ace40a2..5baa4aa51e59 100755
--- a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/builder.sh
+++ b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/builder.sh
@@ -84,8 +84,14 @@ installPhase() {
             else
                 sed -E "s#(libGLX_nvidia)#$i/lib/\\1#" nvidia_icd.json > nvidia_icd.json.fixed
             fi
-            install -Dm644 nvidia_icd.json.fixed $i/share/vulkan/icd.d/nvidia.json
+
+            if [ "$system" = "i686-linux" ]; then
+                install -Dm644 nvidia_icd.json.fixed $i/share/vulkan/icd.d/nvidia_icd.i686.json
+            else
+                install -Dm644 nvidia_icd.json.fixed $i/share/vulkan/icd.d/nvidia_icd.json
+            fi
         fi
+
         if [ -e nvidia_layers.json ]; then
             sed -E "s#(libGLX_nvidia)#$i/lib/\\1#" nvidia_layers.json > nvidia_layers.json.fixed
             install -Dm644 nvidia_layers.json.fixed $i/share/vulkan/implicit_layer.d/nvidia_layers.json
diff --git a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix
index 7c37fcf231fc..b9af74906b49 100644
--- a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -22,25 +22,30 @@ rec {
   # Policy: use the highest stable version as the default (on our master).
   stable = if stdenv.hostPlatform.system == "x86_64-linux"
     then generic {
-      version = "450.66";
-      sha256_64bit = "1a6va0gvbzpkyza693v2ml1is4xbv8wxasqk0zd5y7rxin94c1ms";
-      settingsSha256 = "0mkgs91gx7xb7f24xkq9fl7i8d4l7s0wr9a44b1gm1vkw82fm7lj";
-      persistencedSha256 = "02id8cg8fba7c1j4m6vj4gp2mv39lz2k557kdjw8lszcpw6f1fhh";
+      version = "455.45.01";
+      sha256_64bit = "6tyMfggvZVQPp/aiSdgwn7VG/mIGb0lUcnAdyMEDoVM=";
+      settingsSha256 = "70ABqnO/heCp/5IztpU0Lo7eZd4n4wUoTlp1xIQ3aCc=";
+      persistencedSha256 = "36sM+djZvm77Gle7dcZ5tppgzQkD4IA0FJgCGsdZRI8=";
     }
     else legacy_390;
 
-  # No active beta right now
-  beta = stable;
+  beta = generic {
+    version = "460.27.04";
+    sha256_64bit = "plTqtc5QZQwM0f3MeMZV0N5XOiuSXCCDklL/qyy8HM8=";
+    settingsSha256 = "hU9J0VSrLXs7N14zq6U5LbBLZXEIyTfih/Bj6eFcMf0=";
+    persistencedSha256 = "PmqhoPskqhJe2FxMrQh9zX1BWQCR2kkfDwvA89+XALA=";
+  };
 
   # 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";
+  # See here for more information: https://developer.nvidia.com/vulkan-driver
+  vulkan_beta = generic rec {
+    version = "455.46.04";
+    persistencedVersion = "455.45.01";
+    settingsVersion = "455.45.01";
+    sha256_64bit = "1iv42w3x1vc00bgn6y4w1hnfsvnh6bvj3vcrq8hw47760sqwa4xa";
+    settingsSha256 = "09v86y2c8xas9ql0bqr7vrjxx3if6javccwjzyly11dzffm02h7g";
+    persistencedSha256 = "13s4b73il0lq2hs81q03176n16mng737bfsp3bxnxgnrv3whrayz";
+    url = "https://developer.nvidia.com/vulkan-beta-${lib.concatStrings (lib.splitString "." version)}-linux";
   };
 
   # Last one supporting x86
diff --git a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/persistenced.nix b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/persistenced.nix
index ff2792ac315d..5979f7e9a224 100644
--- a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/persistenced.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/persistenced.nix
@@ -1,6 +1,10 @@
 nvidia_x11: sha256:
 
-{ stdenv, fetchFromGitHub, m4 }:
+{ stdenv
+, fetchFromGitHub
+, m4
+, libtirpc
+}:
 
 stdenv.mkDerivation rec {
   pname = "nvidia-persistenced";
@@ -14,6 +18,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ m4 ];
+  buildInputs = [ libtirpc ];
 
   installFlags = [ "PREFIX=$(out)" ];
 
@@ -27,6 +32,9 @@ stdenv.mkDerivation rec {
       $out/bin/nvidia-persistenced
   '';
 
+  NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
+  NIX_LDFLAGS = [ "-ltirpc" ];
+
   meta = with stdenv.lib; {
     homepage = "https://www.nvidia.com/object/unix.html";
     description = "Settings application for NVIDIA graphics cards";
diff --git a/nixpkgs/pkgs/os-specific/linux/nvidiabl/default.nix b/nixpkgs/pkgs/os-specific/linux/nvidiabl/default.nix
index 08af09d3d051..f56e74eda042 100644
--- a/nixpkgs/pkgs/os-specific/linux/nvidiabl/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nvidiabl/default.nix
@@ -2,14 +2,14 @@
 
 stdenv.mkDerivation rec {
   name = "nvidiabl-${version}-${kernel.version}";
-  version = "2017-09-26";
+  version = "2020-10-01";
 
   # We use a fork which adds support for newer kernels -- upstream has been abandoned.
   src = fetchFromGitHub {
     owner = "yorickvP";
     repo = "nvidiabl";
-    rev = "2d909f4dfceb24ce98479fd571411c6ec3b71bea";
-    sha256 = "0dsar8fsaxwywjh6rbrxkhdp142vqjnsyxfz6bgpbqml6slpiqs1";
+    rev = "9e21bdcb7efedf29450373a2e9ff2913d1b5e3ab";
+    sha256 = "1z57gbnayjid2jv782rpfpp13qdchmbr1vr35g995jfnj624nlgy";
   };
 
   hardeningDisable = [ "pic" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/nvme-cli/default.nix b/nixpkgs/pkgs/os-specific/linux/nvme-cli/default.nix
index 80a00082b81a..b848a8682749 100644
--- a/nixpkgs/pkgs/os-specific/linux/nvme-cli/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nvme-cli/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "nvme-cli";
-  version = "1.12";
+  version = "1.13";
 
   src = fetchFromGitHub {
     owner = "linux-nvme";
     repo = "nvme-cli";
     rev = "v${version}";
-    sha256 = "0ldky34sn0m5c4hgiip0fkzm465nca69bhxicpd5dg8wxhzxqrp3";
+    sha256 = "1d538kp841bjh8h8d9q7inqz56rdcwb3m78zfx8607ddykv7wcqb";
   };
 
   nativeBuildInputs = [ pkg-config ];
diff --git a/nixpkgs/pkgs/os-specific/linux/open-iscsi/default.nix b/nixpkgs/pkgs/os-specific/linux/open-iscsi/default.nix
index 01bbd9a9cc16..b8aa251489dc 100644
--- a/nixpkgs/pkgs/os-specific/linux/open-iscsi/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/open-iscsi/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, automake, autoconf, libtool, gettext
-, utillinux, openisns, openssl, kmod, perl, systemd, pkgconf
+, util-linux, openisns, openssl, kmod, perl, systemd, pkgconf
 }:
 
 stdenv.mkDerivation rec {
@@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
   version = "2.1.2";
 
   nativeBuildInputs = [ autoconf automake gettext libtool perl pkgconf ];
-  buildInputs = [ kmod openisns.lib openssl systemd utillinux ];
+  buildInputs = [ kmod openisns.lib openssl systemd util-linux ];
 
   src = fetchFromGitHub {
     owner = "open-iscsi";
@@ -25,8 +25,16 @@ stdenv.mkDerivation rec {
     sed -i 's|/usr|/|' Makefile
   '';
 
+  installFlags = [
+    "install"
+    "install_systemd"
+  ];
+
   postInstall = ''
     cp usr/iscsistart $out/sbin/
+    for f in $out/lib/systemd/system/*; do
+      substituteInPlace $f --replace /sbin $out/bin
+    done
     $out/sbin/iscsistart -v
   '';
 
diff --git a/nixpkgs/pkgs/os-specific/linux/openrazer/driver.nix b/nixpkgs/pkgs/os-specific/linux/openrazer/driver.nix
index a6bf67db0980..ef96c7697e77 100644
--- a/nixpkgs/pkgs/os-specific/linux/openrazer/driver.nix
+++ b/nixpkgs/pkgs/os-specific/linux/openrazer/driver.nix
@@ -2,7 +2,7 @@
 , fetchFromGitHub
 , kernel
 , stdenv
-, utillinux
+, util-linux
 }:
 
 let
@@ -28,7 +28,7 @@ stdenv.mkDerivation (common // {
     substituteInPlace $RAZER_RULES_OUT \
       --replace razer_mount $RAZER_MOUNT_OUT
     substituteInPlace $RAZER_MOUNT_OUT \
-      --replace /usr/bin/logger ${utillinux}/bin/logger \
+      --replace /usr/bin/logger ${util-linux}/bin/logger \
       --replace chgrp ${coreutils}/bin/chgrp \
       --replace "PATH='/sbin:/bin:/usr/sbin:/usr/bin'" ""
   '';
diff --git a/nixpkgs/pkgs/os-specific/linux/openvswitch/default.nix b/nixpkgs/pkgs/os-specific/linux/openvswitch/default.nix
index 33b252a02254..84f8abf73b0f 100644
--- a/nixpkgs/pkgs/os-specific/linux/openvswitch/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/openvswitch/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeWrapper, pkgconfig, utillinux, which
+{ stdenv, fetchurl, makeWrapper, pkgconfig, util-linux, which
 , procps, libcap_ng, openssl, python3 , perl
 , kernel ? null }:
 
@@ -19,7 +19,7 @@ in stdenv.mkDerivation rec {
   kernel = optional (_kernel != null) _kernel.dev;
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ makeWrapper utillinux openssl libcap_ng pythonEnv
+  buildInputs = [ makeWrapper util-linux openssl libcap_ng pythonEnv
                   perl procps which ];
 
   configureFlags = [
diff --git a/nixpkgs/pkgs/os-specific/linux/openvswitch/lts.nix b/nixpkgs/pkgs/os-specific/linux/openvswitch/lts.nix
index 358a8b39917b..54ecefc54b2f 100644
--- a/nixpkgs/pkgs/os-specific/linux/openvswitch/lts.nix
+++ b/nixpkgs/pkgs/os-specific/linux/openvswitch/lts.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeWrapper, pkgconfig, utillinux, which
+{ stdenv, fetchurl, makeWrapper, pkgconfig, util-linux, which
 , procps, libcap_ng, openssl, python2, iproute , perl
 , automake, autoconf, libtool, kernel ? null }:
 
@@ -20,7 +20,7 @@ in stdenv.mkDerivation rec {
   kernel = optional (_kernel != null) _kernel.dev;
 
   nativeBuildInputs = [ autoconf libtool automake pkgconfig  ];
-  buildInputs = [ makeWrapper utillinux openssl libcap_ng python2
+  buildInputs = [ makeWrapper util-linux openssl libcap_ng python2
                   perl procps which ];
 
   preConfigure = "./boot.sh";
diff --git a/nixpkgs/pkgs/os-specific/linux/pam/default.nix b/nixpkgs/pkgs/os-specific/linux/pam/default.nix
index fb969d7574a0..3faf74af6408 100644
--- a/nixpkgs/pkgs/os-specific/linux/pam/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/pam/default.nix
@@ -1,12 +1,14 @@
-{ stdenv, buildPackages, fetchurl, fetchpatch, flex, cracklib, db4 }:
+{ stdenv, buildPackages, fetchurl, fetchpatch, flex, cracklib, db4
+, nixosTests
+}:
 
 stdenv.mkDerivation rec {
   pname = "linux-pam";
-  version = "1.3.1";
+  version = "1.5.1";
 
   src = fetchurl {
-    url    = "https://github.com/linux-pam/linux-pam/releases/download/v1.3.1/Linux-PAM-${version}.tar.xz";
-    sha256 = "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g";
+    url    = "https://github.com/linux-pam/linux-pam/releases/download/v${version}/Linux-PAM-${version}.tar.xz";
+    sha256 = "sha256-IB1AcwsRNbGzzeoJ8sKKxjTXMYHM0Bcs7d7jZJxXkvw=";
   };
 
   patches = stdenv.lib.optionals (stdenv.hostPlatform.libc == "musl") [
@@ -63,6 +65,10 @@ stdenv.mkDerivation rec {
 
   doCheck = false; # fails
 
+  passthru.tests = {
+    inherit (nixosTests) pam-oath-login pam-u2f shadow;
+  };
+
   meta = with stdenv.lib; {
     homepage = "http://www.linux-pam.org/";
     description = "Pluggable Authentication Modules, a flexible mechanism for authenticating user";
diff --git a/nixpkgs/pkgs/os-specific/linux/pam_gnupg/default.nix b/nixpkgs/pkgs/os-specific/linux/pam_gnupg/default.nix
index 84135f2492aa..50373fe746d6 100644
--- a/nixpkgs/pkgs/os-specific/linux/pam_gnupg/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/pam_gnupg/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "pam_gnupg";
-  version = "0.1";
+  version = "0.2";
 
   src = fetchFromGitHub {
     owner = "cruegge";
     repo = "pam-gnupg";
     rev = "v${version}";
-    sha256 = "0b70mazyvcbg6xyqllm62rwhbz0y94pcy202db1qyy4w8466bhsw";
+    sha256 = "1d8046clv7r3bl77dbpza4f1zlkjffvdczbb5bci3prz7dyfrwsz";
   };
 
   configureFlags = [
diff --git a/nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix b/nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix
index 18bc84effa06..ebfd896555ae 100644
--- a/nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix
@@ -1,37 +1,48 @@
-{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool, pam, libHX, libxml2, pcre, perl, openssl, cryptsetup, utillinux }:
+{ stdenv, fetchurl, autoreconfHook, pkgconfig, libtool, pam, libHX, libxml2, pcre, perl, openssl, cryptsetup, util-linux }:
 
 stdenv.mkDerivation rec {
-  name = "pam_mount-2.16";
+  pname = "pam_mount";
+  version = "2.16";
 
   src = fetchurl {
-    url = "mirror://sourceforge/pam-mount/pam_mount/2.16/${name}.tar.xz";
+    url = "mirror://sourceforge/pam-mount/pam_mount/${version}/${pname}-${version}.tar.xz";
     sha256 = "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ autoconf automake libtool pam libHX utillinux libxml2 pcre perl openssl cryptsetup ];
+  patches = [
+    ./insert_utillinux_path_hooks.patch
+    ./support_luks2.patch
+  ];
 
-  patches = [ ./insert_utillinux_path_hooks.patch ];
+  postPatch = ''
+    substituteInPlace src/mtcrypt.c \
+      --replace @@NIX_UTILLINUX@@ ${util-linux}/bin
+  '';
 
-  preConfigure = ''
-    substituteInPlace src/mtcrypt.c --replace @@NIX_UTILLINUX@@ ${utillinux}/bin
-    sh autogen.sh --prefix=$out
-    '';
+  nativeBuildInputs = [ autoreconfHook libtool pkgconfig ];
 
-  makeFlags = [ "DESTDIR=$(out)" ];
+  buildInputs = [ pam libHX util-linux libxml2 pcre perl openssl cryptsetup ];
+
+  enableParallelBuilding = true;
+
+  configureFlags = [
+    "--prefix=${placeholder "out"}"
+    "--localstatedir=${placeholder "out"}/var"
+    "--sbindir=${placeholder "out"}/bin"
+    "--sysconfdir=${placeholder "out"}/etc"
+    "--with-slibdir=${placeholder "out"}/lib"
+    "--with-ssbindir=${placeholder "out"}/bin"
+  ];
 
-  # Probably a hack, but using DESTDIR and PREFIX makes everything work!
   postInstall = ''
-    mkdir -p $out
-    cp -r $out/$out/* $out
-    rm -r $out/nix
-    '';
+    rm -r $out/var
+  '';
 
   meta = with stdenv.lib; {
-    homepage = "http://pam-mount.sourceforge.net/";
     description = "PAM module to mount volumes for a user session";
-    maintainers = [ maintainers.tstrobel ];
+    homepage = "https://pam-mount.sourceforge.net/";
     license = with licenses; [ gpl2 gpl3 lgpl21 lgpl3 ];
+    maintainers = with maintainers; [ tstrobel ];
     platforms = platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/pam_mount/support_luks2.patch b/nixpkgs/pkgs/os-specific/linux/pam_mount/support_luks2.patch
new file mode 100644
index 000000000000..0b8557f1bae0
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/pam_mount/support_luks2.patch
@@ -0,0 +1,47 @@
+commit d4434c05e7c0cf05d87089404cfa2deedc60811a
+Author: Ingo Franzki <ifranzki@linux.ibm.com>
+Date:   Mon Oct 29 16:47:40 2018 +0100
+
+    crypto: Add support for LUKS2
+    
+    Cryptsetup version 2.0 added support for LUKS2.
+    This patch adds support for mounting LUKS2 volumes with
+    pam_mount.
+    
+    Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
+
+diff --git a/src/crypto-dmc.c b/src/crypto-dmc.c
+index d0ab6ca..abd0358 100644
+--- a/src/crypto-dmc.c
++++ b/src/crypto-dmc.c
+@@ -21,6 +21,12 @@
+ #include "libcryptmount.h"
+ #include "pam_mount.h"
+ 
++#ifndef CRYPT_LUKS
++	#define CRYPT_LUKS	NULL /* Passing NULL to crypt_load will
++					default to LUKS(1) on older
++					libcryptsetup versions. */
++#endif
++
+ /**
+  * dmc_is_luks - check if @path points to a LUKS volume (cf. normal dm-crypt)
+  * @path:	path to the crypto container
+@@ -48,7 +54,7 @@ EXPORT_SYMBOL int ehd_is_luks(const char *path, bool blkdev)
+ 
+ 	ret = crypt_init(&cd, device);
+ 	if (ret == 0) {
+-		ret = crypt_load(cd, CRYPT_LUKS1, NULL);
++		ret = crypt_load(cd, CRYPT_LUKS, NULL);
+ 		if (ret == -EINVAL)
+ 			ret = false;
+ 		else if (ret == 0)
+@@ -106,7 +112,7 @@ static bool dmc_run(const struct ehd_mount_request *req,
+ #endif
+ 	}
+ 
+-	ret = crypt_load(cd, CRYPT_LUKS1, NULL);
++	ret = crypt_load(cd, CRYPT_LUKS, NULL);
+ 	if (ret == 0) {
+ 		ret = crypt_activate_by_passphrase(cd, mt->crypto_name,
+ 		      CRYPT_ANY_SLOT, req->key_data, req->key_size, flags);
diff --git a/nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/default.nix b/nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/default.nix
index 3ab1ae28a7b5..167363e60a85 100644
--- a/nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/default.nix
@@ -1,46 +1,53 @@
-{ stdenv, fetchpatch, fetchurl, pam, openssl, perl }:
+{ stdenv, fetchpatch, fetchFromGitHub, pam, openssl, perl }:
 
 stdenv.mkDerivation rec {
-  name = "pam_ssh_agent_auth-0.10.3";
+  pname = "pam_ssh_agent_auth";
+  version = "0.10.4";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/pamsshagentauth/${name}.tar.bz2";
-    sha256 = "0qx78x7nvqdscyp04hfijl4rgyf64xy03prr28hipvgasrcd6lrw";
+  src = fetchFromGitHub {
+    owner = "jbeverly";
+    repo = "pam_ssh_agent_auth";
+    rev = "pam_ssh_agent_auth-${version}";
+    sha256 = "YD1R8Cox0UoNiuWleKGzWSzxJ5lhDRCB2mZPp9OM6Cs=";
   };
 
-  patches =
-    [ # Allow multiple colon-separated authorized keys files to be
-      # specified in the file= option.
-      ./multiple-key-files.patch
-      (fetchpatch {
-        name = "openssl-1.1.1-1.patch";
-        url = "https://sources.debian.org/data/main/p/pam-ssh-agent-auth/0.10.3-3/debian/patches/openssl-1.1.1-1.patch";
-        sha256 = "1ndp5j4xfhzshhnl345gb4mkldx6vjfa7284xgng6ikhzpc6y7pf";
-      })
-      (fetchpatch {
-        name = "openssl-1.1.1-2.patch";
-        url = "https://sources.debian.org/data/main/p/pam-ssh-agent-auth/0.10.3-3/debian/patches/openssl-1.1.1-2.patch";
-        sha256 = "0ksrs4xr417by8klf7862n3dircvnw30an1akq4pnsd3ichscmww";
-      })
-    ];
+  ed25519-donna = fetchFromGitHub {
+    owner = "floodyberry";
+    repo = "ed25519-donna";
+    rev = "8757bd4cd209cb032853ece0ce413f122eef212c";
+    sha256 = "ETFpIaWQnlYG8ZuDG2dNjUJddlvibB4ukHquTFn3NZM=";
+  };
 
   buildInputs = [ pam openssl perl ];
 
-  # It's not clear to me why this is necessary, but without it, you see:
-  #
-  # checking OpenSSL header version... 1010104f (OpenSSL 1.1.1d  10 Sep 2019)
-  # checking OpenSSL library version... 1010104f (OpenSSL 1.1.1d  10 Sep 2019)
-  # checking whether OpenSSL's headers match the library... no
-  # configure: WARNING: Your OpenSSL headers do not match your
-  # library. Check config.log for details.
-  #
-  # ...despite the fact that clearly the values match
-  configureFlags = [ "--without-openssl-header-check" ];
+  patches = [
+    # Allow multiple colon-separated authorized keys files to be
+    # specified in the file= option.
+    ./multiple-key-files.patch
+    ./edcsa-crash-fix.patch
+  ];
+
+  configureFlags = [
+    # It's not clear to me why this is necessary, but without it, you see:
+    #
+    # checking OpenSSL header version... 1010108f (OpenSSL 1.1.1h  22 Sep 2020)
+    # checking OpenSSL library version... 1010108f (OpenSSL 1.1.1h  22 Sep 2020)
+    # checking whether OpenSSL's headers match the library... no
+    # configure: WARNING: Your OpenSSL headers do not match your
+    # library. Check config.log for details.
+    #
+    # ...despite the fact that clearly the values match
+    "--without-openssl-header-check"
+    # Make sure it can find ed25519-donna
+    "--with-cflags=-I$PWD"
+  ];
+
+  prePatch = "cp -r ${ed25519-donna}/. ed25519-donna/.";
 
   enableParallelBuilding = true;
 
   meta = {
-    homepage = "http://pamsshagentauth.sourceforge.net/";
+    homepage = "https://github.com/jbeverly/pam_ssh_agent_auth";
     description = "PAM module for authentication through the SSH agent";
     maintainers = [ stdenv.lib.maintainers.eelco ];
     platforms = stdenv.lib.platforms.linux;
diff --git a/nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/edcsa-crash-fix.patch b/nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/edcsa-crash-fix.patch
new file mode 100644
index 000000000000..45ee87458161
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/edcsa-crash-fix.patch
@@ -0,0 +1,53 @@
+commit 1b0d9bcc5f5cd78b0bb1357d6a11da5d616ad26f
+Author: Wout Mertens <Wout.Mertens@gmail.com>
+Date:   Thu Jun 11 18:08:13 2020 +0200
+
+    fix segfault when using ECDSA keys.
+    
+    Author: Marc Deslauriers <marc.deslauriers@canonical.com>
+    Bug-Ubuntu: https://bugs.launchpad.net/bugs/1869512
+
+diff --git a/ssh-ecdsa.c b/ssh-ecdsa.c
+index 5b13b30..5bf29cc 100644
+--- a/ssh-ecdsa.c
++++ b/ssh-ecdsa.c
+@@ -46,7 +46,7 @@ ssh_ecdsa_sign(const Key *key, u_char **sigp, u_int *lenp,
+     u_int len, dlen;
+     Buffer b, bb;
+ #if OPENSSL_VERSION_NUMBER >= 0x10100005L
+-	BIGNUM *r, *s;
++	BIGNUM *r = NULL, *s = NULL;
+ #endif
+ 
+     if (key == NULL || key->type != KEY_ECDSA || key->ecdsa == NULL) {
+@@ -137,20 +137,27 @@ ssh_ecdsa_verify(const Key *key, const u_char *signature, u_int signaturelen,
+ 
+     /* parse signature */
+     if ((sig = ECDSA_SIG_new()) == NULL)
+-        pamsshagentauth_fatal("ssh_ecdsa_verify: DSA_SIG_new failed");
++        pamsshagentauth_fatal("ssh_ecdsa_verify: ECDSA_SIG_new failed");
+ 
+     pamsshagentauth_buffer_init(&b);
+     pamsshagentauth_buffer_append(&b, sigblob, len);
+ #if OPENSSL_VERSION_NUMBER < 0x10100005L
+     if ((pamsshagentauth_buffer_get_bignum2_ret(&b, sig->r) == -1) ||
+         (pamsshagentauth_buffer_get_bignum2_ret(&b, sig->s) == -1))
++        pamsshagentauth_fatal("ssh_ecdsa_verify:"
++            "pamsshagentauth_buffer_get_bignum2_ret failed");
+ #else
+-    DSA_SIG_get0(sig, &r, &s);
++    if ((r = BN_new()) == NULL)
++        pamsshagentauth_fatal("ssh_ecdsa_verify: BN_new failed");
++    if ((s = BN_new()) == NULL)
++        pamsshagentauth_fatal("ssh_ecdsa_verify: BN_new failed");
+     if ((pamsshagentauth_buffer_get_bignum2_ret(&b, r) == -1) ||
+         (pamsshagentauth_buffer_get_bignum2_ret(&b, s) == -1))
+-#endif
+         pamsshagentauth_fatal("ssh_ecdsa_verify:"
+             "pamsshagentauth_buffer_get_bignum2_ret failed");
++    if (ECDSA_SIG_set0(sig, r, s) != 1)
++        pamsshagentauth_fatal("ssh_ecdsa_verify: ECDSA_SIG_set0 failed");
++#endif
+ 
+     /* clean up */
+     memset(sigblob, 0, len);
diff --git a/nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/multiple-key-files.patch b/nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/multiple-key-files.patch
index 190325251c9a..71d8e08ecd0b 100644
--- a/nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/multiple-key-files.patch
+++ b/nixpkgs/pkgs/os-specific/linux/pam_ssh_agent_auth/multiple-key-files.patch
@@ -87,21 +87,27 @@ diff -u pam_ssh_agent_auth-0.10.3-orig/pam_ssh_agent_auth.c pam_ssh_agent_auth-0
  
      /*
       * PAM_USER and PAM_RUSER do not necessarily have to get set by the calling application, and we may be unable to divine the latter.
-@@ -187,16 +184,17 @@
+@@ -184,5 +181,5 @@
       */
  
      if(user && strlen(ruser) > 0) {
 -        pamsshagentauth_verbose("Attempting authentication: `%s' as `%s' using %s", ruser, user, authorized_keys_file);
 +        pamsshagentauth_verbose("Attempting authentication: `%s' as `%s' using %s", ruser, user, authorized_keys_file_input);
  
+@@ -201,3 +197,3 @@
+                 retval = PAM_SUCCESS;
+-                pamsshagentauth_logit("Authenticated (sshd): `%s' as `%s' using %s", ruser, user, authorized_keys_file);
++                pamsshagentauth_logit("Authenticated (sshd): `%s' as `%s' using %s", ruser, user, authorized_keys_file_input);
+ 
+@@ -211,11 +208,12 @@
          /*
           * this pw_uid is used to validate the SSH_AUTH_SOCK, and so must be the uid of the ruser invoking the program, not the target-user
           */
 -        if(pamsshagentauth_find_authorized_keys(user, ruser, servicename)) { /* getpwnam(ruser)->pw_uid)) { */
--            pamsshagentauth_logit("Authenticated: `%s' as `%s' using %s", ruser, user, authorized_keys_file);
+-            pamsshagentauth_logit("Authenticated (agent): `%s' as `%s' using %s", ruser, user, authorized_keys_file);
 +        const char *key_file;
 +        if((key_file = pamsshagentauth_find_authorized_keys(user, ruser, servicename))) { /* getpwnam(ruser)->pw_uid)) { */
-+            pamsshagentauth_logit("Authenticated: `%s' as `%s' using %s", ruser, user, key_file);
++            pamsshagentauth_logit("Authenticated (agent): `%s' as `%s' using %s", ruser, user, key_file);
              retval = PAM_SUCCESS;
          } else {
 -            pamsshagentauth_logit("Failed Authentication: `%s' as `%s' using %s", ruser, user, authorized_keys_file);
diff --git a/nixpkgs/pkgs/os-specific/linux/pam_u2f/default.nix b/nixpkgs/pkgs/os-specific/linux/pam_u2f/default.nix
index 30acb86d860e..d8d9a96652c4 100644
--- a/nixpkgs/pkgs/os-specific/linux/pam_u2f/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/pam_u2f/default.nix
@@ -1,19 +1,16 @@
-{ stdenv, fetchurl, pkgconfig, libu2f-host, libu2f-server, pam }:
+{ stdenv, fetchurl, pkgconfig, libfido2, pam, openssl }:
 
 stdenv.mkDerivation rec {
   pname = "pam_u2f";
-  version = "1.0.8";
+  version = "1.1.0";
 
   src     = fetchurl {
     url = "https://developers.yubico.com/pam-u2f/Releases/${pname}-${version}.tar.gz";
-    sha256 = "16awjzx348imjz141fzzldy00qpdmw2g37rnq430w5mnzak078jj";
+    sha256 = "01fwbrfnjkv93vvqm54jywdcxa1p7d4r32azicwnx75nxfbbzhqd";
   };
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ libu2f-host libu2f-server pam ];
-
-  # Fix the broken include in 1.0.1
-  CFLAGS = "-I${libu2f-host}/include/u2f-host";
+  buildInputs = [ libfido2 pam openssl ];
 
   preConfigure = ''
     configureFlagsArray+=("--with-pam-dir=$out/lib/security")
diff --git a/nixpkgs/pkgs/os-specific/linux/pcm/default.nix b/nixpkgs/pkgs/os-specific/linux/pcm/default.nix
index 3c49e53d8008..66f5dcf338a3 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 = "202008";
+  version = "202011";
   pname = "pcm";
 
   src = fetchFromGitHub {
     owner = "opcm";
     repo = "pcm";
     rev = version;
-    sha256 = "1paxwq0p39vp2ma0rg7dkalc3r28wzj77sm3alavvk2vxgvxi0ig";
+    sha256 = "09p8drp9xvvs5bahgnr9xx6987fryz27xs2zaf1mr7a9wsh5j912";
   };
 
   installPhase = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/pktgen/default.nix b/nixpkgs/pkgs/os-specific/linux/pktgen/default.nix
index 41db6e936615..a883935b7b95 100644
--- a/nixpkgs/pkgs/os-specific/linux/pktgen/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/pktgen/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchurl, meson, ninja, pkgconfig
-, dpdk, libbsd, libpcap, lua5_3, numactl, utillinux
+, dpdk, libbsd, libpcap, lua5_3, numactl, util-linux
 , gtk2, which, withGtk ? false
 }:
 
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   patches = [ ./configure.patch ];
 
   postPatch = ''
-    substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu
+    substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${util-linux}/bin/lscpu
   '';
 
   postInstall = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/pm-utils/default.nix b/nixpkgs/pkgs/os-specific/linux/pm-utils/default.nix
index 1d8314923d37..e685402d4739 100644
--- a/nixpkgs/pkgs/os-specific/linux/pm-utils/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/pm-utils/default.nix
@@ -1,10 +1,10 @@
-{ stdenv, fetchurl, coreutils, gnugrep, utillinux, kmod
+{ stdenv, fetchurl, coreutils, gnugrep, util-linux, kmod
 , procps, kbd, dbus }:
 
 let
 
   binPath = stdenv.lib.makeBinPath
-    [ coreutils gnugrep utillinux kmod procps kbd dbus ];
+    [ coreutils gnugrep util-linux kmod procps kbd dbus ];
 
   sbinPath = stdenv.lib.makeSearchPathOutput "bin" "sbin"
     [ procps ];
diff --git a/nixpkgs/pkgs/os-specific/linux/pmount/default.nix b/nixpkgs/pkgs/os-specific/linux/pmount/default.nix
index 63d0c88c1f8e..01624bff5359 100644
--- a/nixpkgs/pkgs/os-specific/linux/pmount/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/pmount/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, intltool, ntfs3g, utillinux
+{ stdenv, fetchurl, intltool, ntfs3g, util-linux
 , mediaDir ? "/media/"
 , lockDir ? "/var/lock/pmount"
 , whiteList ? "/etc/pmount.allow"
@@ -16,14 +16,14 @@ stdenv.mkDerivation rec {
     sha256 = "db38fc290b710e8e9e9d442da2fb627d41e13b3ee80326c15cc2595ba00ea036";
   };
 
-  buildInputs = [ intltool utillinux ];
+  buildInputs = [ intltool util-linux ];
 
   configureFlags = [
     "--with-media-dir=${mediaDir}"
     "--with-lock-dir=${lockDir}"
     "--with-whitelist=${whiteList}"
-    "--with-mount-prog=${utillinux}/bin/mount"
-    "--with-umount-prog=${utillinux}/bin/umount"
+    "--with-mount-prog=${util-linux}/bin/mount"
+    "--with-umount-prog=${util-linux}/bin/umount"
     "--with-mount-ntfs3g=${ntfs3g}/sbin/mount.ntfs-3g"
   ];
 
diff --git a/nixpkgs/pkgs/os-specific/linux/powertop/default.nix b/nixpkgs/pkgs/os-specific/linux/powertop/default.nix
index 4bf318d743ea..22e70fc0b658 100644
--- a/nixpkgs/pkgs/os-specific/linux/powertop/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/powertop/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
   postPatch = ''
     substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe"
     substituteInPlace src/calibrate/calibrate.cpp --replace "/usr/bin/xset" "xset"
+    substituteInPlace src/tuning/bluetooth.cpp --replace "/usr/bin/hcitool" "hcitool"
   '';
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/os-specific/linux/prl-tools/default.nix b/nixpkgs/pkgs/os-specific/linux/prl-tools/default.nix
index e71dcb497a26..9b0e38198a33 100644
--- a/nixpkgs/pkgs/os-specific/linux/prl-tools/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/prl-tools/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, makeWrapper, p7zip
-, gawk, utillinux, xorg, glib, dbus-glib, zlib
+, gawk, util-linux, xorg, glib, dbus-glib, zlib
 , kernel ? null, libsOnly ? false
 , undmg, fetchurl
 }:
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
 
   kernelVersion = if libsOnly then "" else lib.getName kernel.name;
   kernelDir = if libsOnly then "" else "${kernel.dev}/lib/modules/${kernelVersion}";
-  scriptPath = lib.concatStringsSep ":" (lib.optionals (!libsOnly) [ "${utillinux}/bin" "${gawk}/bin" ]);
+  scriptPath = lib.concatStringsSep ":" (lib.optionals (!libsOnly) [ "${util-linux}/bin" "${gawk}/bin" ]);
 
   buildPhase = ''
     if test -z "$libsOnly"; then
diff --git a/nixpkgs/pkgs/os-specific/linux/procps-ng/default.nix b/nixpkgs/pkgs/os-specific/linux/procps-ng/default.nix
index 466e66a8713c..4942710f755e 100644
--- a/nixpkgs/pkgs/os-specific/linux/procps-ng/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/procps-ng/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, ncurses, pkgconfig
+{ lib, stdenv, fetchurl, fetchpatch, ncurses, pkgconfig
 
 # `ps` with systemd support is able to properly report different
 # attributes like unit name, so we want to have it on linux.
@@ -22,6 +22,14 @@ stdenv.mkDerivation rec {
     sha256 = "1br0g93ysqhlv13i1k4lfbimsgxnpy5rgs4lxfc9rkzdbpbaqplj";
   };
 
+  patches = [
+    (fetchpatch {
+      url = "https://gitlab.com/procps-ng/procps/-/commit/bb96fc42956c9ed926a1b958ab715f8b4a663dec.diff";
+      sha256 = "0fzsb6ns3fvrszyzsz28qvbmcn135ilr4nwh2z1a0vlpl2fw961z";
+      name = "sysconf-argmax-sanity.patch";
+    })
+  ];
+
   buildInputs = [ ncurses ]
     ++ lib.optional withSystemd systemd;
   nativeBuildInputs = [ pkgconfig ];
diff --git a/nixpkgs/pkgs/os-specific/linux/psftools/default.nix b/nixpkgs/pkgs/os-specific/linux/psftools/default.nix
new file mode 100644
index 000000000000..5a19fbec24d5
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/psftools/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  pname = "psftools";
+  version = "1.0.14";
+  src = fetchurl {
+    url = "https://www.seasip.info/Unix/PSF/${pname}-${version}.tar.gz";
+    sha256 = "17nia5n5rabbh42gz51c8y53rjwddria4j3wvzk8dd0llj7k1y6w";
+  };
+  outputs = ["out" "man" "dev" "lib"];
+
+  meta = with stdenv.lib; {
+    homepage = "https://www.seasip.info/Unix/PSF";
+    description = "Conversion tools for .PSF fonts";
+    longDescription = ''
+      The PSFTOOLS are designed to manipulate fixed-width bitmap fonts,
+      such as DOS or Linux console fonts. Both the PSF1 (8 pixels wide)
+      and PSF2 (any width) formats are supported; the default output
+      format is PSF2.
+    '';
+    platforms = platforms.unix;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ kaction ];
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/r8168/default.nix b/nixpkgs/pkgs/os-specific/linux/r8168/default.nix
index b3d8965704fd..91e15db2eeb6 100644
--- a/nixpkgs/pkgs/os-specific/linux/r8168/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/r8168/default.nix
@@ -6,7 +6,7 @@ let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wi
 in stdenv.mkDerivation rec {
   name = "r8168-${kernel.version}-${version}";
   # on update please verify that the source matches the realtek version
-  version = "8.047.04";
+  version = "8.048.03";
 
   # This is a mirror. The original website[1] doesn't allow non-interactive
   # downloads, instead emailing you a download link.
@@ -17,7 +17,7 @@ in stdenv.mkDerivation rec {
     owner = "mtorromeo";
     repo = "r8168";
     rev = version;
-    sha256 = "1rni8jimwdhyx75603mdcylrdxgfwfpyprf1lf5x5cli2i4bbijg";
+    sha256 = "1l8llpcnapcaafxp7wlyny2ywh7k6q5zygwwjl9h0l6p04cghss4";
   };
 
   hardeningDisable = [ "pic" ];
@@ -29,8 +29,8 @@ in stdenv.mkDerivation rec {
   # based on the ArchLinux pkgbuild: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/r8168
   preBuild = ''
     makeFlagsArray+=("-C${kernel.dev}/lib/modules/${kernel.modDirVersion}/build")
-    makeFlagsArray+=("SUBDIRS=$PWD/src")
-    makeFlagsArray+=("EXTRA_CFLAGS=-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN")
+    makeFlagsArray+=("M=$PWD/src")
+    makeFlagsArray+=("EXTRA_CFLAGS=-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN -DCONFIG_ASPM -DENABLE_S5WOL -DENABLE_EEE")
     makeFlagsArray+=("modules")
   '';
 
diff --git a/nixpkgs/pkgs/os-specific/linux/radeontop/default.nix b/nixpkgs/pkgs/os-specific/linux/radeontop/default.nix
index 3d26914d4f9d..f55b09f6991b 100644
--- a/nixpkgs/pkgs/os-specific/linux/radeontop/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/radeontop/default.nix
@@ -3,11 +3,11 @@
 
 stdenv.mkDerivation rec {
   pname = "radeontop";
-  version = "2019-06-03";
+  version = "1.3";
 
   src = fetchFromGitHub {
-    sha256 = "1b1m30r2nfwqkajqw6m01xmfhlq83z1qylyijxg7962mp9x2k0gw";
-    rev = "v1.2";
+    sha256 = "sha256-tnIxM0+RfOIt714fEUWRP/4rEPHaOuCZFit9/RPdxis=";
+    rev = "v${version}";
     repo = "radeontop";
     owner = "clbr";
   };
diff --git a/nixpkgs/pkgs/os-specific/linux/raspberrypi-eeprom/default.nix b/nixpkgs/pkgs/os-specific/linux/raspberrypi-eeprom/default.nix
new file mode 100644
index 000000000000..ee5ead73bc13
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/raspberrypi-eeprom/default.nix
@@ -0,0 +1,56 @@
+{ stdenvNoCC, lib, fetchFromGitHub, makeWrapper
+, python3, binutils-unwrapped, findutils, kmod, pciutils, libraspberrypi
+}:
+stdenvNoCC.mkDerivation {
+  pname = "raspberrypi-eeprom";
+  version = "2020-12-11";
+
+  src = fetchFromGitHub {
+    owner = "raspberrypi";
+    repo = "rpi-eeprom";
+    rev = "54a9796abbee59067bff9da6b90c1014178f2c21";
+    sha256 = "0yp7bn444n6yisp4hiblrm00rrvrf213amzb4sh96mlb5nhxspqk";
+  };
+
+  buildInputs = [ python3 ];
+  nativeBuildInputs = [ makeWrapper ];
+
+  postPatch = ''
+    # Don't try to verify md5 signatures from /var/lib/dpkg and
+    # fix path to the configuration.
+    substituteInPlace rpi-eeprom-update \
+      --replace 'IGNORE_DPKG_CHECKSUMS=$LOCAL_MODE' 'IGNORE_DPKG_CHECKSUMS=1' \
+      --replace '/etc/default' '/etc'
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/rpi-eeprom
+
+    cp rpi-eeprom-config rpi-eeprom-update $out/bin
+    cp -r firmware/{beta,critical,old,stable} $out/share/rpi-eeprom
+    cp -r firmware/vl805 $out/bin
+  '';
+
+  fixupPhase = ''
+    patchShebangs $out/bin
+    wrapProgram $out/bin/rpi-eeprom-update \
+      --set FIRMWARE_ROOT $out/share/rpi-eeprom \
+      ${lib.optionalString stdenvNoCC.isAarch64 "--set VCMAILBOX ${libraspberrypi}/bin/vcmailbox"} \
+      --prefix PATH : "${lib.makeBinPath ([
+        binutils-unwrapped
+        findutils
+        kmod
+        pciutils
+        (placeholder "out")
+      ] ++ lib.optionals stdenvNoCC.isAarch64 [
+        libraspberrypi
+      ])}"
+  '';
+
+  meta = with lib; {
+    description = "Installation scripts and binaries for the closed sourced Raspberry Pi 4 EEPROMs";
+    homepage = "https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md";
+    license = with licenses; [ bsd3 unfreeRedistributableFirmware ];
+    maintainers = with maintainers; [ das_j ];
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/rdma-core/default.nix b/nixpkgs/pkgs/os-specific/linux/rdma-core/default.nix
index 59a7125aad6d..339a6cbbf290 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 = "31.0";
+  version = "33.0";
 
 in stdenv.mkDerivation {
   pname = "rdma-core";
@@ -14,7 +14,7 @@ in stdenv.mkDerivation {
     owner = "linux-rdma";
     repo = "rdma-core";
     rev = "v${version}";
-    sha256 = "0qr8a25ylmkwfgyj519zvl74q16bhf4895xjich2r98rl2yg0qdl";
+    sha256 = "04q4z95nxxxjc674qnbwn19bv18nl3x7xwp6aql17h1cw3gdmhw4";
   };
 
   nativeBuildInputs = [ cmake pkgconfig pandoc docutils makeWrapper ];
diff --git a/nixpkgs/pkgs/os-specific/linux/rtl8812au/default.nix b/nixpkgs/pkgs/os-specific/linux/rtl8812au/default.nix
index cb93c635afe0..9b2bcf3b91ce 100644
--- a/nixpkgs/pkgs/os-specific/linux/rtl8812au/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/rtl8812au/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "rtl8812au-${kernel.version}-${version}";
-  version = "5.6.4.2_35491.20200318";
+  version = "5.6.4.2_35491.20200702";
 
   src = fetchFromGitHub {
     owner = "gordboy";
     repo = "rtl8812au-5.6.4.2";
-    rev = "49e98ff9bfdbe2ddce843808713de383132002e0";
-    sha256 = "0f4isqasm9rli5v6a7xpphyh509wdxs1zcfvgdsnyhnv8amhqxgs";
+    rev = "3110ad65d0f03532bd97b1017cae67ca86dd34f6";
+    sha256 = "0p0cv67dfr41npxn0c1frr0k9wiv0pdbvlzlmclgixn39xc6n5qz";
   };
 
   nativeBuildInputs = [ bc nukeReferences ];
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "Driver for Realtek 802.11ac, rtl8812au, provides the 8812au mod";
-    homepage = "https://github.com/zebulon2/rtl8812au-driver-5.2.20";
+    homepage = "https://github.com/gordboy/rtl8812au-5.6.4.2";
     license = licenses.gpl2;
     platforms = platforms.linux;
     maintainers = with maintainers; [ danielfullmer ];
diff --git a/nixpkgs/pkgs/os-specific/linux/rtl8821cu/default.nix b/nixpkgs/pkgs/os-specific/linux/rtl8821cu/default.nix
index 62ea8aaaab5e..35dbd1a9ee10 100644
--- a/nixpkgs/pkgs/os-specific/linux/rtl8821cu/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/rtl8821cu/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchFromGitHub, kernel, bc }:
 stdenv.mkDerivation rec {
   name = "rtl8821cu-${kernel.version}-${version}";
-  version = "unstable-2020-05-16";
+  version = "unstable-2020-12-21";
 
   src = fetchFromGitHub {
     owner = "brektrou";
     repo = "rtl8821cu";
-    rev = "5c510c9f14352fed4906a10921040b9e46b58346";
-    sha256 = "1n74h1m3l2dj35caswaghzcjwcv5qlv3gj6j1rqdddbyg5khl4ag";
+    rev = "428a0820487418ec69c0edb91726d1cf19763b1e";
+    sha256 = "1ccl94727yq7gzn37ky91k0736cambgnkaa37r2f2hinpl9qdd8q";
   };
 
   hardeningDisable = [ "pic" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/rtl88x2bu/default.nix b/nixpkgs/pkgs/os-specific/linux/rtl88x2bu/default.nix
index 3d461d525567..c2b5eb1cdb4c 100644
--- a/nixpkgs/pkgs/os-specific/linux/rtl88x2bu/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/rtl88x2bu/default.nix
@@ -1,16 +1,24 @@
-{ stdenv, fetchFromGitHub, kernel, bc }:
+{ stdenv, fetchFromGitHub, fetchpatch, kernel, bc }:
 
 stdenv.mkDerivation rec {
   name = "rtl88x2bu-${kernel.version}-${version}";
-  version = "unstable-2020-05-19";
+  version = "unstable-2020-08-20";
 
   src = fetchFromGitHub {
     owner = "cilynx";
     repo = "rtl88x2BU";
-    rev = "0f159d7cd937a12b818121cb1f1c4910bd1adc72";
-    sha256 = "0flqnvzfdb4wsiiqv9vf5gfwd5fgpjvhs9zhqknnv1cmp8msgw6y";
+    rev = "a1c53f43fb9995fbe3ad26567079d6384626d350";
+    sha256 = "1cby66jg511zxs1i535mflafhryla9764mnrzacxppimxpancv3s";
   };
 
+  patches = [
+    # https://github.com/cilynx/rtl88x2bu/pull/58
+    (fetchpatch {
+      url = "https://github.com/cilynx/rtl88x2bu/pull/58.patch";
+      sha256 = "0md9cv61nx85pk3v60y9wviyb9fgj54q9m26wiv3dc7smr70h8l6";
+    })
+  ];
+
   hardeningDisable = [ "pic" ];
 
   nativeBuildInputs = [ bc ];
diff --git a/nixpkgs/pkgs/os-specific/linux/s6-linux-utils/default.nix b/nixpkgs/pkgs/os-specific/linux/s6-linux-utils/default.nix
index 74bf913df982..5c4fc7622453 100644
--- a/nixpkgs/pkgs/os-specific/linux/s6-linux-utils/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/s6-linux-utils/default.nix
@@ -4,8 +4,8 @@ with skawarePackages;
 
 buildPackage {
   pname = "s6-linux-utils";
-  version = "2.5.1.2";
-  sha256 = "0w4jms9qyb5kx9zcyd3gzri60rrii2rbmh08s59ckg4awy27py86";
+  version = "2.5.1.3";
+  sha256 = "0wbv02zxaami88xbj2zg63kspz05bbplswg0c6ncb5g9khf52wa4";
 
   description = "A set of minimalistic Linux-specific system utilities";
   platforms = stdenv.lib.platforms.linux;
diff --git a/nixpkgs/pkgs/os-specific/linux/schedtool/default.nix b/nixpkgs/pkgs/os-specific/linux/schedtool/default.nix
index de947a9cd346..98663a5ab41e 100644
--- a/nixpkgs/pkgs/os-specific/linux/schedtool/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/schedtool/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "Query or alter a process' scheduling policy under Linux";
-    homepage = "http://freequaos.host.sk/schedtool/";
+    homepage = "https://freequaos.host.sk/schedtool/";
     license = licenses.gpl2;
     platforms = platforms.linux;
     maintainers = with maintainers; [ abbradar ];
diff --git a/nixpkgs/pkgs/os-specific/linux/shadow/default.nix b/nixpkgs/pkgs/os-specific/linux/shadow/default.nix
index fbcecf05f188..59cc59d7714d 100644
--- a/nixpkgs/pkgs/os-specific/linux/shadow/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/shadow/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt, libxml2
-, docbook_xml_dtd_45, docbook_xsl, itstool, flex, bison
+{ stdenv, nixosTests, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt
+, libxml2 , docbook_xml_dtd_45, docbook_xsl, itstool, flex, bison
 , pam ? null, glibcCross ? null
 }:
 
@@ -19,13 +19,13 @@ in
 
 stdenv.mkDerivation rec {
   pname = "shadow";
-  version = "4.8";
+  version = "4.8.1";
 
   src = fetchFromGitHub {
     owner = "shadow-maint";
     repo = "shadow";
     rev = version;
-    sha256 = "05a636dqxip09l5jjrrs30lvwq6xkhjrdgjbbj3bg6b6z7hc67qk";
+    sha256 = "13407r6qwss00504qy740jghb2dzd561la7dhp47rg8w3g8jarpn";
   };
 
   buildInputs = stdenv.lib.optional (pam != null && stdenv.isLinux) pam;
@@ -86,5 +86,6 @@ stdenv.mkDerivation rec {
 
   passthru = {
     shellPath = "/bin/nologin";
+    tests = { inherit (nixosTests) shadow; };
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/sssd/default.nix b/nixpkgs/pkgs/os-specific/linux/sssd/default.nix
index 22e2da79c8cd..05866f942692 100644
--- a/nixpkgs/pkgs/os-specific/linux/sssd/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/sssd/default.nix
@@ -24,6 +24,11 @@ stdenv.mkDerivation rec {
       url = "https://github.com/SSSD/sssd/commit/bc56b10aea999284458dcc293b54cf65288e325d.patch";
       sha256 = "0q74sx5n41srq3kdn55l5j1sq4xrjsnl5y4v8yh5mwsijj74yh4g";
     })
+    # Fix collision with external nss symbol
+    (fetchpatch {
+      url = "https://github.com/SSSD/sssd/commit/fe9eeb51be06059721e873f77092b1e9ba08e6c1.patch";
+      sha256 = "0b83b2w0rnvm26pg03a4lpmkmi7n3gqxg7lk751q61q79gnzrpz4";
+    })
   ];
 
   # Something is looking for <libxml/foo.h> instead of <libxml2/libxml/foo.h>
diff --git a/nixpkgs/pkgs/os-specific/linux/swapview/default.nix b/nixpkgs/pkgs/os-specific/linux/swapview/default.nix
new file mode 100644
index 000000000000..c88c8757db3c
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/swapview/default.nix
@@ -0,0 +1,23 @@
+{ lib, rustPlatform, fetchFromGitHub }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "swapview";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "lilydjwg";
+    repo = "swapview";
+    rev = "v${version}";
+    sha256 = "0339biydk997j5r72vzp7djwkscsz89xr3936nshv23fmxjh2rzj";
+  };
+
+  cargoSha256 = "0z99pqd41y8cci3yvwsnm5zbq7pzli62z8qqqghmz1hcq5pb5q7g";
+
+  meta = with lib; {
+    description = "A simple program to view processes' swap usage on Linux";
+    homepage = "https://github.com/lilydjwg/swapview";
+    platforms = platforms.linux;
+    license = with licenses; [ bsd3 ];
+    maintainers = with maintainers; [ oxalica ];
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/sysdig/default.nix b/nixpkgs/pkgs/os-specific/linux/sysdig/default.nix
index bef9231385a0..0f8702eb6e01 100644
--- a/nixpkgs/pkgs/os-specific/linux/sysdig/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/sysdig/default.nix
@@ -1,20 +1,20 @@
-{ stdenv, fetchFromGitHub, cmake, kernel
+{ stdenv, fetchFromGitHub, cmake, kernel, installShellFiles
 , luajit, zlib, ncurses, perl, jsoncpp, libb64, openssl, curl, jq, gcc, elfutils, tbb, c-ares, protobuf, grpc
 }:
 
 with stdenv.lib;
 stdenv.mkDerivation rec {
   pname = "sysdig";
-  version = "0.27.0";
+  version = "0.27.1";
 
   src = fetchFromGitHub {
     owner = "draios";
     repo = "sysdig";
     rev = version;
-    sha256 = "0lpp271g0749sx7qgpwl6myi0kgfpsxk1kc4yp3r9k1pynv8bq1b";
+    sha256 = "sha256-lYjMvxMIReANNwMr62u881Nugrs9piOaN3EmrvGzRns=";
   };
 
-  nativeBuildInputs = [ cmake perl ];
+  nativeBuildInputs = [ cmake perl installShellFiles ];
   buildInputs = [
     zlib luajit ncurses jsoncpp libb64 openssl curl jq gcc elfutils tbb c-ares protobuf grpc
   ] ++ optionals (kernel != null) kernel.moduleBuildDependencies;
@@ -38,19 +38,28 @@ stdenv.mkDerivation rec {
     export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
   '';
 
-  postInstall = optionalString (kernel != null) ''
-    make install_driver
-    kernel_dev=${kernel.dev}
-    kernel_dev=''${kernel_dev#/nix/store/}
-    kernel_dev=''${kernel_dev%%-linux*dev*}
-    if test -f "$out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko"; then
-        sed -i "s#$kernel_dev#................................#g" $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko
-    else
-        xz -d $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko.xz
-        sed -i "s#$kernel_dev#................................#g" $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko
-        xz $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko
-    fi
-  '';
+  postInstall =
+    ''
+      # Fix the bash completion location
+      installShellCompletion --bash $out/etc/bash_completion.d/sysdig
+      rm $out/etc/bash_completion.d/sysdig
+      rmdir $out/etc/bash_completion.d
+      rmdir $out/etc
+    ''
+    + optionalString (kernel != null) ''
+      make install_driver
+      kernel_dev=${kernel.dev}
+      kernel_dev=''${kernel_dev#/nix/store/}
+      kernel_dev=''${kernel_dev%%-linux*dev*}
+      if test -f "$out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko"; then
+          sed -i "s#$kernel_dev#................................#g" $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko
+      else
+          xz -d $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko.xz
+          sed -i "s#$kernel_dev#................................#g" $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko
+          xz $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko
+      fi
+    '';
+
 
   meta = {
     description = "A tracepoint-based system tracing tool for Linux (with clients for other OSes)";
diff --git a/nixpkgs/pkgs/os-specific/linux/syslinux/default.nix b/nixpkgs/pkgs/os-specific/linux/syslinux/default.nix
index 28681aed5640..559fb6219b43 100644
--- a/nixpkgs/pkgs/os-specific/linux/syslinux/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/syslinux/default.nix
@@ -47,6 +47,7 @@ stdenv.mkDerivation {
       url = mkURL "26f0e7b2" "0018-prevent-pow-optimization.patch";
       sha256 = "1c8g0jz5yj9a0rsmryx9vdjsw4hw8mjfcg05c9pmyjg85w3dfp3m";
     })
+    ./gcc10.patch
   ];
 
   postPatch = ''
diff --git a/nixpkgs/pkgs/os-specific/linux/syslinux/gcc10.patch b/nixpkgs/pkgs/os-specific/linux/syslinux/gcc10.patch
new file mode 100644
index 000000000000..f4893a912313
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/syslinux/gcc10.patch
@@ -0,0 +1,33 @@
+diff --git a/dos/string.h b/dos/string.h
+index f648de2..a502132 100644
+--- a/dos/string.h
++++ b/dos/string.h
+@@ -5,12 +5,13 @@
+ #ifndef _STRING_H
+ #define _STRING_H
+ 
++#include <stddef.h>
++
+ /* Standard routines */
+ #define memcpy(a,b,c)	__builtin_memcpy(a,b,c)
+ #define memmove(a,b,c)	__builtin_memmove(a,b,c)
+ #define memset(a,b,c)	__builtin_memset(a,b,c)
+ #define strcpy(a,b)	__builtin_strcpy(a,b)
+-#define strlen(a)	__builtin_strlen(a)
+ 
+ /* This only returns true or false */
+ static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n)
+@@ -21,6 +22,13 @@ static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n)
+     return rv;
+ }
+ 
++static inline size_t strlen(const char *s)
++{
++    size_t len = 0;
++    while (*s++) len++;
++    return len;
++}
++
+ extern char *strchr(const char *s, int c);
+ 
+ #endif /* _STRING_H */
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 390e7f9f09b3..b3b241b570a0 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 54fb14592fc41752c3cd26552c974dd1ad4b9e73 Mon Sep 17 00:00:00 2001
+From dd2ec741aaa7c587eb7719bbf4b305fe28168b77 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 1c60eec587..b2486da130 100644
+index d2f595d18e..941a7c1ba3 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 1c60eec587..b2486da130 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.27.0
+2.29.2
 
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 9bb69092ca4e..1f3a1b646841 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 d52880eeae09aaacd308430499f55810157b1a6d Mon Sep 17 00:00:00 2001
+From ab3dab997695db5346f8efbf8566ac96612f0c6e 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
@@ -12,7 +12,7 @@ https://github.com/NixOS/nixos/issues/126
  2 files changed, 4 insertions(+)
 
 diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c
-index 806dda8475..0220741c91 100644
+index 292b97cd69..791b8e6b7e 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) {
@@ -25,10 +25,10 @@ index 806dda8475..0220741c91 100644
                          "/etc"))
                  return true;
 diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
-index 8a5e80eeaa..fab35ed6f3 100644
+index 3a72a13e1a..541320dc9d 100644
 --- a/src/shutdown/umount.c
 +++ b/src/shutdown/umount.c
-@@ -414,6 +414,8 @@ static int delete_dm(dev_t devnum) {
+@@ -500,6 +500,8 @@ static int delete_md(MountPoint *m) {
  
  static bool nonunmountable_path(const char *path) {
          return path_equal(path, "/")
@@ -38,5 +38,5 @@ index 8a5e80eeaa..fab35ed6f3 100644
                  || path_equal(path, "/usr")
  #endif
 -- 
-2.27.0
+2.29.2
 
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 5ee54f39b741..56f52b9971e3 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 794073e466a3b6c8e138f0e6d15c8d6465a1a4a9 Mon Sep 17 00:00:00 2001
+From 3581f8f30270e6340c671a640fe551e954715f8e 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 3b9493f232..0117a9939d 100644
+index 0842731c18..f790853104 100644
 --- a/src/nspawn/nspawn.c
 +++ b/src/nspawn/nspawn.c
-@@ -5122,6 +5122,7 @@ static int run(int argc, char *argv[]) {
+@@ -5319,6 +5319,7 @@ static int run(int argc, char *argv[]) {
                                  goto finish;
                          }
                  } else {
@@ -21,7 +21,7 @@ index 3b9493f232..0117a9939d 100644
                          const char *p, *q;
  
                          if (arg_pivot_root_new)
-@@ -5136,6 +5137,7 @@ static int run(int argc, char *argv[]) {
+@@ -5333,6 +5334,7 @@ static int run(int argc, char *argv[]) {
                                  r = -EINVAL;
                                  goto finish;
                          }
@@ -30,5 +30,5 @@ index 3b9493f232..0117a9939d 100644
  
          } else {
 -- 
-2.27.0
+2.29.2
 
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 cdef28ad68ed..4d3729556d6c 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 caa8dcfa87cf2e46a7a1cce9c16f929916cf9186 Mon Sep 17 00:00:00 2001
+From 12b63d8c1d2ca85d9bb7ea07e8eb5e623e1b58e9 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
@@ -8,10 +8,10 @@ Subject: [PATCH 04/18] Look for fsck in the right place
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
-index 80f7107b9d..74e48a385f 100644
+index 04752fe9dc..ad0ccf91c0 100644
 --- a/src/fsck/fsck.c
 +++ b/src/fsck/fsck.c
-@@ -370,7 +370,7 @@ static int run(int argc, char *argv[]) {
+@@ -369,7 +369,7 @@ static int run(int argc, char *argv[]) {
                  } else
                          dash_c[0] = 0;
  
@@ -21,5 +21,5 @@ index 80f7107b9d..74e48a385f 100644
                  cmdline[i++] = "-T";
  
 -- 
-2.27.0
+2.29.2
 
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 95dd17531ab2..476ebe06e70f 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 e5d73359928b79bd846bda29ce61fe276d8c0b76 Mon Sep 17 00:00:00 2001
+From 6ede8baac88aba769030f5bc5f5b2070098c7428 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
@@ -15,7 +15,7 @@ Also, remove /usr and /lib as these don't exist on NixOS.
  2 files changed, 8 insertions(+), 17 deletions(-)
 
 diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
-index 52968dee34..bba2eb09b8 100644
+index 96b82170d0..b9fbed5c61 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) {
@@ -102,7 +102,7 @@ index 52968dee34..bba2eb09b8 100644
  
                  if (!add)
 diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
-index 8424837824..b1c541bc52 100644
+index f2c045511d..ccb382e421 100644
 --- a/src/core/systemd.pc.in
 +++ b/src/core/systemd.pc.in
 @@ -38,10 +38,11 @@ systemdsystemconfdir=${systemd_system_conf_dir}
@@ -120,5 +120,5 @@ index 8424837824..b1c541bc52 100644
  
  systemd_system_generator_dir=${root_prefix}/lib/systemd/system-generators
 -- 
-2.27.0
+2.29.2
 
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 3e519e7fe73d..99e68c37c20a 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 1a3de021d9b8da060a77af6e26d2b61bafefda74 Mon Sep 17 00:00:00 2001
+From 3aeb3a10c4a7ad387b004bf41efbd171913bcca9 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 2c09def06f..c70540e1a3 100644
+index 45a417a090..8af3cb08d6 100644
 --- a/src/core/unit.c
 +++ b/src/core/unit.c
-@@ -2150,7 +2150,8 @@ static void unit_check_binds_to(Unit *u) {
+@@ -2163,7 +2163,8 @@ static void unit_check_binds_to(Unit *u) {
          }
  
          assert(other);
@@ -27,5 +27,5 @@ index 2c09def06f..c70540e1a3 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.27.0
+2.29.2
 
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 b63a051ae075..aeb734f94df0 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,4 +1,4 @@
-From 6c12e0d2afe80563e692fc1f2f545a487c83418c Mon Sep 17 00:00:00 2001
+From a1454e8edb7a1a87093808dc7db540232147df3d 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
@@ -11,10 +11,10 @@ Subject: [PATCH 07/18] hostnamed, localed, timedated: disable methods that
  3 files changed, 25 insertions(+)
 
 diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
-index 7f6607a527..b5a9388916 100644
+index a1794bdab1..77134731e1 100644
 --- a/src/hostname/hostnamed.c
 +++ b/src/hostname/hostnamed.c
-@@ -626,6 +626,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
+@@ -643,6 +643,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
          if (r < 0)
                  return r;
  
@@ -24,7 +24,7 @@ index 7f6607a527..b5a9388916 100644
          name = empty_to_null(name);
  
          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
+@@ -702,6 +705,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess
          if (r < 0)
                  return r;
  
@@ -35,7 +35,7 @@ index 7f6607a527..b5a9388916 100644
  
          context_read_machine_info(c);
 diff --git a/src/locale/localed.c b/src/locale/localed.c
-index 715ce5cac7..014f7dcf6c 100644
+index 736dacdee9..53e0ee935e 100644
 --- a/src/locale/localed.c
 +++ b/src/locale/localed.c
 @@ -317,6 +317,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er
@@ -69,7 +69,7 @@ index 715ce5cac7..014f7dcf6c 100644
          model = empty_to_null(model);
          variant = empty_to_null(variant);
 diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
-index c467b85477..3e78b2f575 100644
+index 8bfcfd5cdc..a0ee03f134 100644
 --- a/src/timedate/timedated.c
 +++ b/src/timedate/timedated.c
 @@ -646,6 +646,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error *
@@ -93,7 +93,7 @@ index c467b85477..3e78b2f575 100644
          if (lrtc == c->local_rtc)
                  return sd_bus_reply_method_return(m, NULL);
  
-@@ -917,6 +924,9 @@ static int method_set_ntp(sd_bus_message *m, void *userdata, sd_bus_error *error
+@@ -905,6 +912,9 @@ static int method_set_ntp(sd_bus_message *m, void *userdata, sd_bus_error *error
          if (r < 0)
                  return r;
  
@@ -104,5 +104,5 @@ index c467b85477..3e78b2f575 100644
          if (r < 0)
                  return r;
 -- 
-2.27.0
+2.29.2
 
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 63bd03fcf38e..0da52477bb30 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 1e40be83eca9a831509ae764081c2252934478c3 Mon Sep 17 00:00:00 2001
+From 27680c555713e36d16198fc5f60b0f85e0777d30 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
@@ -9,7 +9,7 @@ Patch by vcunat.
  1 file changed, 1 insertion(+), 6 deletions(-)
 
 diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c
-index b3febdbb31..eba00a5bc7 100644
+index cb3c77ce96..7b8c80071f 100644
 --- a/src/libsystemd/sd-hwdb/sd-hwdb.c
 +++ b/src/libsystemd/sd-hwdb/sd-hwdb.c
 @@ -297,13 +297,8 @@ static int trie_search_f(sd_hwdb *hwdb, const char *search) {
@@ -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.27.0
+2.29.2
 
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 dcdc0cd7ea01..2b05cea435c8 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 5e235e1f720f37fc5581b40c9a13d365368e74a8 Mon Sep 17 00:00:00 2001
+From b423ce2560bd380abd80796a890454d95cd8926c 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
@@ -13,7 +13,7 @@ NixOS uses this path.
  5 files changed, 12 insertions(+), 12 deletions(-)
 
 diff --git a/man/localtime.xml b/man/localtime.xml
-index 0f1652ee2e..71c4f95c2e 100644
+index 73c1b8e5a3..4ab4276283 100644
 --- a/man/localtime.xml
 +++ b/man/localtime.xml
 @@ -20,7 +20,7 @@
@@ -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 15cc1b8851..d0abde5933 100644
+index 5318d6378d..04069dc27b 100644
 --- a/src/basic/time-util.c
 +++ b/src/basic/time-util.c
-@@ -1259,7 +1259,7 @@ int get_timezones(char ***ret) {
+@@ -1277,7 +1277,7 @@ int get_timezones(char ***ret) {
          n_allocated = 2;
          n_zones = 1;
  
@@ -47,7 +47,7 @@ index 15cc1b8851..d0abde5933 100644
          if (f) {
                  for (;;) {
                          _cleanup_free_ char *line = NULL;
-@@ -1354,7 +1354,7 @@ bool timezone_is_valid(const char *name, int log_level) {
+@@ -1372,7 +1372,7 @@ bool timezone_is_valid(const char *name, int log_level) {
          if (p - name >= PATH_MAX)
                  return false;
  
@@ -56,7 +56,7 @@ index 15cc1b8851..d0abde5933 100644
  
          fd = open(t, O_RDONLY|O_CLOEXEC);
          if (fd < 0) {
-@@ -1452,7 +1452,7 @@ int get_timezone(char **ret) {
+@@ -1470,7 +1470,7 @@ int get_timezone(char **ret) {
          if (r < 0)
                  return r; /* returns EINVAL if not a symlink */
  
@@ -66,7 +66,7 @@ index 15cc1b8851..d0abde5933 100644
                  return -EINVAL;
  
 diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
-index a3f442518e..feff49e280 100644
+index 742b43f9fc..f2cb121816 100644
 --- a/src/firstboot/firstboot.c
 +++ b/src/firstboot/firstboot.c
 @@ -459,7 +459,7 @@ static int process_timezone(void) {
@@ -79,10 +79,10 @@ index a3f442518e..feff49e280 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 0117a9939d..d86445b40f 100644
+index f790853104..74b51f4d28 100644
 --- a/src/nspawn/nspawn.c
 +++ b/src/nspawn/nspawn.c
-@@ -1699,8 +1699,8 @@ static int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t u
+@@ -1810,8 +1810,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,7 +94,7 @@ index 0117a9939d..d86445b40f 100644
  
  static bool etc_writable(void) {
 diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
-index 3e78b2f575..de5477a08f 100644
+index a0ee03f134..9ecacad25e 100644
 --- a/src/timedate/timedated.c
 +++ b/src/timedate/timedated.c
 @@ -269,7 +269,7 @@ static int context_read_data(Context *c) {
@@ -128,5 +128,5 @@ index 3e78b2f575..de5477a08f 100644
                          return -ENOMEM;
  
 -- 
-2.27.0
+2.29.2
 
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 50c2a1174dfb..1d17bc4cf777 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 141d1d7acf5f018df86f0a5f7fbe49a8e928fd73 Mon Sep 17 00:00:00 2001
+From aff592e0bf9a911e7f44ce07b66517c38456b627 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,7 +10,7 @@ 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 e0664de826..c521f33a2a 100644
+index 7d2e887660..91c5139eed 100644
 --- a/src/locale/localectl.c
 +++ b/src/locale/localectl.c
 @@ -277,7 +277,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
@@ -23,5 +23,5 @@ index e0664de826..c521f33a2a 100644
                  return log_error_errno(errno, "Failed to open keyboard mapping list. %m");
  
 -- 
-2.27.0
+2.29.2
 
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 8ad310984ed7..8c185c52a271 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 db3946f465c0066fb1775a92c1fcc6450134904d Mon Sep 17 00:00:00 2001
+From d410a7a6d1bb0fe730c3ef690676232bfaa49f85 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 dbbddb68e2..bbeb23223d 100644
+index f406d595e6..f05f579816 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -3369,9 +3369,6 @@ install_data('LICENSE.GPL2',
+@@ -3517,9 +3517,6 @@ install_data('LICENSE.GPL2',
               'src/libsystemd/sd-bus/GVARIANT-SERIALIZATION',
               install_dir : docdir)
  
@@ -22,5 +22,5 @@ index dbbddb68e2..bbeb23223d 100644
  
  check_help = find_program('tools/check-help.sh')
 -- 
-2.27.0
+2.29.2
 
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
deleted file mode 100644
index 0844f85763b3..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0012-Install-default-configuration-into-out-share-factory.patch
+++ /dev/null
@@ -1,314 +0,0 @@
-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
-
-By default systemd should read all its configuration from /etc. Therefor
-we rely on -Dsysconfdir=/etc in meson as default value. Unfortunately
-this would also lead to installation of systemd's own configuration
-files to `/etc` whereas we are limited to /nix/store. To counter that
-this commit introduces two new configuration variables `factoryconfdir`
-and `factorypkgconfdir` to install systemd's own configuration into nix
-store again, while having executables looking up files in /etc.
----
- hwdb.d/meson.build             |  2 +-
- meson.build                    | 11 +++++++----
- network/meson.build            |  2 +-
- src/core/meson.build           | 10 +++++-----
- src/coredump/meson.build       |  2 +-
- src/journal-remote/meson.build |  4 ++--
- src/journal/meson.build        |  2 +-
- src/kernel-install/meson.build |  2 +-
- src/login/meson.build          |  2 +-
- src/network/meson.build        |  2 +-
- src/pstore/meson.build         |  2 +-
- src/resolve/meson.build        |  2 +-
- src/timesync/meson.build       |  2 +-
- src/udev/meson.build           |  4 ++--
- sysctl.d/meson.build           |  2 +-
- tmpfiles.d/meson.build         |  2 +-
- units/meson.build              |  2 +-
- 17 files changed, 29 insertions(+), 26 deletions(-)
-
-diff --git a/hwdb.d/meson.build b/hwdb.d/meson.build
-index 5c77387a26..6404bc01ba 100644
---- a/hwdb.d/meson.build
-+++ b/hwdb.d/meson.build
-@@ -43,7 +43,7 @@ if conf.get('ENABLE_HWDB') == 1
-                      install_dir : udevhwdbdir)
- 
-         meson.add_install_script('sh', '-c',
--                                 mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
-+                                 mkdir_p.format(join_paths(factoryconfdir, 'udev/hwdb.d')))
- 
-         meson.add_install_script('sh', '-c',
-                                  'test -n "$DESTDIR" || @0@/systemd-hwdb update'
-diff --git a/meson.build b/meson.build
-index bbeb23223d..1a9c56fad2 100644
---- a/meson.build
-+++ b/meson.build
-@@ -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')
-+factoryconfdir = join_paths(datadir, 'factory/etc')
-+factorypkgconfdir = join_paths(datadir, 'factory/etc/systemd')
-+factoryxinitrcdir = join_paths(datadir, 'factory/etc/X11/xinit/xinitrc.d')
- bootlibdir = join_paths(prefixdir, 'lib/systemd/boot/efi')
- testsdir = join_paths(prefixdir, 'lib/systemd/tests')
- systemdstatedir = join_paths(localstatedir, 'lib/systemd')
-@@ -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',
--                                 mkdir_p.format(join_paths(sysconfdir, 'binfmt.d')))
-+                                 mkdir_p.format(join_paths(factoryconfdir, 'binfmt.d')))
- endif
- 
- if conf.get('ENABLE_REPART') == 1
-@@ -2767,7 +2770,7 @@ executable(
-         install_dir : rootlibexecdir)
- 
- install_data('src/sleep/sleep.conf',
--             install_dir : pkgsysconfdir)
-+             install_dir : factorypkgconfdir)
- 
- 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',
--                                 mkdir_p.format(join_paths(sysconfdir, 'modules-load.d')))
-+                                 mkdir_p.format(join_paths(factoryconfdir, 'modules-load.d')))
- endif
- 
- public_programs += executable(
-@@ -3352,7 +3355,7 @@ install_subdir('factory/etc',
-                install_dir : factorydir)
- 
- install_data('xorg/50-systemd-user.sh',
--             install_dir : xinitrcdir)
-+             install_dir : factoryxinitrcdir)
- install_data('modprobe.d/systemd.conf',
-              install_dir : modprobedir)
- install_data('LICENSE.GPL2',
-diff --git a/network/meson.build b/network/meson.build
-index 99a650eac3..8105a4e48d 100644
---- a/network/meson.build
-+++ b/network/meson.build
-@@ -11,7 +11,7 @@ if conf.get('ENABLE_NETWORKD') == 1
-                      install_dir : networkdir)
- 
-         meson.add_install_script('sh', '-c',
--                                 mkdir_p.format(join_paths(sysconfdir, 'systemd/network')))
-+                                 mkdir_p.format(join_paths(factoryconfdir, 'systemd/network')))
- endif
- 
- install_data('99-default.link',
-diff --git a/src/core/meson.build b/src/core/meson.build
-index fa95108523..60ee0e31c1 100644
---- a/src/core/meson.build
-+++ b/src/core/meson.build
-@@ -183,8 +183,8 @@ libcore = static_library(
- systemd_sources = files('main.c')
- 
- in_files = [['macros.systemd',   rpmmacrosdir],
--            ['system.conf',      pkgsysconfdir],
--            ['user.conf',        pkgsysconfdir],
-+            ['system.conf',      factorypkgconfdir],
-+            ['user.conf',        factorypkgconfdir],
-             ['systemd.pc',       pkgconfigdatadir],
-             ['triggers.systemd', '']]
- 
-@@ -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))
- 
--meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
--meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
--meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))
-+meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(factorypkgconfdir, 'system')))
-+meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(factorypkgconfdir, 'user')))
-+meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(factorypkgconfdir, 'xdg/systemd')))
-diff --git a/src/coredump/meson.build b/src/coredump/meson.build
-index 7fa5942697..34c865dfa0 100644
---- a/src/coredump/meson.build
-+++ b/src/coredump/meson.build
-@@ -15,7 +15,7 @@ coredumpctl_sources = files('coredumpctl.c')
- 
- if conf.get('ENABLE_COREDUMP') == 1
-         install_data('coredump.conf',
--                     install_dir : pkgsysconfdir)
-+                     install_dir : factorypkgconfdir)
- endif
- 
- tests += [
-diff --git a/src/journal-remote/meson.build b/src/journal-remote/meson.build
-index 87b8ba6495..daff8ec967 100644
---- a/src/journal-remote/meson.build
-+++ b/src/journal-remote/meson.build
-@@ -49,7 +49,7 @@ if conf.get('ENABLE_REMOTE') ==1 and conf.get('HAVE_LIBCURL') == 1
-                 output : 'journal-upload.conf',
-                 configuration : substs)
-         install_data(journal_upload_conf,
--                     install_dir : pkgsysconfdir)
-+                     install_dir : factorypkgconfdir)
- endif
- 
- if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
-@@ -58,7 +58,7 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
-                 output : 'journal-remote.conf',
-                 configuration : substs)
-         install_data(journal_remote_conf,
--                     install_dir : pkgsysconfdir)
-+                     install_dir : factorypkgconfdir)
- 
-         install_data('browse.html',
-                      install_dir : join_paths(pkgdatadir, 'gatewayd'))
-diff --git a/src/journal/meson.build b/src/journal/meson.build
-index 5796f77cac..75d975c260 100644
---- a/src/journal/meson.build
-+++ b/src/journal/meson.build
-@@ -109,7 +109,7 @@ if conf.get('HAVE_QRENCODE') == 1
- endif
- 
- install_data('journald.conf',
--             install_dir : pkgsysconfdir)
-+             install_dir : factorypkgconfdir)
- 
- 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 9ae342dfba..65df666337 100644
---- a/src/kernel-install/meson.build
-+++ b/src/kernel-install/meson.build
-@@ -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')))
- endif
-diff --git a/src/login/meson.build b/src/login/meson.build
-index 0a7d3d5440..ff90149c1c 100644
---- a/src/login/meson.build
-+++ b/src/login/meson.build
-@@ -75,7 +75,7 @@ if conf.get('ENABLE_LOGIND') == 1
-                 output : 'logind.conf',
-                 configuration : substs)
-         install_data(logind_conf,
--                     install_dir : pkgsysconfdir)
-+                     install_dir : factorypkgconfdir)
- 
-         install_data('org.freedesktop.login1.conf',
-                      install_dir : dbuspolicydir)
-diff --git a/src/network/meson.build b/src/network/meson.build
-index b3a88d9910..be56d1e9d7 100644
---- a/src/network/meson.build
-+++ b/src/network/meson.build
-@@ -229,7 +229,7 @@ if conf.get('ENABLE_NETWORKD') == 1
-         endif
- 
-         install_data('networkd.conf',
--                     install_dir : pkgsysconfdir)
-+                     install_dir : factorypkgconfdir)
- 
-         fuzzers += [
-     [['src/network/fuzz-netdev-parser.c',
-diff --git a/src/pstore/meson.build b/src/pstore/meson.build
-index adbac24b54..e9dc88dfa2 100644
---- a/src/pstore/meson.build
-+++ b/src/pstore/meson.build
-@@ -6,5 +6,5 @@ systemd_pstore_sources = files('''
- 
- if conf.get('ENABLE_PSTORE') == 1
-         install_data('pstore.conf',
--                     install_dir : pkgsysconfdir)
-+                     install_dir : factorypkgconfdir)
- endif
-diff --git a/src/resolve/meson.build b/src/resolve/meson.build
-index 92b67b6333..ac5b9a0b0a 100644
---- a/src/resolve/meson.build
-+++ b/src/resolve/meson.build
-@@ -168,7 +168,7 @@ if conf.get('ENABLE_RESOLVE') == 1
-                 output : 'resolved.conf',
-                 configuration : substs)
-         install_data(resolved_conf,
--                     install_dir : pkgsysconfdir)
-+                     install_dir : factorypkgconfdir)
- 
-         install_data('resolv.conf',
-                      install_dir : rootlibexecdir)
-diff --git a/src/timesync/meson.build b/src/timesync/meson.build
-index e5c118c8db..19235df9ca 100644
---- a/src/timesync/meson.build
-+++ b/src/timesync/meson.build
-@@ -27,7 +27,7 @@ if conf.get('ENABLE_TIMESYNCD') == 1
-                 output : 'timesyncd.conf',
-                 configuration : substs)
-         install_data(timesyncd_conf,
--                     install_dir : pkgsysconfdir)
-+                     install_dir : factorypkgconfdir)
-         install_data('org.freedesktop.timesync1.conf',
-                      install_dir : dbuspolicydir)
-         install_data('org.freedesktop.timesync1.service',
-diff --git a/src/udev/meson.build b/src/udev/meson.build
-index aa23b07090..ad004d803a 100644
---- a/src/udev/meson.build
-+++ b/src/udev/meson.build
-@@ -186,7 +186,7 @@ foreach prog : [['ata_id/ata_id.c'],
- endforeach
- 
- install_data('udev.conf',
--             install_dir : join_paths(sysconfdir, 'udev'))
-+             install_dir : join_paths(factoryconfdir, 'udev'))
- 
- configure_file(
-         input : 'udev.pc.in',
-@@ -195,7 +195,7 @@ configure_file(
-         install_dir : pkgconfigdatadir == 'no' ? '' : pkgconfigdatadir)
- 
- meson.add_install_script('sh', '-c',
--                         mkdir_p.format(join_paths(sysconfdir, 'udev/rules.d')))
-+                         mkdir_p.format(join_paths(factoryconfdir, 'udev/rules.d')))
- 
- fuzzers += [
-         [['src/udev/net/fuzz-link-parser.c',
-diff --git a/sysctl.d/meson.build b/sysctl.d/meson.build
-index 3f072e3db7..bd9f843eba 100644
---- a/sysctl.d/meson.build
-+++ b/sysctl.d/meson.build
-@@ -27,4 +27,4 @@ foreach file : in_files
- endforeach
- 
- meson.add_install_script('sh', '-c',
--                         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 0a9582d8b9..3c56ca7d83 100644
---- a/tmpfiles.d/meson.build
-+++ b/tmpfiles.d/meson.build
-@@ -58,5 +58,5 @@ endforeach
- if enable_tmpfiles
-         meson.add_install_script(
-                 'sh', '-c',
--                mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
-+                mkdir_p.format(join_paths(factoryconfdir, 'tmpfiles.d')))
- endif
-diff --git a/units/meson.build b/units/meson.build
-index aa2ed115ea..12e2925226 100644
---- a/units/meson.build
-+++ b/units/meson.build
-@@ -323,7 +323,7 @@ install_data('user-.slice.d/10-defaults.conf',
- 
- meson.add_install_script(meson_make_symlink,
-                          join_paths(pkgsysconfdir, 'user'),
--                         join_paths(sysconfdir, 'xdg/systemd/user'))
-+                         join_paths(factorypkgconfdir, 'xdg/systemd/user'))
- meson.add_install_script(meson_make_symlink,
-                          join_paths(dbussystemservicedir, 'org.freedesktop.systemd1.service'),
-                          join_paths(dbussessionservicedir, 'org.freedesktop.systemd1.service'))
--- 
-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/0012-inherit-systemd-environment-when-calling-generators.patch
index a15220fd3f93..00d085d8a70a 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0012-inherit-systemd-environment-when-calling-generators.patch
@@ -1,7 +1,7 @@
-From bfaa53731ffe984c93c5321099d1341b5059f029 Mon Sep 17 00:00:00 2001
+From a569dc0bdb43edb79e338c897f06de2dfa81cfc7 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.
+Subject: [PATCH 12/18] inherit systemd environment when calling generators.
 
 Systemd generators need access to the environment configured in
 stage-2-init.sh since it schedules fsck and mkfs executions based on
@@ -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 41e0d73736..d02de06f09 100644
+index 1f1450b97c..26b9e41d78 100644
 --- a/src/core/manager.c
 +++ b/src/core/manager.c
-@@ -4095,9 +4095,14 @@ static int manager_run_generators(Manager *m) {
+@@ -4111,9 +4111,14 @@ static int manager_run_generators(Manager *m) {
          argv[4] = NULL;
  
          RUN_WITH_UMASK(0022)
@@ -38,5 +38,5 @@ index 41e0d73736..d02de06f09 100644
  
  finish:
 -- 
-2.27.0
+2.29.2
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0014-add-rootprefix-to-lookup-dir-paths.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0013-add-rootprefix-to-lookup-dir-paths.patch
index dca7b5591d29..51fc4cc30d76 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0014-add-rootprefix-to-lookup-dir-paths.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0013-add-rootprefix-to-lookup-dir-paths.patch
@@ -1,7 +1,7 @@
-From d8b93ef32f3b95a6ce6548a8ad1504a485ffbe81 Mon Sep 17 00:00:00 2001
+From d36d688e32b8f2368499af091c67a7825fadf5ad 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
+Subject: [PATCH 13/18] add rootprefix to lookup dir paths
 
 systemd does not longer use the UDEVLIBEXEC directory as root for
 discovery default udev rules. By adding `$out/lib` to the lookup paths
@@ -12,7 +12,7 @@ files that I might have missed.
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/src/basic/def.h b/src/basic/def.h
-index 970654a1ad..bb261040f8 100644
+index 2e60abb4f1..732ec51d36 100644
 --- a/src/basic/def.h
 +++ b/src/basic/def.h
 @@ -39,13 +39,15 @@
@@ -34,5 +34,5 @@ index 970654a1ad..bb261040f8 100644
  #define CONF_PATHS(n)                           \
          CONF_PATHS_USR(n)                       \
 -- 
-2.27.0
+2.29.2
 
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/0014-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch
index 1bd9e23d25c2..57499d1feec7 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/0014-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch
@@ -1,7 +1,7 @@
-From b3bc0aa899c51d19edfb53af2b00dde64123ab06 Mon Sep 17 00:00:00 2001
+From c02b7eb62e46145ec5b544ebd9338c29b9b8f32c 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
+Subject: [PATCH 14/18] systemd-shutdown: execute scripts in
  /etc/systemd/system-shutdown
 
 This is needed for NixOS to use such scripts as systemd directory is immutable.
@@ -10,7 +10,7 @@ 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 06c9710c6e..dadcc3117d 100644
+index 0d07865542..26d974ef73 100644
 --- a/src/shutdown/shutdown.c
 +++ b/src/shutdown/shutdown.c
 @@ -312,7 +312,7 @@ int main(int argc, char *argv[]) {
@@ -23,5 +23,5 @@ index 06c9710c6e..dadcc3117d 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.27.0
+2.29.2
 
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/0015-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
index d99c7ecc96c1..fa72b66911a3 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/0015-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
@@ -1,7 +1,7 @@
-From 2679210f4ce804713bf1d244ac0fb8ac7b9b1e5f Mon Sep 17 00:00:00 2001
+From f01b73709d68d4581ad561fbb20c59f895132a99 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
+Subject: [PATCH 15/18] systemd-sleep: execute scripts in
  /etc/systemd/system-sleep
 
 This is needed for NixOS to use such scripts as systemd directory is immutable.
@@ -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 7029352ca5..6d9c636872 100644
+index 39ab554290..880ac7ccb0 100644
 --- a/src/sleep/sleep.c
 +++ b/src/sleep/sleep.c
-@@ -182,6 +182,7 @@ static int execute(char **modes, char **states) {
+@@ -178,6 +178,7 @@ static int execute(char **modes, char **states) {
          };
          static const char* const dirs[] = {
                  SYSTEM_SLEEP_PATH,
@@ -22,5 +22,5 @@ index 7029352ca5..6d9c636872 100644
          };
  
 -- 
-2.27.0
+2.29.2
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0017-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0016-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch
index f45e4edd8e84..887864baec3f 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/0017-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0016-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch
@@ -1,7 +1,7 @@
-From 561b0cc9a1faed5729d6f701304a65c2968394ec Mon Sep 17 00:00:00 2001
+From 3db343c08a09a0009da049f37e3f981519eac62f 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
+Subject: [PATCH 16/18] kmod-static-nodes.service: Update ConditionFileNotEmpty
 
 On NixOS, kernel modules of the currently booted systems are located at
 /run/booted-system/kernel-modules/lib/modules/%v/, not /lib/modules/%v/.
@@ -10,7 +10,7 @@ On NixOS, kernel modules of the currently booted systems are located at
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/units/kmod-static-nodes.service.in b/units/kmod-static-nodes.service.in
-index 0971edf9ec..87105a87b9 100644
+index f4170d6a99..9a6a591bea 100644
 --- a/units/kmod-static-nodes.service.in
 +++ b/units/kmod-static-nodes.service.in
 @@ -12,7 +12,7 @@ Description=Create list of static device nodes for the current kernel
@@ -23,5 +23,5 @@ index 0971edf9ec..87105a87b9 100644
  [Service]
  Type=oneshot
 -- 
-2.27.0
+2.29.2
 
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/0017-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
index a964aeede76b..ad92291c258d 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/0017-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
@@ -1,7 +1,7 @@
-From 0d9d7c03054babdbd1fa5f6f266b56e8c96e9ba5 Mon Sep 17 00:00:00 2001
+From 6f0e9a60dcd2160bcab01366bd521630f6f5dc76 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
+Subject: [PATCH 17/18] path-util.h: add placeholder for DEFAULT_PATH_NORMAL
 
 This will be the $PATH used to lookup ExecStart= etc. options, which
 systemd itself uses extensively.
@@ -10,7 +10,7 @@ systemd itself uses extensively.
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/src/basic/path-util.h b/src/basic/path-util.h
-index 30031fca8e..d97145539a 100644
+index d613709f0b..5cced4c115 100644
 --- a/src/basic/path-util.h
 +++ b/src/basic/path-util.h
 @@ -24,11 +24,11 @@
@@ -29,5 +29,5 @@ index 30031fca8e..d97145539a 100644
  #if HAVE_SPLIT_USR
  #  define DEFAULT_PATH DEFAULT_PATH_SPLIT_USR
 -- 
-2.27.0
+2.29.2
 
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0018-logind-seat-debus-show-CanMultiSession-again.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0018-logind-seat-debus-show-CanMultiSession-again.patch
new file mode 100644
index 000000000000..52a749a16b64
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0018-logind-seat-debus-show-CanMultiSession-again.patch
@@ -0,0 +1,26 @@
+From 120b53a3279ba098ee8e5a346b39cb2b7ef4a106 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Mon, 26 Oct 2020 21:21:38 +0100
+Subject: [PATCH 18/18] logind-seat-debus: show CanMultiSession again
+
+Fixes the "switch user" function in Plasma < 5.20.
+---
+ src/login/logind-seat-dbus.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c
+index a60ed2d3c2..69b6271075 100644
+--- a/src/login/logind-seat-dbus.c
++++ b/src/login/logind-seat-dbus.c
+@@ -450,7 +450,7 @@ static const sd_bus_vtable seat_vtable[] = {
+ 
+         SD_BUS_PROPERTY("Id", "s", NULL, offsetof(Seat, id), SD_BUS_VTABLE_PROPERTY_CONST),
+         SD_BUS_PROPERTY("ActiveSession", "(so)", property_get_active_session, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
+-        SD_BUS_PROPERTY("CanMultiSession", "b", property_get_const_true, 0, SD_BUS_VTABLE_PROPERTY_CONST|SD_BUS_VTABLE_HIDDEN),
++        SD_BUS_PROPERTY("CanMultiSession", "b", property_get_const_true, 0, SD_BUS_VTABLE_PROPERTY_CONST),
+         SD_BUS_PROPERTY("CanTTY", "b", property_get_can_tty, 0, SD_BUS_VTABLE_PROPERTY_CONST),
+         SD_BUS_PROPERTY("CanGraphical", "b", property_get_can_graphical, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
+         SD_BUS_PROPERTY("Sessions", "a(so)", property_get_sessions, 0, 0),
+-- 
+2.29.2
+
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0019-Revert-pkg-config-prefix-is-not-really-configurable-.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0019-Revert-pkg-config-prefix-is-not-really-configurable-.patch
new file mode 100644
index 000000000000..11e619593286
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/0019-Revert-pkg-config-prefix-is-not-really-configurable-.patch
@@ -0,0 +1,72 @@
+From cd5b1075499b8498d9c700a317ad11a3199c447a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
+Date: Sun, 6 Dec 2020 08:34:19 +0100
+Subject: [PATCH 19/19] Revert "pkg-config: prefix is not really configurable,
+ don't pretend it was"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This reverts commit 6e65df89c348242dbd10036abc7dd5e8181cf733.
+
+Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
+---
+ src/core/systemd.pc.in | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
+index ccb382e421..8a35e53a4a 100644
+--- a/src/core/systemd.pc.in
++++ b/src/core/systemd.pc.in
+@@ -11,7 +11,7 @@
+ # considered deprecated (though there is no plan to remove them). New names
+ # shall have underscores.
+ 
+-prefix=/usr
++prefix=@prefix@
+ root_prefix=@rootprefix_noslash@
+ rootprefix=${root_prefix}
+ sysconf_dir=@sysconfdir@
+@@ -26,10 +26,10 @@ systemdsystemunitdir=${systemd_system_unit_dir}
+ systemd_system_preset_dir=${rootprefix}/lib/systemd/system-preset
+ systemdsystempresetdir=${systemd_system_preset_dir}
+ 
+-systemd_user_unit_dir=/usr/lib/systemd/user
++systemd_user_unit_dir=${prefix}/lib/systemd/user
+ systemduserunitdir=${systemd_user_unit_dir}
+ 
+-systemd_user_preset_dir=/usr/lib/systemd/user-preset
++systemd_user_preset_dir=${prefix}/lib/systemd/user-preset
+ systemduserpresetdir=${systemd_user_preset_dir}
+ 
+ systemd_system_conf_dir=${sysconfdir}/systemd/system
+@@ -48,7 +48,7 @@ systemduserunitpath=${systemd_user_unit_path}
+ systemd_system_generator_dir=${root_prefix}/lib/systemd/system-generators
+ systemdsystemgeneratordir=${systemd_system_generator_dir}
+ 
+-systemd_user_generator_dir=/usr/lib/systemd/user-generators
++systemd_user_generator_dir=${prefix}/lib/systemd/user-generators
+ systemdusergeneratordir=${systemd_user_generator_dir}
+ 
+ systemd_system_generator_path=/run/systemd/system-generators:/etc/systemd/system-generators:/usr/local/lib/systemd/system-generators:${systemd_system_generator_dir}
+@@ -63,7 +63,7 @@ systemdsleepdir=${systemd_sleep_dir}
+ systemd_shutdown_dir=${root_prefix}/lib/systemd/system-shutdown
+ systemdshutdowndir=${systemd_shutdown_dir}
+ 
+-tmpfiles_dir=/usr/lib/tmpfiles.d
++tmpfiles_dir=${prefix}/lib/tmpfiles.d
+ tmpfilesdir=${tmpfiles_dir}
+ 
+ sysusers_dir=${rootprefix}/lib/sysusers.d
+@@ -78,7 +78,7 @@ binfmtdir=${binfmt_dir}
+ modules_load_dir=${rootprefix}/lib/modules-load.d
+ modulesloaddir=${modules_load_dir}
+ 
+-catalog_dir=/usr/lib/systemd/catalog
++catalog_dir=${prefix}/lib/systemd/catalog
+ catalogdir=${catalog_dir}
+ 
+ system_uid_max=@SYSTEM_UID_MAX@
+-- 
+2.29.2
+
diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/default.nix b/nixpkgs/pkgs/os-specific/linux/systemd/default.nix
index 54060b156f26..e6cb589c9bfe 100644
--- a/nixpkgs/pkgs/os-specific/linux/systemd/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/systemd/default.nix
@@ -1,27 +1,120 @@
-{ 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, pcre2
-, linuxHeaders ? stdenv.cc.libc.linuxHeaders
-, iptables, gnu-efi, bashInteractive
-, gettext, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45
-, ninja, meson, python3Packages, glibcLocales
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, buildPackages
+, ninja
+, meson
+, m4
+, pkgconfig
+, coreutils
+, gperf
+, getent
 , patchelf
+, glibcLocales
+, glib
 , substituteAll
-, getent
-, cryptsetup, lvm2
-, buildPackages
-, perl
-, withSelinux ? false, libselinux
-, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp
-, withKexectools ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) kexectools.meta.platforms, kexectools
+, gettext
+, python3Packages
+
+  # Mandatory dependencies
+, libcap
+, util-linux
+, kbd
+, kmod
+
+  # Optional dependencies
+, pam
+, cryptsetup
+, lvm2
+, audit
+, acl
+, lz4
+, libgcrypt
+, libgpgerror
+, libidn2
+, curl
+, gnutar
+, gnupg
+, zlib
+, xz
+, libuuid
+, libapparmor
+, intltool
+, bzip2
+, pcre2
+, e2fsprogs
+, linuxHeaders ? stdenv.cc.libc.linuxHeaders
+, gnu-efi
+, iptables
+, withSelinux ? false
+, libselinux
+, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms
+, libseccomp
+, withKexectools ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) kexectools.meta.platforms
+, kexectools
+, bashInteractive
+, libmicrohttpd
+
+, withAnalyze ? true
+, withApparmor ? true
+, withCompression ? true  # adds bzip2, lz4 and xz
+, withCoredump ? true
+, withCryptsetup ? true
+, withDocumentation ? true
+, withEfi ? stdenv.hostPlatform.isEfi
+, withHomed ? false
+, withHostnamed ? true
+, withHwdb ? true
+, withImportd ? true
+, withLocaled ? true
+, withLogind ? true
+, withMachined ? true
+, withNetworkd ? true
+, withNss ? true
+, withOomd ? false
+, withPCRE2 ? true
+, withPolkit ? true
+, withPortabled ? false
+, withRemote ? true
+, withResolved ? true
+, withShellCompletions ? true
+, withTimedated ? true
+, withTimesyncd ? true
+, withUserDb ? true
+, libfido2
+, p11-kit
+
+  # name argument
+, pname ? "systemd"
+
+
+, libxslt
+, docbook_xsl
+, docbook_xml_dtd_42
+, docbook_xml_dtd_45
 }:
 
+assert withResolved -> (libgcrypt != null && libgpgerror != null);
+assert withImportd ->
+(curl.dev != null && zlib != null && xz != null && libgcrypt != null
+  && gnutar != null && gnupg != null && withCompression);
+
+assert withEfi -> (gnu-efi != null);
+assert withRemote -> lib.getDev curl != null;
+assert withCoredump -> withCompression;
+
+assert withHomed -> withCryptsetup;
+
+assert withCryptsetup ->
+(cryptsetup != null);
 let
-  version = "246";
-in stdenv.mkDerivation {
-  inherit version;
-  pname = "systemd";
+  wantCurl = withRemote || withImportd;
+
+  version = "247.2";
+in
+stdenv.mkDerivation {
+  inherit version pname;
 
   # 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.
@@ -29,12 +122,13 @@ in stdenv.mkDerivation {
     owner = "systemd";
     repo = "systemd-stable";
     rev = "v${version}";
-    sha256 = "0zrkyxrh5rm45f2l1rnjyv229bcyzawfw7c63jqxwix75px60dyw";
+    sha256 = "091pwrvxz3gcf80shlp28d6l4gvjzc6pb61v4mwxmk9d71qaq7ry";
   };
 
   # 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}`.
+  # Use `find . -name "*.patch" | sort` to get an up-to-date listing of all patches
   patches = [
     ./0001-Start-device-units-for-uninitialised-encrypted-devic.patch
     ./0002-Don-t-try-to-unmount-nix-or-nix-store.patch
@@ -47,13 +141,14 @@ in stdenv.mkDerivation {
     ./0009-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch
     ./0010-localectl-use-etc-X11-xkb-for-list-x11.patch
     ./0011-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch
-    ./0012-Install-default-configuration-into-out-share-factory.patch
-    ./0013-inherit-systemd-environment-when-calling-generators.patch
-    ./0014-add-rootprefix-to-lookup-dir-paths.patch
-    ./0015-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch
-    ./0016-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
-    ./0017-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch
-    ./0018-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
+    ./0012-inherit-systemd-environment-when-calling-generators.patch
+    ./0013-add-rootprefix-to-lookup-dir-paths.patch
+    ./0014-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch
+    ./0015-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
+    ./0016-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch
+    ./0017-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
+    ./0018-logind-seat-debus-show-CanMultiSession-again.patch
+    ./0019-Revert-pkg-config-prefix-is-not-really-configurable-.patch
   ];
 
   postPatch = ''
@@ -70,24 +165,55 @@ in stdenv.mkDerivation {
   outputs = [ "out" "man" "dev" ];
 
   nativeBuildInputs =
-    [ pkgconfig intltool gperf libxslt gettext docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_45
-      ninja meson
+    [
+      pkgconfig
+      gperf
+      ninja
+      meson
       coreutils # meson calls date, stat etc.
       glibcLocales
-      patchelf getent m4
-      perl # to patch the libsystemd.so and remove dependencies on aarch64
+      patchelf
+      getent
+      m4
+
+      intltool
+      gettext
 
-      (buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]))
+      libxslt
+      docbook_xsl
+      docbook_xml_dtd_42
+      docbook_xml_dtd_45
+      (buildPackages.python3Packages.python.withPackages (ps: with ps; [ python3Packages.lxml ]))
     ];
+
   buildInputs =
-    [ linuxHeaders libcap curl.dev kmod xz pam acl
-      cryptsetup libuuid glib libgcrypt libgpgerror libidn2
-      pcre2 ] ++
-      stdenv.lib.optional withKexectools kexectools ++
-      stdenv.lib.optional withLibseccomp libseccomp ++
-    [ libffi audit lz4 bzip2 libapparmor
-      iptables gnu-efi
-    ] ++ stdenv.lib.optional withSelinux libselinux;
+    [
+      acl
+      audit
+      glib
+      kmod
+      libcap
+      libgcrypt
+      libidn2
+      libuuid
+      linuxHeaders
+      pam
+    ]
+
+    ++ lib.optional withApparmor libapparmor
+    ++ lib.optional wantCurl (lib.getDev curl)
+    ++ lib.optionals withCompression [ bzip2 lz4 xz ]
+    ++ lib.optional withCryptsetup (lib.getDev cryptsetup.dev)
+    ++ lib.optional withEfi gnu-efi
+    ++ lib.optional withKexectools kexectools
+    ++ lib.optional withLibseccomp libseccomp
+    ++ lib.optional withNetworkd iptables
+    ++ lib.optional withPCRE2 pcre2
+    ++ lib.optional withResolved libgpgerror
+    ++ lib.optional withSelinux libselinux
+    ++ lib.optional withRemote libmicrohttpd
+    ++ lib.optionals withHomed [ p11-kit libfido2 ]
+  ;
 
   #dontAddPrefix = true;
 
@@ -103,29 +229,41 @@ in stdenv.mkDerivation {
     "-Dsetfont-path=${kbd}/bin/setfont"
     "-Dtty-gid=3" # tty in NixOS has gid 3
     "-Ddebug-shell=${bashInteractive}/bin/bash"
+    "-Dglib=${lib.boolToString (glib != null)}"
     # while we do not run tests we should also not build them. Removes about 600 targets
     "-Dtests=false"
-    "-Dimportd=true"
-    "-Dlz4=true"
-    "-Dhomed=false"
-    "-Dhostnamed=true"
-    "-Dnetworkd=true"
-    "-Dportabled=false"
-    "-Dremote=false"
+    "-Danalyze=${lib.boolToString withAnalyze}"
+    "-Dgcrypt=${lib.boolToString (libgcrypt != null)}"
+    "-Dimportd=${lib.boolToString withImportd}"
+    "-Dlz4=${lib.boolToString withCompression}"
+    "-Dhomed=${stdenv.lib.boolToString withHomed}"
+    "-Dlogind=${lib.boolToString withLogind}"
+    "-Dlocaled=${lib.boolToString withLocaled}"
+    "-Dhostnamed=${lib.boolToString withHostnamed}"
+    "-Dmachined=${lib.boolToString withMachined}"
+    "-Dnetworkd=${lib.boolToString withNetworkd}"
+    "-Doomd=${lib.boolToString withOomd}"
+    "-Dpolkit=${lib.boolToString withPolkit}"
+    "-Dcryptsetup=${lib.boolToString withCryptsetup}"
+    "-Dportabled=${lib.boolToString withPortabled}"
+    "-Dhwdb=${lib.boolToString withHwdb}"
+    "-Dremote=${lib.boolToString withRemote}"
     "-Dsysusers=false"
-    "-Dtimedated=true"
-    "-Dtimesyncd=true"
+    "-Dtimedated=${lib.boolToString withTimedated}"
+    "-Dtimesyncd=${lib.boolToString withTimesyncd}"
+    "-Duserdb=${lib.boolToString withUserDb}"
+    "-Dcoredump=${lib.boolToString withCoredump}"
     "-Dfirstboot=false"
-    "-Dlocaled=true"
-    "-Dresolve=true"
+    "-Dresolve=${lib.boolToString withResolved}"
     "-Dsplit-usr=false"
-    "-Dlibcurl=true"
+    "-Dlibcurl=${lib.boolToString wantCurl}"
     "-Dlibidn=false"
     "-Dlibidn2=true"
     "-Dquotacheck=false"
     "-Dldconfig=false"
     "-Dsmack=true"
     "-Db_pie=true"
+    "-Dinstall-sysconfdir=false"
     /*
     As of now, systemd doesn't allow runtime configuration of these values. So
     the settings in /etc/login.defs have no effect on it. Many people think this
@@ -140,26 +278,36 @@ in stdenv.mkDerivation {
     "-Dsystem-gid-max=999"
     # "-Dtime-epoch=1"
 
-    (if !stdenv.hostPlatform.isEfi then "-Dgnu-efi=false" else "-Dgnu-efi=true")
-    "-Defi-libdir=${toString gnu-efi}/lib"
-    "-Defi-includedir=${toString gnu-efi}/include/efi"
-    "-Defi-ldsdir=${toString gnu-efi}/lib"
-
     "-Dsysvinit-path="
     "-Dsysvrcnd-path="
 
     "-Dkill-path=${coreutils}/bin/kill"
     "-Dkmod-path=${kmod}/bin/kmod"
-    "-Dsulogin-path=${utillinux}/bin/sulogin"
-    "-Dmount-path=${utillinux}/bin/mount"
-    "-Dumount-path=${utillinux}/bin/umount"
+    "-Dsulogin-path=${util-linux}/bin/sulogin"
+    "-Dmount-path=${util-linux}/bin/mount"
+    "-Dumount-path=${util-linux}/bin/umount"
     "-Dcreate-log-dirs=false"
-    # Upstream uses cgroupsv2 by default. To support docker and other
-    # container managers we still need v1.
-    "-Ddefault-hierarchy=hybrid"
+
+    # Use cgroupsv2. This is already the upstream default, but better be explicit.
+    "-Ddefault-hierarchy=unified"
     # Upstream defaulted to disable manpages since they optimize for the much
     # more frequent development builds
     "-Dman=true"
+
+    "-Defi=${lib.boolToString withEfi}"
+    "-Dgnu-efi=${lib.boolToString withEfi}"
+  ] ++ lib.optionals withEfi [
+    "-Defi-libdir=${toString gnu-efi}/lib"
+    "-Defi-includedir=${toString gnu-efi}/include/efi"
+    "-Defi-ldsdir=${toString gnu-efi}/lib"
+  ] ++ lib.optionals (withShellCompletions == false) [
+    "-Dbashcompletiondir=no"
+    "-Dzshcompletiondir=no"
+  ] ++ lib.optionals (!withNss) [
+    "-Dnss-myhostname=false"
+    "-Dnss-mymachines=false"
+    "-Dnss-resolve=false"
+    "-Dnss-systemd=false"
   ];
 
   preConfigure = ''
@@ -171,7 +319,6 @@ in stdenv.mkDerivation {
       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 \
@@ -185,20 +332,18 @@ in stdenv.mkDerivation {
       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 /sbin/mkswap ${lib.getBin util-linux}/sbin/mkswap \
+        --replace /sbin/swapon ${lib.getBin util-linux}/sbin/swapon \
+        --replace /sbin/swapoff ${lib.getBin util-linux}/sbin/swapoff \
         --replace /bin/echo ${coreutils}/bin/echo \
         --replace /bin/cat ${coreutils}/bin/cat \
-        --replace /sbin/sulogin ${lib.getBin utillinux}/sbin/sulogin \
+        --replace /sbin/sulogin ${lib.getBin util-linux}/sbin/sulogin \
         --replace /sbin/modprobe ${lib.getBin kmod}/sbin/modprobe \
         --replace /usr/lib/systemd/systemd-fsck $out/lib/systemd/systemd-fsck \
         --replace /bin/plymouth /run/current-system/sw/bin/plymouth # To avoid dependency
     done
 
-    for dir in tools src/resolve test src/test; do
+    for dir in tools src/resolve test src/test src/shared; do
       patchShebangs $dir
     done
 
@@ -226,14 +371,17 @@ in stdenv.mkDerivation {
   NIX_CFLAGS_COMPILE = toString [
     # Can't say ${polkit.bin}/bin/pkttyagent here because that would
     # lead to a cyclic dependency.
-    "-UPOLKIT_AGENT_BINARY_PATH" "-DPOLKIT_AGENT_BINARY_PATH=\"/run/current-system/sw/bin/pkttyagent\""
+    "-UPOLKIT_AGENT_BINARY_PATH"
+    "-DPOLKIT_AGENT_BINARY_PATH=\"/run/current-system/sw/bin/pkttyagent\""
 
     # Set the release_agent on /sys/fs/cgroup/systemd to the
     # currently running systemd (/run/current-system/systemd) so
     # that we don't use an obsolete/garbage-collected release agent.
-    "-USYSTEMD_CGROUP_AGENT_PATH" "-DSYSTEMD_CGROUP_AGENT_PATH=\"/run/current-system/systemd/lib/systemd/systemd-cgroups-agent\""
+    "-USYSTEMD_CGROUP_AGENT_PATH"
+    "-DSYSTEMD_CGROUP_AGENT_PATH=\"/run/current-system/systemd/lib/systemd/systemd-cgroups-agent\""
 
-    "-USYSTEMD_BINARY_PATH" "-DSYSTEMD_BINARY_PATH=\"/run/current-system/systemd/lib/systemd/systemd\""
+    "-USYSTEMD_BINARY_PATH"
+    "-DSYSTEMD_BINARY_PATH=\"/run/current-system/systemd/lib/systemd/systemd\""
   ];
 
   doCheck = false; # fails a bunch of tests
@@ -265,7 +413,9 @@ in stdenv.mkDerivation {
 
     # "kernel-install" shouldn't be used on NixOS.
     find $out -name "*kernel-install*" -exec rm {} \;
-  ''; # */
+  '' + lib.optionalString (!withDocumentation) ''
+    rm -rf $out/share/doc
+  '';
 
   enableParallelBuilding = true;
 
@@ -277,12 +427,12 @@ in stdenv.mkDerivation {
   # runtime; otherwise we can't and we need to reboot.
   passthru.interfaceVersion = 2;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://www.freedesktop.org/wiki/Software/systemd/";
     description = "A system and service manager for Linux";
     license = licenses.lgpl21Plus;
     platforms = platforms.linux;
     priority = 10;
-    maintainers = with maintainers; [ andir eelco flokli ];
+    maintainers = with maintainers; [ andir eelco flokli kloenk ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/tomb/default.nix b/nixpkgs/pkgs/os-specific/linux/tomb/default.nix
index 150c64a04514..0c5a02061b82 100644
--- a/nixpkgs/pkgs/os-specific/linux/tomb/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/tomb/default.nix
@@ -1,16 +1,16 @@
 { stdenv, lib, fetchFromGitHub, makeWrapper
-, gettext, zsh, pinentry, cryptsetup, gnupg, utillinux, e2fsprogs, sudo
+, gettext, zsh, pinentry, cryptsetup, gnupg, util-linux, e2fsprogs, sudo
 }:
 
 stdenv.mkDerivation rec {
   pname = "tomb";
-  version = "2.7";
+  version = "2.8.1";
 
   src = fetchFromGitHub {
     owner  = "dyne";
     repo   = "Tomb";
     rev    = "v${version}";
-    sha256 = "1vzkpzci6cp1r1q2n34pcgcns78i726k8d89dd6pibyj0vfnkl57";
+    sha256 = "03zj9az5626kjg96rkqr5sjydqwlrzhz0gq35r62sajv6mn2qm6s";
   };
 
   buildInputs = [ sudo zsh pinentry ];
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
     install -Dm644 doc/tomb.1 $out/share/man/man1/tomb.1
 
     wrapProgram $out/bin/tomb \
-      --prefix PATH : $out/bin:${lib.makeBinPath [ cryptsetup gettext gnupg pinentry utillinux e2fsprogs ]}
+      --prefix PATH : $out/bin:${lib.makeBinPath [ cryptsetup gettext gnupg pinentry util-linux e2fsprogs ]}
   '';
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/os-specific/linux/trace-cmd/default.nix b/nixpkgs/pkgs/os-specific/linux/trace-cmd/default.nix
index a80635c53cef..ddd411702151 100644
--- a/nixpkgs/pkgs/os-specific/linux/trace-cmd/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/trace-cmd/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
     "man_dir=${placeholder "man"}/share/man"
     "libdir=${placeholder "lib"}/lib"
     "includedir=${placeholder "dev"}/include"
-    "BASH_COMPLETE_DIR=${placeholder "out"}/etc/bash_completion.d"
+    "BASH_COMPLETE_DIR=${placeholder "out"}/share/bash-completion/completions"
   ];
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/os-specific/linux/udisks/1-default.nix b/nixpkgs/pkgs/os-specific/linux/udisks/1-default.nix
index f8876e5d155a..725706f9b0eb 100644
--- a/nixpkgs/pkgs/os-specific/linux/udisks/1-default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/udisks/1-default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, pkgconfig, sg3_utils, udev, glib, dbus, dbus-glib
 , polkit, parted, lvm2, libatasmart, intltool, libuuid, mdadm
-, libxslt, docbook_xsl, utillinux, libgudev }:
+, libxslt, docbook_xsl, util-linux, libgudev }:
 
 stdenv.mkDerivation rec {
   name = "udisks-1.0.5";
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
 
       substituteInPlace src/main.c --replace \
         "/sbin:/bin:/usr/sbin:/usr/bin" \
-        "${utillinux}/bin:${mdadm}/sbin:/run/current-system/sw/bin:/run/current-system/sw/bin"
+        "${util-linux}/bin:${mdadm}/sbin:/run/current-system/sw/bin:/run/current-system/sw/bin"
     '';
 
   buildInputs =
diff --git a/nixpkgs/pkgs/os-specific/linux/udisks/2-default.nix b/nixpkgs/pkgs/os-specific/linux/udisks/2-default.nix
index 3b502dbe48f5..b47d31ab6fdc 100644
--- a/nixpkgs/pkgs/os-specific/linux/udisks/2-default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/udisks/2-default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchFromGitHub, fetchpatch, substituteAll, libtool, pkgconfig, gettext, gnused
 , gtk-doc, acl, systemd, glib, libatasmart, polkit, coreutils, bash, which
-, expat, libxslt, docbook_xsl, utillinux, mdadm, libgudev, libblockdev, parted
+, expat, libxslt, docbook_xsl, util-linux, mdadm, libgudev, libblockdev, parted
 , gobject-introspection, docbook_xml_dtd_412, docbook_xml_dtd_43, autoconf, automake
 , xfsprogs, f2fs-tools, dosfstools, e2fsprogs, btrfs-progs, exfat, nilfs-utils, ntfs3g
 }:
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
     (substituteAll {
       src = ./fix-paths.patch;
       bash = "${bash}/bin/bash";
-      blkid = "${utillinux}/bin/blkid";
+      blkid = "${util-linux}/bin/blkid";
       false = "${coreutils}/bin/false";
       mdadm = "${mdadm}/bin/mdadm";
       sed = "${gnused}/bin/sed";
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
       src = ./force-path.patch;
       path = stdenv.lib.makeBinPath [
         btrfs-progs coreutils dosfstools e2fsprogs exfat f2fs-tools nilfs-utils
-        xfsprogs ntfs3g parted utillinux
+        xfsprogs ntfs3g parted util-linux
       ];
     })
 
diff --git a/nixpkgs/pkgs/os-specific/linux/usbguard/default.nix b/nixpkgs/pkgs/os-specific/linux/usbguard/default.nix
index ad751b9cfe06..e2746c7a1e7a 100644
--- a/nixpkgs/pkgs/os-specific/linux/usbguard/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/usbguard/default.nix
@@ -55,9 +55,9 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   meta = {
-    description = "The USBGuard software framework helps to protect your computer against BadUSB.";
+    description = "The USBGuard software framework helps to protect your computer against BadUSB";
     homepage = "https://usbguard.github.io/";
-    license = licenses.gpl2;
+    license = licenses.gpl2Plus;
     maintainers = [ maintainers.tnias ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/usbip/default.nix b/nixpkgs/pkgs/os-specific/linux/usbip/default.nix
index ffd33b6ff854..9a009b74f083 100644
--- a/nixpkgs/pkgs/os-specific/linux/usbip/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/usbip/default.nix
@@ -1,11 +1,11 @@
-{ lib, stdenv, kernel, udev, autoconf, automake, libtool }:
+{ lib, stdenv, kernel, udev, autoconf, automake, libtool, kernelOlder }:
 
 stdenv.mkDerivation {
   name = "usbip-${kernel.name}";
 
   src = kernel.src;
 
-  patches = lib.optionals (lib.versionAtLeast "5.4" kernel.version) [
+  patches = lib.optionals (kernelOlder "5.4") [
     # fixes build with gcc8
     ./fix-snprintf-truncation.patch
     # fixes build with gcc9
@@ -27,5 +27,6 @@ stdenv.mkDerivation {
     description = "allows to pass USB device from server to client over the network";
     license = licenses.gpl2;
     platforms = platforms.linux;
+    broken = kernelOlder "4.10";
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix b/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix
index ac6ad8a4bb76..4f8f7cae7f8a 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.36";
+  version = "2.36.1";
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/util-linux/v${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "1cg0m4psswg71v6wrqc2bngcw20fsp01vbijxdzvdf8kxdkiqjwy";
+    sha256 = "1vbyydl1b13lx73di4bhc4br9ih24hcqv7bky0kyrn1c2x1c5yh9";
   };
 
   patches = [
diff --git a/nixpkgs/pkgs/os-specific/linux/wireguard/default.nix b/nixpkgs/pkgs/os-specific/linux/wireguard/default.nix
index b8b65fecafc2..25a59b14ab82 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.20200908";
+  version = "1.0.20201112";
 
   src = fetchzip {
     url = "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-${version}.tar.xz";
-    sha256 = "1nd2kc3c62907kxm1084dw7krd8xsy3hxydmcpz4jvk03vm5dnkg";
+    sha256 = "sha256-HnYvjZ3VUH79NwNIvyTTygWYbVqEL2ttvlOlLiHhb5s=";
   };
 
   hardeningDisable = [ "pic" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/xf86-input-cmt/default.nix b/nixpkgs/pkgs/os-specific/linux/xf86-input-cmt/default.nix
index 9f9b278d6f77..93fd7dd5b0e6 100644
--- a/nixpkgs/pkgs/os-specific/linux/xf86-input-cmt/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/xf86-input-cmt/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
   ];
 
   meta = with stdenv.lib; {
-    description = "Chromebook touchpad driver.";
+    description = "Chromebook touchpad driver";
     license = licenses.bsd3;
     platforms = platforms.linux;
     homepage = "https://www.github.com/hugegreenbug/xf86-input-cmt";
diff --git a/nixpkgs/pkgs/os-specific/linux/xpadneo/default.nix b/nixpkgs/pkgs/os-specific/linux/xpadneo/default.nix
index 5f1018969212..e0e2bcc21d9b 100644
--- a/nixpkgs/pkgs/os-specific/linux/xpadneo/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/xpadneo/default.nix
@@ -1,14 +1,14 @@
-{ stdenv, fetchFromGitHub, kernel, bluez }:
+{ lib, stdenv, fetchFromGitHub, kernel, bluez }:
 
 stdenv.mkDerivation rec {
   pname = "xpadneo";
-  version = "0.8.3";
+  version = "0.8.4";
 
   src = fetchFromGitHub {
     owner = "atar-axis";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1g3ml7vq0dzwl9815c3l0i0qz3a7v8c376c6dqbfkbj2f1d43vqs";
+    sha256 = "113xa2mxs2hc4fpjdk3jhhchy81kli6jxdd6vib7zz61n10cjb85";
   };
 
   setSourceRoot = ''
@@ -34,10 +34,11 @@ stdenv.mkDerivation rec {
   installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
   installTargets = [ "modules_install" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Advanced Linux driver for Xbox One wireless controllers";
     homepage = "https://atar-axis.github.io/xpadneo";
     license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ metadark ];
     platforms = platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/zfs/BACKPORT-Linux-5.8-compat-__vmalloc.patch b/nixpkgs/pkgs/os-specific/linux/zfs/BACKPORT-Linux-5.8-compat-__vmalloc.patch
deleted file mode 100644
index 780ce83d84f3..000000000000
--- a/nixpkgs/pkgs/os-specific/linux/zfs/BACKPORT-Linux-5.8-compat-__vmalloc.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-From 6cc95288ccea12ad7b67b2b5b3997dfad8e5b5c9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Michael=20Niew=C3=B6hner?=
- <c0d3z3r0@users.noreply.github.com>
-Date: Tue, 9 Jun 2020 01:32:02 +0200
-Subject: [PATCH] BACKPORT: Linux 5.8 compat: __vmalloc()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The `pgprot` argument has been removed from `__vmalloc` in Linux 5.8,
-being `PAGE_KERNEL` always now [1].
-
-Detect this during configure and define a wrapper for older kernels.
-
-[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/mm/vmalloc.c?h=next-20200605&id=88dca4ca5a93d2c09e5bbc6a62fbfc3af83c4fca
-
-Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Co-authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
-Co-authored-by: Michael Niewöhner <foss@mniewoehner.de>
-Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
-Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
-Closes #10422
----
- config/kernel-kmem.m4       | 26 ++++++++++++++++++++++++++
- config/kernel.m4            |  2 ++
- include/spl/sys/kmem.h      |  9 +++++++++
- module/spl/spl-kmem-cache.c |  4 ++--
- module/spl/spl-kmem.c       |  9 ++++-----
- 5 files changed, 43 insertions(+), 7 deletions(-)
-
-diff --git a/config/kernel-kmem.m4 b/config/kernel-kmem.m4
-index cc055e530..f1c0d2412 100644
---- a/config/kernel-kmem.m4
-+++ b/config/kernel-kmem.m4
-@@ -56,3 +56,29 @@ AC_DEFUN([SPL_AC_DEBUG_KMEM_TRACKING], [
- 	AC_MSG_CHECKING([whether detailed kmem tracking is enabled])
- 	AC_MSG_RESULT([$enable_debug_kmem_tracking])
- ])
-+
-+dnl #
-+dnl # 5.8 API,
-+dnl # __vmalloc PAGE_KERNEL removal
-+dnl #
-+AC_DEFUN([ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL], [
-+	ZFS_LINUX_TEST_SRC([__vmalloc], [
-+		#include <linux/mm.h>
-+		#include <linux/vmalloc.h>
-+	],[
-+		void *p __attribute__ ((unused));
-+
-+		p = __vmalloc(0, GFP_KERNEL, PAGE_KERNEL);
-+	])
-+])
-+
-+AC_DEFUN([ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL], [
-+	AC_MSG_CHECKING([whether __vmalloc(ptr, flags, pageflags) is available])
-+	ZFS_LINUX_TEST_RESULT([__vmalloc], [
-+		AC_MSG_RESULT(yes)
-+		AC_DEFINE(HAVE_VMALLOC_PAGE_KERNEL, 1, [__vmalloc page flags exists])
-+	],[
-+		AC_MSG_RESULT(no)
-+	])
-+])
-+-
-diff --git a/config/kernel.m4 b/config/kernel.m4
-index b67fcef8c..23edfdcd8 100644
---- a/config/kernel.m4
-+++ b/config/kernel.m4
-@@ -45,6 +45,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
- 	ZFS_AC_KERNEL_SRC_SCHED
- 	ZFS_AC_KERNEL_SRC_USLEEP_RANGE
- 	ZFS_AC_KERNEL_SRC_KMEM_CACHE
-+	ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL
- 	ZFS_AC_KERNEL_SRC_WAIT
- 	ZFS_AC_KERNEL_SRC_INODE_TIMES
- 	ZFS_AC_KERNEL_SRC_INODE_LOCK
-@@ -163,6 +164,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
- 	ZFS_AC_KERNEL_SCHED
- 	ZFS_AC_KERNEL_USLEEP_RANGE
- 	ZFS_AC_KERNEL_KMEM_CACHE
-+	ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL
- 	ZFS_AC_KERNEL_WAIT
- 	ZFS_AC_KERNEL_INODE_TIMES
- 	ZFS_AC_KERNEL_INODE_LOCK
-diff --git a/include/spl/sys/kmem.h b/include/spl/sys/kmem.h
-index 72d3a7765..ca15bfe7f 100644
---- a/include/spl/sys/kmem.h
-+++ b/include/spl/sys/kmem.h
-@@ -169,6 +169,15 @@ extern void *spl_kmem_alloc(size_t sz, int fl, const char *func, int line);
- extern void *spl_kmem_zalloc(size_t sz, int fl, const char *func, int line);
- extern void spl_kmem_free(const void *ptr, size_t sz);
- 
-+/*
-+ * 5.8 API change, pgprot_t argument removed.
-+ */
-+#ifdef HAVE_VMALLOC_PAGE_KERNEL
-+#define	spl_vmalloc(size, flags)	__vmalloc(size, flags, PAGE_KERNEL)
-+#else
-+#define	spl_vmalloc(size, flags)	__vmalloc(size, flags)
-+#endif
-+
- /*
-  * The following functions are only available for internal use.
-  */
-diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c
-index d71b4b348..4866b2993 100644
---- a/module/spl/spl-kmem-cache.c
-+++ b/module/spl/spl-kmem-cache.c
-@@ -203,7 +203,7 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags)
- 		ASSERT(ISP2(size));
- 		ptr = (void *)__get_free_pages(lflags, get_order(size));
- 	} else {
--		ptr = __vmalloc(size, lflags | __GFP_HIGHMEM, PAGE_KERNEL);
-+		ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM);
- 	}
- 
- 	/* Resulting allocated memory will be page aligned */
-@@ -1242,7 +1242,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj)
- 	 * allocation.
- 	 *
- 	 * However, this can't be applied to KVM_VMEM due to a bug that
--	 * __vmalloc() doesn't honor gfp flags in page table allocation.
-+	 * spl_vmalloc() doesn't honor gfp flags in page table allocation.
- 	 */
- 	if (!(skc->skc_flags & KMC_VMEM)) {
- 		rc = __spl_cache_grow(skc, flags | KM_NOSLEEP);
-diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
-index cee69ad43..ca1fc145f 100644
---- a/module/spl/spl-kmem.c
-+++ b/module/spl/spl-kmem.c
-@@ -172,16 +172,15 @@ spl_kmem_alloc_impl(size_t size, int flags, int node)
- 		 * kmem_zalloc() callers.
- 		 *
- 		 * For vmem_alloc() and vmem_zalloc() callers it is permissible
--		 * to use __vmalloc().  However, in general use of __vmalloc()
--		 * is strongly discouraged because a global lock must be
--		 * acquired.  Contention on this lock can significantly
-+		 * to use spl_vmalloc().  However, in general use of
-+		 * spl_vmalloc() is strongly discouraged because a global lock
-+		 * must be acquired.  Contention on this lock can significantly
- 		 * impact performance so frequently manipulating the virtual
- 		 * address space is strongly discouraged.
- 		 */
- 		if ((size > spl_kmem_alloc_max) || use_vmem) {
- 			if (flags & KM_VMEM) {
--				ptr = __vmalloc(size, lflags | __GFP_HIGHMEM,
--				    PAGE_KERNEL);
-+				ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM);
- 			} else {
- 				return (NULL);
- 			}
--- 
-2.25.1
-
diff --git a/nixpkgs/pkgs/os-specific/linux/zfs/default.nix b/nixpkgs/pkgs/os-specific/linux/zfs/default.nix
index 27e26b13a533..8bdf9efd4459 100644
--- a/nixpkgs/pkgs/os-specific/linux/zfs/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/zfs/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, fetchpatch
-, autoreconfHook, utillinux, nukeReferences, coreutils
+, autoreconfHook269, util-linux, nukeReferences, coreutils
 , perl, buildPackages
 , configFile ? "all"
 
@@ -9,6 +9,7 @@
 , nfs-utils
 , gawk, gnugrep, gnused, systemd
 , smartmontools, sysstat, sudo
+, pkgconfig
 
 # Kernel dependencies
 , kernel ? null
@@ -48,13 +49,11 @@ let
         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/${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"'
+        substituteInPlace ./module/os/linux/zfs/zfs_ctldir.c \
+          --replace '"/usr/bin/env", "umount"' '"${util-linux}/bin/umount", "-n"' \
+          --replace '"/usr/bin/env", "mount"'  '"${util-linux}/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/${optionalString isUnstable "os/linux/"}nfs.c --replace "/usr/sbin/exportfs" "${
+        substituteInPlace ./lib/libshare/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
@@ -64,7 +63,6 @@ let
         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"
 
         substituteInPlace ./contrib/initramfs/hooks/Makefile.am \
           --replace "/usr/share/initramfs-tools/hooks" "$out/usr/share/initramfs-tools/hooks"
@@ -81,30 +79,22 @@ 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 "
 
         substituteInPlace ./cmd/vdev_id/vdev_id \
           --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \
           "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}"
-      '' + optionalString stdenv.hostPlatform.isMusl ''
-        substituteInPlace config/user-libtirpc.m4 \
-          --replace /usr/include/tirpc ${libtirpc}/include/tirpc
       '';
 
-      nativeBuildInputs = [ autoreconfHook nukeReferences ]
-        ++ optionals buildKernel (kernel.moduleBuildDependencies ++ [ perl ]);
-      buildInputs = optionals buildUser [ zlib libuuid attr ]
+      nativeBuildInputs = [ autoreconfHook269 nukeReferences ]
+        ++ optionals buildKernel (kernel.moduleBuildDependencies ++ [ perl ])
+        ++ optional buildUser pkgconfig;
+      buildInputs = optionals buildUser [ zlib libuuid attr libtirpc ]
         ++ optional buildUser openssl
-        ++ optional (buildUser && enablePython) python3
-        ++ optional stdenv.hostPlatform.isMusl libtirpc;
+        ++ optional (buildUser && enablePython) python3;
 
       # for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work
       NIX_CFLAGS_LINK = "-lgcc_s";
@@ -113,6 +103,7 @@ let
 
       configureFlags = [
         "--with-config=${configFile}"
+        "--with-tirpc=1"
         (withFeatureAs (buildUser && enablePython) "python" python3.interpreter)
       ] ++ optionals buildUser [
         "--with-dracutdir=$(out)/lib/dracut"
@@ -143,7 +134,7 @@ let
       postInstall = optionalString buildKernel ''
         # Add reference that cannot be detected due to compressed kernel module
         mkdir -p "$out/nix-support"
-        echo "${utillinux}" >> "$out/nix-support/extra-refs"
+        echo "${util-linux}" >> "$out/nix-support/extra-refs"
       '' + optionalString buildUser ''
         # Remove provided services as they are buggy
         rm $out/etc/systemd/system/zfs-import-*.service
@@ -154,9 +145,6 @@ let
         substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target"
         done
 
-        # Fix pkgconfig.
-        ln -s ../share/pkgconfig $out/lib/pkgconfig
-
         # Remove tests because they add a runtime dependency on gcc
         rm -rf $out/share/zfs/zfs-tests
 
@@ -165,10 +153,11 @@ let
         (cd $out/share/bash-completion/completions; ln -s zfs zpool)
       '';
 
-      postFixup = ''
-        path="PATH=${makeBinPath [ coreutils gawk gnused gnugrep utillinux smartmontools sysstat sudo ]}"
+      postFixup = let
+        path = "PATH=${makeBinPath [ coreutils gawk gnused gnugrep util-linux smartmontools sysstat ]}:$PATH";
+      in ''
         for i in $out/libexec/zfs/zpool.d/*; do
-          sed -i "2i$path" $i
+          sed -i '2i${path}' $i
         done
       '';
 
@@ -181,12 +170,17 @@ let
           Copy-On-Write filesystem with data integrity detection and repair,
           snapshotting, cloning, block devices, deduplication, and more.
         '';
-        homepage = "https://zfsonlinux.org/";
+        homepage = "https://github.com/openzfs/zfs";
         license = licenses.cddl;
         platforms = platforms.linux;
-        maintainers = with maintainers; [ jcumming wizeman fpletz globin ];
+        maintainers = with maintainers; [ hmenke jcumming jonringer wizeman fpletz globin mic92 ];
       };
     };
+
+  linux-rt-patch = fetchpatch {
+    url = "https://github.com/openzfs/zfs/commit/ab4fb9b74e9d089fc9a261c4f41e19697ad6a4ca.patch";
+    sha256 = "1nrxmb4rhrkgncav6dzwm66l0700fi72qkkcs0w6pkm850srws36";
+  };
 in {
   # also check if kernel version constraints in
   # ./nixos/modules/tasks/filesystems/zfs.nix needs
@@ -196,10 +190,11 @@ in {
     # incompatibleKernelVersion = "4.20";
 
     # this package should point to the latest release.
-    version = "0.8.4";
+    version = "2.0.0";
+
+    sha256 = "1kriz6pg8wj98izvjc60wp23lgcp4k3mzhpkgj74np73rzgy6v8r";
 
-    sha256 = "1hl4n900d24gl4vd65qdzq4m62b7bpvckldazcbd1xqcn8xhi6wp";
-    extraPatches = [ ./BACKPORT-Linux-5.8-compat-__vmalloc.patch ];
+    extraPatches = [ linux-rt-patch ];
   };
 
   zfsUnstable = common {
@@ -207,9 +202,10 @@ in {
     # incompatibleKernelVersion = "4.19";
 
     # this package should point to a version / git revision compatible with the latest kernel release
-    version = "2.0.0-rc1";
+    version = "2.0.0";
+
+    sha256 = "1kriz6pg8wj98izvjc60wp23lgcp4k3mzhpkgj74np73rzgy6v8r";
 
-    sha256 = "0d1m5zwgqzfwbscvb60zvzkjgl5nkbvas22vjsyci3xygz0qwjsb";
-    isUnstable = true;
+    extraPatches = [ linux-rt-patch ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/zsa-udev-rules/default.nix b/nixpkgs/pkgs/os-specific/linux/zsa-udev-rules/default.nix
new file mode 100644
index 000000000000..76150affe49f
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/zsa-udev-rules/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  pname = "zsa-udev-rules";
+  version = "unstable-2020-12-16";
+
+  # TODO: use version and source from nixpkgs/pkgs/development/tools/wally-cli/default.nix after next release
+  src = fetchFromGitHub {
+    owner = "zsa";
+    repo = "wally";
+    rev = "e5dde3c700beab39fb941c6941e55535bf9b2af6";
+    sha256 = "0pkybi32r1hrmpa1mc8qlzhv7xy5n5rr5ah25lbr0cipp1bda417";
+  };
+
+  # it only installs files
+  dontConfigure = true;
+  dontBuild = true;
+  dontFixup = true;
+
+  installPhase = ''
+    mkdir -p $out/lib/udev/rules.d
+    cp dist/linux64/50-oryx.rules $out/lib/udev/rules.d/
+    cp dist/linux64/50-wally.rules $out/lib/udev/rules.d/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "udev rules for ZSA devices";
+    license = licenses.mit;
+    maintainers = with maintainers; [ davidak ];
+    platforms = platforms.linux;
+    homepage = "https://github.com/zsa/wally/wiki/Linux-install#2-create-a-udev-rule-file";
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/solo5/default.nix b/nixpkgs/pkgs/os-specific/solo5/default.nix
new file mode 100644
index 000000000000..283cceb12405
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/solo5/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, fetchurl, pkgconfig, libseccomp }:
+
+let version = "0.6.7";
+in stdenv.mkDerivation {
+  pname = "solo5";
+  inherit version;
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = lib.optional (stdenv.hostPlatform.isLinux) libseccomp;
+
+  src = fetchurl {
+    url =
+      "https://github.com/Solo5/solo5/releases/download/v${version}/solo5-v${version}.tar.gz";
+    sha256 = "05k9adg3440zk5baa6ry8z5dj8d8r8hvzafh2469pdgcnr6h45gr";
+  };
+
+  hardeningEnable = [ "pie" ];
+
+  configurePhase = ''
+    runHook preConfigure
+    sh configure.sh
+    runHook postConfigure
+  '';
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    runHook preInstall
+    export DESTDIR=$out
+    export PREFIX=$out
+    make install-tools
+    ${lib.optionalString stdenv.hostPlatform.isLinux "make ${
+      (lib.concatMapStringsSep " " (x: "install-opam-${x}") [ "hvt" "spt" ])
+    }"}
+    runHook postInstall
+  '';
+
+  doCheck = true;
+  checkPhase = if stdenv.hostPlatform.isLinux then
+    ''
+    patchShebangs tests
+    ./tests/bats-core/bats ./tests/tests.bats
+    ''
+  else
+    null;
+
+  meta = with lib; {
+    description = "Sandboxed execution environment";
+    homepage = "https://github.com/solo5/solo5";
+    license = licenses.isc;
+    maintainers = [ maintainers.ehmry ];
+    platforms = lib.crossLists (arch: os: "${arch}-${os}") [
+      [ "aarch64" "x86_64" ]
+      [ "freebsd" "genode" "linux" "openbsd" ]
+    ];
+  };
+
+}