summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--flake.nix1
-rw-r--r--lib/systems/default.nix15
-rw-r--r--lib/systems/doubles.nix2
-rw-r--r--lib/systems/examples.nix15
-rw-r--r--lib/systems/platforms.nix12
-rw-r--r--nixos/doc/manual/release-notes/rl-2105.xml12
-rw-r--r--nixos/modules/services/x11/desktop-managers/plasma5.nix4
-rw-r--r--pkgs/applications/audio/flac/default.nix15
-rw-r--r--pkgs/applications/audio/gradio/default.nix1
-rw-r--r--pkgs/applications/audio/mmtc/default.nix2
-rw-r--r--pkgs/applications/audio/muso/default.nix2
-rw-r--r--pkgs/applications/audio/netease-music-tui/default.nix2
-rw-r--r--pkgs/applications/audio/parlatype/default.nix1
-rw-r--r--pkgs/applications/audio/spotify-tui/default.nix2
-rw-r--r--pkgs/applications/audio/spotifyd/default.nix2
-rw-r--r--pkgs/applications/editors/amp/default.nix2
-rw-r--r--pkgs/applications/editors/hexdino/default.nix2
-rw-r--r--pkgs/applications/editors/kibi/default.nix2
-rw-r--r--pkgs/applications/editors/neovim/gnvim/default.nix2
-rw-r--r--pkgs/applications/editors/ox/default.nix2
-rw-r--r--pkgs/applications/gis/whitebox-tools/default.nix2
-rw-r--r--pkgs/applications/graphics/ImageMagick/6.x.nix2
-rw-r--r--pkgs/applications/graphics/ImageMagick/7.0.nix2
-rw-r--r--pkgs/applications/graphics/rx/default.nix2
-rw-r--r--pkgs/applications/kde/akonadi-import-wizard.nix4
-rw-r--r--pkgs/applications/kde/akonadi/0001-akonadi-paths.patch90
-rw-r--r--pkgs/applications/kde/akonadi/0002-akonadi-timestamps.patch14
-rw-r--r--pkgs/applications/kde/akonadi/0003-akonadi-revert-make-relocatable.patch10
-rw-r--r--pkgs/applications/kde/akonadi/default.nix7
-rw-r--r--pkgs/applications/kde/baloo-widgets.nix4
-rw-r--r--pkgs/applications/kde/default.nix14
-rw-r--r--pkgs/applications/kde/dolphin-plugins.nix4
-rw-r--r--pkgs/applications/kde/dolphin.nix4
-rw-r--r--pkgs/applications/kde/dragon.nix4
-rw-r--r--pkgs/applications/kde/fetch.sh2
-rw-r--r--pkgs/applications/kde/gwenview.nix5
-rw-r--r--pkgs/applications/kde/kalarm.nix4
-rw-r--r--pkgs/applications/kde/kalarmcal.nix4
-rw-r--r--pkgs/applications/kde/kcachegrind.nix4
-rw-r--r--pkgs/applications/kde/kcalutils.nix4
-rw-r--r--pkgs/applications/kde/kdeconnect-kde.nix2
-rw-r--r--pkgs/applications/kde/kdenlive/default.nix2
-rw-r--r--pkgs/applications/kde/kdepim-runtime/default.nix10
-rw-r--r--pkgs/applications/kde/khelpcenter.nix4
-rw-r--r--pkgs/applications/kde/kio-extras.nix4
-rw-r--r--pkgs/applications/kde/kldap.nix4
-rw-r--r--pkgs/applications/kde/kmail.nix9
-rw-r--r--pkgs/applications/kde/kmailtransport.nix7
-rw-r--r--pkgs/applications/kde/kmix.nix4
-rw-r--r--pkgs/applications/kde/knotes.nix3
-rw-r--r--pkgs/applications/kde/kolourpaint.nix10
-rw-r--r--pkgs/applications/kde/konqueror.nix8
-rw-r--r--pkgs/applications/kde/konquest.nix14
-rw-r--r--pkgs/applications/kde/konsole.nix4
-rw-r--r--pkgs/applications/kde/kontactinterface.nix3
-rw-r--r--pkgs/applications/kde/korganizer.nix4
-rw-r--r--pkgs/applications/kde/krfb.nix14
-rw-r--r--pkgs/applications/kde/ktnef.nix4
-rw-r--r--pkgs/applications/kde/kwalletmanager.nix3
-rw-r--r--pkgs/applications/kde/libkdegames.nix3
-rw-r--r--pkgs/applications/kde/pim-sieve-editor.nix4
-rw-r--r--pkgs/applications/kde/srcs.nix1800
-rw-r--r--pkgs/applications/misc/break-time/default.nix2
-rw-r--r--pkgs/applications/misc/clipcat/default.nix2
-rw-r--r--pkgs/applications/misc/effitask/default.nix2
-rw-r--r--pkgs/applications/misc/elfx86exts/default.nix2
-rw-r--r--pkgs/applications/misc/fitnesstrax/default.nix2
-rw-r--r--pkgs/applications/misc/flavours/default.nix2
-rw-r--r--pkgs/applications/misc/imag/default.nix2
-rw-r--r--pkgs/applications/misc/kondo/default.nix2
-rw-r--r--pkgs/applications/misc/lscolors/default.nix2
-rw-r--r--pkgs/applications/misc/pastel/default.nix2
-rw-r--r--pkgs/applications/misc/pipr/default.nix2
-rw-r--r--pkgs/applications/misc/pueue/default.nix2
-rw-r--r--pkgs/applications/misc/reddsaver/default.nix2
-rw-r--r--pkgs/applications/misc/rsclock/default.nix2
-rw-r--r--pkgs/applications/misc/surface-control/default.nix2
-rw-r--r--pkgs/applications/misc/taizen/default.nix2
-rw-r--r--pkgs/applications/misc/taskwarrior-tui/default.nix2
-rw-r--r--pkgs/applications/misc/terminal-typeracer/default.nix2
-rw-r--r--pkgs/applications/misc/tickrs/default.nix2
-rw-r--r--pkgs/applications/misc/todiff/default.nix2
-rw-r--r--pkgs/applications/misc/zktree/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/asuka/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/castor/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/chromium/common.nix2
-rw-r--r--pkgs/applications/networking/browsers/firefox/common.nix28
-rw-r--r--pkgs/applications/networking/cluster/click/default.nix2
-rw-r--r--pkgs/applications/networking/cluster/habitat/default.nix2
-rw-r--r--pkgs/applications/networking/cluster/kubernix/default.nix2
-rw-r--r--pkgs/applications/networking/dyndns/cfdyndns/default.nix2
-rw-r--r--pkgs/applications/networking/feedreaders/newsboat/default.nix2
-rw-r--r--pkgs/applications/networking/irc/tiny/default.nix2
-rw-r--r--pkgs/applications/networking/ncgopher/default.nix2
-rw-r--r--pkgs/applications/networking/opsdroid/default.nix36
-rw-r--r--pkgs/applications/networking/p2p/synapse-bt/default.nix2
-rw-r--r--pkgs/applications/networking/wg-bond/default.nix2
-rw-r--r--pkgs/applications/office/espanso/default.nix2
-rw-r--r--pkgs/applications/office/watson/default.nix2
-rw-r--r--pkgs/applications/radio/noaa-apt/default.nix2
-rw-r--r--pkgs/applications/science/machine-learning/finalfrontier/default.nix2
-rw-r--r--pkgs/applications/science/machine-learning/finalfusion-utils/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/delta/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-absorb/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-dit/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-gone/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-ignore/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-subset/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-trim/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-vanity-hash/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-workspace/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/rs-git-fsmonitor/default.nix2
-rw-r--r--pkgs/applications/version-management/git-backup/default.nix2
-rw-r--r--pkgs/applications/version-management/sit/default.nix2
-rw-r--r--pkgs/applications/video/alass/default.nix2
-rw-r--r--pkgs/applications/video/handbrake/default.nix2
-rw-r--r--pkgs/applications/video/sub-batch/default.nix2
-rw-r--r--pkgs/applications/virtualization/cntr/default.nix2
-rw-r--r--pkgs/applications/virtualization/crosvm/default.nix2
-rw-r--r--pkgs/applications/virtualization/railcar/default.nix2
-rw-r--r--pkgs/applications/window-managers/i3/auto-layout.nix2
-rw-r--r--pkgs/applications/window-managers/i3/default.nix2
-rw-r--r--pkgs/applications/window-managers/i3/i3-ratiosplit.nix2
-rw-r--r--pkgs/applications/window-managers/i3/wmfocus.nix2
-rw-r--r--pkgs/applications/window-managers/sway/wsr.nix2
-rwxr-xr-xpkgs/build-support/bintools-wrapper/darwin-install_name_tool-wrapper.sh49
-rwxr-xr-xpkgs/build-support/bintools-wrapper/darwin-strip-wrapper.sh78
-rw-r--r--pkgs/build-support/bintools-wrapper/default.nix21
-rw-r--r--pkgs/build-support/bintools-wrapper/ld-wrapper.sh26
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix11
-rw-r--r--pkgs/build-support/nuke-references/builder.sh29
-rw-r--r--pkgs/build-support/nuke-references/darwin-sign-fixup.sh5
-rw-r--r--pkgs/build-support/nuke-references/default.nix28
-rw-r--r--pkgs/build-support/nuke-references/nuke-refs.sh33
-rw-r--r--pkgs/build-support/remove-references-to/darwin-sign-fixup.sh5
-rw-r--r--pkgs/build-support/remove-references-to/default.nix59
-rw-r--r--pkgs/build-support/remove-references-to/remove-references-to.sh37
-rw-r--r--pkgs/build-support/rust/default.nix5
-rw-r--r--pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh2
-rw-r--r--pkgs/desktops/plasma-5/fetch.sh2
-rw-r--r--pkgs/desktops/plasma-5/kdeplasma-addons.nix4
-rw-r--r--pkgs/desktops/plasma-5/kinfocenter.nix17
-rw-r--r--pkgs/desktops/plasma-5/kmenuedit.nix4
-rw-r--r--pkgs/desktops/plasma-5/kscreenlocker.nix4
-rw-r--r--pkgs/desktops/plasma-5/ksysguard.nix6
-rw-r--r--pkgs/desktops/plasma-5/kwin/default.nix19
-rw-r--r--pkgs/desktops/plasma-5/plasma-desktop/default.nix24
-rw-r--r--pkgs/desktops/plasma-5/plasma-nm/default.nix22
-rw-r--r--pkgs/desktops/plasma-5/powerdevil.nix11
-rw-r--r--pkgs/desktops/plasma-5/srcs.nix416
-rw-r--r--pkgs/development/compilers/gcc/10/default.nix18
-rw-r--r--pkgs/development/compilers/gcc/11/default.nix23
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix9
-rw-r--r--pkgs/development/compilers/gcc/7/default.nix18
-rw-r--r--pkgs/development/compilers/gcc/8/default.nix18
-rw-r--r--pkgs/development/compilers/gcc/9/default.nix18
-rw-r--r--pkgs/development/compilers/gcc/common/configure-flags.nix3
-rw-r--r--pkgs/development/compilers/llvm/10/bintools/default.nix (renamed from pkgs/development/compilers/llvm/10/bintools.nix)0
-rw-r--r--pkgs/development/compilers/llvm/10/clang/default.nix25
-rw-r--r--pkgs/development/compilers/llvm/10/compiler-rt/default.nix30
-rw-r--r--pkgs/development/compilers/llvm/10/default.nix148
-rw-r--r--pkgs/development/compilers/llvm/10/libcxx/default.nix (renamed from pkgs/development/compilers/llvm/10/libc++/default.nix)21
-rw-r--r--pkgs/development/compilers/llvm/10/libcxx/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/10/libc++/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/10/libcxxabi/default.nix (renamed from pkgs/development/compilers/llvm/10/libc++abi/default.nix)18
-rw-r--r--pkgs/development/compilers/llvm/10/libcxxabi/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/10/libc++abi/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/10/libcxxabi/no-threads.patch (renamed from pkgs/development/compilers/llvm/10/libc++abi/no-threads.patch)0
-rw-r--r--pkgs/development/compilers/llvm/10/libcxxabi/wasm.patch (renamed from pkgs/development/compilers/llvm/10/libc++abi/wasm.patch)0
-rw-r--r--pkgs/development/compilers/llvm/10/libunwind/default.nix14
-rw-r--r--pkgs/development/compilers/llvm/10/lld/default.nix18
-rw-r--r--pkgs/development/compilers/llvm/10/lldb/default.nix18
-rw-r--r--pkgs/development/compilers/llvm/10/llvm/default.nix37
-rw-r--r--pkgs/development/compilers/llvm/10/openmp.nix25
-rw-r--r--pkgs/development/compilers/llvm/10/openmp/default.nix34
-rw-r--r--pkgs/development/compilers/llvm/11/bintools/default.nix (renamed from pkgs/development/compilers/llvm/11/bintools.nix)0
-rw-r--r--pkgs/development/compilers/llvm/11/clang/default.nix37
-rw-r--r--pkgs/development/compilers/llvm/11/compiler-rt/default.nix41
-rw-r--r--pkgs/development/compilers/llvm/11/default.nix148
-rw-r--r--pkgs/development/compilers/llvm/11/libcxx/default.nix (renamed from pkgs/development/compilers/llvm/11/libc++/default.nix)36
-rw-r--r--pkgs/development/compilers/llvm/11/libcxx/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/11/libc++/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/11/libcxxabi/default.nix (renamed from pkgs/development/compilers/llvm/11/libc++abi/default.nix)20
-rw-r--r--pkgs/development/compilers/llvm/11/libcxxabi/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/11/libc++abi/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/11/libcxxabi/no-threads.patch (renamed from pkgs/development/compilers/llvm/11/libc++abi/no-threads.patch)0
-rw-r--r--pkgs/development/compilers/llvm/11/libcxxabi/wasm.patch (renamed from pkgs/development/compilers/llvm/11/libc++abi/wasm.patch)0
-rw-r--r--pkgs/development/compilers/llvm/11/libunwind/default.nix14
-rw-r--r--pkgs/development/compilers/llvm/11/lld/default.nix18
-rw-r--r--pkgs/development/compilers/llvm/11/lldb/default.nix18
-rw-r--r--pkgs/development/compilers/llvm/11/llvm/default.nix37
-rw-r--r--pkgs/development/compilers/llvm/11/openmp.nix35
-rw-r--r--pkgs/development/compilers/llvm/11/openmp/default.nix44
-rw-r--r--pkgs/development/compilers/llvm/12/compiler-rt/default.nix13
-rw-r--r--pkgs/development/compilers/llvm/12/default.nix131
-rw-r--r--pkgs/development/compilers/llvm/12/libcxx/default.nix8
-rw-r--r--pkgs/development/compilers/llvm/12/libcxx/gnu-install-dirs.patch100
-rw-r--r--pkgs/development/compilers/llvm/12/libcxxabi/default.nix30
-rw-r--r--pkgs/development/compilers/llvm/12/libcxxabi/gnu-install-dirs.patch34
-rw-r--r--pkgs/development/compilers/llvm/12/lld/default.nix16
-rw-r--r--pkgs/development/compilers/llvm/12/llvm/default.nix13
-rw-r--r--pkgs/development/compilers/llvm/5/clang/default.nix25
-rw-r--r--pkgs/development/compilers/llvm/5/compiler-rt/default.nix17
-rw-r--r--pkgs/development/compilers/llvm/5/default.nix43
-rw-r--r--pkgs/development/compilers/llvm/5/libcxx/default.nix (renamed from pkgs/development/compilers/llvm/5/libc++/default.nix)17
-rw-r--r--pkgs/development/compilers/llvm/5/libcxx/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/5/libc++/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/5/libcxxabi/default.nix (renamed from pkgs/development/compilers/llvm/5/libc++abi/default.nix)18
-rw-r--r--pkgs/development/compilers/llvm/5/libcxxabi/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/5/libc++abi/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/5/lld/default.nix21
-rw-r--r--pkgs/development/compilers/llvm/5/lldb/default.nix14
-rw-r--r--pkgs/development/compilers/llvm/5/llvm/default.nix29
-rw-r--r--pkgs/development/compilers/llvm/5/openmp.nix25
-rw-r--r--pkgs/development/compilers/llvm/5/openmp/default.nix34
-rw-r--r--pkgs/development/compilers/llvm/6/clang/default.nix25
-rw-r--r--pkgs/development/compilers/llvm/6/compiler-rt/default.nix17
-rw-r--r--pkgs/development/compilers/llvm/6/default.nix43
-rw-r--r--pkgs/development/compilers/llvm/6/libcxx/default.nix (renamed from pkgs/development/compilers/llvm/6/libc++/default.nix)17
-rw-r--r--pkgs/development/compilers/llvm/6/libcxx/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/6/libc++/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/6/libcxxabi/default.nix (renamed from pkgs/development/compilers/llvm/6/libc++abi/default.nix)18
-rw-r--r--pkgs/development/compilers/llvm/6/libcxxabi/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/6/libc++abi/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/6/lld/default.nix22
-rw-r--r--pkgs/development/compilers/llvm/6/lldb/default.nix14
-rw-r--r--pkgs/development/compilers/llvm/6/llvm/default.nix29
-rw-r--r--pkgs/development/compilers/llvm/6/openmp.nix25
-rw-r--r--pkgs/development/compilers/llvm/6/openmp/default.nix34
-rw-r--r--pkgs/development/compilers/llvm/7/bintools/default.nix (renamed from pkgs/development/compilers/llvm/7/bintools.nix)0
-rw-r--r--pkgs/development/compilers/llvm/7/clang/default.nix25
-rw-r--r--pkgs/development/compilers/llvm/7/compiler-rt/default.nix33
-rw-r--r--pkgs/development/compilers/llvm/7/compiler-rt/gnu-install-dirs.patch2
-rw-r--r--pkgs/development/compilers/llvm/7/default.nix152
-rw-r--r--pkgs/development/compilers/llvm/7/libcxx/default.nix (renamed from pkgs/development/compilers/llvm/7/libc++/default.nix)23
-rw-r--r--pkgs/development/compilers/llvm/7/libcxx/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/7/libc++/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/7/libcxxabi/default.nix (renamed from pkgs/development/compilers/llvm/7/libc++abi/default.nix)18
-rw-r--r--pkgs/development/compilers/llvm/7/libcxxabi/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/7/libc++abi/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/7/libunwind/default.nix28
-rw-r--r--pkgs/development/compilers/llvm/7/lld/default.nix22
-rw-r--r--pkgs/development/compilers/llvm/7/lldb/default.nix14
-rw-r--r--pkgs/development/compilers/llvm/7/llvm/default.nix29
-rw-r--r--pkgs/development/compilers/llvm/7/openmp.nix25
-rw-r--r--pkgs/development/compilers/llvm/7/openmp/default.nix34
-rw-r--r--pkgs/development/compilers/llvm/8/bintools/default.nix (renamed from pkgs/development/compilers/llvm/8/bintools.nix)0
-rw-r--r--pkgs/development/compilers/llvm/8/clang/default.nix25
-rw-r--r--pkgs/development/compilers/llvm/8/compiler-rt/default.nix25
-rw-r--r--pkgs/development/compilers/llvm/8/compiler-rt/gnu-install-dirs.patch2
-rw-r--r--pkgs/development/compilers/llvm/8/default.nix155
-rw-r--r--pkgs/development/compilers/llvm/8/libcxx/default.nix (renamed from pkgs/development/compilers/llvm/8/libc++/default.nix)21
-rw-r--r--pkgs/development/compilers/llvm/8/libcxx/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/8/libc++/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/8/libcxxabi/default.nix (renamed from pkgs/development/compilers/llvm/8/libc++abi/default.nix)18
-rw-r--r--pkgs/development/compilers/llvm/8/libcxxabi/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/8/libc++abi/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/8/libcxxabi/no-threads.patch (renamed from pkgs/development/compilers/llvm/8/libc++abi/no-threads.patch)0
-rw-r--r--pkgs/development/compilers/llvm/8/libcxxabi/wasm.patch (renamed from pkgs/development/compilers/llvm/8/libc++abi/wasm.patch)0
-rw-r--r--pkgs/development/compilers/llvm/8/libunwind/default.nix14
-rw-r--r--pkgs/development/compilers/llvm/8/lld/default.nix22
-rw-r--r--pkgs/development/compilers/llvm/8/lldb/default.nix14
-rw-r--r--pkgs/development/compilers/llvm/8/llvm/default.nix29
-rw-r--r--pkgs/development/compilers/llvm/8/openmp.nix25
-rw-r--r--pkgs/development/compilers/llvm/8/openmp/default.nix34
-rw-r--r--pkgs/development/compilers/llvm/9/bintools/default.nix (renamed from pkgs/development/compilers/llvm/9/bintools.nix)0
-rw-r--r--pkgs/development/compilers/llvm/9/clang/default.nix25
-rw-r--r--pkgs/development/compilers/llvm/9/compiler-rt/default.nix30
-rw-r--r--pkgs/development/compilers/llvm/9/compiler-rt/gnu-install-dirs.patch2
-rw-r--r--pkgs/development/compilers/llvm/9/default.nix155
-rw-r--r--pkgs/development/compilers/llvm/9/libcxx/default.nix (renamed from pkgs/development/compilers/llvm/9/libc++/default.nix)21
-rw-r--r--pkgs/development/compilers/llvm/9/libcxx/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/9/libc++/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/9/libcxxabi/default.nix (renamed from pkgs/development/compilers/llvm/9/libc++abi/default.nix)18
-rw-r--r--pkgs/development/compilers/llvm/9/libcxxabi/gnu-install-dirs.patch (renamed from pkgs/development/compilers/llvm/9/libc++abi/gnu-install-dirs.patch)0
-rw-r--r--pkgs/development/compilers/llvm/9/libcxxabi/no-threads.patch (renamed from pkgs/development/compilers/llvm/9/libc++abi/no-threads.patch)0
-rw-r--r--pkgs/development/compilers/llvm/9/libcxxabi/wasm.patch (renamed from pkgs/development/compilers/llvm/9/libc++abi/wasm.patch)0
-rw-r--r--pkgs/development/compilers/llvm/9/libunwind/default.nix14
-rw-r--r--pkgs/development/compilers/llvm/9/lld/default.nix18
-rw-r--r--pkgs/development/compilers/llvm/9/lldb/default.nix14
-rw-r--r--pkgs/development/compilers/llvm/9/llvm/default.nix32
-rw-r--r--pkgs/development/compilers/llvm/9/openmp.nix25
-rw-r--r--pkgs/development/compilers/llvm/9/openmp/default.nix34
-rw-r--r--pkgs/development/compilers/rust/1_52.nix (renamed from pkgs/development/compilers/rust/1_51.nix)28
-rw-r--r--pkgs/development/compilers/rust/cargo.nix4
-rw-r--r--pkgs/development/compilers/rust/rustc.nix3
-rw-r--r--pkgs/development/compilers/sbcl/2.0.8.nix4
-rw-r--r--pkgs/development/compilers/sbcl/bootstrap.nix5
-rw-r--r--pkgs/development/compilers/sbcl/common.nix4
-rw-r--r--pkgs/development/compilers/zz/default.nix2
-rw-r--r--pkgs/development/interpreters/python/cpython/2.7/default.nix2
-rw-r--r--pkgs/development/interpreters/python/hooks/pytest-check-hook.sh7
-rw-r--r--pkgs/development/interpreters/python/mk-python-derivation.nix5
-rw-r--r--pkgs/development/interpreters/wasmer/default.nix2
-rw-r--r--pkgs/development/interpreters/wasmtime/default.nix2
-rw-r--r--pkgs/development/libraries/apr/default.nix6
-rw-r--r--pkgs/development/libraries/catch/default.nix10
-rw-r--r--pkgs/development/libraries/fontconfig/default.nix5
-rw-r--r--pkgs/development/libraries/fontconfig/macos-atomics.h39
-rw-r--r--pkgs/development/libraries/gcr/default.nix2
-rw-r--r--pkgs/development/libraries/glib/default.nix5
-rw-r--r--pkgs/development/libraries/glib/link-with-coreservices.patch11
-rw-r--r--pkgs/development/libraries/glibc/common.nix7
-rw-r--r--pkgs/development/libraries/glibc/default.nix2
-rw-r--r--pkgs/development/libraries/glibc/info.nix2
-rw-r--r--pkgs/development/libraries/glibc/locales.nix2
-rw-r--r--pkgs/development/libraries/glibmm/default.nix2
-rw-r--r--pkgs/development/libraries/gmp/6.x.nix2
-rw-r--r--pkgs/development/libraries/gsl/default.nix4
-rw-r--r--pkgs/development/libraries/gtk/2.x.nix4
-rw-r--r--pkgs/development/libraries/gtkmm/3.x.nix2
-rw-r--r--pkgs/development/libraries/kde-frameworks/fetch.sh2
-rw-r--r--pkgs/development/libraries/kde-frameworks/srcs.nix664
-rw-r--r--pkgs/development/libraries/libevent/default.nix4
-rw-r--r--pkgs/development/libraries/libical/default.nix4
-rw-r--r--pkgs/development/libraries/libidn2/default.nix10
-rw-r--r--pkgs/development/libraries/libsoup/default.nix10
-rw-r--r--pkgs/development/libraries/libxml2/default.nix34
-rw-r--r--pkgs/development/libraries/libxslt/default.nix9
-rw-r--r--pkgs/development/libraries/lmdb/default.nix2
-rw-r--r--pkgs/development/libraries/lyra/default.nix2
-rw-r--r--pkgs/development/libraries/mesa/default.nix1
-rw-r--r--pkgs/development/libraries/openbsm/default.nix4
-rw-r--r--pkgs/development/libraries/openldap/default.nix4
-rw-r--r--pkgs/development/libraries/openssl/default.nix1
-rw-r--r--pkgs/development/libraries/pcre/default.nix3
-rw-r--r--pkgs/development/libraries/pcre2/default.nix3
-rw-r--r--pkgs/development/libraries/poppler/default.nix110
-rw-r--r--pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0003-qtbase-mkspecs.patch54
-rw-r--r--pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0003-qtbase-mkspecs.patch50
-rw-r--r--pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch60
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtcharts.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtconnectivity.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtdeclarative.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtdoc.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtgamepad.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtimageformats.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtlocation.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtmacextras.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtmultimedia.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtscript.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtscxml.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtsensors.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtserialbus.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtserialport.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtspeech.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtsvg.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qttools.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qttranslations.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwayland.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebchannel.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebengine.nix10
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebkit.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebsockets.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebview.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtx11extras.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix2
-rw-r--r--pkgs/development/libraries/qt-5/qtModule.nix2
-rw-r--r--pkgs/development/libraries/spdk/default.nix2
-rw-r--r--pkgs/development/libraries/wasilibc/default.nix3
-rw-r--r--pkgs/development/libraries/wayland/default.nix6
-rw-r--r--pkgs/development/libraries/zlib/default.nix4
-rw-r--r--pkgs/development/misc/loc/default.nix2
-rw-r--r--pkgs/development/python-modules/arrow/1.nix41
-rw-r--r--pkgs/development/python-modules/arrow/default.nix24
-rw-r--r--pkgs/development/python-modules/cryptography/default.nix15
-rw-r--r--pkgs/development/python-modules/dbus/default.nix6
-rw-r--r--pkgs/development/python-modules/delorean/default.nix32
-rw-r--r--pkgs/development/python-modules/get-video-properties/default.nix35
-rw-r--r--pkgs/development/python-modules/ibm-cloud-sdk-core/default.nix52
-rw-r--r--pkgs/development/python-modules/ibm-watson/default.nix53
-rw-r--r--pkgs/development/python-modules/johnnycanencrypt/default.nix2
-rw-r--r--pkgs/development/python-modules/matrix-api-async/default.nix25
-rw-r--r--pkgs/development/python-modules/mattermostdriver/default.nix33
-rw-r--r--pkgs/development/python-modules/mockupdb/default.nix24
-rw-r--r--pkgs/development/python-modules/motor/default.nix30
-rw-r--r--pkgs/development/python-modules/opsdroid_get_image_size/default.nix24
-rw-r--r--pkgs/development/python-modules/psutil/default.nix21
-rw-r--r--pkgs/development/python-modules/puremagic/default.nix29
-rw-r--r--pkgs/development/python-modules/pybind11/default.nix8
-rw-r--r--pkgs/development/python-modules/pycron/default.nix30
-rw-r--r--pkgs/development/python-modules/pytorch/default.nix3
-rw-r--r--pkgs/development/python-modules/udatetime/default.nix35
-rw-r--r--pkgs/development/python-modules/watchgod/default.nix27
-rw-r--r--pkgs/development/tools/analysis/bingrep/default.nix2
-rw-r--r--pkgs/development/tools/analysis/cargo-tarpaulin/default.nix2
-rw-r--r--pkgs/development/tools/analysis/dotenv-linter/default.nix2
-rw-r--r--pkgs/development/tools/analysis/panopticon/default.nix2
-rw-r--r--pkgs/development/tools/analysis/qcachegrind/default.nix2
-rw-r--r--pkgs/development/tools/analysis/svlint/default.nix2
-rw-r--r--pkgs/development/tools/async/default.nix2
-rw-r--r--pkgs/development/tools/build-managers/fac/default.nix2
-rw-r--r--pkgs/development/tools/cargo-flamegraph/default.nix2
-rw-r--r--pkgs/development/tools/cargo-web/default.nix2
-rw-r--r--pkgs/development/tools/chit/default.nix2
-rw-r--r--pkgs/development/tools/clog-cli/default.nix2
-rw-r--r--pkgs/development/tools/convco/default.nix2
-rw-r--r--pkgs/development/tools/diesel-cli/default.nix2
-rw-r--r--pkgs/development/tools/documentation/gi-docgen/default.nix59
-rw-r--r--pkgs/development/tools/documentation/mdsh/default.nix2
-rw-r--r--pkgs/development/tools/dot-http/default.nix2
-rw-r--r--pkgs/development/tools/git-series/default.nix2
-rw-r--r--pkgs/development/tools/misc/autoconf/default.nix4
-rw-r--r--pkgs/development/tools/misc/autogen/default.nix4
-rw-r--r--pkgs/development/tools/misc/ctags/default.nix7
-rw-r--r--pkgs/development/tools/misc/ctags/unused-collision.patch246
-rw-r--r--pkgs/development/tools/misc/gdb/default.nix4
-rw-r--r--pkgs/development/tools/misc/hydra-cli/default.nix2
-rw-r--r--pkgs/development/tools/misc/itm-tools/default.nix2
-rw-r--r--pkgs/development/tools/misc/libtool/libtool2-macos11.patch32
-rw-r--r--pkgs/development/tools/misc/libtool/libtool2.nix28
-rw-r--r--pkgs/development/tools/misc/mdctags/default.nix2
-rw-r--r--pkgs/development/tools/misc/ptags/default.nix2
-rw-r--r--pkgs/development/tools/misc/rtss/default.nix2
-rw-r--r--pkgs/development/tools/misc/sccache/default.nix2
-rw-r--r--pkgs/development/tools/misc/svls/default.nix2
-rw-r--r--pkgs/development/tools/misc/tokei/default.nix2
-rw-r--r--pkgs/development/tools/misc/unused/default.nix2
-rw-r--r--pkgs/development/tools/misc/wishbone-tool/default.nix2
-rw-r--r--pkgs/development/tools/pactorio/default.nix2
-rw-r--r--pkgs/development/tools/parinfer-rust/default.nix2
-rw-r--r--pkgs/development/tools/parsing/flex/default.nix4
-rw-r--r--pkgs/development/tools/parsing/tree-sitter/default.nix2
-rw-r--r--pkgs/development/tools/pax-rs/default.nix2
-rw-r--r--pkgs/development/tools/pqrs/default.nix2
-rw-r--r--pkgs/development/tools/py-spy/default.nix2
-rw-r--r--pkgs/development/tools/rebazel/default.nix2
-rw-r--r--pkgs/development/tools/rnix-lsp/default.nix2
-rw-r--r--pkgs/development/tools/rq/default.nix10
-rw-r--r--pkgs/development/tools/rust/cargo-asm/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-binutils/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-bloat/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-c/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-criterion/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-cross/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-feature/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-fund/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-geiger/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-generate/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-inspect/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-play/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-readme/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-sweep/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-sync-readme/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-valgrind/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-whatfeatures/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-wipe/default.nix2
-rw-r--r--pkgs/development/tools/rust/cargo-xbuild/default.nix2
-rw-r--r--pkgs/development/tools/rust/crate2nix/default.nix2
-rw-r--r--pkgs/development/tools/rust/racerd/default.nix2
-rw-r--r--pkgs/development/tools/so/default.nix2
-rw-r--r--pkgs/development/tools/the-way/default.nix2
-rw-r--r--pkgs/development/tools/trunk/default.nix2
-rw-r--r--pkgs/development/tools/wasm-bindgen-cli/default.nix2
-rw-r--r--pkgs/development/tools/wasm-pack/default.nix2
-rw-r--r--pkgs/development/tools/xcbuild/platforms.nix30
-rw-r--r--pkgs/development/tools/xcbuild/wrapper.nix2
-rw-r--r--pkgs/games/eidolon/default.nix2
-rw-r--r--pkgs/games/freenukum/default.nix2
-rw-r--r--pkgs/games/ja2-stracciatella/default.nix2
-rw-r--r--pkgs/games/portmod/default.nix2
-rw-r--r--pkgs/games/system-syzygy/default.nix2
-rw-r--r--pkgs/misc/emulators/snes9x-gtk/default.nix1
-rwxr-xr-xpkgs/misc/uq/default.nix2
-rw-r--r--pkgs/misc/vim-plugins/overrides.nix2
-rw-r--r--pkgs/misc/vscode-extensions/vscode-lldb/default.nix2
-rw-r--r--pkgs/os-specific/bsd/netbsd/default.nix197
-rw-r--r--pkgs/os-specific/bsd/netbsd/no-dynamic-linker.patch16
-rw-r--r--pkgs/os-specific/darwin/DarwinTools/default.nix6
-rw-r--r--pkgs/os-specific/darwin/DarwinTools/sw_vers-CFPriv.patch19
-rw-r--r--pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix151
-rw-r--r--pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh6
-rw-r--r--pkgs/os-specific/darwin/apple-sdk-11.0/default.nix58
-rw-r--r--pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix193
-rw-r--r--pkgs/os-specific/darwin/apple-sdk-11.0/libSystem.nix78
-rw-r--r--pkgs/os-specific/darwin/apple-sdk-11.0/libcharset.nix16
-rw-r--r--pkgs/os-specific/darwin/apple-sdk-11.0/libnetwork.nix20
-rw-r--r--pkgs/os-specific/darwin/apple-sdk-11.0/libobjc.nix21
-rw-r--r--pkgs/os-specific/darwin/apple-sdk-11.0/libunwind.nix24
-rw-r--r--pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix17
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix7
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix38
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix24
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix5
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix15
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/configd/default.nix148
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/default.nix22
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix7
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/hfs/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix67
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/mDNSResponder/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/shell_cmds/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix9
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix20
-rw-r--r--pkgs/os-specific/darwin/binutils/default.nix1
-rw-r--r--pkgs/os-specific/darwin/cctools/port.nix4
-rw-r--r--pkgs/os-specific/darwin/darwin-stubs/default.nix4
-rw-r--r--pkgs/os-specific/darwin/libtapi/default.nix40
-rw-r--r--pkgs/os-specific/darwin/libtapi/disable-rpath.patch14
-rw-r--r--pkgs/os-specific/darwin/libtapi/native-clang-tblgen.patch21
-rw-r--r--pkgs/os-specific/darwin/print-reexports/default.nix (renamed from pkgs/os-specific/darwin/apple-sdk/print-reexports/default.nix)4
-rw-r--r--pkgs/os-specific/darwin/print-reexports/main.c (renamed from pkgs/os-specific/darwin/apple-sdk/print-reexports/main.c)81
-rw-r--r--pkgs/os-specific/darwin/print-reexports/setup-hook.sh19
-rw-r--r--pkgs/os-specific/darwin/rewrite-tbd/default.nix16
-rw-r--r--pkgs/os-specific/darwin/signing-utils/auto-sign-hook.sh20
-rw-r--r--pkgs/os-specific/darwin/signing-utils/default.nix24
-rw-r--r--pkgs/os-specific/darwin/signing-utils/utils.sh43
-rw-r--r--pkgs/os-specific/darwin/sigtool/default.nix24
-rw-r--r--pkgs/os-specific/darwin/xcode/sdk-pkgs.nix1
-rw-r--r--pkgs/os-specific/linux/bionic-prebuilt/default.nix113
-rw-r--r--pkgs/os-specific/linux/bionic-prebuilt/ndk-version.patch42
-rw-r--r--pkgs/os-specific/linux/catfs/default.nix2
-rw-r--r--pkgs/os-specific/linux/dlm/default.nix2
-rw-r--r--pkgs/os-specific/linux/dpdk/default.nix2
-rw-r--r--pkgs/os-specific/linux/firmware/firmware-manager/default.nix2
-rw-r--r--pkgs/os-specific/linux/firmware/system76-firmware/default.nix2
-rw-r--r--pkgs/os-specific/linux/fuse/common.nix2
-rw-r--r--pkgs/os-specific/linux/greetd/default.nix2
-rw-r--r--pkgs/os-specific/linux/hwdata/default.nix6
-rw-r--r--pkgs/os-specific/linux/kernel-headers/default.nix20
-rw-r--r--pkgs/os-specific/linux/kernel/generate-config.pl2
-rw-r--r--pkgs/os-specific/linux/kernel/generic.nix10
-rw-r--r--pkgs/os-specific/linux/libsepol/default.nix7
-rw-r--r--pkgs/os-specific/linux/lvm2/default.nix4
-rw-r--r--pkgs/os-specific/linux/miraclecast/default.nix2
-rw-r--r--pkgs/os-specific/linux/swapview/default.nix2
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix2
-rw-r--r--pkgs/os-specific/linux/tuigreet/default.nix2
-rw-r--r--pkgs/os-specific/linux/wlgreet/default.nix2
-rw-r--r--pkgs/os-specific/windows/default.nix2
-rw-r--r--pkgs/servers/clickhouse/default.nix4
-rw-r--r--pkgs/servers/dns/doh-proxy-rust/default.nix2
-rw-r--r--pkgs/servers/fishnet/default.nix2
-rw-r--r--pkgs/servers/martin/default.nix2
-rw-r--r--pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state.nix2
-rw-r--r--pkgs/servers/microserver/default.nix2
-rw-r--r--pkgs/servers/monitoring/prometheus/unbound-exporter.nix2
-rw-r--r--pkgs/servers/routinator/default.nix2
-rw-r--r--pkgs/servers/search/meilisearch/default.nix2
-rw-r--r--pkgs/servers/sozu/default.nix2
-rw-r--r--pkgs/servers/tarssh/default.nix2
-rw-r--r--pkgs/servers/udpt/default.nix2
-rw-r--r--pkgs/servers/unpfs/default.nix2
-rw-r--r--pkgs/servers/webmetro/default.nix2
-rw-r--r--pkgs/stdenv/cross/default.nix6
-rw-r--r--pkgs/stdenv/darwin/default.nix356
-rw-r--r--pkgs/stdenv/darwin/make-bootstrap-tools.nix92
-rw-r--r--pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh52
-rw-r--r--pkgs/stdenv/default.nix1
-rw-r--r--pkgs/stdenv/linux/default.nix3
-rw-r--r--pkgs/test/rust-sysroot/default.nix2
-rw-r--r--pkgs/tools/X11/xidlehook/default.nix2
-rw-r--r--pkgs/tools/admin/intecture/agent.nix2
-rw-r--r--pkgs/tools/admin/intecture/auth.nix2
-rw-r--r--pkgs/tools/admin/intecture/cli.nix2
-rw-r--r--pkgs/tools/admin/procs/default.nix2
-rw-r--r--pkgs/tools/archivers/gnutar/default.nix5
-rw-r--r--pkgs/tools/backup/monolith/default.nix2
-rw-r--r--pkgs/tools/backup/rdedup/default.nix2
-rw-r--r--pkgs/tools/compression/bzip2/1_1.nix2
-rw-r--r--pkgs/tools/compression/pbzx/default.nix2
-rw-r--r--pkgs/tools/compression/xar/0001-Add-useless-descriptions-to-AC_DEFINE.patch95
-rw-r--r--pkgs/tools/compression/xar/0002-Use-pkg-config-for-libxml2.patch89
-rw-r--r--pkgs/tools/compression/xar/default.nix14
-rw-r--r--pkgs/tools/filesystems/sandboxfs/default.nix2
-rw-r--r--pkgs/tools/filesystems/supertag/default.nix2
-rw-r--r--pkgs/tools/graphics/gifski/default.nix2
-rw-r--r--pkgs/tools/graphics/oxipng/default.nix2
-rw-r--r--pkgs/tools/graphics/resvg/default.nix2
-rw-r--r--pkgs/tools/graphics/shotgun/default.nix2
-rw-r--r--pkgs/tools/graphics/svgbob/default.nix2
-rw-r--r--pkgs/tools/graphics/svgcleaner/default.nix2
-rw-r--r--pkgs/tools/graphics/viu/default.nix2
-rw-r--r--pkgs/tools/inputmethods/evscript/default.nix2
-rw-r--r--pkgs/tools/misc/as-tree/default.nix2
-rw-r--r--pkgs/tools/misc/asciinema-scenario/default.nix2
-rw-r--r--pkgs/tools/misc/dijo/default.nix2
-rw-r--r--pkgs/tools/misc/diskonaut/default.nix2
-rw-r--r--pkgs/tools/misc/diskus/default.nix2
-rw-r--r--pkgs/tools/misc/dust/default.nix2
-rw-r--r--pkgs/tools/misc/eva/default.nix2
-rw-r--r--pkgs/tools/misc/fd/default.nix2
-rw-r--r--pkgs/tools/misc/fend/default.nix2
-rw-r--r--pkgs/tools/misc/fontfor/default.nix2
-rw-r--r--pkgs/tools/misc/g933-utils/default.nix2
-rw-r--r--pkgs/tools/misc/grex/default.nix2
-rw-r--r--pkgs/tools/misc/hacksaw/default.nix2
-rw-r--r--pkgs/tools/misc/heatseeker/default.nix2
-rw-r--r--pkgs/tools/misc/hexyl/default.nix2
-rw-r--r--pkgs/tools/misc/hyperfine/default.nix2
-rw-r--r--pkgs/tools/misc/i3nator/default.nix2
-rw-r--r--pkgs/tools/misc/intermodal/default.nix2
-rw-r--r--pkgs/tools/misc/journaldriver/default.nix2
-rw-r--r--pkgs/tools/misc/kak-lsp/default.nix2
-rw-r--r--pkgs/tools/misc/licensor/default.nix2
-rw-r--r--pkgs/tools/misc/loop/default.nix2
-rw-r--r--pkgs/tools/misc/lsd/default.nix2
-rw-r--r--pkgs/tools/misc/mc/default.nix8
-rw-r--r--pkgs/tools/misc/mcfly/default.nix2
-rw-r--r--pkgs/tools/misc/onefetch/default.nix2
-rw-r--r--pkgs/tools/misc/page/default.nix2
-rw-r--r--pkgs/tools/misc/pazi/default.nix2
-rw-r--r--pkgs/tools/misc/peep/default.nix2
-rw-r--r--pkgs/tools/misc/powerline-rs/default.nix2
-rw-r--r--pkgs/tools/misc/psw/default.nix2
-rw-r--r--pkgs/tools/misc/rargs/default.nix2
-rw-r--r--pkgs/tools/misc/shadowenv/default.nix2
-rw-r--r--pkgs/tools/misc/shell-hist/default.nix2
-rw-r--r--pkgs/tools/misc/silicon/default.nix2
-rw-r--r--pkgs/tools/misc/skim/default.nix2
-rw-r--r--pkgs/tools/misc/tab-rs/default.nix2
-rw-r--r--pkgs/tools/misc/tagref/default.nix2
-rw-r--r--pkgs/tools/misc/tealdeer/default.nix2
-rw-r--r--pkgs/tools/misc/tensorman/default.nix2
-rw-r--r--pkgs/tools/misc/termplay/default.nix2
-rw-r--r--pkgs/tools/misc/tremor-rs/default.nix6
-rw-r--r--pkgs/tools/misc/tydra/default.nix2
-rw-r--r--pkgs/tools/misc/uwuify/default.nix2
-rw-r--r--pkgs/tools/misc/vivid/default.nix2
-rw-r--r--pkgs/tools/misc/void/default.nix2
-rw-r--r--pkgs/tools/misc/wagyu/default.nix2
-rw-r--r--pkgs/tools/misc/xprite-editor/default.nix2
-rw-r--r--pkgs/tools/misc/xxv/default.nix2
-rw-r--r--pkgs/tools/networking/bandwhich/default.nix2
-rw-r--r--pkgs/tools/networking/boringtun/default.nix2
-rw-r--r--pkgs/tools/networking/bukubrow/default.nix2
-rw-r--r--pkgs/tools/networking/curl/default.nix11
-rw-r--r--pkgs/tools/networking/dogdns/default.nix2
-rw-r--r--pkgs/tools/networking/drill/default.nix2
-rw-r--r--pkgs/tools/networking/fastd/default.nix2
-rw-r--r--pkgs/tools/networking/gnirehtet/default.nix2
-rw-r--r--pkgs/tools/networking/gping/default.nix2
-rw-r--r--pkgs/tools/networking/httplz/default.nix2
-rw-r--r--pkgs/tools/networking/mozwire/default.nix2
-rw-r--r--pkgs/tools/networking/openssh/common.nix2
-rw-r--r--pkgs/tools/networking/rshijack/default.nix2
-rw-r--r--pkgs/tools/networking/tdns-cli/default.nix2
-rw-r--r--pkgs/tools/networking/tox-node/default.nix2
-rw-r--r--pkgs/tools/networking/tunnelto/default.nix2
-rw-r--r--pkgs/tools/networking/vde2/default.nix4
-rw-r--r--pkgs/tools/nix/cached-nix-shell/default.nix2
-rw-r--r--pkgs/tools/nix/nix-query-tree-viewer/default.nix2
-rw-r--r--pkgs/tools/nix/nixdoc/default.nix2
-rw-r--r--pkgs/tools/nix/nixpkgs-fmt/default.nix2
-rw-r--r--pkgs/tools/nix/rnix-hashes/default.nix2
-rw-r--r--pkgs/tools/package-management/cargo-about/default.nix2
-rw-r--r--pkgs/tools/package-management/cargo-deps/default.nix2
-rw-r--r--pkgs/tools/package-management/cargo-edit/default.nix2
-rw-r--r--pkgs/tools/package-management/cargo-graph/default.nix2
-rw-r--r--pkgs/tools/package-management/cargo-kcov/default.nix2
-rw-r--r--pkgs/tools/package-management/cargo-license/default.nix2
-rw-r--r--pkgs/tools/package-management/cargo-update/default.nix2
-rw-r--r--pkgs/tools/package-management/emplace/default.nix2
-rw-r--r--pkgs/tools/package-management/nix-doc/default.nix2
-rw-r--r--pkgs/tools/package-management/nix-index/default.nix2
-rw-r--r--pkgs/tools/package-management/nix-simple-deploy/default.nix2
-rw-r--r--pkgs/tools/package-management/nix-template/default.nix2
-rw-r--r--pkgs/tools/security/b3sum/default.nix2
-rw-r--r--pkgs/tools/security/bitwarden_rs/default.nix2
-rw-r--r--pkgs/tools/security/fido2luks/default.nix2
-rw-r--r--pkgs/tools/security/genpass/default.nix2
-rw-r--r--pkgs/tools/security/jwt-cli/default.nix2
-rw-r--r--pkgs/tools/security/ripasso/cursive.nix2
-rw-r--r--pkgs/tools/security/rustscan/default.nix2
-rw-r--r--pkgs/tools/security/sn0int/default.nix2
-rw-r--r--pkgs/tools/system/kmon/default.nix2
-rw-r--r--pkgs/tools/system/mq-cli/default.nix2
-rw-r--r--pkgs/tools/system/tre-command/default.nix2
-rw-r--r--pkgs/tools/system/zenith/default.nix2
-rw-r--r--pkgs/tools/text/angle-grinder/default.nix2
-rw-r--r--pkgs/tools/text/chars/default.nix2
-rw-r--r--pkgs/tools/text/choose/default.nix2
-rw-r--r--pkgs/tools/text/coloursum/default.nix2
-rw-r--r--pkgs/tools/text/diffr/default.nix2
-rw-r--r--pkgs/tools/text/each/default.nix2
-rw-r--r--pkgs/tools/text/fst/default.nix2
-rw-r--r--pkgs/tools/text/groff/default.nix9
-rw-r--r--pkgs/tools/text/mdbook/default.nix2
-rw-r--r--pkgs/tools/text/mdcat/default.nix2
-rw-r--r--pkgs/tools/text/ripgrep-all/default.nix2
-rw-r--r--pkgs/tools/text/ripgrep/default.nix2
-rw-r--r--pkgs/tools/text/ruplacer/default.nix2
-rw-r--r--pkgs/tools/text/sd/default.nix2
-rw-r--r--pkgs/tools/text/uwc/default.nix2
-rw-r--r--pkgs/tools/text/xsv/default.nix2
-rw-r--r--pkgs/tools/typesetting/tectonic/default.nix2
-rw-r--r--pkgs/tools/typesetting/tex/tex-match/default.nix2
-rw-r--r--pkgs/tools/video/rav1e/default.nix2
-rw-r--r--pkgs/top-level/all-packages.nix191
-rw-r--r--pkgs/top-level/darwin-packages.nix98
-rw-r--r--pkgs/top-level/python-packages.nix32
-rw-r--r--pkgs/top-level/qt5-packages.nix13
-rw-r--r--pkgs/top-level/release-lib.nix2
-rw-r--r--pkgs/top-level/release.nix9
-rw-r--r--pkgs/top-level/stage.nix14
711 files changed, 8099 insertions, 3803 deletions
diff --git a/flake.nix b/flake.nix
index 537f91ee5e7..5237cae86f1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -18,6 +18,7 @@
         "aarch64-linux"
         "armv6l-linux"
         "armv7l-linux"
+        "aarch64-darwin"
       ];
 
       forAllSystems = f: lib.genAttrs systems (system: f system);
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index 21b00374da4..70ec98b03c1 100644
--- a/lib/systems/default.nix
+++ b/lib/systems/default.nix
@@ -41,6 +41,19 @@ rec {
         else if final.isNetBSD              then "nblibc"
         # TODO(@Ericson2314) think more about other operating systems
         else                                     "native/impure";
+      # Choose what linker we wish to use by default. Someday we might also
+      # choose the C compiler, runtime library, C++ standard library, etc. in
+      # this way, nice and orthogonally, and deprecate `useLLVM`. But due to
+      # the monolithic GCC build we cannot actually make those choices
+      # independently, so we are just doing `linker` and keeping `useLLVM` for
+      # now.
+      linker =
+        /**/ if final.useLLVM or false      then "lld"
+        else if final.isDarwin              then "cctools"
+        # "bfd" and "gold" both come from GNU binutils. The existance of Gold
+        # is why we use the more obscure "bfd" and not "binutils" for this
+        # choice.
+        else                                     "bfd";
       extensions = {
         sharedLibrary =
           /**/ if final.isDarwin  then ".dylib"
@@ -118,7 +131,7 @@ rec {
         else null;
       # The canonical name for this attribute is darwinSdkVersion, but some
       # platforms define the old name "sdkVer".
-      darwinSdkVersion = final.sdkVer or "10.12";
+      darwinSdkVersion = final.sdkVer or (if final.isAarch64 then "11.0" else "10.12");
       darwinMinVersion = final.darwinSdkVersion;
       darwinMinVersionVariable =
         if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET"
diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix
index 6f638be585b..c6d90ba9850 100644
--- a/lib/systems/doubles.nix
+++ b/lib/systems/doubles.nix
@@ -96,5 +96,5 @@ in {
 
   embedded      = filterDoubles predicates.isNone;
 
-  mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "armv7a-linux" "aarch64-linux" "powerpc64-linux" "powerpc64le-linux"];
+  mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "armv7a-linux" "aarch64-linux" "powerpc64-linux" "powerpc64le-linux" "aarch64-darwin"];
 }
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index 9c0013c3977..6a8f4e091aa 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -70,6 +70,15 @@ rec {
     useAndroidPrebuilt = true;
   };
 
+  aarch64-android = {
+    config = "aarch64-unknown-linux-android";
+    sdkVer = "30";
+    ndkVer = "21";
+    libc = "bionic";
+    useAndroidPrebuilt = false;
+    useLLVM = true;
+  };
+
   scaleway-c1 = armv7l-hf-multiplatform // platforms.scaleway-c1;
 
   pogoplug4 = {
@@ -231,6 +240,12 @@ rec {
     useiOSPrebuilt = true;
   };
 
+  aarch64-darwin = {
+    config = "aarch64-apple-darwin";
+    xcodePlatform = "MacOSX";
+    platform = {};
+  };
+
   #
   # Windows
   #
diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix
index f46e9c826a5..445144439ca 100644
--- a/lib/systems/platforms.nix
+++ b/lib/systems/platforms.nix
@@ -375,6 +375,13 @@ rec {
     };
   };
 
+  apple-m1 = {
+    gcc = {
+      arch = "armv8.3-a+crypto+sha2+aes+crc+fp16+lse+simd+ras+rdm+rcpc";
+      cpu = "apple-a13";
+    };
+  };
+
   ##
   ## MIPS
   ##
@@ -495,7 +502,10 @@ rec {
         else if lib.versionOlder version "6" then sheevaplug
         else if lib.versionOlder version "7" then raspberrypi
         else armv7l-hf-multiplatform
-    else if platform.isAarch64 then aarch64-multiplatform
+
+    else if platform.isAarch64 then
+      if platform.isDarwin then apple-m1
+      else aarch64-multiplatform
 
     else if platform.isRiscV then riscv-multiplatform
 
diff --git a/nixos/doc/manual/release-notes/rl-2105.xml b/nixos/doc/manual/release-notes/rl-2105.xml
index 52bc501c100..a5501533be7 100644
--- a/nixos/doc/manual/release-notes/rl-2105.xml
+++ b/nixos/doc/manual/release-notes/rl-2105.xml
@@ -102,6 +102,18 @@
    </listitem>
    <listitem>
     <para>
+     KDE Gear (formerly KDE Applications) is upgraded to 21.04, see its
+     <link xlink:href="https://kde.org/announcements/gear/21.04/">release
+     notes</link> for details.
+    </para>
+    <para>
+     The <code>kdeApplications</code> package set is now <code>kdeGear</code>,
+     in keeping with the new name. The old name remains for compatibility, but
+     it is deprecated.
+    </para>
+   </listitem>
+   <listitem>
+    <para>
      <link xlink:href="https://libreswan.org/">Libreswan</link> has been updated
      to version 4.4. The package now includes example configurations and manual
      pages by default. The NixOS module has been changed to use the upstream
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix
index d6e36d0246b..b6be524aea6 100644
--- a/nixos/modules/services/x11/desktop-managers/plasma5.nix
+++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix
@@ -8,7 +8,7 @@ let
   cfg = xcfg.desktopManager.plasma5;
 
   libsForQt5 = pkgs.plasma5Packages;
-  inherit (libsForQt5) kdeApplications kdeFrameworks plasma5;
+  inherit (libsForQt5) kdeGear kdeFrameworks plasma5;
   inherit (pkgs) writeText;
 
   pulseaudio = config.hardware.pulseaudio;
@@ -213,7 +213,7 @@ in
 
       environment.systemPackages =
         with libsForQt5;
-        with plasma5; with kdeApplications; with kdeFrameworks;
+        with plasma5; with kdeGear; with kdeFrameworks;
         [
           frameworkintegration
           kactivities
diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix
index b4e4af9f516..0b1a2edc3ba 100644
--- a/pkgs/applications/audio/flac/default.nix
+++ b/pkgs/applications/audio/flac/default.nix
@@ -1,13 +1,22 @@
-{ lib, stdenv, fetchurl, libogg }:
+{ lib, stdenv, fetchurl, fetchpatch, libogg }:
 
 stdenv.mkDerivation rec {
-  name = "flac-1.3.3";
+  pname = "flac";
+  version = "1.3.3";
 
   src = fetchurl {
-    url = "http://downloads.xiph.org/releases/flac/${name}.tar.xz";
+    url = "http://downloads.xiph.org/releases/flac/${pname}-${version}.tar.xz";
     sha256 = "0j0p9sf56a2fm2hkjnf7x3py5ir49jyavg4q5zdyd7bcf6yq4gi1";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "CVE-2020-0499.patch";
+      url = "https://github.com/xiph/flac/commit/2e7931c27eb15e387da440a37f12437e35b22dd4.patch";
+      sha256 = "160qzq9ms5addz7sx06pnyjjkqrffr54r4wd8735vy4x008z71ah";
+    })
+  ];
+
   buildInputs = [ libogg ];
 
   #doCheck = true; # takes lots of time
diff --git a/pkgs/applications/audio/gradio/default.nix b/pkgs/applications/audio/gradio/default.nix
index 1e0fc40b533..9e2187f4a8f 100644
--- a/pkgs/applications/audio/gradio/default.nix
+++ b/pkgs/applications/audio/gradio/default.nix
@@ -55,7 +55,6 @@ in stdenv.mkDerivation {
     gsettings-desktop-schemas
   ] ++ gst_plugins;
 
-  enableParallelBuilding = true;
   postInstall = ''
     glib-compile-schemas "$out"/share/glib-2.0/schemas
   '';
diff --git a/pkgs/applications/audio/mmtc/default.nix b/pkgs/applications/audio/mmtc/default.nix
index 4bd922c8fb6..fc5a2e9b035 100644
--- a/pkgs/applications/audio/mmtc/default.nix
+++ b/pkgs/applications/audio/mmtc/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0ag87hgdg6fvk80fgznba0xjlcajks5w5s6y8lvwhz9irn2kq2rz";
   };
 
-  cargoSha256 = "06xqh0mqbik00qyg8mn1ddbn15v3pdwvh1agghg22xgx53kmnxb3";
+  cargoSha256 = "0lkx0zj9xc0rlrq91l4wydzp430hxlrqyq7ii8wq2fcan8ln22lv";
 
   nativeBuildInputs = [ installShellFiles ];
 
diff --git a/pkgs/applications/audio/muso/default.nix b/pkgs/applications/audio/muso/default.nix
index 67569ccfb99..15c61196d43 100644
--- a/pkgs/applications/audio/muso/default.nix
+++ b/pkgs/applications/audio/muso/default.nix
@@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec {
     cp share/* $out/share/muso/
   '';
 
-  cargoSha256 = "06jgk54r3f8gq6iylv5rgsawss3hc5kmvk02y4gl8iwfnw4xrvmg";
+  cargoSha256 = "1hgdzyz005244f2mh97js9ga0a6s2hcd6iydz07f1hmhsh1j2bwy";
 
   meta = with lib; {
     description = "An automatic music sorter (based on ID3 tags)";
diff --git a/pkgs/applications/audio/netease-music-tui/default.nix b/pkgs/applications/audio/netease-music-tui/default.nix
index a8f90ef34ef..61353f45fec 100644
--- a/pkgs/applications/audio/netease-music-tui/default.nix
+++ b/pkgs/applications/audio/netease-music-tui/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ alsaLib openssl ];
 
-  cargoSha256 = "0f06wc7h2zjipifvxsskxvihjf6mykrjrm7yk0zf98ra079bc9g9";
+  cargoSha256 = "1pca0sz4rz8qls6k2vhf70ixhnvgk81c4hbx81q3pv106g5k205f";
 
   meta = with lib; {
     homepage = "https://github.com/betta-cyber/netease-music-tui";
diff --git a/pkgs/applications/audio/parlatype/default.nix b/pkgs/applications/audio/parlatype/default.nix
index acffe9464fa..7b448cc69af 100644
--- a/pkgs/applications/audio/parlatype/default.nix
+++ b/pkgs/applications/audio/parlatype/default.nix
@@ -48,7 +48,6 @@ stdenv.mkDerivation rec {
   '';
 
   doCheck = false;
-  enableParallelBuilding = true;
 
   buildPhase = ''
     export GST_PLUGIN_SYSTEM_PATH_1_0="$out/lib/gstreamer-1.0/:$GST_PLUGIN_SYSTEM_PATH_1_0"
diff --git a/pkgs/applications/audio/spotify-tui/default.nix b/pkgs/applications/audio/spotify-tui/default.nix
index 78972effc4d..86873802bfa 100644
--- a/pkgs/applications/audio/spotify-tui/default.nix
+++ b/pkgs/applications/audio/spotify-tui/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "082y5m2vglzx9kdc2088zynz0njcnljnb0y170igmlsxq9wkrgg2";
   };
 
-  cargoSha256 = "100c7x603qyhav3p24clwfal4ngh0258x9lqsi84kcj4wq2f3i8f";
+  cargoSha256 = "1khn6fx13qlfpqwnw7ysgan5h4nrg2qnzn2p74vn7jic3mqc3sax";
 
   nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.isLinux [ pkg-config python3 ];
   buildInputs = [ ]
diff --git a/pkgs/applications/audio/spotifyd/default.nix b/pkgs/applications/audio/spotifyd/default.nix
index 3c4370d1614..8a077918d4f 100644
--- a/pkgs/applications/audio/spotifyd/default.nix
+++ b/pkgs/applications/audio/spotifyd/default.nix
@@ -18,7 +18,7 @@ rustPackages.rustPlatform.buildRustPackage rec {
     sha256 = "1a578h13iv8gqmskzlncfr42jlg5gp0zfcizv4wbd48y9hl8fh2l";
   };
 
-  cargoSha256 = "1sm5yfgjx5xfnqqh1v8ycwzxw4kl6dq5gcvsdnc4h1cj3pdhbpcc";
+  cargoSha256 = "07dxfc0csrnfl01p9vdrqvca9f574svlf37dk3dz8p6q08ki0n1z";
 
   cargoBuildFlags = [
     "--no-default-features"
diff --git a/pkgs/applications/editors/amp/default.nix b/pkgs/applications/editors/amp/default.nix
index 5f8c56592f6..7f4081a399e 100644
--- a/pkgs/applications/editors/amp/default.nix
+++ b/pkgs/applications/editors/amp/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0l1vpcfq6jrq2dkrmsa4ghwdpp7c54f46gz3n7nk0i41b12hnigw";
   };
 
-  cargoSha256 = "09v991rl2w4c4jh7ga7q1lk6wyl2vr71j5cpniij8mcvszrz78qf";
+  cargoSha256 = "19r3xvysragmf02zk2l5s2hjg92gxdygsh52y7za81x443lvjyvq";
 
   nativeBuildInputs = [ cmake pkg-config python3 ];
   buildInputs = [ openssl xorg.libxcb libgit2 ] ++ lib.optionals stdenv.isDarwin
diff --git a/pkgs/applications/editors/hexdino/default.nix b/pkgs/applications/editors/hexdino/default.nix
index f92a4557ac7..82119ae91d1 100644
--- a/pkgs/applications/editors/hexdino/default.nix
+++ b/pkgs/applications/editors/hexdino/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage {
     sha256 = "11mz07735gxqfamjcjjmxya6swlvr1p77sgd377zjcmd6z54gwyf";
   };
 
-  cargoSha256 = "06ghcd4j751mdkzwb88nqwk8la4zdb137y0iqrkpykkfx0as43x3";
+  cargoSha256 = "1hpndmpk1zlfvb4r95m13yvnsbjkwgw4pb9ala2d5yzfp38225nm";
 
   buildInputs = [ ncurses ];
 
diff --git a/pkgs/applications/editors/kibi/default.nix b/pkgs/applications/editors/kibi/default.nix
index 337a46c0ec6..2020729d81c 100644
--- a/pkgs/applications/editors/kibi/default.nix
+++ b/pkgs/applications/editors/kibi/default.nix
@@ -7,7 +7,7 @@ rustPlatform.buildRustPackage rec {
   pname = "kibi";
   version = "0.2.2";
 
-  cargoSha256 = "sha256-8iEUOLFwHBLS0HQL/oLnv6lcV3V9Hm4jMqXkqPvIF9E=";
+  cargoSha256 = "sha256-ebUCkcUACganeq5U0XU4VIGClKDZGhUw6K3WBgTUUUw=";
 
   src = fetchFromGitHub {
     owner = "ilai-deutel";
diff --git a/pkgs/applications/editors/neovim/gnvim/default.nix b/pkgs/applications/editors/neovim/gnvim/default.nix
index 8e86683f9bf..c82829bc109 100644
--- a/pkgs/applications/editors/neovim/gnvim/default.nix
+++ b/pkgs/applications/editors/neovim/gnvim/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1cc3yk04v9icdjr5cn58mqc3ba1wqmlzhf9ly7biy9m8yk30w9y0";
   };
 
-  cargoSha256 = "1fyn8nsabzrfl9ykf2gk2p8if0yjp6k0ybrmp0pw67pbwaxpb9ym";
+  cargoSha256 = "0z6hhahxdc6d7nzqvc8jlxn1frsc39va8z5pmwfmmq5z61ahk90z";
 
   buildInputs = [ gtk webkitgtk ];
 
diff --git a/pkgs/applications/editors/ox/default.nix b/pkgs/applications/editors/ox/default.nix
index aa3f22a2626..0888bc7cea3 100644
--- a/pkgs/applications/editors/ox/default.nix
+++ b/pkgs/applications/editors/ox/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "18iffnmvax6mbnhypf7yma98y5q2zlsyp9q18f92fdwz426r33p0";
   };
 
-  cargoSha256 = "0v0a1dl9rq5qyy9xwnb59w62qr9db3y3zlmnp60wafvj70zi9zxs";
+  cargoSha256 = "0m5vglm58myf50vbb7m6gd3srk3n93afg70lz63i2kciqkkwsnjl";
 
   meta = with lib; {
     description = "An independent Rust text editor that runs in your terminal";
diff --git a/pkgs/applications/gis/whitebox-tools/default.nix b/pkgs/applications/gis/whitebox-tools/default.nix
index 1e7390f8c83..fdfbcdbfccf 100644
--- a/pkgs/applications/gis/whitebox-tools/default.nix
+++ b/pkgs/applications/gis/whitebox-tools/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
-  cargoSha256 = "09rz8f1xyc64qjbj6pgw8jxr2a7chghmdc6sfkbv7hdvx6vg4wvk";
+  cargoSha256 = "0rdg9k44si37iyqlcl1rw7ilajcvqy93gbfpd7n4cr1hg9ypm0m3";
 
   meta = with lib; {
     description = "An advanced geospatial data analysis platform";
diff --git a/pkgs/applications/graphics/ImageMagick/6.x.nix b/pkgs/applications/graphics/ImageMagick/6.x.nix
index cafad76c273..79fdacfaadb 100644
--- a/pkgs/applications/graphics/ImageMagick/6.x.nix
+++ b/pkgs/applications/graphics/ImageMagick/6.x.nix
@@ -9,7 +9,7 @@ let
     if stdenv.hostPlatform.system == "i686-linux" then "i686"
     else if stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin" then "x86-64"
     else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l"
-    else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64"
+    else if stdenv.hostPlatform.system == "aarch64-linux"  || stdenv.hostPlatform.system == "aarch64-darwin" then "aarch64"
     else if stdenv.hostPlatform.system == "powerpc64le-linux" then "ppc64le"
     else throw "ImageMagick is not supported on this platform.";
 in
diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix
index c4e1f3406f6..ed1e580cb16 100644
--- a/pkgs/applications/graphics/ImageMagick/7.0.nix
+++ b/pkgs/applications/graphics/ImageMagick/7.0.nix
@@ -11,7 +11,7 @@ let
     if stdenv.hostPlatform.system == "i686-linux" then "i686"
     else if stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin" then "x86-64"
     else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l"
-    else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64"
+    else if stdenv.hostPlatform.system == "aarch64-linux"  || stdenv.hostPlatform.system == "aarch64-darwin" then "aarch64"
     else if stdenv.hostPlatform.system == "powerpc64le-linux" then "ppc64le"
     else throw "ImageMagick is not supported on this platform.";
 in
diff --git a/pkgs/applications/graphics/rx/default.nix b/pkgs/applications/graphics/rx/default.nix
index 78cc664accc..55349e8a08d 100644
--- a/pkgs/applications/graphics/rx/default.nix
+++ b/pkgs/applications/graphics/rx/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1pln65pqy39ijrld11d06klwzfhhzmrgdaxijpx9q7w9z66zmqb8";
   };
 
-  cargoSha256 = "143a5x61s7ywk0ljqd10jkfvs6lrhlibkm2a9lw41wq13mgzb78j";
+  cargoSha256 = "1mb9wx5h729pc9y1b0d0yiapyk0mlbvdmvwq993fcpkziwjvnl44";
 
   nativeBuildInputs = [ cmake pkg-config makeWrapper ];
 
diff --git a/pkgs/applications/kde/akonadi-import-wizard.nix b/pkgs/applications/kde/akonadi-import-wizard.nix
index 26b373fb330..948f9e5d2a2 100644
--- a/pkgs/applications/kde/akonadi-import-wizard.nix
+++ b/pkgs/applications/kde/akonadi-import-wizard.nix
@@ -2,7 +2,8 @@
   mkDerivation, lib, kdepimTeam,
   extra-cmake-modules, kdoctools,
   akonadi, karchive, kcontacts, kcrash, kidentitymanagement, kio,
-  kmailtransport, kwallet, mailcommon, mailimporter, messagelib
+  kmailtransport, kwallet, mailcommon, mailimporter, messagelib,
+  qtkeychain, libsecret
 }:
 
 mkDerivation {
@@ -15,6 +16,7 @@ mkDerivation {
   buildInputs = [
     akonadi karchive kcontacts kcrash kidentitymanagement kio
     kmailtransport kwallet mailcommon mailimporter messagelib
+    qtkeychain libsecret
   ];
   outputs = [ "out" "dev" ];
 }
diff --git a/pkgs/applications/kde/akonadi/0001-akonadi-paths.patch b/pkgs/applications/kde/akonadi/0001-akonadi-paths.patch
index 3e5ccc9cdaa..d5e4fe1ee72 100644
--- a/pkgs/applications/kde/akonadi/0001-akonadi-paths.patch
+++ b/pkgs/applications/kde/akonadi/0001-akonadi-paths.patch
@@ -1,6 +1,6 @@
-From f4d718502ecd8242500078a7783e27caba72871e Mon Sep 17 00:00:00 2001
+From ca8ff6e6d527ee968300cce5e8cd148f6a4d256b Mon Sep 17 00:00:00 2001
 From: Thomas Tuegel <ttuegel@mailbox.org>
-Date: Sun, 31 Jan 2021 11:00:03 -0600
+Date: Sun, 25 Apr 2021 08:00:10 -0500
 Subject: [PATCH 1/3] akonadi paths
 
 ---
@@ -11,32 +11,32 @@ Subject: [PATCH 1/3] akonadi paths
  4 files changed, 11 insertions(+), 40 deletions(-)
 
 diff --git a/src/akonadicontrol/agentmanager.cpp b/src/akonadicontrol/agentmanager.cpp
-index 31e0cf2..6436e87 100644
+index 44ceec5..eb5fa50 100644
 --- a/src/akonadicontrol/agentmanager.cpp
 +++ b/src/akonadicontrol/agentmanager.cpp
-@@ -48,7 +48,7 @@ public:
-                 []() {
-                     QCoreApplication::instance()->exit(255);
-                 });
+@@ -47,7 +47,7 @@ public:
+         connect(this, &Akonadi::ProcessControl::unableToStart, this, []() {
+             QCoreApplication::instance()->exit(255);
+         });
 -        start(QStringLiteral("akonadiserver"), args, RestartOnCrash);
-+        start(QLatin1String(NIX_OUT "/bin/akonadiserver"), args, RestartOnCrash);
++        start(QStringLiteral(NIX_OUT "/bin/akonadiserver"), args, RestartOnCrash);
      }
- 
+
      ~StorageProcessControl() override
-@@ -70,7 +70,7 @@ public:
-                 []() {
-                     qCCritical(AKONADICONTROL_LOG) << "Failed to start AgentServer!";
-                 });
+@@ -69,7 +69,7 @@ public:
+         connect(this, &Akonadi::ProcessControl::unableToStart, this, []() {
+             qCCritical(AKONADICONTROL_LOG) << "Failed to start AgentServer!";
+         });
 -        start(QStringLiteral("akonadi_agent_server"), args, RestartOnCrash);
-+        start(QLatin1String(NIX_OUT "/bin/akonadi_agent_server"), args, RestartOnCrash);
++        start(QStringLiteral(NIX_OUT "/bin/akonadi_agent_server"), args, RestartOnCrash);
      }
- 
+
      ~AgentServerProcessControl() override
 diff --git a/src/akonadicontrol/agentprocessinstance.cpp b/src/akonadicontrol/agentprocessinstance.cpp
-index c98946c..aa307ca 100644
+index 8e92e08..f98dfd8 100644
 --- a/src/akonadicontrol/agentprocessinstance.cpp
 +++ b/src/akonadicontrol/agentprocessinstance.cpp
-@@ -49,7 +49,7 @@ bool AgentProcessInstance::start(const AgentType &agentInfo)
+@@ -47,7 +47,7 @@ bool AgentProcessInstance::start(const AgentType &agentInfo)
      } else {
          Q_ASSERT(agentInfo.launchMethod == AgentType::Launcher);
          const QStringList arguments = QStringList() << executable << identifier();
@@ -46,20 +46,20 @@ index c98946c..aa307ca 100644
      }
      return true;
 diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
-index d595a3a..99324f6 100644
+index 1a437ac..3550f9d 100644
 --- a/src/server/storage/dbconfigmysql.cpp
 +++ b/src/server/storage/dbconfigmysql.cpp
-@@ -69,7 +69,6 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
+@@ -72,7 +72,6 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
      // determine default settings depending on the driver
      QString defaultHostName;
      QString defaultOptions;
 -    QString defaultServerPath;
      QString defaultCleanShutdownCommand;
- 
+
  #ifndef Q_OS_WIN
-@@ -78,16 +77,7 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
+@@ -80,16 +79,7 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
  #endif
- 
+
      const bool defaultInternalServer = true;
 -#ifdef MYSQLD_EXECUTABLE
 -    if (QFile::exists(QStringLiteral(MYSQLD_EXECUTABLE))) {
@@ -75,20 +75,20 @@ index d595a3a..99324f6 100644
      if (!mysqladminPath.isEmpty()) {
  #ifndef Q_OS_WIN
          defaultCleanShutdownCommand = QStringLiteral("%1 --defaults-file=%2/mysql.conf --socket=%3/%4 shutdown")
-@@ -97,10 +87,10 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
+@@ -99,10 +89,10 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
  #endif
      }
- 
+
 -    mMysqlInstallDbPath = findExecutable(QStringLiteral("mysql_install_db"));
 +    mMysqlInstallDbPath = QLatin1String(NIXPKGS_MYSQL_MYSQL_INSTALL_DB);
      qCDebug(AKONADISERVER_LOG) << "Found mysql_install_db: " << mMysqlInstallDbPath;
- 
+
 -    mMysqlCheckPath = findExecutable(QStringLiteral("mysqlcheck"));
 +    mMysqlCheckPath = QLatin1String(NIXPKGS_MYSQL_MYSQLCHECK);
      qCDebug(AKONADISERVER_LOG) << "Found mysqlcheck: " << mMysqlCheckPath;
- 
+
      mInternalServer = settings.value(QStringLiteral("QMYSQL/StartServer"), defaultInternalServer).toBool();
-@@ -117,7 +107,7 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
+@@ -119,7 +109,7 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
      mUserName = settings.value(QStringLiteral("User")).toString();
      mPassword = settings.value(QStringLiteral("Password")).toString();
      mConnectionOptions = settings.value(QStringLiteral("Options"), defaultOptions).toString();
@@ -96,18 +96,18 @@ index d595a3a..99324f6 100644
 +    mMysqldPath = QLatin1String(NIXPKGS_MYSQL_MYSQLD);
      mCleanServerShutdownCommand = settings.value(QStringLiteral("CleanServerShutdownCommand"), defaultCleanShutdownCommand).toString();
      settings.endGroup();
- 
-@@ -127,9 +117,6 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
+
+@@ -129,9 +119,6 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
          // intentionally not namespaced as we are the only one in this db instance when using internal mode
          mDatabaseName = QStringLiteral("akonadi");
      }
 -    if (mInternalServer && (mMysqldPath.isEmpty() || !QFile::exists(mMysqldPath))) {
 -        mMysqldPath = defaultServerPath;
 -    }
- 
+
      qCDebug(AKONADISERVER_LOG) << "Using mysqld:" << mMysqldPath;
- 
-@@ -139,9 +126,6 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
+
+@@ -141,9 +128,6 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
          settings.setValue(QStringLiteral("Name"), mDatabaseName);
          settings.setValue(QStringLiteral("Host"), mHostName);
          settings.setValue(QStringLiteral("Options"), mConnectionOptions);
@@ -117,20 +117,20 @@ index d595a3a..99324f6 100644
          settings.setValue(QStringLiteral("StartServer"), mInternalServer);
          settings.endGroup();
          settings.sync();
-@@ -214,7 +198,7 @@ bool DbConfigMysql::startInternalServer()
+@@ -215,7 +199,7 @@ bool DbConfigMysql::startInternalServer()
  #endif
- 
+
      // generate config file
 -    const QString globalConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-global.conf"));
 +    const QString globalConfig = QLatin1String(NIX_OUT "/etc/xdg/akonadi/mysql-global.conf");
-     const QString localConfig  = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-local.conf"));
+     const QString localConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-local.conf"));
      const QString actualConfig = StandardDirs::saveDir("data") + QLatin1String("/mysql.conf");
      if (globalConfig.isEmpty()) {
 diff --git a/src/server/storage/dbconfigpostgresql.cpp b/src/server/storage/dbconfigpostgresql.cpp
-index dd273fc..05288d9 100644
+index 4df61da..e3469c4 100644
 --- a/src/server/storage/dbconfigpostgresql.cpp
 +++ b/src/server/storage/dbconfigpostgresql.cpp
-@@ -127,9 +127,7 @@ bool DbConfigPostgresql::init(QSettings &settings, bool storeSettings)
+@@ -125,9 +125,7 @@ bool DbConfigPostgresql::init(QSettings &settings, bool storeSettings)
      // determine default settings depending on the driver
      QString defaultHostName;
      QString defaultOptions;
@@ -138,10 +138,10 @@ index dd273fc..05288d9 100644
      QString defaultInitDbPath;
 -    QString defaultPgUpgradePath;
      QString defaultPgData;
- 
+
  #ifndef Q_WS_WIN // We assume that PostgreSQL is running as service on Windows
-@@ -140,12 +138,8 @@ bool DbConfigPostgresql::init(QSettings &settings, bool storeSettings)
- 
+@@ -138,12 +136,8 @@ bool DbConfigPostgresql::init(QSettings &settings, bool storeSettings)
+
      mInternalServer = settings.value(QStringLiteral("QPSQL/StartServer"), defaultInternalServer).toBool();
      if (mInternalServer) {
 -        const auto paths = postgresSearchPaths(QStringLiteral("/usr/lib/postgresql"));
@@ -153,8 +153,8 @@ index dd273fc..05288d9 100644
 -        defaultPgUpgradePath = QStandardPaths::findExecutable(QStringLiteral("pg_upgrade"), paths);
          defaultPgData = StandardDirs::saveDir("data", QStringLiteral("db_data"));
      }
- 
-@@ -164,20 +158,14 @@ bool DbConfigPostgresql::init(QSettings &settings, bool storeSettings)
+
+@@ -162,20 +156,14 @@ bool DbConfigPostgresql::init(QSettings &settings, bool storeSettings)
      mUserName = settings.value(QStringLiteral("User")).toString();
      mPassword = settings.value(QStringLiteral("Password")).toString();
      mConnectionOptions = settings.value(QStringLiteral("Options"), defaultOptions).toString();
@@ -177,7 +177,7 @@ index dd273fc..05288d9 100644
      qCDebug(AKONADISERVER_LOG) << "Found pg_upgrade:" << mPgUpgradePath;
      mPgData = settings.value(QStringLiteral("PgData"), defaultPgData).toString();
      if (mPgData.isEmpty()) {
-@@ -194,7 +182,6 @@ bool DbConfigPostgresql::init(QSettings &settings, bool storeSettings)
+@@ -192,7 +180,6 @@ bool DbConfigPostgresql::init(QSettings &settings, bool storeSettings)
              settings.setValue(QStringLiteral("Port"), mHostPort);
          }
          settings.setValue(QStringLiteral("Options"), mConnectionOptions);
@@ -185,6 +185,6 @@ index dd273fc..05288d9 100644
          settings.setValue(QStringLiteral("InitDbPath"), mInitDbPath);
          settings.setValue(QStringLiteral("StartServer"), mInternalServer);
          settings.endGroup();
--- 
-2.29.2
+--
+2.31.1
 
diff --git a/pkgs/applications/kde/akonadi/0002-akonadi-timestamps.patch b/pkgs/applications/kde/akonadi/0002-akonadi-timestamps.patch
index 24f59f67916..1da52dbad0e 100644
--- a/pkgs/applications/kde/akonadi/0002-akonadi-timestamps.patch
+++ b/pkgs/applications/kde/akonadi/0002-akonadi-timestamps.patch
@@ -1,6 +1,6 @@
-From badd4be311afd37a99126c60490f1ae5daced6c4 Mon Sep 17 00:00:00 2001
+From f6c446cf6fab2edbd2606b4c6100903e9437362a Mon Sep 17 00:00:00 2001
 From: Thomas Tuegel <ttuegel@mailbox.org>
-Date: Sun, 31 Jan 2021 11:00:15 -0600
+Date: Sun, 25 Apr 2021 08:01:02 -0500
 Subject: [PATCH 2/3] akonadi timestamps
 
 ---
@@ -8,19 +8,19 @@ Subject: [PATCH 2/3] akonadi timestamps
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
-index 99324f6..3c170a8 100644
+index 3550f9d..e9e8887 100644
 --- a/src/server/storage/dbconfigmysql.cpp
 +++ b/src/server/storage/dbconfigmysql.cpp
-@@ -240,8 +240,7 @@ bool DbConfigMysql::startInternalServer()
+@@ -241,8 +241,7 @@ bool DbConfigMysql::startInternalServer()
      bool confUpdate = false;
      QFile actualFile(actualConfig);
      // update conf only if either global (or local) is newer than actual
--    if ((QFileInfo(globalConfig).lastModified() > QFileInfo(actualFile).lastModified()) ||
--            (QFileInfo(localConfig).lastModified()  > QFileInfo(actualFile).lastModified())) {
+-    if ((QFileInfo(globalConfig).lastModified() > QFileInfo(actualFile).lastModified())
+-        || (QFileInfo(localConfig).lastModified() > QFileInfo(actualFile).lastModified())) {
 +    if (true) {
          QFile globalFile(globalConfig);
          QFile localFile(localConfig);
          if (globalFile.open(QFile::ReadOnly) && actualFile.open(QFile::WriteOnly)) {
 -- 
-2.29.2
+2.31.1
 
diff --git a/pkgs/applications/kde/akonadi/0003-akonadi-revert-make-relocatable.patch b/pkgs/applications/kde/akonadi/0003-akonadi-revert-make-relocatable.patch
index 3aa61da73e4..73d69c5e69a 100644
--- a/pkgs/applications/kde/akonadi/0003-akonadi-revert-make-relocatable.patch
+++ b/pkgs/applications/kde/akonadi/0003-akonadi-revert-make-relocatable.patch
@@ -1,6 +1,6 @@
-From 82bfa975af60757374ffad787e56a981d6df0f98 Mon Sep 17 00:00:00 2001
+From 4b90a0bd4411a66bbe6ecf85ce89a60a58bee969 Mon Sep 17 00:00:00 2001
 From: Thomas Tuegel <ttuegel@mailbox.org>
-Date: Sun, 31 Jan 2021 11:01:24 -0600
+Date: Sun, 25 Apr 2021 08:01:21 -0500
 Subject: [PATCH 3/3] akonadi revert make relocatable
 
 ---
@@ -9,10 +9,10 @@ Subject: [PATCH 3/3] akonadi revert make relocatable
  2 files changed, 3 insertions(+), 6 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 4bb5fec..35720b4 100644
+index 4e8cc81..63161b7 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -343,9 +343,6 @@ configure_package_config_file(
+@@ -368,9 +368,6 @@ configure_package_config_file(
      "${CMAKE_CURRENT_SOURCE_DIR}/KF5AkonadiConfig.cmake.in"
      "${CMAKE_CURRENT_BINARY_DIR}/KF5AkonadiConfig.cmake"
      INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
@@ -41,5 +41,5 @@ index bcf7320..1574319 100644
  # set the directories
  if(NOT AKONADI_INSTALL_DIR)
 -- 
-2.29.2
+2.31.1
 
diff --git a/pkgs/applications/kde/akonadi/default.nix b/pkgs/applications/kde/akonadi/default.nix
index fd662d7e992..f4e4c822350 100644
--- a/pkgs/applications/kde/akonadi/default.nix
+++ b/pkgs/applications/kde/akonadi/default.nix
@@ -1,5 +1,5 @@
 {
-  mkDerivation, lib, kdepimTeam,
+  mkDerivation, lib, kdepimTeam, substituteAll,
   extra-cmake-modules, shared-mime-info, qtbase, accounts-qt,
   boost, kaccounts-integration, kcompletion, kconfigwidgets, kcrash, kdbusaddons,
   kdesignerplugin, ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mariadb, qttools,
@@ -33,8 +33,7 @@ mkDerivation {
     ''-DNIXPKGS_POSTGRES_PG_CTL=\"\"''
     ''-DNIXPKGS_POSTGRES_PG_UPGRADE=\"\"''
     ''-DNIXPKGS_POSTGRES_INITDB=\"\"''
+    ''-DNIX_OUT=\"${placeholder "out"}\"''
+    ''-I${lib.getDev kio}/include/KF5''  # Fixes: kio_version.h: No such file or directory
   ];
-  preConfigure = ''
-    NIX_CFLAGS_COMPILE+=" -DNIX_OUT=\"$out\""
-  '';
 }
diff --git a/pkgs/applications/kde/baloo-widgets.nix b/pkgs/applications/kde/baloo-widgets.nix
index 887e7ea2986..940c47a2ac8 100644
--- a/pkgs/applications/kde/baloo-widgets.nix
+++ b/pkgs/applications/kde/baloo-widgets.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
-  baloo, kconfig, kdelibs4support, kfilemetadata, ki18n, kio, kservice
+  baloo, kconfig, kfilemetadata, ki18n, kio, kservice
 }:
 
 mkDerivation {
@@ -12,7 +12,7 @@ mkDerivation {
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   propagatedBuildInputs = [
-    baloo kconfig kdelibs4support kfilemetadata ki18n kio kservice
+    baloo kconfig kfilemetadata ki18n kio kservice
   ];
   outputs = [ "out" "dev" ];
 }
diff --git a/pkgs/applications/kde/default.nix b/pkgs/applications/kde/default.nix
index f8719c353b0..18e857a2471 100644
--- a/pkgs/applications/kde/default.nix
+++ b/pkgs/applications/kde/default.nix
@@ -30,6 +30,9 @@ still shows most of the available features is in `./gwenview.nix`.
 }:
 
 let
+  minQtVersion = "5.15";
+  broken = lib.versionOlder libsForQt5.qtbase.version minQtVersion;
+
   mirror = "mirror://kde";
   srcs = import ./srcs.nix { inherit fetchurl mirror; };
 
@@ -45,10 +48,13 @@ let
 
         outputs = args.outputs or [ "out" ];
 
-        meta = {
-          platforms = lib.platforms.linux;
-          homepage = "http://www.kde.org";
-        } // (args.meta or {});
+        meta =
+          let meta = args.meta or {}; in
+          meta // {
+            homepage = meta.homepage or "http://www.kde.org";
+            platforms = meta.platforms or lib.platforms.linux;
+            broken = meta.broken or broken;
+          };
       });
 
   packages = self: with self;
diff --git a/pkgs/applications/kde/dolphin-plugins.nix b/pkgs/applications/kde/dolphin-plugins.nix
index 37613f86a7f..123b6f0fc26 100644
--- a/pkgs/applications/kde/dolphin-plugins.nix
+++ b/pkgs/applications/kde/dolphin-plugins.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
-  dolphin, kdelibs4support, ki18n, kio, kxmlgui
+  dolphin, ki18n, kio, kxmlgui
 }:
 
 mkDerivation {
@@ -12,7 +12,7 @@ mkDerivation {
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   propagatedBuildInputs = [
-    dolphin kdelibs4support ki18n kio kxmlgui
+    dolphin ki18n kio kxmlgui
   ];
   outputs = [ "out" "dev" ];
 }
diff --git a/pkgs/applications/kde/dolphin.nix b/pkgs/applications/kde/dolphin.nix
index a558ad26677..83f698b8977 100644
--- a/pkgs/applications/kde/dolphin.nix
+++ b/pkgs/applications/kde/dolphin.nix
@@ -2,7 +2,7 @@
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
   baloo, baloo-widgets, kactivities, kbookmarks, kcmutils,
-  kcompletion, kconfig, kcoreaddons, kdelibs4support, kdbusaddons,
+  kcompletion, kconfig, kcoreaddons, kdbusaddons,
   kfilemetadata, ki18n, kiconthemes, kinit, kio, knewstuff, knotifications,
   kparts, ktexteditor, kwindowsystem, phonon, solid,
   wayland, qtbase, qtwayland
@@ -19,7 +19,7 @@ mkDerivation {
   propagatedUserEnvPkgs = [ baloo ];
   propagatedBuildInputs = [
     baloo baloo-widgets kactivities kbookmarks kcmutils kcompletion kconfig
-    kcoreaddons kdelibs4support kdbusaddons kfilemetadata ki18n kiconthemes
+    kcoreaddons kdbusaddons kfilemetadata ki18n kiconthemes
     kinit kio knewstuff knotifications kparts ktexteditor kwindowsystem
     phonon solid
     wayland qtwayland
diff --git a/pkgs/applications/kde/dragon.nix b/pkgs/applications/kde/dragon.nix
index 0ce6459e3f6..0483d535c9a 100644
--- a/pkgs/applications/kde/dragon.nix
+++ b/pkgs/applications/kde/dragon.nix
@@ -2,7 +2,7 @@
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
   baloo, baloo-widgets, kactivities, kbookmarks, kcmutils,
-  kcompletion, kconfig, kcoreaddons, kdelibs4support, kdbusaddons,
+  kcompletion, kconfig, kcoreaddons, kdbusaddons,
   kfilemetadata, ki18n, kiconthemes, kinit, kio, knewstuff, knotifications,
   kparts, ktexteditor, kwindowsystem, phonon, solid, phonon-backend-gstreamer
 }:
@@ -17,7 +17,7 @@ mkDerivation {
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   propagatedBuildInputs = [
     baloo baloo-widgets kactivities kbookmarks kcmutils kcompletion kconfig
-    kcoreaddons kdelibs4support kdbusaddons kfilemetadata ki18n kiconthemes
+    kcoreaddons kdbusaddons kfilemetadata ki18n kiconthemes
     kinit kio knewstuff knotifications kparts ktexteditor kwindowsystem
     phonon solid phonon-backend-gstreamer
   ];
diff --git a/pkgs/applications/kde/fetch.sh b/pkgs/applications/kde/fetch.sh
index 5b61590003e..3208fce8767 100644
--- a/pkgs/applications/kde/fetch.sh
+++ b/pkgs/applications/kde/fetch.sh
@@ -1 +1 @@
-WGET_ARGS=( http://download.kde.org/stable/release-service/20.12.3/src -A '*.tar.xz' )
+WGET_ARGS=( http://download.kde.org/stable/release-service/21.04.0/src -A '*.tar.xz' )
diff --git a/pkgs/applications/kde/gwenview.nix b/pkgs/applications/kde/gwenview.nix
index 0cd884d5401..5fe126c04e6 100644
--- a/pkgs/applications/kde/gwenview.nix
+++ b/pkgs/applications/kde/gwenview.nix
@@ -2,7 +2,7 @@
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
   exiv2, lcms2,
-  baloo, kactivities, kdelibs4support, kio, kipi-plugins, libkdcraw, libkipi,
+  baloo, kactivities, kio, kipi-plugins, kitemmodels, kparts, libkdcraw, libkipi,
   phonon, qtimageformats, qtsvg, qtx11extras, kinit
 }:
 
@@ -14,7 +14,8 @@ mkDerivation {
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    baloo exiv2 kactivities kdelibs4support kio libkdcraw lcms2 libkipi phonon
+    baloo kactivities kio kitemmodels kparts libkdcraw libkipi phonon
+    exiv2 lcms2
     qtimageformats qtsvg qtx11extras
   ];
   propagatedUserEnvPkgs = [ kipi-plugins libkipi (lib.getBin kinit) ];
diff --git a/pkgs/applications/kde/kalarm.nix b/pkgs/applications/kde/kalarm.nix
index 8709f26bd12..8239cdf0864 100644
--- a/pkgs/applications/kde/kalarm.nix
+++ b/pkgs/applications/kde/kalarm.nix
@@ -4,7 +4,7 @@
 
   kauth, kcodecs, kcompletion, kconfig, kconfigwidgets, kdbusaddons, kdoctools,
   kguiaddons, ki18n, kiconthemes, kidletime, kjobwidgets, kcmutils,
-  kdelibs4support, kio, knotifications, knotifyconfig, kservice, kwidgetsaddons,
+  kio, knotifications, knotifyconfig, kservice, kwidgetsaddons,
   kwindowsystem, kxmlgui, phonon,
 
   kimap, akonadi, akonadi-contacts, akonadi-mime, kalarmcal, kcalendarcore, kcalutils,
@@ -25,7 +25,7 @@ mkDerivation {
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
     kauth kcodecs kcompletion kconfig kconfigwidgets kdbusaddons kdoctools
-    kguiaddons ki18n kiconthemes kidletime kjobwidgets kcmutils kdelibs4support
+    kguiaddons ki18n kiconthemes kidletime kjobwidgets kcmutils
     kio knotifications knotifyconfig kservice kwidgetsaddons kwindowsystem
     kxmlgui phonon
 
diff --git a/pkgs/applications/kde/kalarmcal.nix b/pkgs/applications/kde/kalarmcal.nix
index 5671174e9b1..9296fe024e9 100644
--- a/pkgs/applications/kde/kalarmcal.nix
+++ b/pkgs/applications/kde/kalarmcal.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, lib, kdepimTeam,
   extra-cmake-modules, kdoctools,
-  akonadi, kcalendarcore, kdelibs4support, kholidays, kidentitymanagement,
+  akonadi, kcalendarcore, kholidays, kidentitymanagement,
   kpimtextedit, kcalutils
 }:
 
@@ -13,7 +13,7 @@ mkDerivation {
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   propagatedBuildInputs = [
-    akonadi kcalendarcore kdelibs4support kholidays kidentitymanagement kpimtextedit kcalutils
+    akonadi kcalendarcore kholidays kidentitymanagement kpimtextedit kcalutils
   ];
   outputs = [ "out" "dev" ];
 }
diff --git a/pkgs/applications/kde/kcachegrind.nix b/pkgs/applications/kde/kcachegrind.nix
index 72c22c21ec5..5988885c471 100644
--- a/pkgs/applications/kde/kcachegrind.nix
+++ b/pkgs/applications/kde/kcachegrind.nix
@@ -1,8 +1,8 @@
 {
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
-  karchive, ki18n, kio, perl, python3, php, qttools
-  , kdbusaddons
+  karchive, ki18n, kio, perl, python3, php, qttools,
+  kdbusaddons
 }:
 
 mkDerivation {
diff --git a/pkgs/applications/kde/kcalutils.nix b/pkgs/applications/kde/kcalutils.nix
index 1fce68e7f46..21e84dff05f 100644
--- a/pkgs/applications/kde/kcalutils.nix
+++ b/pkgs/applications/kde/kcalutils.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, lib, kdepimTeam,
   extra-cmake-modules, kdoctools,
-  grantlee, kcalendarcore, kconfig, kontactinterface, kcoreaddons, kdelibs4support,
+  grantlee, kcalendarcore, kconfig, kontactinterface, kcoreaddons,
   kidentitymanagement, kpimtextedit,
 }:
 
@@ -13,7 +13,7 @@ mkDerivation {
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    grantlee kcalendarcore kconfig kontactinterface kcoreaddons kdelibs4support
+    grantlee kcalendarcore kconfig kontactinterface kcoreaddons
     kidentitymanagement kpimtextedit
   ];
   outputs = [ "out" "dev" ];
diff --git a/pkgs/applications/kde/kdeconnect-kde.nix b/pkgs/applications/kde/kdeconnect-kde.nix
index c2b465303b5..30bd0731a87 100644
--- a/pkgs/applications/kde/kdeconnect-kde.nix
+++ b/pkgs/applications/kde/kdeconnect-kde.nix
@@ -21,6 +21,7 @@
 , qca-qt5
 , qtgraphicaleffects
 , qtmultimedia
+, qtquickcontrols2
 , qtx11extras
 , breeze-icons
 , sshfs
@@ -47,6 +48,7 @@ mkDerivation {
     qca-qt5
     qtgraphicaleffects
     qtmultimedia
+    qtquickcontrols2
     qtx11extras
     # otherwise buttons are blank on non-kde
     breeze-icons
diff --git a/pkgs/applications/kde/kdenlive/default.nix b/pkgs/applications/kde/kdenlive/default.nix
index 47afcd0a67e..3beaa4427d7 100644
--- a/pkgs/applications/kde/kdenlive/default.nix
+++ b/pkgs/applications/kde/kdenlive/default.nix
@@ -26,6 +26,7 @@
 , phonon-backend-gstreamer
 , qtdeclarative
 , qtmultimedia
+, qtnetworkauth
 , qtquickcontrols2
 , qtscript
 , rttr
@@ -61,6 +62,7 @@ mkDerivation {
     phonon-backend-gstreamer
     qtdeclarative
     qtmultimedia
+    qtnetworkauth
     qtquickcontrols2
     qtscript
     shared-mime-info
diff --git a/pkgs/applications/kde/kdepim-runtime/default.nix b/pkgs/applications/kde/kdepim-runtime/default.nix
index 335284aa6c4..16ec7ccd213 100644
--- a/pkgs/applications/kde/kdepim-runtime/default.nix
+++ b/pkgs/applications/kde/kdepim-runtime/default.nix
@@ -3,9 +3,10 @@
   extra-cmake-modules, kdoctools,
   shared-mime-info,
   akonadi, akonadi-calendar, akonadi-contacts, akonadi-mime, akonadi-notes,
-  kalarmcal, kcalutils, kcontacts, kdav, kdelibs4support, kidentitymanagement,
+  kalarmcal, kcalutils, kcontacts, kdav, kidentitymanagement,
   kimap, kldap, kmailtransport, kmbox, kmime, knotifications, knotifyconfig,
-  pimcommon, qtwebengine, libkgapi, qca-qt5, qtnetworkauth, qtspeech, qtxmlpatterns,
+  pimcommon, libkgapi, libsecret,
+  qca-qt5, qtkeychain, qtnetworkauth, qtspeech, qtwebengine, qtxmlpatterns,
 }:
 
 mkDerivation {
@@ -17,8 +18,9 @@ mkDerivation {
   nativeBuildInputs = [ extra-cmake-modules kdoctools shared-mime-info ];
   buildInputs = [
     akonadi akonadi-calendar akonadi-contacts akonadi-mime akonadi-notes
-    kalarmcal kcalutils kcontacts kdav kdelibs4support kidentitymanagement kimap
+    kalarmcal kcalutils kcontacts kdav kidentitymanagement kimap
     kldap kmailtransport kmbox kmime knotifications knotifyconfig qtwebengine
-    pimcommon libkgapi qca-qt5 qtnetworkauth qtspeech qtxmlpatterns
+    pimcommon libkgapi libsecret
+    qca-qt5 qtkeychain qtnetworkauth qtspeech qtxmlpatterns
   ];
 }
diff --git a/pkgs/applications/kde/khelpcenter.nix b/pkgs/applications/kde/khelpcenter.nix
index 77f30d8e69b..0270118fc55 100644
--- a/pkgs/applications/kde/khelpcenter.nix
+++ b/pkgs/applications/kde/khelpcenter.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation,
   extra-cmake-modules, kdoctools,
-  grantlee, kcmutils, kconfig, kcoreaddons, kdbusaddons, kdelibs4support, ki18n,
+  grantlee, kcmutils, kconfig, kcoreaddons, kdbusaddons, ki18n,
   kinit, khtml, kservice, xapian
 }:
 
@@ -9,7 +9,7 @@ mkDerivation {
   pname = "khelpcenter";
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    grantlee kcmutils kconfig kcoreaddons kdbusaddons kdelibs4support khtml
+    grantlee kcmutils kconfig kcoreaddons kdbusaddons khtml
     ki18n kinit kservice xapian
   ];
 }
diff --git a/pkgs/applications/kde/kio-extras.nix b/pkgs/applications/kde/kio-extras.nix
index fdc531d5d12..4a41493a525 100644
--- a/pkgs/applications/kde/kio-extras.nix
+++ b/pkgs/applications/kde/kio-extras.nix
@@ -2,7 +2,7 @@
   mkDerivation, lib, extra-cmake-modules, kdoctools, shared-mime-info,
   exiv2, kactivities, karchive, kbookmarks, kconfig, kconfigwidgets,
   kcoreaddons, kdbusaddons, kdsoap, kguiaddons, kdnssd, kiconthemes, ki18n, kio,
-  khtml, kdelibs4support, kpty, syntax-highlighting, libmtp, libssh, openexr,
+  khtml, kpty, syntax-highlighting, libmtp, libssh, openexr,
   ilmbase, openslp, phonon, qtsvg, samba, solid, gperf
 }:
 
@@ -16,7 +16,7 @@ mkDerivation {
   buildInputs = [
     exiv2 kactivities karchive kbookmarks kconfig kconfigwidgets kcoreaddons
     kdbusaddons kdsoap kguiaddons kdnssd kiconthemes ki18n kio khtml
-    kdelibs4support kpty syntax-highlighting libmtp libssh openexr openslp
+    kpty syntax-highlighting libmtp libssh openexr openslp
     phonon qtsvg samba solid gperf
   ];
   CXXFLAGS = [ "-I${ilmbase.dev}/include/OpenEXR" ];
diff --git a/pkgs/applications/kde/kldap.nix b/pkgs/applications/kde/kldap.nix
index 888ac59ddfb..69849f75751 100644
--- a/pkgs/applications/kde/kldap.nix
+++ b/pkgs/applications/kde/kldap.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, lib, kdepimTeam,
   extra-cmake-modules, kdoctools,
-  cyrus_sasl, ki18n, kio, kmbox, openldap
+  cyrus_sasl, ki18n, kio, kmbox, libsecret, openldap, qtkeychain
 }:
 
 mkDerivation {
@@ -11,7 +11,7 @@ mkDerivation {
     maintainers = kdepimTeam;
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
-  buildInputs = [ ki18n kio kmbox ];
+  buildInputs = [ ki18n kio kmbox libsecret qtkeychain ];
   propagatedBuildInputs = [ cyrus_sasl openldap ];
   outputs = [ "out" "dev" ];
 }
diff --git a/pkgs/applications/kde/kmail.nix b/pkgs/applications/kde/kmail.nix
index e742f566678..d5d61694e63 100644
--- a/pkgs/applications/kde/kmail.nix
+++ b/pkgs/applications/kde/kmail.nix
@@ -2,12 +2,13 @@
   mkDerivation, lib, kdepimTeam,
   extra-cmake-modules, kdoctools,
   akonadi-search, kbookmarks, kcalutils, kcmutils, kcompletion, kconfig,
-  kconfigwidgets, kcoreaddons, kdelibs4support, libkdepim,
+  kconfigwidgets, kcoreaddons, libkdepim,
   kdepim-runtime, kguiaddons, ki18n, kiconthemes, kinit, kio, kldap,
   kmail-account-wizard, kmailtransport, knotifications, knotifyconfig,
   kontactinterface, kparts, kpty, kservice, ktextwidgets, ktnef, kwallet,
   kwidgetsaddons, kwindowsystem, kxmlgui, libgravatar, libksieve, mailcommon,
-  messagelib, pim-sieve-editor, qtscript, qtwebengine, akonadi, kdepim-addons
+  messagelib, pim-sieve-editor, qtscript, qtwebengine, akonadi, kdepim-addons,
+  qtkeychain, libsecret
 }:
 
 mkDerivation {
@@ -19,12 +20,12 @@ mkDerivation {
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
     akonadi-search kbookmarks kcalutils kcmutils kcompletion kconfig
-    kconfigwidgets kcoreaddons kdelibs4support kguiaddons ki18n
+    kconfigwidgets kcoreaddons kguiaddons ki18n
     kiconthemes kinit kio kldap kmail-account-wizard kmailtransport libkdepim
     knotifications knotifyconfig kontactinterface kparts kpty kservice
     ktextwidgets ktnef kwidgetsaddons kwindowsystem kxmlgui libgravatar
     libksieve mailcommon messagelib pim-sieve-editor qtscript qtwebengine
-    kdepim-addons
+    kdepim-addons qtkeychain libsecret
   ];
   propagatedUserEnvPkgs = [ kdepim-runtime kwallet akonadi ];
 }
diff --git a/pkgs/applications/kde/kmailtransport.nix b/pkgs/applications/kde/kmailtransport.nix
index 5efdc959afb..976bd634e66 100644
--- a/pkgs/applications/kde/kmailtransport.nix
+++ b/pkgs/applications/kde/kmailtransport.nix
@@ -3,7 +3,7 @@
   extra-cmake-modules, kdoctools,
   akonadi, akonadi-mime, cyrus_sasl, kcmutils,
   ki18n, kio, kmime, kwallet, ksmtp, libkgapi,
-  kcalendarcore, kcontacts
+  kcalendarcore, kcontacts, qtkeychain, libsecret
 }:
 
 mkDerivation {
@@ -13,7 +13,10 @@ mkDerivation {
     maintainers = kdepimTeam;
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
-  buildInputs = [ akonadi kcmutils ki18n kio ksmtp libkgapi kcalendarcore kcontacts ];
+  buildInputs = [
+    akonadi kcmutils ki18n kio ksmtp libkgapi kcalendarcore kcontacts
+    qtkeychain libsecret
+  ];
   propagatedBuildInputs = [ akonadi-mime cyrus_sasl kmime kwallet ];
   outputs = [ "out" "dev" ];
 }
diff --git a/pkgs/applications/kde/kmix.nix b/pkgs/applications/kde/kmix.nix
index 207fba8e77b..a3ae46cf138 100644
--- a/pkgs/applications/kde/kmix.nix
+++ b/pkgs/applications/kde/kmix.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
-  kglobalaccel, kxmlgui, kcoreaddons, kdelibs4support,
+  kglobalaccel, kxmlgui, kcoreaddons,
   plasma-framework, libpulseaudio, alsaLib, libcanberra_kde
 }:
 
@@ -13,7 +13,7 @@ mkDerivation {
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    alsaLib kglobalaccel kxmlgui kcoreaddons kdelibs4support
+    alsaLib kglobalaccel kxmlgui kcoreaddons
     libcanberra_kde libpulseaudio plasma-framework
   ];
   cmakeFlags = [ "-DKMIX_KF5_BUILD=1" ];
diff --git a/pkgs/applications/kde/knotes.nix b/pkgs/applications/kde/knotes.nix
index 75b92eb07bb..1907a8fe910 100644
--- a/pkgs/applications/kde/knotes.nix
+++ b/pkgs/applications/kde/knotes.nix
@@ -5,7 +5,6 @@
   kdbusaddons, kdnssd, kglobalaccel, kiconthemes, kitemmodels,
   kitemviews, kcmutils, knewstuff, knotifications, knotifyconfig,
   kparts, ktextwidgets, kwidgetsaddons, kwindowsystem,
-  kdelibs4support,
   grantlee, grantleetheme, qtx11extras,
   akonadi, akonadi-notes, akonadi-search, kcalutils,
   kontactinterface, libkdepim, kmime, pimcommon, kpimtextedit,
@@ -19,7 +18,7 @@ mkDerivation {
     kcompletion kconfig kconfigwidgets kcoreaddons kcrash
     kdbusaddons kdnssd kglobalaccel kiconthemes kitemmodels kitemviews
     kcmutils knewstuff knotifications knotifyconfig kparts ktextwidgets
-    kwidgetsaddons kwindowsystem kdelibs4support
+    kwidgetsaddons kwindowsystem
     grantlee grantleetheme qtx11extras
     akonadi akonadi-notes kcalutils kontactinterface
     libkdepim kmime pimcommon kpimtextedit
diff --git a/pkgs/applications/kde/kolourpaint.nix b/pkgs/applications/kde/kolourpaint.nix
index 66746cf466d..cd703c49eee 100644
--- a/pkgs/applications/kde/kolourpaint.nix
+++ b/pkgs/applications/kde/kolourpaint.nix
@@ -2,14 +2,20 @@
 , mkDerivation
 , extra-cmake-modules
 , kdoctools
-, kdelibs4support
+, kguiaddons
+, kio
+, ktextwidgets
+, kwidgetsaddons
+, kxmlgui
 , libkexiv2
 }:
 
 mkDerivation {
   pname = "kolourpaint";
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
-  buildInputs = [ kdelibs4support libkexiv2 ];
+  buildInputs = [
+    kguiaddons kio ktextwidgets kwidgetsaddons kxmlgui libkexiv2
+  ];
   meta = {
     maintainers = [ lib.maintainers.fridh ];
     license = with lib.licenses; [ gpl2 ];
diff --git a/pkgs/applications/kde/konqueror.nix b/pkgs/applications/kde/konqueror.nix
index eb188ccef11..781368a108f 100644
--- a/pkgs/applications/kde/konqueror.nix
+++ b/pkgs/applications/kde/konqueror.nix
@@ -1,16 +1,16 @@
 { lib
 , mkDerivation
 , extra-cmake-modules, kdoctools
-, kdelibs4support, kcmutils, khtml, kdesu
-, qtbase, qtwebkit, qtwebengine, qtx11extras, qtscript, qtwayland
+, kinit, kcmutils, khtml, kdesu
+, qtbase, qtwebengine, qtx11extras, qtscript, qtwayland
 }:
 
 mkDerivation {
   pname = "konqueror";
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    kdelibs4support kcmutils khtml kdesu
-    qtwebkit qtwebengine qtx11extras qtscript qtwayland
+    kcmutils khtml kinit kdesu
+    qtwebengine qtx11extras qtscript qtwayland
   ];
 
   # InitialPreference values are too high and any text/html ends up
diff --git a/pkgs/applications/kde/konquest.nix b/pkgs/applications/kde/konquest.nix
index 7802b9c66c3..5957df47956 100644
--- a/pkgs/applications/kde/konquest.nix
+++ b/pkgs/applications/kde/konquest.nix
@@ -2,7 +2,13 @@
 , mkDerivation
 , extra-cmake-modules
 , kdoctools
-, kdelibs4support
+, kconfig
+, kcoreaddons
+, kcrash
+, kdbusaddons
+, kguiaddons
+, kxmlgui
+, kwidgetsaddons
 , libkdegames
 , qtquickcontrols
 }:
@@ -10,7 +16,11 @@
 mkDerivation {
   pname = "konquest";
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
-  buildInputs = [ kdelibs4support libkdegames qtquickcontrols ];
+  buildInputs = [
+    kconfig kcoreaddons kcrash kdbusaddons kguiaddons kxmlgui kwidgetsaddons
+    libkdegames
+    qtquickcontrols
+  ];
   meta = {
     license = with lib.licenses; [ gpl2 ];
     maintainers = with lib.maintainers; [ lheckemann ];
diff --git a/pkgs/applications/kde/konsole.nix b/pkgs/applications/kde/konsole.nix
index b49507e0b8e..18750d1f160 100644
--- a/pkgs/applications/kde/konsole.nix
+++ b/pkgs/applications/kde/konsole.nix
@@ -2,7 +2,7 @@
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
   kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kguiaddons,
-  ki18n, kiconthemes, kinit, kdelibs4support, kio, knotifications,
+  ki18n, kiconthemes, kinit, kio, knotifications,
   knotifyconfig, kparts, kpty, kservice, ktextwidgets, kwidgetsaddons,
   kwindowsystem, kxmlgui, qtscript, knewstuff
 }:
@@ -15,7 +15,7 @@ mkDerivation {
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    kbookmarks kcompletion kconfig kconfigwidgets kcoreaddons kdelibs4support
+    kbookmarks kcompletion kconfig kconfigwidgets kcoreaddons
     kguiaddons ki18n kiconthemes kinit kio knotifications knotifyconfig kparts kpty
     kservice ktextwidgets kwidgetsaddons kwindowsystem kxmlgui qtscript knewstuff
   ];
diff --git a/pkgs/applications/kde/kontactinterface.nix b/pkgs/applications/kde/kontactinterface.nix
index b7e033deb0a..858addcd3ff 100644
--- a/pkgs/applications/kde/kontactinterface.nix
+++ b/pkgs/applications/kde/kontactinterface.nix
@@ -12,6 +12,7 @@ mkDerivation {
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    kiconthemes kparts kwindowsystem kxmlgui
+    kiconthemes kwindowsystem kxmlgui
   ];
+  propagatedBuildInputs = [ kparts ];
 }
diff --git a/pkgs/applications/kde/korganizer.nix b/pkgs/applications/kde/korganizer.nix
index a6a28427772..0f6689bb758 100644
--- a/pkgs/applications/kde/korganizer.nix
+++ b/pkgs/applications/kde/korganizer.nix
@@ -7,7 +7,7 @@
   akonadi-calendar, akonadi-contacts, akonadi-notes, akonadi-search,
   calendarsupport, eventviews, incidenceeditor, kcalutils,
   kholidays, kidentitymanagement, kldap, kmailtransport, kontactinterface,
-  kpimtextedit, pimcommon,
+  kparts, kpimtextedit, pimcommon,
 }:
 
 mkDerivation {
@@ -24,6 +24,6 @@ mkDerivation {
     akonadi-calendar akonadi-contacts akonadi-notes akonadi-search
     calendarsupport eventviews incidenceeditor kcalutils
     kholidays kidentitymanagement kldap kmailtransport kontactinterface
-    kpimtextedit pimcommon
+    kparts kpimtextedit pimcommon
   ];
 }
diff --git a/pkgs/applications/kde/krfb.nix b/pkgs/applications/kde/krfb.nix
index aa280d019b1..905c72b3675 100644
--- a/pkgs/applications/kde/krfb.nix
+++ b/pkgs/applications/kde/krfb.nix
@@ -1,7 +1,10 @@
 {
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
-  kdelibs4support, kdnssd, libvncserver, libXtst, libXdamage, qtx11extras
+  kconfig, kcoreaddons, kcrash, kdbusaddons, kdnssd, knotifications, kwallet,
+  kwidgetsaddons, kwindowsystem, kxmlgui,
+  libvncserver, libXtst, libXdamage,
+  qtx11extras
 }:
 
 mkDerivation {
@@ -11,6 +14,11 @@ mkDerivation {
     maintainers = with lib.maintainers; [ jerith666 ];
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
-  buildInputs = [ libvncserver libXtst libXdamage qtx11extras ];
-  propagatedBuildInputs = [ kdelibs4support kdnssd ];
+  buildInputs = [
+    libvncserver libXtst libXdamage
+    kconfig kcoreaddons kcrash kdbusaddons knotifications kwallet kwidgetsaddons
+    kwindowsystem kxmlgui
+    qtx11extras
+  ];
+  propagatedBuildInputs = [ kdnssd ];
 }
diff --git a/pkgs/applications/kde/ktnef.nix b/pkgs/applications/kde/ktnef.nix
index c264e0b53ca..4a29acd1e7c 100644
--- a/pkgs/applications/kde/ktnef.nix
+++ b/pkgs/applications/kde/ktnef.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, lib, kdepimTeam,
   extra-cmake-modules, kdoctools,
-  kcalendarcore, kcalutils, kcontacts, kdelibs4support
+  kcalendarcore, kcalutils, kcontacts
 }:
 
 mkDerivation {
@@ -12,7 +12,7 @@ mkDerivation {
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   propagatedBuildInputs = [
-    kcalendarcore kcalutils kcontacts kdelibs4support
+    kcalendarcore kcalutils kcontacts
   ];
   outputs = [ "out" "dev" ];
 }
diff --git a/pkgs/applications/kde/kwalletmanager.nix b/pkgs/applications/kde/kwalletmanager.nix
index b5799a24e36..7f227f6d9e6 100644
--- a/pkgs/applications/kde/kwalletmanager.nix
+++ b/pkgs/applications/kde/kwalletmanager.nix
@@ -7,7 +7,6 @@
 , kconfigwidgets
 , kcoreaddons
 , kdbusaddons
-, kdelibs4support
 , kwallet
 , kxmlgui
 }:
@@ -20,7 +19,7 @@ mkDerivation {
   };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    kauth kcmutils kconfigwidgets kcoreaddons kdbusaddons kdelibs4support
+    kauth kcmutils kconfigwidgets kcoreaddons kdbusaddons
     kwallet kxmlgui
   ];
 }
diff --git a/pkgs/applications/kde/libkdegames.nix b/pkgs/applications/kde/libkdegames.nix
index 830837756b8..8e96bc1ad56 100644
--- a/pkgs/applications/kde/libkdegames.nix
+++ b/pkgs/applications/kde/libkdegames.nix
@@ -2,7 +2,6 @@
 , mkDerivation
 , extra-cmake-modules
 , kdoctools
-, kdelibs4support
 , qtdeclarative
 , kdeclarative
 , kdnssd
@@ -16,7 +15,7 @@ mkDerivation {
   pname = "libkdegames";
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    kdelibs4support qtdeclarative kdeclarative kdnssd knewstuff openal libsndfile
+    qtdeclarative kdeclarative kdnssd knewstuff openal libsndfile
     qtquickcontrols
   ];
   meta = {
diff --git a/pkgs/applications/kde/pim-sieve-editor.nix b/pkgs/applications/kde/pim-sieve-editor.nix
index 1f3f1542cdb..9998418ff8a 100644
--- a/pkgs/applications/kde/pim-sieve-editor.nix
+++ b/pkgs/applications/kde/pim-sieve-editor.nix
@@ -2,7 +2,7 @@
   mkDerivation, lib, kdepimTeam,
   extra-cmake-modules, kdoctools,
   kdbusaddons, kcrash, kbookmarks, kiconthemes, kio, kpimtextedit,
-  kmailtransport, pimcommon, libksieve
+  kmailtransport, libksieve, pimcommon, qtkeychain, libsecret
 }:
 
 mkDerivation {
@@ -14,6 +14,6 @@ mkDerivation {
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
     kdbusaddons kcrash kbookmarks kiconthemes kio kpimtextedit kmailtransport
-    pimcommon libksieve
+    libksieve pimcommon qtkeychain libsecret
   ];
 }
diff --git a/pkgs/applications/kde/srcs.nix b/pkgs/applications/kde/srcs.nix
index fc179789df2..f6dd35c83a3 100644
--- a/pkgs/applications/kde/srcs.nix
+++ b/pkgs/applications/kde/srcs.nix
@@ -4,1795 +4,1803 @@
 
 {
   akonadi = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/akonadi-20.12.3.tar.xz";
-      sha256 = "0bcjyh1w8aaq7bp0df8zla7zvddig5ziz9avj82c6d453hfsq6dr";
-      name = "akonadi-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/akonadi-21.04.0.tar.xz";
+      sha256 = "1ka1cxwqvcdyy9i1p7v7vrcrs9d1kx892wzq1dw3jrq9x57l5drz";
+      name = "akonadi-21.04.0.tar.xz";
     };
   };
   akonadi-calendar = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/akonadi-calendar-20.12.3.tar.xz";
-      sha256 = "057iz29y8dvxa26kf995akgy427c20d27i59gdfnl183wikmw9wk";
-      name = "akonadi-calendar-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/akonadi-calendar-21.04.0.tar.xz";
+      sha256 = "1yf92jx7x19cp95c8nbkgmz5q1cg7096gdwy525df56h3pgbm651";
+      name = "akonadi-calendar-21.04.0.tar.xz";
     };
   };
   akonadi-calendar-tools = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/akonadi-calendar-tools-20.12.3.tar.xz";
-      sha256 = "1fdcf6s1ij2l44zg7rha9hhha1k3m4xh0mgkyc836jkqy02jx3j6";
-      name = "akonadi-calendar-tools-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/akonadi-calendar-tools-21.04.0.tar.xz";
+      sha256 = "1g0k1c11lysk3mi6k83lw70d64x543pcdgc9af1hyckb6clzh2gm";
+      name = "akonadi-calendar-tools-21.04.0.tar.xz";
     };
   };
   akonadiconsole = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/akonadiconsole-20.12.3.tar.xz";
-      sha256 = "0skam7yl9m28m51yj0inzcxa5rbz5r4hz104b0ncg9hjjqi7qyfl";
-      name = "akonadiconsole-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/akonadiconsole-21.04.0.tar.xz";
+      sha256 = "0l6famxpw64w7gmknx4szsg16hjydp3cr2mp0z0dfzi4m1i64gi7";
+      name = "akonadiconsole-21.04.0.tar.xz";
     };
   };
   akonadi-contacts = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/akonadi-contacts-20.12.3.tar.xz";
-      sha256 = "1ql7rx3fj12iddsvjip17w3gqm4slcmy3id3b892xwlx4izz2dr4";
-      name = "akonadi-contacts-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/akonadi-contacts-21.04.0.tar.xz";
+      sha256 = "1130dvx8dpfvqsydhx1qy83bqx4drgb762ycf10cqkjvm6sjg3jh";
+      name = "akonadi-contacts-21.04.0.tar.xz";
     };
   };
   akonadi-import-wizard = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/akonadi-import-wizard-20.12.3.tar.xz";
-      sha256 = "080dyygqwc4m38vqkd4yvpy1xa4302a20gcbl5vi06as750qswgn";
-      name = "akonadi-import-wizard-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/akonadi-import-wizard-21.04.0.tar.xz";
+      sha256 = "1idxpymfags4zrqlagndrkp9yvr24vvd4rzm7gm2zxwilw90smdh";
+      name = "akonadi-import-wizard-21.04.0.tar.xz";
     };
   };
   akonadi-mime = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/akonadi-mime-20.12.3.tar.xz";
-      sha256 = "1dnxswwvgm3vj5l12xnv5c7jpmrx3180xpdpgj4xp4nmzvfrfpgl";
-      name = "akonadi-mime-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/akonadi-mime-21.04.0.tar.xz";
+      sha256 = "037v29sq0q46i675n177ny3n5rvndvdpvydbika89gkiyag6hh1v";
+      name = "akonadi-mime-21.04.0.tar.xz";
     };
   };
   akonadi-notes = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/akonadi-notes-20.12.3.tar.xz";
-      sha256 = "1fp5mif6w14snrndw2w4y66hsi14x7qyr9p343hdma4lmd65lic7";
-      name = "akonadi-notes-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/akonadi-notes-21.04.0.tar.xz";
+      sha256 = "0l0m3qpqj4g6j58kfc2xc48cwhhf0538h5bw5m8z123pcggp3w20";
+      name = "akonadi-notes-21.04.0.tar.xz";
     };
   };
   akonadi-search = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/akonadi-search-20.12.3.tar.xz";
-      sha256 = "0bac20n5mbfvl5p5qyiy1dygv1lz0spvm37ah3bp4iz9k4maqp7q";
-      name = "akonadi-search-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/akonadi-search-21.04.0.tar.xz";
+      sha256 = "189z9vqn05ph7c6sfr413hywrrqs1yn5sj84563bjf3rdzn4zp67";
+      name = "akonadi-search-21.04.0.tar.xz";
     };
   };
   akregator = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/akregator-20.12.3.tar.xz";
-      sha256 = "10friff769kq83b9nxx2wj16bgzjh9gblc9r20gvm1qw5vm4l58b";
-      name = "akregator-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/akregator-21.04.0.tar.xz";
+      sha256 = "1px3sxsbhh98822i3yxs9sq019f78njfai07rsyf9wbawa6xj2sm";
+      name = "akregator-21.04.0.tar.xz";
     };
   };
   analitza = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/analitza-20.12.3.tar.xz";
-      sha256 = "187mnzdclqmn6d7yxxvy7xhcaasmgjz6mgk43dxn7rpn20lbx800";
-      name = "analitza-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/analitza-21.04.0.tar.xz";
+      sha256 = "1g4sfcdp13xsbfc1c64pgj7ax75z9cpqgy3sri4cm4qk9d2kkj0i";
+      name = "analitza-21.04.0.tar.xz";
     };
   };
   ark = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ark-20.12.3.tar.xz";
-      sha256 = "0fsv808a554cpka4pvhk829kldm2asnk8dyvr1wiidgpjpjxzwp4";
-      name = "ark-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ark-21.04.0.tar.xz";
+      sha256 = "034ywf6favaj7cbfmcgz00yrmvpb8vxsw4yq8a7y6f40b590aphf";
+      name = "ark-21.04.0.tar.xz";
     };
   };
   artikulate = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/artikulate-20.12.3.tar.xz";
-      sha256 = "1gnnfa0mwafh5msfy41n8fib1mfp713hdyfcqsmfpb04p5251grm";
-      name = "artikulate-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/artikulate-21.04.0.tar.xz";
+      sha256 = "0pbsbhl1phfzrgb393qf60n8k20f1qkda7a0mk6rxp1zj00pg7zw";
+      name = "artikulate-21.04.0.tar.xz";
     };
   };
   audiocd-kio = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/audiocd-kio-20.12.3.tar.xz";
-      sha256 = "06jg3q73hnr7wswqhffj5mncnpvrlmhh4c4k5302jp0c61i5pbv0";
-      name = "audiocd-kio-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/audiocd-kio-21.04.0.tar.xz";
+      sha256 = "1bbdw5gxjzpvvbq28zhazdr2ir1i3diy7rvz77cmw7jlj98x40m0";
+      name = "audiocd-kio-21.04.0.tar.xz";
     };
   };
   baloo-widgets = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/baloo-widgets-20.12.3.tar.xz";
-      sha256 = "0cznzgzn8x9kgn9pjq3fybici88y4al18n0c5vv1h31vz59fqfqi";
-      name = "baloo-widgets-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/baloo-widgets-21.04.0.tar.xz";
+      sha256 = "08y590n7rrha28pyjmf3liishmfjyx422ryd5viwb21g3isdb5ir";
+      name = "baloo-widgets-21.04.0.tar.xz";
     };
   };
   blinken = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/blinken-20.12.3.tar.xz";
-      sha256 = "0vfvlrdan60dx1prd1m4vhakvz5ddi70gzagfjb5c0py9802qqgl";
-      name = "blinken-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/blinken-21.04.0.tar.xz";
+      sha256 = "00fb1a98f6qs2pjcb2hc4rh2zgnqzhg21dal0rc4ddglm0mvgq27";
+      name = "blinken-21.04.0.tar.xz";
     };
   };
   bomber = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/bomber-20.12.3.tar.xz";
-      sha256 = "03d08j8wh989fsxb632fpbjg3zwqyv70jd8msjy4ajxl4039q9sp";
-      name = "bomber-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/bomber-21.04.0.tar.xz";
+      sha256 = "0fkikbyayd5ickhjwgd57kb89698w9ni89218bc47gkqvgm7zdzy";
+      name = "bomber-21.04.0.tar.xz";
     };
   };
   bovo = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/bovo-20.12.3.tar.xz";
-      sha256 = "114rq2a7jr9f9957zfn2fgiylf4ymgx5534i8qw7h78gxnb5915v";
-      name = "bovo-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/bovo-21.04.0.tar.xz";
+      sha256 = "1k6k9hkzrnz2802k4pq0aabdbkwwdvqi8c669cjhxwqxrpxhlan3";
+      name = "bovo-21.04.0.tar.xz";
     };
   };
   calendarsupport = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/calendarsupport-20.12.3.tar.xz";
-      sha256 = "044d9aarq5agh42h88l5bjc6nfsrb5797zlq0wfyx6laxnw8yhdb";
-      name = "calendarsupport-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/calendarsupport-21.04.0.tar.xz";
+      sha256 = "0m3x1pimy5sldgzkggwxyv3r0vn802bysf73nf6azgqachj1rm4g";
+      name = "calendarsupport-21.04.0.tar.xz";
     };
   };
   cantor = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/cantor-20.12.3.tar.xz";
-      sha256 = "0f6ad4mzn54bjc1q9yxana6j5hfdgr2d7gra27x5jfcn079qjijb";
-      name = "cantor-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/cantor-21.04.0.tar.xz";
+      sha256 = "0saz2xapfqmqlh9cmz8vkhsz5ai9fjgzp5y4rg4nc77b6wfwijpp";
+      name = "cantor-21.04.0.tar.xz";
     };
   };
   cervisia = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/cervisia-20.12.3.tar.xz";
-      sha256 = "0802rws42a1ipw2m5r9k7plr7yhyicws8ryx75vivn41v4qanq15";
-      name = "cervisia-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/cervisia-21.04.0.tar.xz";
+      sha256 = "1r76mdrq4v8f850kgx6wamhhpnvj5giclnfp8ck0f86lqx228xhz";
+      name = "cervisia-21.04.0.tar.xz";
     };
   };
   dolphin = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/dolphin-20.12.3.tar.xz";
-      sha256 = "1wx1z2bfcd8irhfbh2j4bhdl72afjwfbrh1ps8xzah14vqjvi54p";
-      name = "dolphin-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/dolphin-21.04.0.tar.xz";
+      sha256 = "1gmxrxs4h9bk1lxs2gn0gv44067wk19p8mq85n6dbpry9sfyb229";
+      name = "dolphin-21.04.0.tar.xz";
     };
   };
   dolphin-plugins = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/dolphin-plugins-20.12.3.tar.xz";
-      sha256 = "102ykanh4a0pdm0j6wns5jaq76f71y96dgymm2mbgwrfrydcmcpw";
-      name = "dolphin-plugins-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/dolphin-plugins-21.04.0.tar.xz";
+      sha256 = "1ll8yhglncbzdmq6kpzavgd2q9llfbcqjyz8x97nlwibqszrbcwz";
+      name = "dolphin-plugins-21.04.0.tar.xz";
     };
   };
   dragon = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/dragon-20.12.3.tar.xz";
-      sha256 = "0aipkxyks1b7jdbxcb6i7l2kb6gahla07h4mls8fsmal4ha808ga";
-      name = "dragon-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/dragon-21.04.0.tar.xz";
+      sha256 = "00lnrskgvxclf75h89ycgafajkw1ddqg74lv38dv9yc21lh683k9";
+      name = "dragon-21.04.0.tar.xz";
     };
   };
   elisa = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/elisa-20.12.3.tar.xz";
-      sha256 = "0rcqwx68hb8cipbd9nd3sl922i63qaaphf6fnryhg7rinh2x75vs";
-      name = "elisa-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/elisa-21.04.0.tar.xz";
+      sha256 = "152i6748pkgnbpd192wd161w001l13gyinar1gphg46gb0z898sg";
+      name = "elisa-21.04.0.tar.xz";
     };
   };
   eventviews = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/eventviews-20.12.3.tar.xz";
-      sha256 = "0pkfhvrf423irvijqjk7a2px23zi053c57lqkp3cjag9z994wqkv";
-      name = "eventviews-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/eventviews-21.04.0.tar.xz";
+      sha256 = "1zq97jfgl0k7k1nhv6zcnbicl1af86rz6hzski9hm387bh60rn5v";
+      name = "eventviews-21.04.0.tar.xz";
     };
   };
   ffmpegthumbs = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ffmpegthumbs-20.12.3.tar.xz";
-      sha256 = "1cwn3rjqghbd2ivb268g68zibqyvvn1a07hcwa8bfjxw8y5cx890";
-      name = "ffmpegthumbs-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ffmpegthumbs-21.04.0.tar.xz";
+      sha256 = "06ycd5q5b4j6xxvrfvvpfdbmzrk8xysv7k8m64yypxnv9r7h1rsa";
+      name = "ffmpegthumbs-21.04.0.tar.xz";
     };
   };
   filelight = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/filelight-20.12.3.tar.xz";
-      sha256 = "0njapqiv2201bk57wl96ky8n78a31234vf2srcjs0nrdmbcp0si0";
-      name = "filelight-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/filelight-21.04.0.tar.xz";
+      sha256 = "1bfpqc67mkqz1w7wwv3p28q0n55vc78l94nyg805zs9adk00886v";
+      name = "filelight-21.04.0.tar.xz";
     };
   };
   granatier = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/granatier-20.12.3.tar.xz";
-      sha256 = "1x2l9f9xwrqf06r2qcrlf8941k6kfqb69442cy1ss9jfl9axy3vl";
-      name = "granatier-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/granatier-21.04.0.tar.xz";
+      sha256 = "0qcnr7n2401ykgwbz4lcsgp19fkb90lfbblbmrnbcslfc5pz8jz8";
+      name = "granatier-21.04.0.tar.xz";
     };
   };
   grantlee-editor = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/grantlee-editor-20.12.3.tar.xz";
-      sha256 = "1n6qi2pvhrhnzpq45757s75rslpzjgl60x7g5fv9cpfjk5knqzkc";
-      name = "grantlee-editor-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/grantlee-editor-21.04.0.tar.xz";
+      sha256 = "0rfcv63flw5izccqxz7mz43hvlim1cilnmrvk2vxc258vl1a226p";
+      name = "grantlee-editor-21.04.0.tar.xz";
     };
   };
   grantleetheme = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/grantleetheme-20.12.3.tar.xz";
-      sha256 = "0z9s5bmy89k3gzczim2prvb5mnylzin93d4h4nz6j7p5sk8aqgg3";
-      name = "grantleetheme-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/grantleetheme-21.04.0.tar.xz";
+      sha256 = "1jxdi7as6c81sy7zs59y6a0gmsjz6xwh6vbcr3r64wx62hj6vyls";
+      name = "grantleetheme-21.04.0.tar.xz";
     };
   };
   gwenview = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/gwenview-20.12.3.tar.xz";
-      sha256 = "18j13db432hhgz3kdrfcs555wy1fyjap8jha0aaw4w08bx8ll8v8";
-      name = "gwenview-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/gwenview-21.04.0.tar.xz";
+      sha256 = "06yyf7f49xbcfzbm10rr0xcmyxmlafh188wq8bjc8mp7p6fq7yd5";
+      name = "gwenview-21.04.0.tar.xz";
     };
   };
   incidenceeditor = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/incidenceeditor-20.12.3.tar.xz";
-      sha256 = "04yf0z6wsmb7zibfvv0pgyjzfacqa3drqqbc35d0hnvjzh39q1a4";
-      name = "incidenceeditor-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/incidenceeditor-21.04.0.tar.xz";
+      sha256 = "1fch2d5jgh3raf2zqc4vapgwf3gkdfsd71djvd626q3dsbh82qxz";
+      name = "incidenceeditor-21.04.0.tar.xz";
     };
   };
   itinerary = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/itinerary-20.12.3.tar.xz";
-      sha256 = "0jpk9f11r563inbm7yrx0lwpb937b1ilgshc9i50fhaqqgii39rp";
-      name = "itinerary-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/itinerary-21.04.0.tar.xz";
+      sha256 = "132y5v5qy89hfvp1j3x6rr6bg4wdzhd177isrs110w0aizdrbjcn";
+      name = "itinerary-21.04.0.tar.xz";
     };
   };
   juk = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/juk-20.12.3.tar.xz";
-      sha256 = "01sz8qnp71z34yyvgwhami5rybnlqy3r81ki21r45lvmlbd2i9l7";
-      name = "juk-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/juk-21.04.0.tar.xz";
+      sha256 = "11plw0h56n4fmhi47rmjw8qdki3r5yf3v7zfc0svwkb12lrvcp6z";
+      name = "juk-21.04.0.tar.xz";
     };
   };
   k3b = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/k3b-20.12.3.tar.xz";
-      sha256 = "132v5jcn7dmrbb69sllyv72d2d7vg9bpnpjzfmvirqa80x0x7s48";
-      name = "k3b-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/k3b-21.04.0.tar.xz";
+      sha256 = "1a6gm7bk486fr2haap6212vzx8hhrwkgjplyyq1nb27v61rpir2n";
+      name = "k3b-21.04.0.tar.xz";
     };
   };
   kaccounts-integration = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kaccounts-integration-20.12.3.tar.xz";
-      sha256 = "0md6jwi0295n2s8mkvc793a4sxfzf6fidwpnjal2dsxkzdr0nfcq";
-      name = "kaccounts-integration-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kaccounts-integration-21.04.0.tar.xz";
+      sha256 = "1znfyslk4w45923xfxflipf0zwxf91k949carnbhzfiplab30gpy";
+      name = "kaccounts-integration-21.04.0.tar.xz";
     };
   };
   kaccounts-providers = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kaccounts-providers-20.12.3.tar.xz";
-      sha256 = "05q6wzdbr1vm8g8qjssk0hnzrqkpq5qrrjwgqj8nkqgipzgclwdf";
-      name = "kaccounts-providers-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kaccounts-providers-21.04.0.tar.xz";
+      sha256 = "17rnqsagg60zd5nf7hag74kc9s7nj01ps3z411j8zwa1vlbqidg0";
+      name = "kaccounts-providers-21.04.0.tar.xz";
     };
   };
   kaddressbook = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kaddressbook-20.12.3.tar.xz";
-      sha256 = "15fpcxlnf42wc2z942rrgydb21v30ml3633cvsscrbjc3vys9vc3";
-      name = "kaddressbook-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kaddressbook-21.04.0.tar.xz";
+      sha256 = "1p9lcs4jd8n52hd0mpckwiv23zivzflkih2lpdbqcw55s75g03bl";
+      name = "kaddressbook-21.04.0.tar.xz";
     };
   };
   kajongg = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kajongg-20.12.3.tar.xz";
-      sha256 = "0h3kdvrp6y6ydhbmvwc8h1l0zh16jy519k5ragwkd9039cvyryxi";
-      name = "kajongg-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kajongg-21.04.0.tar.xz";
+      sha256 = "11hxc0scc700zmw5736z3vcign09g5rgnfmg98z3j34bms7iff5n";
+      name = "kajongg-21.04.0.tar.xz";
     };
   };
   kalarm = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kalarm-20.12.3.tar.xz";
-      sha256 = "0pkr9vm5hvdwyqb2mpi1qq5cxv0fd8czlq2hq8kb4ghskwd2nm6z";
-      name = "kalarm-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kalarm-21.04.0.tar.xz";
+      sha256 = "1zcyc6nlsdh9ixl10n6xlnfj78z6j218a9aipj1vws0jx7zahl12";
+      name = "kalarm-21.04.0.tar.xz";
     };
   };
   kalarmcal = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kalarmcal-20.12.3.tar.xz";
-      sha256 = "184qdpwwqnwlny0iil2vrw6x1al575mm6fx9iqbpg6hwz131nzhg";
-      name = "kalarmcal-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kalarmcal-21.04.0.tar.xz";
+      sha256 = "0cp5mian3zkyb51l6h2j7dkdhhmhk9vh33yvfa9x5q998sknr1m3";
+      name = "kalarmcal-21.04.0.tar.xz";
     };
   };
   kalgebra = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kalgebra-20.12.3.tar.xz";
-      sha256 = "0bx7v28qgpyjxka3kxjas6n1r5rq88vq064qscgjrn25536bg6p9";
-      name = "kalgebra-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kalgebra-21.04.0.tar.xz";
+      sha256 = "1w9vy3130kxw68fnpvzvq2k40dyain0ncsflf24fmn7dzjl4wpxn";
+      name = "kalgebra-21.04.0.tar.xz";
     };
   };
   kalzium = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kalzium-20.12.3.tar.xz";
-      sha256 = "1r7zvknc8kkx5kcs111ij6k6byj93xbg47bpi8wfh17i2fdrccw2";
-      name = "kalzium-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kalzium-21.04.0.tar.xz";
+      sha256 = "0fnqj1xnlgkb5wfx7j2zzbypyyql44srd555bdb1w0q37w1zxxgm";
+      name = "kalzium-21.04.0.tar.xz";
     };
   };
   kamera = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kamera-20.12.3.tar.xz";
-      sha256 = "0g6i4a975n9sxcjvpihz3wmldivk65i6p175vq2nik46jq6kxnj6";
-      name = "kamera-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kamera-21.04.0.tar.xz";
+      sha256 = "068ic1nf15x4h7h877q7by3hkd5dap9a2kdm7x2jwcqhwriiirw2";
+      name = "kamera-21.04.0.tar.xz";
     };
   };
   kamoso = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kamoso-20.12.3.tar.xz";
-      sha256 = "0zmhfcdihb5gd0gvnx3gmsn85dl4h1a42672592qrv7mv9yfl8x4";
-      name = "kamoso-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kamoso-21.04.0.tar.xz";
+      sha256 = "0npabci0x04g7v56x3pb5ps560d0xdshaznlci05bn3czxdas93h";
+      name = "kamoso-21.04.0.tar.xz";
     };
   };
   kanagram = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kanagram-20.12.3.tar.xz";
-      sha256 = "0yzz8apm76vhfgbx72jjfrc8z090xp9l6lr318wla809bvk92kn5";
-      name = "kanagram-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kanagram-21.04.0.tar.xz";
+      sha256 = "0ccnzrra54hqx7acsaiz8fk5gnax9y4j195hsbix7mghgb5ylz8r";
+      name = "kanagram-21.04.0.tar.xz";
     };
   };
   kapman = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kapman-20.12.3.tar.xz";
-      sha256 = "1734r0i37w8cbsmhmv6553l2prcg6l960j2j387x3lm6ynm8szl5";
-      name = "kapman-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kapman-21.04.0.tar.xz";
+      sha256 = "1i7jr8xlh3v4wz9bbc335q79zx96nfp15hhqnhkgxsqc216zn8qm";
+      name = "kapman-21.04.0.tar.xz";
     };
   };
   kapptemplate = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kapptemplate-20.12.3.tar.xz";
-      sha256 = "0587cwsjh9776zwb9dlqsn75bin5cv80yyixd9hqx86kqkxabw4c";
-      name = "kapptemplate-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kapptemplate-21.04.0.tar.xz";
+      sha256 = "0l2y562s7rk99zr5vbp03gbv0fwbd211j4n51g3yry7vbk433aiw";
+      name = "kapptemplate-21.04.0.tar.xz";
     };
   };
   kate = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kate-20.12.3.tar.xz";
-      sha256 = "1zfl53b3166ijr41bymlv0mvavjxv9sv5cf8xrpihn0rzs52vg41";
-      name = "kate-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kate-21.04.0.tar.xz";
+      sha256 = "1m11fh5c527d6b8a5wmglj9z0d2caak5bqh1g7fql1ygw06wr01p";
+      name = "kate-21.04.0.tar.xz";
     };
   };
   katomic = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/katomic-20.12.3.tar.xz";
-      sha256 = "1qmby2cp1sz31hraxybcb60a6smaf8ksy3m8nzkk7kpr11mzss0q";
-      name = "katomic-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/katomic-21.04.0.tar.xz";
+      sha256 = "0hrlmzqnw03nv334q680zwk700c8pvnaw57gh1ixphzsbx871yrk";
+      name = "katomic-21.04.0.tar.xz";
     };
   };
   kbackup = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kbackup-20.12.3.tar.xz";
-      sha256 = "04qj9645r427ki2jbj5ij243y6svw24ilwz5pz2qp0dp95wndfql";
-      name = "kbackup-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kbackup-21.04.0.tar.xz";
+      sha256 = "1l3bk7dj2grbki41fhxawrwn4vpncf3m2b5bq5ivj4vj4jc6vlyz";
+      name = "kbackup-21.04.0.tar.xz";
     };
   };
   kblackbox = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kblackbox-20.12.3.tar.xz";
-      sha256 = "0z4w3f22d8dmvmv4jmbgk91ga0qbw54xmawkikks5b0xgqkwkls7";
-      name = "kblackbox-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kblackbox-21.04.0.tar.xz";
+      sha256 = "17ba03qmyaiqda064dhxl0kwvncll7fznjvnfvby9lgdpzfjj8j9";
+      name = "kblackbox-21.04.0.tar.xz";
     };
   };
   kblocks = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kblocks-20.12.3.tar.xz";
-      sha256 = "0rsxyyaz6gs4a8qz5gsl865ky8a25hl282m293zsyd66wsc0f3hv";
-      name = "kblocks-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kblocks-21.04.0.tar.xz";
+      sha256 = "01i24fizs8d6yvyldln905vnww8ajy3aswn55xhxinjwhx9dcy7n";
+      name = "kblocks-21.04.0.tar.xz";
     };
   };
   kbounce = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kbounce-20.12.3.tar.xz";
-      sha256 = "0yyzr0zmsvfafrvy23vd4grdzpgc1w5ava0fb90x174mv0k2v55s";
-      name = "kbounce-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kbounce-21.04.0.tar.xz";
+      sha256 = "05wy4my4hil72cmj3p2hf9bshpknyps8xmp0mrbigyrzg505zjj2";
+      name = "kbounce-21.04.0.tar.xz";
     };
   };
   kbreakout = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kbreakout-20.12.3.tar.xz";
-      sha256 = "1djiixrwda25p2d8bvhkwn07v2gib35kwm94i1j5yxn0v68m86q1";
-      name = "kbreakout-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kbreakout-21.04.0.tar.xz";
+      sha256 = "0084id4wwk31m7wjkl5grcpbyqyzqx6cxixhdy48v7djdnn43jfj";
+      name = "kbreakout-21.04.0.tar.xz";
     };
   };
   kbruch = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kbruch-20.12.3.tar.xz";
-      sha256 = "1g2ihgxx6fj98cibfla9rig1mpgivs0l0ipkg5v8ax9wy7cmrx82";
-      name = "kbruch-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kbruch-21.04.0.tar.xz";
+      sha256 = "0qygd4zx039qckv4zzkgvz70wm8hg156bmb70g9g0nv5bzh4y02g";
+      name = "kbruch-21.04.0.tar.xz";
     };
   };
   kcachegrind = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kcachegrind-20.12.3.tar.xz";
-      sha256 = "1sk9bxz6lx3kadfv862d52pm69fcvg160y84y3qj59b9ms2qpqcm";
-      name = "kcachegrind-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kcachegrind-21.04.0.tar.xz";
+      sha256 = "1bdlzp35914nvbzcf4n6qrjmg7c0dc7c13kwq9gr5q6i4lvf275r";
+      name = "kcachegrind-21.04.0.tar.xz";
     };
   };
   kcalc = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kcalc-20.12.3.tar.xz";
-      sha256 = "1plq0xfaq2wwhsqddiq5wssn3k3i9dxrr5p80zanzngqcwbql1jl";
-      name = "kcalc-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kcalc-21.04.0.tar.xz";
+      sha256 = "0x0b19yaif6mjh20lbvl87phna781ya3l9hpwj2941vgvffwwpsh";
+      name = "kcalc-21.04.0.tar.xz";
     };
   };
   kcalutils = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kcalutils-20.12.3.tar.xz";
-      sha256 = "0as3900mcsdngrszd19928dfacm3qa7y1y2v65vf9mn0alz367qx";
-      name = "kcalutils-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kcalutils-21.04.0.tar.xz";
+      sha256 = "0kvl8ghwcamxayvwbsyjzib5b19v3k5hch17lj2pjsj20dgfl4qv";
+      name = "kcalutils-21.04.0.tar.xz";
     };
   };
   kcharselect = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kcharselect-20.12.3.tar.xz";
-      sha256 = "1qz96clyh7wl7sb3hkpkij96a0s9zx9saxhvbwrkqjqdhnqai8c3";
-      name = "kcharselect-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kcharselect-21.04.0.tar.xz";
+      sha256 = "1gp75qkwphgxpjkc1fwqkrbkkmc45l55ck8mqvbpz4aq8bscc0nx";
+      name = "kcharselect-21.04.0.tar.xz";
     };
   };
   kcolorchooser = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kcolorchooser-20.12.3.tar.xz";
-      sha256 = "0aamaml734mcbja9j4m9grp0zsxvy8ivzia49l2pmq27ci23ygad";
-      name = "kcolorchooser-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kcolorchooser-21.04.0.tar.xz";
+      sha256 = "0cgzclfmcn7l98ycm313sp8fhmx46fbn88l9cykywi27idymmb9v";
+      name = "kcolorchooser-21.04.0.tar.xz";
     };
   };
   kcron = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kcron-20.12.3.tar.xz";
-      sha256 = "0jn5mymzbifblg1sl4h9micql8baxmbpjclmlxp9r59m3vlpd0pf";
-      name = "kcron-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kcron-21.04.0.tar.xz";
+      sha256 = "144y4cn8xpkmn1gsab8wpvhqrnfidcjrbp2cy9xhx18as5ckpjn3";
+      name = "kcron-21.04.0.tar.xz";
     };
   };
   kdebugsettings = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdebugsettings-20.12.3.tar.xz";
-      sha256 = "1nsinb3psnvab0gc88hl374fr8f3iwxzi5ly9fg41f0z5a4hp9qv";
-      name = "kdebugsettings-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdebugsettings-21.04.0.tar.xz";
+      sha256 = "1xpbw9v9ws9i7a6ag5f6z7d15svyyx34p5vibm4p4j70vd7q5rwk";
+      name = "kdebugsettings-21.04.0.tar.xz";
     };
   };
   kdeconnect-kde = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdeconnect-kde-20.12.3.tar.xz";
-      sha256 = "1a08js0nrjzkfs46wydyz2ipivvgyc0hyyz4cxglhs5i97gab601";
-      name = "kdeconnect-kde-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdeconnect-kde-21.04.0.tar.xz";
+      sha256 = "1zbn2hi245934ljxgrzc3s2rpyapwrrkzx5vcjhnf8ri9v6sxhgp";
+      name = "kdeconnect-kde-21.04.0.tar.xz";
     };
   };
   kde-dev-scripts = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kde-dev-scripts-20.12.3.tar.xz";
-      sha256 = "1qng0232gzfzqlx5ri7lkkhri6wj9gci14xc62qqhklkmfdfx3nh";
-      name = "kde-dev-scripts-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kde-dev-scripts-21.04.0.tar.xz";
+      sha256 = "0plg145hp3bpxb2x3j8hja6fjn7yzmvx8j7zw123xnmqbzi25f6s";
+      name = "kde-dev-scripts-21.04.0.tar.xz";
     };
   };
   kde-dev-utils = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kde-dev-utils-20.12.3.tar.xz";
-      sha256 = "09k9c0dk6gq3372zarmq7kfid7kn2s1vfdcrzal6wg57axfqs8d7";
-      name = "kde-dev-utils-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kde-dev-utils-21.04.0.tar.xz";
+      sha256 = "1cgzkhpb81s1zbx4rsfprmjn3cwqykyaaymg4bm7nqwnq97bbmc5";
+      name = "kde-dev-utils-21.04.0.tar.xz";
     };
   };
   kdeedu-data = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdeedu-data-20.12.3.tar.xz";
-      sha256 = "0cg62yvv39zgshqmfwl5p007b4za6x1nimfmn0hk8j9paas4ykkr";
-      name = "kdeedu-data-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdeedu-data-21.04.0.tar.xz";
+      sha256 = "0s4x0n8skwn117iiffi8rp4l5ddizfdqlc9lm49ijlvzkvhz3g3p";
+      name = "kdeedu-data-21.04.0.tar.xz";
     };
   };
   kdegraphics-mobipocket = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdegraphics-mobipocket-20.12.3.tar.xz";
-      sha256 = "1zbizlk84idqxk0mr6zi86f3z4wrcc0k75s2s0xwfavjp5wvjj4l";
-      name = "kdegraphics-mobipocket-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdegraphics-mobipocket-21.04.0.tar.xz";
+      sha256 = "00pxfffc2xb7mszzgq6b3kp1h3m870k81rqarsy2igxxpbr3dr2p";
+      name = "kdegraphics-mobipocket-21.04.0.tar.xz";
     };
   };
   kdegraphics-thumbnailers = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdegraphics-thumbnailers-20.12.3.tar.xz";
-      sha256 = "0g3z6jai2v7pin23vk8xh66r9y8bw2768aykqhh5s507q0k8cnfx";
-      name = "kdegraphics-thumbnailers-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdegraphics-thumbnailers-21.04.0.tar.xz";
+      sha256 = "0yga4pa37zpgawq2hhc5w3scw40fwyp7901vbh6zspbdzya9lb50";
+      name = "kdegraphics-thumbnailers-21.04.0.tar.xz";
     };
   };
   kdenetwork-filesharing = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdenetwork-filesharing-20.12.3.tar.xz";
-      sha256 = "1lg3431wgrswam1mgck1p2kfgrwk0pk02nzh7xxgvh78104npbb2";
-      name = "kdenetwork-filesharing-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdenetwork-filesharing-21.04.0.tar.xz";
+      sha256 = "07a9pflvjf7ffi9jqx43f43wykl7z92z3pr1ca9q36fxw7cdixad";
+      name = "kdenetwork-filesharing-21.04.0.tar.xz";
     };
   };
   kdenlive = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdenlive-20.12.3.tar.xz";
-      sha256 = "11l5m19vbkjgvxcxh64ccwk33ws5sjpxr68d8459piggkdlr97wd";
-      name = "kdenlive-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdenlive-21.04.0.tar.xz";
+      sha256 = "1psb7mvffiqnv5n4b0wwa6s2ykcfkc4dxsvbxh2k67gmvq58zgmh";
+      name = "kdenlive-21.04.0.tar.xz";
     };
   };
   kdepim-addons = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdepim-addons-20.12.3.tar.xz";
-      sha256 = "0wd64aby2yrg937m9sfyzby3gxhwp2n1h6ijxxz7h2wi5mw3aqdp";
-      name = "kdepim-addons-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdepim-addons-21.04.0.tar.xz";
+      sha256 = "02xlp9xm15462y02wz05kn5vkg11lkiblz0cx43i8rcyiqnxbldz";
+      name = "kdepim-addons-21.04.0.tar.xz";
     };
   };
   kdepim-runtime = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdepim-runtime-20.12.3.tar.xz";
-      sha256 = "0lp3cvkbfqd0zn7gh0as1ksknzqwxpz70zbks70wzdf4i59k2sxv";
-      name = "kdepim-runtime-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdepim-runtime-21.04.0.tar.xz";
+      sha256 = "1m1fshyivm1mz4hj9qaq33wdjkqxpjjbr0rkscb2b56a6jg4glza";
+      name = "kdepim-runtime-21.04.0.tar.xz";
     };
   };
   kdesdk-kioslaves = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdesdk-kioslaves-20.12.3.tar.xz";
-      sha256 = "0x48xzqg85rc639rrd7y43y1bvzyw189vydra13wbg063acx79n8";
-      name = "kdesdk-kioslaves-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdesdk-kioslaves-21.04.0.tar.xz";
+      sha256 = "068hqm1f2wllq3gcpmsib8cky6fhgpmqvmzvymcfc19ccyzwayhf";
+      name = "kdesdk-kioslaves-21.04.0.tar.xz";
     };
   };
   kdesdk-thumbnailers = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdesdk-thumbnailers-20.12.3.tar.xz";
-      sha256 = "1n49psav0528dzg7b8h79pwngzjh1if7n47y7y8f5dj3smnyi6mv";
-      name = "kdesdk-thumbnailers-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdesdk-thumbnailers-21.04.0.tar.xz";
+      sha256 = "0cj6xsazqv94l02bp1pr5kny5id0kr5kqv3xkwv4jvmq317vfi3i";
+      name = "kdesdk-thumbnailers-21.04.0.tar.xz";
     };
   };
   kdf = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdf-20.12.3.tar.xz";
-      sha256 = "1qvjkfnagcyplkpx5v7vwfhs0xjll7g5jc0fvmkxqf38v2m5wb77";
-      name = "kdf-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdf-21.04.0.tar.xz";
+      sha256 = "1vbc75z33gx8pvy0kbmrhcg209qxxnvw7ccw83wk9hhzqg7mj5gf";
+      name = "kdf-21.04.0.tar.xz";
     };
   };
   kdialog = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdialog-20.12.3.tar.xz";
-      sha256 = "1ph26rks7yfjr28gvgyq77d8mnxxj0dxldd83lw94plhwlsnf7r3";
-      name = "kdialog-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdialog-21.04.0.tar.xz";
+      sha256 = "0damdppa2hm18nd99nzx23nac3k5ps0f5kc04cgfip4cr34rpg5s";
+      name = "kdialog-21.04.0.tar.xz";
     };
   };
   kdiamond = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kdiamond-20.12.3.tar.xz";
-      sha256 = "1wljkv0hacahc6n1x40diycvd32qlw363yzf3qm2l3h55g1ynca7";
-      name = "kdiamond-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kdiamond-21.04.0.tar.xz";
+      sha256 = "1lpwghy8v4242rm2vzm3wng43h5ys6r7spzlv53h329kpzd2259v";
+      name = "kdiamond-21.04.0.tar.xz";
     };
   };
   keditbookmarks = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/keditbookmarks-20.12.3.tar.xz";
-      sha256 = "0nfpdm672vs5h5ivxj6aaicj1b8nqcp7gw81jvjnq3nqk1k488v8";
-      name = "keditbookmarks-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/keditbookmarks-21.04.0.tar.xz";
+      sha256 = "1adk2g9hg7mls2vrrslmmy0nfvpgri9jlmii4pqfwl9kilcnk7lc";
+      name = "keditbookmarks-21.04.0.tar.xz";
     };
   };
   kfind = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kfind-20.12.3.tar.xz";
-      sha256 = "0rzilsw9y8cd4vmksl3jpddc0qc3y60yz7f6yk11n0hpszy0ixp6";
-      name = "kfind-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kfind-21.04.0.tar.xz";
+      sha256 = "1122h7jmsf49j7388py6pp72gfkqqzv971n7dkzpyqhfirqaigvj";
+      name = "kfind-21.04.0.tar.xz";
     };
   };
   kfloppy = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kfloppy-20.12.3.tar.xz";
-      sha256 = "00ff15fcgp1bgl4qin6md18p93wbpg3p230kgjk76qp8rmnwamg8";
-      name = "kfloppy-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kfloppy-21.04.0.tar.xz";
+      sha256 = "19maj0a469wnyindbrmqby8qikxcz38czagfygpq16y9bnkbvp3s";
+      name = "kfloppy-21.04.0.tar.xz";
     };
   };
   kfourinline = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kfourinline-20.12.3.tar.xz";
-      sha256 = "0rj1b60g7dng8yqw92lv9kk8fbnc7wwc9gbikkkjsrmw20hsl4jj";
-      name = "kfourinline-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kfourinline-21.04.0.tar.xz";
+      sha256 = "0yna3lydp0gii1rasij5593gaf4w9pbv7y5l6hz5qddb5y6r82ds";
+      name = "kfourinline-21.04.0.tar.xz";
     };
   };
   kgeography = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kgeography-20.12.3.tar.xz";
-      sha256 = "0i9sg203rbkcjl5si8fprmz31m90i5gq7ckv6vrsnmf3y0f6324m";
-      name = "kgeography-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kgeography-21.04.0.tar.xz";
+      sha256 = "1hcjp34jzz9qx8jp065gisnr9gn1v1ifnajfnaa3vc6sq1m1bvvi";
+      name = "kgeography-21.04.0.tar.xz";
     };
   };
   kget = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kget-20.12.3.tar.xz";
-      sha256 = "0kh2yv3fq6mdfqfiqiqd01l8rmr36pmcmjdqqaagsb16jprxivnl";
-      name = "kget-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kget-21.04.0.tar.xz";
+      sha256 = "0lws94g3780kdnxw2wf8vl41fq8ffxwaafma3r7p15rs05cyl1rv";
+      name = "kget-21.04.0.tar.xz";
     };
   };
   kgoldrunner = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kgoldrunner-20.12.3.tar.xz";
-      sha256 = "01c2ia8hs8i92ayah3jlsrqb62mcfa0phmm8rjbpnv8ybkjba720";
-      name = "kgoldrunner-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kgoldrunner-21.04.0.tar.xz";
+      sha256 = "02gldv7l8igzzmmyrkyixgzncsh0ysmfhx0lfc27pdj0mvfpm3m2";
+      name = "kgoldrunner-21.04.0.tar.xz";
     };
   };
   kgpg = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kgpg-20.12.3.tar.xz";
-      sha256 = "0z4xlgdhdagniabbzsvrpgzm2k3vwmk6li2wp9y719yj1jm23iyz";
-      name = "kgpg-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kgpg-21.04.0.tar.xz";
+      sha256 = "0a5xik5wb0b15p612lxzwqr5b58d4d7v3c7ghxmm8g27k36igqff";
+      name = "kgpg-21.04.0.tar.xz";
     };
   };
   khangman = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/khangman-20.12.3.tar.xz";
-      sha256 = "0alk18a95m5cl3zxf4y69i6vs1v027s5zwkbgrczznnxx2isv82r";
-      name = "khangman-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/khangman-21.04.0.tar.xz";
+      sha256 = "0pkqhbvw375v3cwn7ilfn7x93nadnxl07swcj5dbxn84gs33aj7c";
+      name = "khangman-21.04.0.tar.xz";
     };
   };
   khelpcenter = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/khelpcenter-20.12.3.tar.xz";
-      sha256 = "0mixgxi4a56x1xgan4rz3f6bifm21rwnm193klsd15bkd29yfa8f";
-      name = "khelpcenter-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/khelpcenter-21.04.0.tar.xz";
+      sha256 = "04fvipc3dzjl2fsgbla8w7kmv239ch86da8539gwg7l54bdmb5pv";
+      name = "khelpcenter-21.04.0.tar.xz";
     };
   };
   kidentitymanagement = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kidentitymanagement-20.12.3.tar.xz";
-      sha256 = "161dj154r43gmw7768llanvmismf5fa141xblji6q40ss5aknsh3";
-      name = "kidentitymanagement-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kidentitymanagement-21.04.0.tar.xz";
+      sha256 = "1y83k7lzyzc5r6f7pqkbzqm1xnjv0z11vg8yazqwmfcv1whbzxda";
+      name = "kidentitymanagement-21.04.0.tar.xz";
     };
   };
   kig = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kig-20.12.3.tar.xz";
-      sha256 = "1ncy071wlyinkzhalnhg23x6n01031m2sx5kzh8gllp023mn2cnf";
-      name = "kig-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kig-21.04.0.tar.xz";
+      sha256 = "0d4p7py3lf05dsfy9x98aq6fwk6fsvf97jwxsdz4z3r49qvcp3hp";
+      name = "kig-21.04.0.tar.xz";
     };
   };
   kigo = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kigo-20.12.3.tar.xz";
-      sha256 = "1s4ykxlr47gk6n44fnv390m619i0jnxbxs4vd3vv7f9hfl65k598";
-      name = "kigo-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kigo-21.04.0.tar.xz";
+      sha256 = "0ans0mj9ql6vdmnc130sw0wkkm8rc1bpiww36a76nw8n28cfcyzi";
+      name = "kigo-21.04.0.tar.xz";
     };
   };
   killbots = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/killbots-20.12.3.tar.xz";
-      sha256 = "056slp4d9gk40i75gk42cvaq300zr228srqly2gap4879vqs04pa";
-      name = "killbots-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/killbots-21.04.0.tar.xz";
+      sha256 = "1qf2lahvi5g9cgvbgp6sj9vw1g8fcvcwaxgaqnc5akl03p51gz2k";
+      name = "killbots-21.04.0.tar.xz";
     };
   };
   kimagemapeditor = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kimagemapeditor-20.12.3.tar.xz";
-      sha256 = "15z2mygfhk4bq212f76x60zzia1339hw1jg5vf24q2xs26gppprr";
-      name = "kimagemapeditor-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kimagemapeditor-21.04.0.tar.xz";
+      sha256 = "1f3y10bk5541sgi2qfww56mfq245a9wg38vpw2c8ygf4lc5rh67s";
+      name = "kimagemapeditor-21.04.0.tar.xz";
     };
   };
   kimap = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kimap-20.12.3.tar.xz";
-      sha256 = "080k4zyl7rlgzyfz6hsygv4wpw1hf08qnv4sbakpy3j8h6cbn79j";
-      name = "kimap-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kimap-21.04.0.tar.xz";
+      sha256 = "0fbcwsiz1q5s9d70zn7y183p477ykyjpw27i3k2mxb9ggk0h8bnx";
+      name = "kimap-21.04.0.tar.xz";
     };
   };
   kio-extras = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kio-extras-20.12.3.tar.xz";
-      sha256 = "1qj1cxzlpwh47vx7n3lm86556a53i6x3nvj5xc51mkh8pkdr0nxs";
-      name = "kio-extras-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kio-extras-21.04.0.tar.xz";
+      sha256 = "1p5kd5c4p5yc9fmppa6sivgv5kn1l9krzzw5h5y8xmi9g896yjjg";
+      name = "kio-extras-21.04.0.tar.xz";
     };
   };
   kio-gdrive = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kio-gdrive-20.12.3.tar.xz";
-      sha256 = "0w3vizdrjrikpgq137l5g0anvk0nb5wkr4m7pn0qma0sd03wqsa5";
-      name = "kio-gdrive-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kio-gdrive-21.04.0.tar.xz";
+      sha256 = "0p1y30syzbj7lg8hpxb5r255ba0v93gc219r1v7gb1ja5p7pjvsh";
+      name = "kio-gdrive-21.04.0.tar.xz";
     };
   };
   kipi-plugins = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kipi-plugins-20.12.3.tar.xz";
-      sha256 = "0wf0f6n1kpbcrlrfnmhkvcva4n86nav3lwfka29xwmk0brq35ghn";
-      name = "kipi-plugins-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kipi-plugins-21.04.0.tar.xz";
+      sha256 = "1x26yw1f47pylly2211kdld17m0p42a5miygwc7rnvasvh0dngwf";
+      name = "kipi-plugins-21.04.0.tar.xz";
     };
   };
   kirigami-gallery = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kirigami-gallery-20.12.3.tar.xz";
-      sha256 = "0925n23wa69v69f0i3fafkaqsvn3sv41ili7c62110zx5n92qd3v";
-      name = "kirigami-gallery-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kirigami-gallery-21.04.0.tar.xz";
+      sha256 = "04hq0hikx692glb83xs8fg97dv53ayzd8lp776zv4p3sd6dpaysf";
+      name = "kirigami-gallery-21.04.0.tar.xz";
     };
   };
   kiriki = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kiriki-20.12.3.tar.xz";
-      sha256 = "0xnwdvnblz8qpgngjmmn218nrjxhy6f6z6ispszirr39mxvqgdhd";
-      name = "kiriki-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kiriki-21.04.0.tar.xz";
+      sha256 = "0dlimwhw6ii9x4m7166hbl3n6zi5pcvbsg303jm8pjc2bj83izis";
+      name = "kiriki-21.04.0.tar.xz";
     };
   };
   kiten = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kiten-20.12.3.tar.xz";
-      sha256 = "0yjfdbrm5kijf5rh45ih8x3hxcj9y9d5bivpi2xqdnl8w6dq0hnq";
-      name = "kiten-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kiten-21.04.0.tar.xz";
+      sha256 = "0vvq75q7j4j2hzzwnsr5zafphqvhwggb0mbs6y1ccb6yfm5vy3a4";
+      name = "kiten-21.04.0.tar.xz";
     };
   };
   kitinerary = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kitinerary-20.12.3.tar.xz";
-      sha256 = "1p8s27clnvn87kmlvv00j9s50n82awb19cvh4kwm7h77f3aai7jm";
-      name = "kitinerary-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kitinerary-21.04.0.tar.xz";
+      sha256 = "0sxzc2c0i1qjn5302a3cg7inx020r3n1pzjif6bhw4phynbzxliy";
+      name = "kitinerary-21.04.0.tar.xz";
     };
   };
   kjumpingcube = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kjumpingcube-20.12.3.tar.xz";
-      sha256 = "0rr0972scdr0x5ba3gqdprhg0ipm75577bx79m1jhkbqrcsr9kvg";
-      name = "kjumpingcube-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kjumpingcube-21.04.0.tar.xz";
+      sha256 = "12khypxl87725zs5ykwcp1ag27v5q89n9cvn879d6lp7qqs7mjx8";
+      name = "kjumpingcube-21.04.0.tar.xz";
     };
   };
   kldap = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kldap-20.12.3.tar.xz";
-      sha256 = "0lynv6101wqyi88rm34kwl4a4rdb59q69x918y4ggc4jzvgvq32c";
-      name = "kldap-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kldap-21.04.0.tar.xz";
+      sha256 = "1mqqpzqpz0hlldb0nz3dnm33d1hwpxcwj9hdqik5bzbfnr7ww04g";
+      name = "kldap-21.04.0.tar.xz";
     };
   };
   kleopatra = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kleopatra-20.12.3.tar.xz";
-      sha256 = "187agxw1s441qpskv8s74nvmsqmgh5z3mid85i8lvm5bqsdzjc5z";
-      name = "kleopatra-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kleopatra-21.04.0.tar.xz";
+      sha256 = "0w58nsklvc63ps0m92knf0n2wkmksq432ckx1959klimgqacffy0";
+      name = "kleopatra-21.04.0.tar.xz";
     };
   };
   klettres = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/klettres-20.12.3.tar.xz";
-      sha256 = "1zfbcciki2gz14b0mq7nv7pq90n2kf6dn33nkrwy086rmfm245dw";
-      name = "klettres-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/klettres-21.04.0.tar.xz";
+      sha256 = "1kxyisvmpgf4m5qzi7w6lfmnnpp96f4v72pls5k68q01ygf7mlrg";
+      name = "klettres-21.04.0.tar.xz";
     };
   };
   klickety = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/klickety-20.12.3.tar.xz";
-      sha256 = "155qhsgslx9nw4fzm5x5c09i3vwkqbl5xxa1arcxjpwsashfri2q";
-      name = "klickety-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/klickety-21.04.0.tar.xz";
+      sha256 = "0jiaxfzvdbygmfd6d0bsakzsvzkjvlhhidjz1wmvxq0jla4qna6b";
+      name = "klickety-21.04.0.tar.xz";
     };
   };
   klines = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/klines-20.12.3.tar.xz";
-      sha256 = "06syv5wxf2d9wqh5l7lwwjd0i3q8jqhimgb2ndyv2sp3p6zyx28n";
-      name = "klines-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/klines-21.04.0.tar.xz";
+      sha256 = "1ay26by2hwn7b0i48xgsxdysqpwzkvsz6g974c93103f5ygn8wjl";
+      name = "klines-21.04.0.tar.xz";
     };
   };
   kmag = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmag-20.12.3.tar.xz";
-      sha256 = "1p31i6hnhmmmx97bi1zb6c71zi1428gzf11sx66yhvfpj6vjx4rj";
-      name = "kmag-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmag-21.04.0.tar.xz";
+      sha256 = "06yw7397v5wcdx4jxpyc2mxgbxr744wgnqm7w2xb4771izlwq3qy";
+      name = "kmag-21.04.0.tar.xz";
     };
   };
   kmahjongg = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmahjongg-20.12.3.tar.xz";
-      sha256 = "1kx6l03x68cvr78iqjc7byraw714pbynavzm4vr8spadqr1scmj2";
-      name = "kmahjongg-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmahjongg-21.04.0.tar.xz";
+      sha256 = "0w4fpnafn9vir8c6ha6kl1x8vbmvmjax0p1qzxa7596hf3lvcncq";
+      name = "kmahjongg-21.04.0.tar.xz";
     };
   };
   kmail = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmail-20.12.3.tar.xz";
-      sha256 = "192wqkvq062xaq42bwl9f1rn7bc60slb3c0ika3mn446mr04s7j1";
-      name = "kmail-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmail-21.04.0.tar.xz";
+      sha256 = "11ghi1bqc8ldsb04z7fs5ba9b9fvsmcxxjp8j837iv0qz5rwh0fw";
+      name = "kmail-21.04.0.tar.xz";
     };
   };
   kmail-account-wizard = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmail-account-wizard-20.12.3.tar.xz";
-      sha256 = "1djc4fl5nyvnz26kbpqav5qy6azcrl0vmfaphmh4msx01823w50n";
-      name = "kmail-account-wizard-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmail-account-wizard-21.04.0.tar.xz";
+      sha256 = "0jalwjk5jyih765i7cpa0qidw3di17cz1fygmzgdz1v6kasg3h0c";
+      name = "kmail-account-wizard-21.04.0.tar.xz";
     };
   };
   kmailtransport = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmailtransport-20.12.3.tar.xz";
-      sha256 = "1m2r30rlmfb41m6hqmbrrw6lf7im4xlsxpfqf2h8qiss9avxf66p";
-      name = "kmailtransport-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmailtransport-21.04.0.tar.xz";
+      sha256 = "1jgw93q8jpgkg8ms7pjral1wz1ycs12ikjnsw2fiybd67syd2dns";
+      name = "kmailtransport-21.04.0.tar.xz";
     };
   };
   kmbox = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmbox-20.12.3.tar.xz";
-      sha256 = "0cwhzppckk3lv5p8nwba1vw57hkpbpgk69wnax6ad5x6nkynri8f";
-      name = "kmbox-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmbox-21.04.0.tar.xz";
+      sha256 = "01p1ihr08dnmzsq22ipy06grnz59nxyc2vfqbh6hc949mhl3kwx4";
+      name = "kmbox-21.04.0.tar.xz";
     };
   };
   kmime = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmime-20.12.3.tar.xz";
-      sha256 = "0va7xxr9bk27nalpr1959g7kbsbn4q974qhsnfvyac7qv0wnh7iq";
-      name = "kmime-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmime-21.04.0.tar.xz";
+      sha256 = "096vbbr8qnwcws7c6llxwk0klbfrhh4k83384bkhw5m5xawnqaq4";
+      name = "kmime-21.04.0.tar.xz";
     };
   };
   kmines = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmines-20.12.3.tar.xz";
-      sha256 = "11g98f8q77a1zivpv46bahqzkxna15mxm9abc5nmbhhrfl3n2ljr";
-      name = "kmines-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmines-21.04.0.tar.xz";
+      sha256 = "08dynl219n0jd58i01ccmgphc03z2x143l0a8v11x0m5cfazvzpp";
+      name = "kmines-21.04.0.tar.xz";
     };
   };
   kmix = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmix-20.12.3.tar.xz";
-      sha256 = "05za6km6lgkc79rk6iksbvfbc62110j6dlvsas2ld67cisar5y38";
-      name = "kmix-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmix-21.04.0.tar.xz";
+      sha256 = "1s2cnbmpkchp1wc5217r17ramj7a8xrm4l9hb74lyw4fc78455z2";
+      name = "kmix-21.04.0.tar.xz";
     };
   };
   kmousetool = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmousetool-20.12.3.tar.xz";
-      sha256 = "0xsjwjm517j2pqc04fvam181yrhb6qsi4nyxzc9c7xwwqm1pw03a";
-      name = "kmousetool-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmousetool-21.04.0.tar.xz";
+      sha256 = "0iaqgflnyl62ynxcip8zbxm25hgr82yc9d3z5v36mv0q3lq4bi92";
+      name = "kmousetool-21.04.0.tar.xz";
     };
   };
   kmouth = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmouth-20.12.3.tar.xz";
-      sha256 = "152xgpq8mlwpaq82cff0llwpkw2jylwbpwfbish7glqghryzrgwh";
-      name = "kmouth-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmouth-21.04.0.tar.xz";
+      sha256 = "0sza7arw0nfga6g9fv7rbkgkxmn694awzhkjbklafdvcjyn3dw2v";
+      name = "kmouth-21.04.0.tar.xz";
     };
   };
   kmplot = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kmplot-20.12.3.tar.xz";
-      sha256 = "1b70kfjp83dnslpb9732dsci3yq0iglr6ikbm6lsbf2qbxxshjl3";
-      name = "kmplot-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kmplot-21.04.0.tar.xz";
+      sha256 = "1wpz5kb06ym920ghmrfb0jh6z4nadlb7d9z0l85vkm3y1rz0iisy";
+      name = "kmplot-21.04.0.tar.xz";
     };
   };
   knavalbattle = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/knavalbattle-20.12.3.tar.xz";
-      sha256 = "1a7rja1zb06aa9brjlsd0jx3vxn3gmdq1fg0gzmmfg77mdmb3l6g";
-      name = "knavalbattle-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/knavalbattle-21.04.0.tar.xz";
+      sha256 = "0xn7mkmcr4p6c8kdcdxk7k9ifv12l0fflg2nkgmr1gbjxkpyy435";
+      name = "knavalbattle-21.04.0.tar.xz";
     };
   };
   knetwalk = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/knetwalk-20.12.3.tar.xz";
-      sha256 = "1bnm1lfp0igav57ys5yqim2wky8xpkk52zy50k5l5p32sd7g2x59";
-      name = "knetwalk-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/knetwalk-21.04.0.tar.xz";
+      sha256 = "127s5fgjpcndgbg30wd9sv3jrskq7ib4rnrw5qdfsxv8c77kv74m";
+      name = "knetwalk-21.04.0.tar.xz";
     };
   };
   knights = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/knights-20.12.3.tar.xz";
-      sha256 = "0z85xw91fqgrhz8kl1gshqy6n4ah14b5z1ajr0m0x817xy2ifys9";
-      name = "knights-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/knights-21.04.0.tar.xz";
+      sha256 = "09w3qqvp5k8z3bfwz6zlclagn11j1nar0bp2sgnjmi9cy2rs74n3";
+      name = "knights-21.04.0.tar.xz";
     };
   };
   knotes = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/knotes-20.12.3.tar.xz";
-      sha256 = "1n642jqwlg8nrmlm9xllbcdffwq3gy32pr6fp3k076x28kjg7mh6";
-      name = "knotes-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/knotes-21.04.0.tar.xz";
+      sha256 = "0zy10amznrkbj663h0b5a410ry65kh1sw2k9ra43zx45bpamh62q";
+      name = "knotes-21.04.0.tar.xz";
     };
   };
   kolf = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kolf-20.12.3.tar.xz";
-      sha256 = "1xxmw85gxs96djanx5q0vzz0h5ilckyz644vvxqillng6f54skbp";
-      name = "kolf-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kolf-21.04.0.tar.xz";
+      sha256 = "0220b4mbphb7c7p3szhi976dx8ln0f64ghika7b9x2cmdxcizfcq";
+      name = "kolf-21.04.0.tar.xz";
     };
   };
   kollision = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kollision-20.12.3.tar.xz";
-      sha256 = "16bfbhb7dlfkwbald1vsbfffphpvzc3pglcjdc3wval8kqh9f7i0";
-      name = "kollision-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kollision-21.04.0.tar.xz";
+      sha256 = "0cfn7l4ccl26rqm9i8rqp07yx6jc12xqhm16pgamrf8qv40vch9f";
+      name = "kollision-21.04.0.tar.xz";
     };
   };
   kolourpaint = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kolourpaint-20.12.3.tar.xz";
-      sha256 = "0gp9pnagajhzy2f4cmvimvwr3sfk87w6zjwi264nk0cgd41pi51g";
-      name = "kolourpaint-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kolourpaint-21.04.0.tar.xz";
+      sha256 = "0xp1kas6hk279aqm5g36qlsylpd43p9pv6vdk2dy4cilds4fc3vw";
+      name = "kolourpaint-21.04.0.tar.xz";
     };
   };
   kompare = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kompare-20.12.3.tar.xz";
-      sha256 = "0zzvcxwr2vb48i8dj1r7m9841177zdci762f5ljk5wn8lbgysmvv";
-      name = "kompare-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kompare-21.04.0.tar.xz";
+      sha256 = "17p1i4gfgzbps60zq3svicp6yz6w33wvcp145lq1iqkj80pf5qyf";
+      name = "kompare-21.04.0.tar.xz";
     };
   };
   konqueror = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/konqueror-20.12.3.tar.xz";
-      sha256 = "1y6jpq1v5yxdhanyll3kgg9m5p0ri66cvsbg3vhiay377s992927";
-      name = "konqueror-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/konqueror-21.04.0.tar.xz";
+      sha256 = "04mli5dv05v7fin58zrhm7jmddj8qa2qz7w3qdbjd3a4iz7y7z71";
+      name = "konqueror-21.04.0.tar.xz";
     };
   };
   konquest = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/konquest-20.12.3.tar.xz";
-      sha256 = "11ygcif5z7nn8x599m4dk0a8kdriiqg177f7v05pf0fhd7x72968";
-      name = "konquest-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/konquest-21.04.0.tar.xz";
+      sha256 = "1ryh7d3ndvrw8vjaraxyzyw08sx9w4yny7hdj1ss7319y041a07s";
+      name = "konquest-21.04.0.tar.xz";
     };
   };
   konsole = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/konsole-20.12.3.tar.xz";
-      sha256 = "138kvndy7xjjmac2wy2lsqi5pckba6nwbfgsdd91fbmfqkyl5k94";
-      name = "konsole-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/konsole-21.04.0.tar.xz";
+      sha256 = "1dlr0w77sccibhp37xi49bi6g4679fymgziznqxjvhk5l141f2i6";
+      name = "konsole-21.04.0.tar.xz";
     };
   };
   kontact = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kontact-20.12.3.tar.xz";
-      sha256 = "0vysa621chslz8l0xhnxs8bymkgjwqg24bhp2kw5lllz4f46iidl";
-      name = "kontact-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kontact-21.04.0.tar.xz";
+      sha256 = "08d1837kkcqc8gp9hmd351yymjdl31vg6nk1vcrlb7xsndqcsb79";
+      name = "kontact-21.04.0.tar.xz";
     };
   };
   kontactinterface = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kontactinterface-20.12.3.tar.xz";
-      sha256 = "1nqxk2x0bzndfv35g1l8yhafknyb0s68vrmcwf4kd15g5rf3k7rw";
-      name = "kontactinterface-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kontactinterface-21.04.0.tar.xz";
+      sha256 = "1h4v7jz4d5nl23fyjz946qszmidvdkayhsb1ffzk53bv8wpjh76m";
+      name = "kontactinterface-21.04.0.tar.xz";
     };
   };
   kontrast = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kontrast-20.12.3.tar.xz";
-      sha256 = "12q21d6fj29akvy6yk769pfwwhw24y13bhhbwrpnyv2ih96j9s8d";
-      name = "kontrast-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kontrast-21.04.0.tar.xz";
+      sha256 = "1bjkmhal9prizv1dlz8gdlki096a8d09bwksc0xxq3kml1r5gmfm";
+      name = "kontrast-21.04.0.tar.xz";
     };
   };
   konversation = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/konversation-20.12.3.tar.xz";
-      sha256 = "0cwnlihdidr5pxcbz4l68w1q6a9g3y1997gk7xqqnh4kz2fkc37q";
-      name = "konversation-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/konversation-21.04.0.tar.xz";
+      sha256 = "1fq4w0awg2xj6f7ivvpqrcch68ss01vnh0diwagryhrb0g0a37n7";
+      name = "konversation-21.04.0.tar.xz";
+    };
+  };
+  kopeninghours = {
+    version = "21.04.0";
+    src = fetchurl {
+      url = "${mirror}/stable/release-service/21.04.0/src/kopeninghours-21.04.0.tar.xz";
+      sha256 = "11gkri2sk1dz4hndpid4c84pxkdzc1fdpzw8h2x0141njl62421c";
+      name = "kopeninghours-21.04.0.tar.xz";
     };
   };
   kopete = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kopete-20.12.3.tar.xz";
-      sha256 = "0jl498q59dfwkazf7iqzlvia9jr6hhmkhy0hprbvww4av2si7x6w";
-      name = "kopete-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kopete-21.04.0.tar.xz";
+      sha256 = "14ypdl4xy4izg14nbdczif5i8q5kjly5gnyz032iy0cgnkarhi4q";
+      name = "kopete-21.04.0.tar.xz";
     };
   };
   korganizer = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/korganizer-20.12.3.tar.xz";
-      sha256 = "16mz7rmh65xljlf1jq719nkihr23wh840lf5cxzcx3vpk4gcc87w";
-      name = "korganizer-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/korganizer-21.04.0.tar.xz";
+      sha256 = "0znbwnzn35q4fdlj9n7hdqvq9rz3g8dyan9v1z9rh11cmdn4pc6h";
+      name = "korganizer-21.04.0.tar.xz";
     };
   };
   kosmindoormap = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kosmindoormap-20.12.3.tar.xz";
-      sha256 = "02dgnwand9sbas4v4c12xn8szgc3a7crmh8dd4q7rpcrzm2x1m9k";
-      name = "kosmindoormap-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kosmindoormap-21.04.0.tar.xz";
+      sha256 = "1c31f7b79xq9sxmfqxfs3082yrbqwkmw02brja8dg1h2avn0r3cy";
+      name = "kosmindoormap-21.04.0.tar.xz";
     };
   };
   kpat = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kpat-20.12.3.tar.xz";
-      sha256 = "1v1lzvl0xb5h4vma78ln400a81wilx16m987aijxg4c8gq4h5n11";
-      name = "kpat-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kpat-21.04.0.tar.xz";
+      sha256 = "043apdv55kc8d2dih65vb4fkwmaqybz167z0g5nfrrg0ilnqhifn";
+      name = "kpat-21.04.0.tar.xz";
     };
   };
   kpimtextedit = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kpimtextedit-20.12.3.tar.xz";
-      sha256 = "07lkc5zgsgvjz9544ckp17sii5bm06fynb0s046rks6z8fcncxrk";
-      name = "kpimtextedit-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kpimtextedit-21.04.0.tar.xz";
+      sha256 = "1acj6w164xg3v1svzlf4qa10kkzbhlnzrl4cp0brak81gal7bnrp";
+      name = "kpimtextedit-21.04.0.tar.xz";
     };
   };
   kpkpass = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kpkpass-20.12.3.tar.xz";
-      sha256 = "0lcgalcyfd5ggznwifwvvybj6z080gx12y4gx4mdh7jjjx0j4ng9";
-      name = "kpkpass-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kpkpass-21.04.0.tar.xz";
+      sha256 = "0s1f9j3n3ki71kzi8zw95q4v8y3dcgi5cnpq5rk03qb69yqf45xi";
+      name = "kpkpass-21.04.0.tar.xz";
     };
   };
   kpmcore = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kpmcore-20.12.3.tar.xz";
-      sha256 = "02jaz24wvw4jqi0k41067wwwy5yi6z80a1ah36ypxawzah9y94ik";
-      name = "kpmcore-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kpmcore-21.04.0.tar.xz";
+      sha256 = "0cb71d0w2jhbpm0da9rzn484930c022gxn2m4y9bgimaz0cgzcp7";
+      name = "kpmcore-21.04.0.tar.xz";
     };
   };
   kpublictransport = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kpublictransport-20.12.3.tar.xz";
-      sha256 = "15y6h44wdl78rfs40b71ijmvs2qb2ylnq72r8v6rn3fdnfhx2l4r";
-      name = "kpublictransport-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kpublictransport-21.04.0.tar.xz";
+      sha256 = "18zmsq9585d8sx6qvcfw6wb183nzga9l0b6mm06cl89bwpr2bdbb";
+      name = "kpublictransport-21.04.0.tar.xz";
     };
   };
   kqtquickcharts = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kqtquickcharts-20.12.3.tar.xz";
-      sha256 = "1icc28acp7n8f5hiiq9rvmyv21f1ayghcr8d97lwm29aagsblx5j";
-      name = "kqtquickcharts-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kqtquickcharts-21.04.0.tar.xz";
+      sha256 = "09lw31sx93gw3s6hmwi0xaxyjnfx2nhij8iayam1sg644vx9a7ws";
+      name = "kqtquickcharts-21.04.0.tar.xz";
     };
   };
   krdc = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/krdc-20.12.3.tar.xz";
-      sha256 = "0s7wp11zcgp5z1drywm636wx5lkbalym4xxpmrb28xbdcgy9wgi2";
-      name = "krdc-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/krdc-21.04.0.tar.xz";
+      sha256 = "08iqydss6lyc6823762fq1p5c1hs7hv2crwv609gw97cvxvc8ww1";
+      name = "krdc-21.04.0.tar.xz";
     };
   };
   kreversi = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kreversi-20.12.3.tar.xz";
-      sha256 = "0v6nhrzxd7pwc7wyj1wv7spbc437vb14pwdd731w8s02223kkkzf";
-      name = "kreversi-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kreversi-21.04.0.tar.xz";
+      sha256 = "02zk0bwjmhgpk7fbvzwxap0xda2vxfyfjy38zagm5wgpgd4acsj4";
+      name = "kreversi-21.04.0.tar.xz";
     };
   };
   krfb = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/krfb-20.12.3.tar.xz";
-      sha256 = "0675smz307zwb4sdnhdlcgi7v38pxj0frr4c3cbhcpcmkjnbayc4";
-      name = "krfb-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/krfb-21.04.0.tar.xz";
+      sha256 = "0vjf10fg8nqbc7dr19i1hlqpgi1z2bcm1zrpf2rs85fi4pxrw7lg";
+      name = "krfb-21.04.0.tar.xz";
     };
   };
   kross-interpreters = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kross-interpreters-20.12.3.tar.xz";
-      sha256 = "1rq3gl0mndx3qhd0zk532z4m95zb4gwgahx208n6l5xh4rwgn7ck";
-      name = "kross-interpreters-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kross-interpreters-21.04.0.tar.xz";
+      sha256 = "1203gmm6pcv37k2m3yah1qgazja8qxkn18dqxmnw7fj3903mqxjw";
+      name = "kross-interpreters-21.04.0.tar.xz";
     };
   };
   kruler = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kruler-20.12.3.tar.xz";
-      sha256 = "1nvghf3gdn06nkk070zfbjmmh4z1anxxj15mwmdk3xriiwwm4w9z";
-      name = "kruler-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kruler-21.04.0.tar.xz";
+      sha256 = "0yrpkb755g2xy329336dl9yarl6dhcj5cwgv1sy75w1k3gibsz5y";
+      name = "kruler-21.04.0.tar.xz";
     };
   };
   kshisen = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kshisen-20.12.3.tar.xz";
-      sha256 = "19grx2zs26il2jplff4nb5sakvbkgsf9a91269gfjzsxzijf166q";
-      name = "kshisen-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kshisen-21.04.0.tar.xz";
+      sha256 = "087vynb6gr3l2291nvxcdk27ib10063fyhhxa7ibvfw68j612fri";
+      name = "kshisen-21.04.0.tar.xz";
     };
   };
   ksirk = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ksirk-20.12.3.tar.xz";
-      sha256 = "1rq4r5d1mhdkpfxv71s6pyaac8yaf03z4ayfhjh1azf3zvv9i8a5";
-      name = "ksirk-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ksirk-21.04.0.tar.xz";
+      sha256 = "1qrgkzgm7vnjz6mk7gqkxkx6i7p1dfnlw8fhxa6h1ihvgfmxr6kr";
+      name = "ksirk-21.04.0.tar.xz";
     };
   };
   ksmtp = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ksmtp-20.12.3.tar.xz";
-      sha256 = "0qmriih43q1lp4bq68hzlnwzab0vcjyjddyhs44gv9r83icw6rw6";
-      name = "ksmtp-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ksmtp-21.04.0.tar.xz";
+      sha256 = "0mn4ciyg0c8rxbcc3d99slm03jbca7b6gaplh8zz54p2krf86my5";
+      name = "ksmtp-21.04.0.tar.xz";
     };
   };
   ksnakeduel = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ksnakeduel-20.12.3.tar.xz";
-      sha256 = "132pdhfi9jy55y0ys785pz5xjw9f6fxx061ppvfy11giz9cbphsc";
-      name = "ksnakeduel-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ksnakeduel-21.04.0.tar.xz";
+      sha256 = "1s3k4k2a27rfp300bgxm1qhsg0dnlz72ip3csdixkidwcig7v017";
+      name = "ksnakeduel-21.04.0.tar.xz";
     };
   };
   kspaceduel = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kspaceduel-20.12.3.tar.xz";
-      sha256 = "0ff1dpj01szzgg6yb774lzpimlf7japkv4ns0xb3a6vp5ghfayxw";
-      name = "kspaceduel-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kspaceduel-21.04.0.tar.xz";
+      sha256 = "0acgmh4blmp2vmzqnxvphixbjmfv12al99hxwv1iavdfyl88yfqz";
+      name = "kspaceduel-21.04.0.tar.xz";
     };
   };
   ksquares = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ksquares-20.12.3.tar.xz";
-      sha256 = "0qp2j4abjjvazcqv9zyclvb425587dcwrsnlfrv7ami64ndr7xkb";
-      name = "ksquares-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ksquares-21.04.0.tar.xz";
+      sha256 = "1y23c86qz1qcmjzfsrj974c4ccai4rrp7ajmwxi7wgzgzwypflir";
+      name = "ksquares-21.04.0.tar.xz";
     };
   };
   ksudoku = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ksudoku-20.12.3.tar.xz";
-      sha256 = "0ykippr4d9s7mkmnqpbb3wa2l9cbhrmhvqaargm0553iqnwh6w4r";
-      name = "ksudoku-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ksudoku-21.04.0.tar.xz";
+      sha256 = "0r6m6jpjpz759gq40bxh5n7lg89gn2kfmiik2i06d1slz9v54iv0";
+      name = "ksudoku-21.04.0.tar.xz";
     };
   };
   ksystemlog = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ksystemlog-20.12.3.tar.xz";
-      sha256 = "1szh1iqriynpsbcrilia46vpsj52ifk8q0paib79byf9wals4gqy";
-      name = "ksystemlog-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ksystemlog-21.04.0.tar.xz";
+      sha256 = "06az8kfsp468hr3xzcfbra81xbfv12w2jzhd4n2cirsi6k8vhx14";
+      name = "ksystemlog-21.04.0.tar.xz";
     };
   };
   kteatime = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kteatime-20.12.3.tar.xz";
-      sha256 = "1y9cc8xjfn3pqmqh34lrnq2slj8y09k3njwkxkxzk20ni676j5ph";
-      name = "kteatime-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kteatime-21.04.0.tar.xz";
+      sha256 = "1zk7gbdsxyw59lfr0r2nnxm08jjls0zcp7wqkm4sq2gyczs73vy5";
+      name = "kteatime-21.04.0.tar.xz";
     };
   };
   ktimer = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktimer-20.12.3.tar.xz";
-      sha256 = "1yypwzrqkl09hbc8d24m51pjz8lzj80xi6f86xb0jazdl7d83flw";
-      name = "ktimer-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktimer-21.04.0.tar.xz";
+      sha256 = "0czwbd0id7a9w8wwpfsv2s06xc9my996bcdj0bn37091yik1wqzr";
+      name = "ktimer-21.04.0.tar.xz";
     };
   };
   ktnef = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktnef-20.12.3.tar.xz";
-      sha256 = "0wvqi09kz49m9lbxnk8070ikp4syhrxb90dgyiz1vax12baz7mvq";
-      name = "ktnef-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktnef-21.04.0.tar.xz";
+      sha256 = "0zs0bfb2g7rxcxc7ngjzszrcnj9qarpnig7b29xcrmnsxppa9z8y";
+      name = "ktnef-21.04.0.tar.xz";
     };
   };
   ktorrent = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktorrent-20.12.3.tar.xz";
-      sha256 = "12gj8bmbgvplc6r8ic104q18hq4dwiajhj0dwm1yjwmnslzdplr8";
-      name = "ktorrent-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktorrent-21.04.0.tar.xz";
+      sha256 = "0f28iyb2mrin2n5f6msxib9lh38qxid1sz5p5dq1g703gyqgr345";
+      name = "ktorrent-21.04.0.tar.xz";
     };
   };
   ktouch = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktouch-20.12.3.tar.xz";
-      sha256 = "1yv81mfavbvvlzc41ydfs1yjynza12n1cj8w36dgbgm6dwcldwfw";
-      name = "ktouch-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktouch-21.04.0.tar.xz";
+      sha256 = "0f46dsjcgqqg1f24sl3za624h5kpynqdi480hnc0fc6yaf3nm2mm";
+      name = "ktouch-21.04.0.tar.xz";
     };
   };
   ktp-accounts-kcm = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-accounts-kcm-20.12.3.tar.xz";
-      sha256 = "0jj6cspzmbn1fnkq5dfc7vzylbsq8vglcgwx4a2x8j5g7s8vm9y2";
-      name = "ktp-accounts-kcm-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-accounts-kcm-21.04.0.tar.xz";
+      sha256 = "1vvnk9nfq4z3m73yr59y65v0nvqwn4xjx6lrm754dnqr6vldv01p";
+      name = "ktp-accounts-kcm-21.04.0.tar.xz";
     };
   };
   ktp-approver = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-approver-20.12.3.tar.xz";
-      sha256 = "1brzpm50d4nqkva34h9va15xm4l7g0hvq1b610qnn9mvhikrzy43";
-      name = "ktp-approver-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-approver-21.04.0.tar.xz";
+      sha256 = "0j407a3bfmi4gn5v3gfazfidyp1kxn4vbs40xm5pkgxr4ykvzqj5";
+      name = "ktp-approver-21.04.0.tar.xz";
     };
   };
   ktp-auth-handler = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-auth-handler-20.12.3.tar.xz";
-      sha256 = "1i8jcxl828kany2668aid5vmhrla5rv6frb36xy7wdxv6y2q2gcc";
-      name = "ktp-auth-handler-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-auth-handler-21.04.0.tar.xz";
+      sha256 = "1lqjb3mawdvwrx7b2q2f3kr132shbgs9lvlzdn450pn9cn1c4z7i";
+      name = "ktp-auth-handler-21.04.0.tar.xz";
     };
   };
   ktp-call-ui = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-call-ui-20.12.3.tar.xz";
-      sha256 = "079jlq7zs3zb37bnb48q68rcfjg3b263qplgcpgs1f77k9g449ql";
-      name = "ktp-call-ui-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-call-ui-21.04.0.tar.xz";
+      sha256 = "1f2rzm5jfw12b6v2yfzjs152sq2ak3k7zk3nwipyiy86n0f25yqp";
+      name = "ktp-call-ui-21.04.0.tar.xz";
     };
   };
   ktp-common-internals = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-common-internals-20.12.3.tar.xz";
-      sha256 = "0c9hcyfsjhd2ydm5ldgxh9j5wbckavn4nj2n8l4zkyxk7knxf5w4";
-      name = "ktp-common-internals-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-common-internals-21.04.0.tar.xz";
+      sha256 = "0j3fnvyln6w7m3z416blpvrk1bpcbd5403h6pyjyq3dsvswzd21x";
+      name = "ktp-common-internals-21.04.0.tar.xz";
     };
   };
   ktp-contact-list = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-contact-list-20.12.3.tar.xz";
-      sha256 = "03gqm2pjf2i6f0gvifd7bqclkfjbpabnlavadxf71qlnf7fki3rf";
-      name = "ktp-contact-list-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-contact-list-21.04.0.tar.xz";
+      sha256 = "1bym3sf3szmgi3nbczlilcazkjd1jfy7v0p0c3844c33fid6ln4q";
+      name = "ktp-contact-list-21.04.0.tar.xz";
     };
   };
   ktp-contact-runner = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-contact-runner-20.12.3.tar.xz";
-      sha256 = "047bzbb02y17yq973bzxf1h1c41f25njrsxc5qa7igvwwcid7hbc";
-      name = "ktp-contact-runner-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-contact-runner-21.04.0.tar.xz";
+      sha256 = "1afcsc8bfvyqy9y32a73x01xar50g48q9jbvnsggmjb20qbgk6fz";
+      name = "ktp-contact-runner-21.04.0.tar.xz";
     };
   };
   ktp-desktop-applets = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-desktop-applets-20.12.3.tar.xz";
-      sha256 = "1m4nizagb7i45ys8k60kw1m5jfflxy1iy3qp1i17d0fy4xk81i6h";
-      name = "ktp-desktop-applets-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-desktop-applets-21.04.0.tar.xz";
+      sha256 = "1achgl8prdl33hw73nfjcm0djxzf9xy76n365kqzfz757fvy025w";
+      name = "ktp-desktop-applets-21.04.0.tar.xz";
     };
   };
   ktp-filetransfer-handler = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-filetransfer-handler-20.12.3.tar.xz";
-      sha256 = "0wq9n5q8xgv70ikxavmmq7jnj24w9m3k7xaxl8qs7aas14jlcg29";
-      name = "ktp-filetransfer-handler-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-filetransfer-handler-21.04.0.tar.xz";
+      sha256 = "0mhvx3x4mf9b1mmn901995107ixz9qd80ydx468k30w13k8hwjpg";
+      name = "ktp-filetransfer-handler-21.04.0.tar.xz";
     };
   };
   ktp-kded-module = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-kded-module-20.12.3.tar.xz";
-      sha256 = "0j28hdikn5713ngl3hf1gjr7syzba92irffhfrj6ia582gm7j2nz";
-      name = "ktp-kded-module-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-kded-module-21.04.0.tar.xz";
+      sha256 = "1d3rpbqks6x6bv12mzpd6g5x2h35hf4xfx871i23pq7p2n4nna8f";
+      name = "ktp-kded-module-21.04.0.tar.xz";
     };
   };
   ktp-send-file = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-send-file-20.12.3.tar.xz";
-      sha256 = "0lmyxvq49ibbvgg69cy1iayfgd4g777xbqdgzx0jgvvmd6ryrrqq";
-      name = "ktp-send-file-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-send-file-21.04.0.tar.xz";
+      sha256 = "1lyshgan77cia7cnirjfyg0hw0wgazjw9z21ig0czs3hr6qqf277";
+      name = "ktp-send-file-21.04.0.tar.xz";
     };
   };
   ktp-text-ui = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktp-text-ui-20.12.3.tar.xz";
-      sha256 = "0gqgqjv0wamzcfzicvgc8n3jl4xizpzdjsq92bsbg1yk51ihn6iq";
-      name = "ktp-text-ui-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktp-text-ui-21.04.0.tar.xz";
+      sha256 = "04k2m4f873hz783szmkgpc0y6mjpwld5z3xcbdqippfzcdn4hg0v";
+      name = "ktp-text-ui-21.04.0.tar.xz";
     };
   };
   ktuberling = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/ktuberling-20.12.3.tar.xz";
-      sha256 = "0d4z9kk0vdljaf6damyjxnplmg6s1g6caw1ffd1dnyxhkszlka86";
-      name = "ktuberling-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/ktuberling-21.04.0.tar.xz";
+      sha256 = "14yg3pghm4l3qgpi1i5zicjyak62w2ci4b36914kn5b3yfxh132i";
+      name = "ktuberling-21.04.0.tar.xz";
     };
   };
   kturtle = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kturtle-20.12.3.tar.xz";
-      sha256 = "17mqi9kb57bva2rzqnmkiilr114zqqlh5f6sn9c13x7s8npdpgp6";
-      name = "kturtle-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kturtle-21.04.0.tar.xz";
+      sha256 = "1l8drllf7a1d3zra23ysyli8jl6xgl3xciqfkhc1fxhdkncx24cd";
+      name = "kturtle-21.04.0.tar.xz";
     };
   };
   kubrick = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kubrick-20.12.3.tar.xz";
-      sha256 = "0a581gajl9k3864q3y99kcxqfh8adbwpyrc1rakgzwbwd342wgrj";
-      name = "kubrick-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kubrick-21.04.0.tar.xz";
+      sha256 = "0m8ps0yxqijshgx09cypzd3l1n0zlrqcrkjcd725zwxarpm0z0hk";
+      name = "kubrick-21.04.0.tar.xz";
     };
   };
   kwalletmanager = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kwalletmanager-20.12.3.tar.xz";
-      sha256 = "16lx0nblxlzmlydblysrbf92dxf0biqxrzwvy7nhsnkk2yh18m4r";
-      name = "kwalletmanager-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kwalletmanager-21.04.0.tar.xz";
+      sha256 = "1rh7xdwn0kdw8j936asxy8llar144144xgvp7sjlpi5y93ayf8vk";
+      name = "kwalletmanager-21.04.0.tar.xz";
     };
   };
   kwave = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kwave-20.12.3.tar.xz";
-      sha256 = "1bd193wszlzra1xg6ahijmswmpkm8ra05pzbk6zvc67j71kzdmzs";
-      name = "kwave-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kwave-21.04.0.tar.xz";
+      sha256 = "1wy6sxmf9pk2677xdsbpgy01p284rzqwiyzm1hr971xbra5h4k6i";
+      name = "kwave-21.04.0.tar.xz";
     };
   };
   kwordquiz = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/kwordquiz-20.12.3.tar.xz";
-      sha256 = "0vqkj7zmp8v0iydll8gn7ybwha19sxpqd608wj6c7clwcr0y39yp";
-      name = "kwordquiz-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/kwordquiz-21.04.0.tar.xz";
+      sha256 = "0wnihn75yvhz2j310vr806vkbfywhr26wny07fpbzcishyjb89vi";
+      name = "kwordquiz-21.04.0.tar.xz";
     };
   };
   libgravatar = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libgravatar-20.12.3.tar.xz";
-      sha256 = "130wk6v40rz0rsc1z8yyl5zf4s6rbhlwgqdjijp1k6xnsp7xm8n4";
-      name = "libgravatar-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libgravatar-21.04.0.tar.xz";
+      sha256 = "0li6p9df000bmkqgmwiix7ab4sah05r1n4gm109jjglh0a41bfvr";
+      name = "libgravatar-21.04.0.tar.xz";
     };
   };
   libkcddb = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkcddb-20.12.3.tar.xz";
-      sha256 = "0m7fj11lp6i7fal0ckbpshyp5rw1pn3vxirnrg8ydp8ggs22jqi0";
-      name = "libkcddb-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkcddb-21.04.0.tar.xz";
+      sha256 = "1fzbhn0rnlmxdglfb48f4f3ddagkgny2665mgv8gdbcq3vg62zwr";
+      name = "libkcddb-21.04.0.tar.xz";
     };
   };
   libkcompactdisc = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkcompactdisc-20.12.3.tar.xz";
-      sha256 = "192la7rlknjwlqw69yyqxcg2yar7p8fklykah5i3l5r6rcvx2h1w";
-      name = "libkcompactdisc-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkcompactdisc-21.04.0.tar.xz";
+      sha256 = "1skaic0vfspdkv0q574ia4jszq1a5smf4s9ls4flfk5qxmkv6862";
+      name = "libkcompactdisc-21.04.0.tar.xz";
     };
   };
   libkdcraw = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkdcraw-20.12.3.tar.xz";
-      sha256 = "1vwdr04z31aq37mx83vbgimkrpxq67dmlb68sl1wyivmllp084jg";
-      name = "libkdcraw-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkdcraw-21.04.0.tar.xz";
+      sha256 = "1ir6m61yb8f0ic39jxxnzjd9jjkb0ksln3fkls5v0af6g546bgab";
+      name = "libkdcraw-21.04.0.tar.xz";
     };
   };
   libkdegames = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkdegames-20.12.3.tar.xz";
-      sha256 = "1l8nwbjkgsnqxqjc94wqq6phyxdj9n8y075bzv45xagf82b926s0";
-      name = "libkdegames-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkdegames-21.04.0.tar.xz";
+      sha256 = "1q0m4kq32gsllxz8vx0qj9qii5y2lbd6wclwlykhayx1fcncwrj7";
+      name = "libkdegames-21.04.0.tar.xz";
     };
   };
   libkdepim = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkdepim-20.12.3.tar.xz";
-      sha256 = "1armxkai841ki9hgfwb4q53c8rlp55zgz1416dhrr97jrn03ckfa";
-      name = "libkdepim-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkdepim-21.04.0.tar.xz";
+      sha256 = "1ai5l9qcjnpwndvv744sx85b0yyg4wz01r0v9b0b62zwx8i35clb";
+      name = "libkdepim-21.04.0.tar.xz";
     };
   };
   libkeduvocdocument = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkeduvocdocument-20.12.3.tar.xz";
-      sha256 = "1x5w40avw73kjryiss71x10635l012jv5criaqlwyn3jfaf2idg0";
-      name = "libkeduvocdocument-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkeduvocdocument-21.04.0.tar.xz";
+      sha256 = "0264i01w44fjdh14psmw8ynmb8vzkw94lqqff1ia8bw5n0ihr914";
+      name = "libkeduvocdocument-21.04.0.tar.xz";
     };
   };
   libkexiv2 = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkexiv2-20.12.3.tar.xz";
-      sha256 = "1r11j2j0ymxg4dbhrznyr34cwdqcgh124lk9fmhdpjgq2q276qmp";
-      name = "libkexiv2-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkexiv2-21.04.0.tar.xz";
+      sha256 = "0grhibpq47yba9mjdhr1p0sbw62vxsrwfydi5ybpa8fjgvbbbprr";
+      name = "libkexiv2-21.04.0.tar.xz";
     };
   };
   libkgapi = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkgapi-20.12.3.tar.xz";
-      sha256 = "0h9rcn03jgw3rxxm3ylh1ap7ryswzm78hpfi6x9gdsfiqc8q8rpx";
-      name = "libkgapi-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkgapi-21.04.0.tar.xz";
+      sha256 = "1x811g0mbgjz8spngdsqdxfhkyic9kqxkhx9nq592zihaqkl3ifz";
+      name = "libkgapi-21.04.0.tar.xz";
     };
   };
   libkipi = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkipi-20.12.3.tar.xz";
-      sha256 = "1a0lpp3qkirsv8r6hpmndkn2f895jad5x7xlnxyf2x1s9qhzyvxv";
-      name = "libkipi-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkipi-21.04.0.tar.xz";
+      sha256 = "0gk8bfhq1z9f82mnjm2xjabgxn0qjrabw53bb67lwvrrgaliliqb";
+      name = "libkipi-21.04.0.tar.xz";
     };
   };
   libkleo = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkleo-20.12.3.tar.xz";
-      sha256 = "034m92af08g5769kr9xs91mgkl3ribcafsmm96isjbngj9acqjcr";
-      name = "libkleo-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkleo-21.04.0.tar.xz";
+      sha256 = "073ghnw1s09fvai22ag37n20mmhkbl4gp4y58nbgw43gfy5gsv6z";
+      name = "libkleo-21.04.0.tar.xz";
     };
   };
   libkmahjongg = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkmahjongg-20.12.3.tar.xz";
-      sha256 = "16wb744gbi4rgz9k9zr4dm7ilhjhjyaszawjmm626p4k145rcg4v";
-      name = "libkmahjongg-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkmahjongg-21.04.0.tar.xz";
+      sha256 = "1n2jswdvpvc9jcqsvqf0nniaf893432v123my2q6msk2zvss6pcb";
+      name = "libkmahjongg-21.04.0.tar.xz";
     };
   };
   libkomparediff2 = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libkomparediff2-20.12.3.tar.xz";
-      sha256 = "0py3k5mn9kf82qcy89r1lkrhn702dgrjbgcd9ddslqfpiw8cb1l3";
-      name = "libkomparediff2-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libkomparediff2-21.04.0.tar.xz";
+      sha256 = "13kpaasyhrhhrgk8a5qg9qv65wdv6qvnz2gjbjv8qgp4k4jmwv7h";
+      name = "libkomparediff2-21.04.0.tar.xz";
     };
   };
   libksane = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libksane-20.12.3.tar.xz";
-      sha256 = "02sbizfw2a819l5f7di3k7x7cc4n19pipv68dfhsrh1hk6c5iia6";
-      name = "libksane-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libksane-21.04.0.tar.xz";
+      sha256 = "17a5i21h99qvv8sig7xh5n149ji8fqch5m0w6fqirrwf0iz66363";
+      name = "libksane-21.04.0.tar.xz";
     };
   };
   libksieve = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libksieve-20.12.3.tar.xz";
-      sha256 = "0j149jszdslnyia09fn6xsbkxa2p0xmxz05pf3byxl9albxq17q0";
-      name = "libksieve-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libksieve-21.04.0.tar.xz";
+      sha256 = "04zyiqmkr78rnilv5zmmbr09k1nycgpc3qw3a9qy4xzh5amkl8wl";
+      name = "libksieve-21.04.0.tar.xz";
     };
   };
   libktorrent = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/libktorrent-20.12.3.tar.xz";
-      sha256 = "1ykyfvr7w3h058gls7pnh9qwc6b4v9lp85s10qdbbsaiyly0h7n3";
-      name = "libktorrent-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/libktorrent-21.04.0.tar.xz";
+      sha256 = "0c8hbsk2vjkmdvnws4kaa9bylzyzmx12fxm354qm65n4j6pdd59v";
+      name = "libktorrent-21.04.0.tar.xz";
     };
   };
   lokalize = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/lokalize-20.12.3.tar.xz";
-      sha256 = "1a1dzg6qwd3dxcvln7nkpc5r6v6agqnzja6s09w9jb0gflrql372";
-      name = "lokalize-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/lokalize-21.04.0.tar.xz";
+      sha256 = "1wb95y89qi4z7hsldyq75w69rgdca3m0ji85khfvsb4h3cgilana";
+      name = "lokalize-21.04.0.tar.xz";
     };
   };
   lskat = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/lskat-20.12.3.tar.xz";
-      sha256 = "1fmyskr5i08gfjaghih2gihj6sgm8v5mn0m4wjmr9plg1vi6flcv";
-      name = "lskat-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/lskat-21.04.0.tar.xz";
+      sha256 = "1acxbsldcjk3d84ip5z15y8x6nngj2vnb40s5p3mv47r6vgbh0qd";
+      name = "lskat-21.04.0.tar.xz";
     };
   };
   mailcommon = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/mailcommon-20.12.3.tar.xz";
-      sha256 = "0z0ppv6yi5n54hi6x5s5nagciqpdbxyl0z5sa3whl7d6ikga0s4m";
-      name = "mailcommon-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/mailcommon-21.04.0.tar.xz";
+      sha256 = "1ljchkfrnknlzgjrrpwszzyv8m066d29xwns1yp8smqzk723g0gx";
+      name = "mailcommon-21.04.0.tar.xz";
     };
   };
   mailimporter = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/mailimporter-20.12.3.tar.xz";
-      sha256 = "1lkkvriq69v0lpmk38my8k0vnw2yq182g6139i5r7krcyvrz4ynn";
-      name = "mailimporter-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/mailimporter-21.04.0.tar.xz";
+      sha256 = "06zvaq3ccrgsd6idnd9m201924bnm72nvcg66v1salcdk93a8sv5";
+      name = "mailimporter-21.04.0.tar.xz";
     };
   };
   marble = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/marble-20.12.3.tar.xz";
-      sha256 = "1hkvp97mjg6gqs0b39j2rpgwwi70vzwhm4szmcjc2083vllv3cap";
-      name = "marble-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/marble-21.04.0.tar.xz";
+      sha256 = "1c63x75fzhkqgvijd1pmpywq4dx7gkyw9x90aj54fzkgjzwzqzhq";
+      name = "marble-21.04.0.tar.xz";
     };
   };
   markdownpart = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/markdownpart-20.12.3.tar.xz";
-      sha256 = "1g3r07fj4azpjbp6p6brcnd5dv7hi34w6z6a8bsg8cckmvhrirbl";
-      name = "markdownpart-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/markdownpart-21.04.0.tar.xz";
+      sha256 = "0xgnj2g0hqwflw550fj6jzq36pc8j9vwb6p9cbvfljd8yv8va9kq";
+      name = "markdownpart-21.04.0.tar.xz";
     };
   };
   mbox-importer = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/mbox-importer-20.12.3.tar.xz";
-      sha256 = "0rjk9blsbgjpd6l6ghrlzj04llaibjs8ngcfddxgixg8dxvsp0k9";
-      name = "mbox-importer-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/mbox-importer-21.04.0.tar.xz";
+      sha256 = "0rxrf1sxb5pzrkr8m2n1f3xgpwsihn6b6d5nilxmmsl5c60ya8j8";
+      name = "mbox-importer-21.04.0.tar.xz";
     };
   };
   messagelib = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/messagelib-20.12.3.tar.xz";
-      sha256 = "08rcw7y69xkrv0pwfz44hrbzkx9li2nabfjpgc9sc6i8klikgbis";
-      name = "messagelib-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/messagelib-21.04.0.tar.xz";
+      sha256 = "1qsvqrkh30vyfrsxkpriqkzizxg9mx6v2xx7j6gyhz7pmrskx8rg";
+      name = "messagelib-21.04.0.tar.xz";
     };
   };
   minuet = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/minuet-20.12.3.tar.xz";
-      sha256 = "0jidbfqsnk3dyd5f459p2jsyxs2jjpx3j356sg6c3hbs4imz5nm6";
-      name = "minuet-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/minuet-21.04.0.tar.xz";
+      sha256 = "0djqp807g47fy163bp0pkrhb7j37ijqdfyafz74871j2frrmnc97";
+      name = "minuet-21.04.0.tar.xz";
     };
   };
   okular = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/okular-20.12.3.tar.xz";
-      sha256 = "1p3kdc0awgpihf10m3fxypq5hqr5vvwbcm8w3h39rk1m5g6hymxf";
-      name = "okular-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/okular-21.04.0.tar.xz";
+      sha256 = "0l0vrglxy9331sqn3lx76hvbh7b0znsafl5ia61srk48kb0w9rqy";
+      name = "okular-21.04.0.tar.xz";
     };
   };
   palapeli = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/palapeli-20.12.3.tar.xz";
-      sha256 = "14hqifg18ngqsafp1k78wi2k7jpxglvcjdw55f0fi0iqjnsrk6xa";
-      name = "palapeli-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/palapeli-21.04.0.tar.xz";
+      sha256 = "0f7ylr46alafp2gz9sf7xgnjm9vgyx5r7nipbqjl4wi8w908rklw";
+      name = "palapeli-21.04.0.tar.xz";
     };
   };
   parley = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/parley-20.12.3.tar.xz";
-      sha256 = "0j4bbqlh0rix0wkfwp0jsf07akbysxnasbr1f2zwj75487mcwajn";
-      name = "parley-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/parley-21.04.0.tar.xz";
+      sha256 = "0a186zqpi815apf2grlj11xp64kw80i43779z99r665jpp6189z3";
+      name = "parley-21.04.0.tar.xz";
     };
   };
   partitionmanager = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/partitionmanager-20.12.3.tar.xz";
-      sha256 = "06kk64gynlxf7njdgaklrx8b4jlbqpk6bbx0nk4lzbyw191dfr0m";
-      name = "partitionmanager-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/partitionmanager-21.04.0.tar.xz";
+      sha256 = "02dgbqx1a6wahds04jcjdjh56pyrm47165hwv98ccarakrvn8yqm";
+      name = "partitionmanager-21.04.0.tar.xz";
     };
   };
   picmi = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/picmi-20.12.3.tar.xz";
-      sha256 = "1xwkdrs6wmhhz6vrs17d7vj6sdlwl60mh8cb7yxx03pw5g6gkdd2";
-      name = "picmi-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/picmi-21.04.0.tar.xz";
+      sha256 = "1pwswzc02blvf49v4i2grw9mlm9y1ydmms6mg50iyi6qrnzbv6r3";
+      name = "picmi-21.04.0.tar.xz";
     };
   };
   pimcommon = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/pimcommon-20.12.3.tar.xz";
-      sha256 = "18gy521g0i806bjjdkszgajac733inrakhkdw1fslhcg2b90m6hb";
-      name = "pimcommon-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/pimcommon-21.04.0.tar.xz";
+      sha256 = "0bprmk20pmngvxxxpygajnlr4yx9acrz7dw6bfnn6d8kig281qdn";
+      name = "pimcommon-21.04.0.tar.xz";
     };
   };
   pim-data-exporter = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/pim-data-exporter-20.12.3.tar.xz";
-      sha256 = "17zc56420ndqfk8aw1mn1vwf34icgf03bbvvvg4s3m6cibnj0x4q";
-      name = "pim-data-exporter-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/pim-data-exporter-21.04.0.tar.xz";
+      sha256 = "0rbkr1vgl14q4hi4byn20kfhkz3yzmrydhb3f1i2amp08ca4x71n";
+      name = "pim-data-exporter-21.04.0.tar.xz";
     };
   };
   pim-sieve-editor = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/pim-sieve-editor-20.12.3.tar.xz";
-      sha256 = "1d1z4i3g5n6rfs48phb700a68na75yg7cr4f3q2wzlnyyvpd1m51";
-      name = "pim-sieve-editor-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/pim-sieve-editor-21.04.0.tar.xz";
+      sha256 = "1yxc4i0bsgrj9wsn44k7w3z1zkcm4y9qd8zd7shsqpca9lb9n13y";
+      name = "pim-sieve-editor-21.04.0.tar.xz";
     };
   };
   poxml = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/poxml-20.12.3.tar.xz";
-      sha256 = "1z7py6qjrx0j0mya5cmxc0gm1fmjwbkrm0g8916vdlyc4m5vpg9l";
-      name = "poxml-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/poxml-21.04.0.tar.xz";
+      sha256 = "0yhygizd0i6az1pd34lh4ij2x8867svbh2bic9lgcpmqbza9054g";
+      name = "poxml-21.04.0.tar.xz";
     };
   };
   print-manager = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/print-manager-20.12.3.tar.xz";
-      sha256 = "19kwrl95p56zm5g11sws8h4vdc59w694ghhnmrwpyj2qra350dwa";
-      name = "print-manager-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/print-manager-21.04.0.tar.xz";
+      sha256 = "1k5pqh264jy698jdzsk7d6bhadnwvgx1g3rpji06pb0igr1zn820";
+      name = "print-manager-21.04.0.tar.xz";
     };
   };
   rocs = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/rocs-20.12.3.tar.xz";
-      sha256 = "0709qyixnhsrdhkqqkwigmbfnr21rz2yapvmfylmaipdfm0i72wv";
-      name = "rocs-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/rocs-21.04.0.tar.xz";
+      sha256 = "11yzgrmb15zv24pfr3096g9zgsvgdlw43vnbjgbr7s8xvnprlh5l";
+      name = "rocs-21.04.0.tar.xz";
     };
   };
   signon-kwallet-extension = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/signon-kwallet-extension-20.12.3.tar.xz";
-      sha256 = "1a7hvkga6sj3sr4qv75n7p9gq44agncs0c7c9k6wni84h3y0icyp";
-      name = "signon-kwallet-extension-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/signon-kwallet-extension-21.04.0.tar.xz";
+      sha256 = "05jaa74j6rd89cj8szfgw5izjlkakbjmz7qiwlswyjd4lafjz65n";
+      name = "signon-kwallet-extension-21.04.0.tar.xz";
     };
   };
   spectacle = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/spectacle-20.12.3.tar.xz";
-      sha256 = "1h29w4ajmgfksdmxanfmb1gdjk4h7hpc2zwiqf0yrq8vm2hhxqjc";
-      name = "spectacle-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/spectacle-21.04.0.tar.xz";
+      sha256 = "0cqf9p7mc5wyl5qy6866m7xhndwmgd3hmw7amkpzngmmz4h9i2p0";
+      name = "spectacle-21.04.0.tar.xz";
     };
   };
   step = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/step-20.12.3.tar.xz";
-      sha256 = "08z2zh8qq46288pddz9p5w10plpd26wgwil92maj6z765dqcxwqn";
-      name = "step-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/step-21.04.0.tar.xz";
+      sha256 = "169ka33nkzrxdk874180v6yzmrngl98gzyql4p5ssmmdh0vrkg25";
+      name = "step-21.04.0.tar.xz";
     };
   };
   svgpart = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/svgpart-20.12.3.tar.xz";
-      sha256 = "1ldkyd7kb8m6zw7siw2rryxzk6v26xc00arwlq1zsy4inbs8idgl";
-      name = "svgpart-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/svgpart-21.04.0.tar.xz";
+      sha256 = "0chfyxl94kp5pif6lzhlm7q8rg9l4lg74x4y04wslrfqcn1gghdj";
+      name = "svgpart-21.04.0.tar.xz";
     };
   };
   sweeper = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/sweeper-20.12.3.tar.xz";
-      sha256 = "12lp9m4sxblwp16dbb6gi1pf0yvav8gh5as1fpfx9kazava3xkhp";
-      name = "sweeper-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/sweeper-21.04.0.tar.xz";
+      sha256 = "1iysxrfdp8bv0vgssv062yllsq4w3jf9vdi66jm9ka8i9w8wqpsv";
+      name = "sweeper-21.04.0.tar.xz";
     };
   };
   umbrello = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/umbrello-20.12.3.tar.xz";
-      sha256 = "0y6kyir86k9cjpmhm4giqfn7g651hfsbl1zq2j2y2nqiisc7vysp";
-      name = "umbrello-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/umbrello-21.04.0.tar.xz";
+      sha256 = "17xwsjc1ph2glscv41x4f5bagw1q5ackqpy1wcg8m9jrg9ipqpqx";
+      name = "umbrello-21.04.0.tar.xz";
     };
   };
   yakuake = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/yakuake-20.12.3.tar.xz";
-      sha256 = "1y151cp5ygkxfd9ar4c38h2c1xwpx8mihh5f2sz6gbykzm3impbx";
-      name = "yakuake-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/yakuake-21.04.0.tar.xz";
+      sha256 = "1jkwcc4pdb06v4q7bnqppdkjf8n8qpfp9mk02l77brnxxf8i9r3b";
+      name = "yakuake-21.04.0.tar.xz";
     };
   };
   zeroconf-ioslave = {
-    version = "20.12.3";
+    version = "21.04.0";
     src = fetchurl {
-      url = "${mirror}/stable/release-service/20.12.3/src/zeroconf-ioslave-20.12.3.tar.xz";
-      sha256 = "1zx7xmj7vj9d39cnnsgb15lbkr8yc81mcqilhq3jfhd3zgp8lrlv";
-      name = "zeroconf-ioslave-20.12.3.tar.xz";
+      url = "${mirror}/stable/release-service/21.04.0/src/zeroconf-ioslave-21.04.0.tar.xz";
+      sha256 = "03cmz3y8f48y26aybyygwssqicp0kz4ry9xm30rvvc5hiv0n6hj7";
+      name = "zeroconf-ioslave-21.04.0.tar.xz";
     };
   };
 }
diff --git a/pkgs/applications/misc/break-time/default.nix b/pkgs/applications/misc/break-time/default.nix
index 3458ac3f250..8d9a872a102 100644
--- a/pkgs/applications/misc/break-time/default.nix
+++ b/pkgs/applications/misc/break-time/default.nix
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "18p9gfp0inbnjsc7af38fghyklr7qnl2kkr25isfy9d5m8cpxqc6";
   };
 
-  cargoSha256 = "0brmgrxhspcpcarm4lvnl95dw2n96r20w736giv18xcg7d5jmgca";
+  cargoSha256 = "01y1p40vz30h2jkh37zipqvmfybgpq6wdcdglkab85jivmd1lslx";
 
   nativeBuildInputs = [
     pkg-config
diff --git a/pkgs/applications/misc/clipcat/default.nix b/pkgs/applications/misc/clipcat/default.nix
index 95f50998f3f..b28b33d56c9 100644
--- a/pkgs/applications/misc/clipcat/default.nix
+++ b/pkgs/applications/misc/clipcat/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0rxl3ksjinw07q3p2vjqg80k3c6wx2q7pzpf2344zyfb4gkqzx1c";
   };
 
-  cargoSha256 = "1ffgvhkdj8wkhlgi0cj0njdm9ycxq2qda4b5qn8bmaygzr2zkwpd";
+  cargoSha256 = "1n4il3l59m2a6ca54vfaivzg25abf8s4w5kpd5q51p13624iz0kb";
 
   LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
 
diff --git a/pkgs/applications/misc/effitask/default.nix b/pkgs/applications/misc/effitask/default.nix
index b80ec80746f..a01d55ae20e 100644
--- a/pkgs/applications/misc/effitask/default.nix
+++ b/pkgs/applications/misc/effitask/default.nix
@@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
   # workaround for missing Cargo.lock file https://github.com/sanpii/effitask/issues/48
   cargoPatches = [ ./cargo-lock.patch ];
 
-  cargoSha256 = "0dvmp23kny6rlv6c0mfyy3cmz1bi5wcm1mxps4z67lym5kxfd362";
+  cargoSha256 = "1a80kf95kr94l6jzxdj4i09x1342x358fqjy6119qjg3q3bj0y3p";
 
   buildInputs = [ openssl gtk3 ];
 
diff --git a/pkgs/applications/misc/elfx86exts/default.nix b/pkgs/applications/misc/elfx86exts/default.nix
index 690b88d8417..91598db76d0 100644
--- a/pkgs/applications/misc/elfx86exts/default.nix
+++ b/pkgs/applications/misc/elfx86exts/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1j9ca2lyxjsrf0rsfv83xi53vj6jz5nb76xibh367brcsc26mvd6";
   };
 
-  cargoSha256 = "1dfhx40jr5llqa554wifd920mqdbm8s5fns98m6vcqdjxzan4nr2";
+  cargoSha256 = "0n3b9vdk5n32jmd7ks50d55z4dfahjincd2s1d8m9z17ip2qw2c4";
 
   meta = with lib; {
     description = "Decode x86 binaries and print out which instruction set extensions they use.";
diff --git a/pkgs/applications/misc/fitnesstrax/default.nix b/pkgs/applications/misc/fitnesstrax/default.nix
index e90e364aaee..ea1dd18d18c 100644
--- a/pkgs/applications/misc/fitnesstrax/default.nix
+++ b/pkgs/applications/misc/fitnesstrax/default.nix
@@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec {
     gtk3
   ];
 
-  cargoSha256 = "1xgyyxd2kz21xan0pk7rbxiym90s7m2qrzg2ddilcszva60bxdd9";
+  cargoSha256 = "0dlnlb3hqyh98y916wvdb4rd20az73brs8hqna2lgr7kv1pd77j7";
 
   postInstall = ''
     mkdir -p $out/share/glib-2.0/schemas
diff --git a/pkgs/applications/misc/flavours/default.nix b/pkgs/applications/misc/flavours/default.nix
index 5274e606dda..fcedf65af71 100644
--- a/pkgs/applications/misc/flavours/default.nix
+++ b/pkgs/applications/misc/flavours/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
   buildInputs = [ ]
     ++ lib.optionals stdenv.isDarwin [ libiconv ];
 
-  cargoSha256 = "sha256-cAXiAPhHdxdd8pFQ0Gq7eHO2p/Dam53gDbE583UYY/k=";
+  cargoSha256 = "sha256-I8ZH35L2CVLy6ypmdOPd8VEG/sQeGaHyT1HWNdwyZVo=";
 
   meta = with lib; {
     description = "An easy to use base16 scheme manager/builder that integrates with any workflow";
diff --git a/pkgs/applications/misc/imag/default.nix b/pkgs/applications/misc/imag/default.nix
index 5c1e87612e1..b637cd077d7 100644
--- a/pkgs/applications/misc/imag/default.nix
+++ b/pkgs/applications/misc/imag/default.nix
@@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec {
 
   LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
 
-  cargoSha256 = "0n8cw70qh8g4hfwfaxwwxbrrx5hm2z037z8kdhvdpqkxljl9189x";
+  cargoSha256 = "1vnrc72g2271i2p847z30kplxmdpi60n3dzpw0s7dahg33g14ai6";
 
   checkPhase = ''
     export HOME=$TMPDIR
diff --git a/pkgs/applications/misc/kondo/default.nix b/pkgs/applications/misc/kondo/default.nix
index dcbeb408759..64cae5b64e5 100644
--- a/pkgs/applications/misc/kondo/default.nix
+++ b/pkgs/applications/misc/kondo/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0kl2zn6ir3w75ny25ksgxl93vlyb13gzx2795zyimqqnsrdpbbrf";
   };
 
-  cargoSha256 = "1ax81a2828z3yla1psg5xi8ild65m6zcsvx48ncz902mpzqlj92b";
+  cargoSha256 = "0sddsm0jys1bsj2bsr39lcyx8k2hzw17nlsv6aql0v82x8qbsiv4";
 
   meta = with lib; {
     description = "Save disk space by cleaning unneeded files from software projects";
diff --git a/pkgs/applications/misc/lscolors/default.nix b/pkgs/applications/misc/lscolors/default.nix
index 76e4792ab1c..85ed493da5a 100644
--- a/pkgs/applications/misc/lscolors/default.nix
+++ b/pkgs/applications/misc/lscolors/default.nix
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
     ./cargo.lock.patch
   ];
 
-  cargoSha256 = "02k23idwy0sb4lnjrwnyah3qp22zj161ilbc13p75k0hdijfaxl5";
+  cargoSha256 = "0kfm1pq22dhiw138bf7jvf7amlkal90n1hc9fq44wr4chr9b2fmx";
 
   meta = with lib; {
     description = "Rust library and tool to colorize paths using LS_COLORS";
diff --git a/pkgs/applications/misc/pastel/default.nix b/pkgs/applications/misc/pastel/default.nix
index 39a4c6a6a03..e842046dd0b 100644
--- a/pkgs/applications/misc/pastel/default.nix
+++ b/pkgs/applications/misc/pastel/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "00xxrssa3gbr5w2jsqlf632jlzc0lc2rpybnbv618ndy5lxidnw0";
   };
 
-  cargoSha256 = "1ji64h0f8f2sq12cx33kymypzar9swhaj903gclf3jdwgna77326";
+  cargoSha256 = "0kkhj58q1lgsyj7hpy3sxg1jva9q51m0i7j60zfzhnjnirwcd0h8";
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/applications/misc/pipr/default.nix b/pkgs/applications/misc/pipr/default.nix
index 6ca315b1092..96627f5cccb 100644
--- a/pkgs/applications/misc/pipr/default.nix
+++ b/pkgs/applications/misc/pipr/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1pbj198nqi27kavz9bm31a3h7h70by6l00046x09yf9n8qjpp01w";
   };
 
-  cargoSha256 = "1dcrafpf252dpjvimaibb93082nymb26wwbvr34zd6j7z285vach";
+  cargoSha256 = "05ryaxi479fxzdcl51r1xlqbiasfzxcxgvl4wnxync8qi8q2yqk0";
 
   nativeBuildInputs = [ makeWrapper ];
   postFixup = ''
diff --git a/pkgs/applications/misc/pueue/default.nix b/pkgs/applications/misc/pueue/default.nix
index cc1ae14350e..8cf8d8286ae 100644
--- a/pkgs/applications/misc/pueue/default.nix
+++ b/pkgs/applications/misc/pueue/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-wcOF34GzlB6YKISkjDgYgsaN1NmWBMIntfT23A6byx8=";
   };
 
-  cargoSha256 = "sha256-7SJjtHNSabE/VqdiSwKZ/yNzk6GSMNsQLaSx/MjN5NA=";
+  cargoSha256 = "sha256-aW1VliL7QQm9gMeM6N+SroHlgqI3F7MX0EzcuEzcJnQ=";
 
   nativeBuildInputs = [ installShellFiles ];
 
diff --git a/pkgs/applications/misc/reddsaver/default.nix b/pkgs/applications/misc/reddsaver/default.nix
index 279d3e4b15d..47412c78f4e 100644
--- a/pkgs/applications/misc/reddsaver/default.nix
+++ b/pkgs/applications/misc/reddsaver/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0ffci3as50f55n1v36hji4n0b3lkch5ylc75awjz65jz2gd2y2j4";
   };
 
-  cargoSha256 = "1cx3sqr7zb1vlfdvbcxp0yva9xh654qczpy8s09c8cviy8hac5sr";
+  cargoSha256 = "1xf26ldgfinzpakcp65w52fdl3arsm053vfnq7gk2fwnq55cjwl0";
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ openssl ]
diff --git a/pkgs/applications/misc/rsclock/default.nix b/pkgs/applications/misc/rsclock/default.nix
index bc36b2f379e..97a5445638e 100644
--- a/pkgs/applications/misc/rsclock/default.nix
+++ b/pkgs/applications/misc/rsclock/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1i93qkz6d8sbk78i4rvx099hnn4lklp4cjvanpm9ssv8na4rqvh2";
   };
 
-  cargoSha256 = "01dhkis6zswq1y40n7sdq9xv1sp61f2v7nfqbkicyjngmdrmcgrl";
+  cargoSha256 = "1vgizkdzi9mnan4rcswyv450y6a4b9l74d0siv1ix0nnlznnqyg1";
 
   meta = with lib; {
     description = "A simple terminal clock written in Rust";
diff --git a/pkgs/applications/misc/surface-control/default.nix b/pkgs/applications/misc/surface-control/default.nix
index 7904af3e7e1..d78904f5988 100644
--- a/pkgs/applications/misc/surface-control/default.nix
+++ b/pkgs/applications/misc/surface-control/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-SLJ4mwBafLGL5pneMTHLc4S4Tgds2xLqByWFH95TK1k=";
   };
 
-  cargoSha256 = "sha256-a+4oOkO90TObfYnq9NZsWy5RmYFYN1BKvUKxpvjiJc8=";
+  cargoSha256 = "sha256-NH33AMuwf4bOF9zZJlONVMYgrrYSBq5VQClYW/rbzsM=";
 
   nativeBuildInputs = [ installShellFiles ];
 
diff --git a/pkgs/applications/misc/taizen/default.nix b/pkgs/applications/misc/taizen/default.nix
index c480c7a8e2f..7974622be7d 100644
--- a/pkgs/applications/misc/taizen/default.nix
+++ b/pkgs/applications/misc/taizen/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
   buildInputs = [ ncurses openssl ] ++ lib.optional stdenv.isDarwin Security;
   nativeBuildInputs = [ pkg-config ];
 
-  cargoSha256 = "0chrgwm97y1a3gj218x25yqk1y1h74a6gzyxjdm023msvs58nkni";
+  cargoSha256 = "1yqy5v02a4qshgb7k8rnn408k3n6qx3jc8zziwvv7im61n9sjynf";
 
   meta = with lib; {
     homepage = "https://crates.io/crates/taizen";
diff --git a/pkgs/applications/misc/taskwarrior-tui/default.nix b/pkgs/applications/misc/taskwarrior-tui/default.nix
index 9c1e778bdf3..5c32d8622e3 100644
--- a/pkgs/applications/misc/taskwarrior-tui/default.nix
+++ b/pkgs/applications/misc/taskwarrior-tui/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
   # Because there's a test that requires terminal access
   doCheck = false;
 
-  cargoSha256 = "0xblxsp7jgqbb3kr5k7yy6ziz18a8wlkrhls0vz9ak2n0ngddg3r";
+  cargoSha256 = "1c9vw1n6h7irwim1zf3mr0g520jnlvfqdy7y9v9g9xpkvbjr7ich";
 
   meta = with lib; {
     description = "A terminal user interface for taskwarrior ";
diff --git a/pkgs/applications/misc/terminal-typeracer/default.nix b/pkgs/applications/misc/terminal-typeracer/default.nix
index 7a19b2923da..48ae142c1ae 100644
--- a/pkgs/applications/misc/terminal-typeracer/default.nix
+++ b/pkgs/applications/misc/terminal-typeracer/default.nix
@@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "RjGHY6KN6thxbg9W5FRwaAmUeD+5/WCeMCvzFHqZ+J4=";
   };
 
-  cargoSha256 = "VSwku0rtQECirCHx2CXe72gCA+p3DdPC4YYwEYu8WfM=";
+  cargoSha256 = "sha256-A7O/e8PAcW36i8pT71SkWoWDIiMuEhSS9SmASNzNCjk=";
 
   buildInputs = [ openssl sqlite ] ++ lib.optionals stdenv.isDarwin [ libiconv Security ];
   nativeBuildInputs = [ pkg-config ];
diff --git a/pkgs/applications/misc/tickrs/default.nix b/pkgs/applications/misc/tickrs/default.nix
index 8866e2a07c2..e6476cb4221 100644
--- a/pkgs/applications/misc/tickrs/default.nix
+++ b/pkgs/applications/misc/tickrs/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-OOsBo+NCfn++2XyfQVoeEPcbSv645Ng7g9s4W7X2xg4=";
   };
 
-  cargoSha256 = "sha256-PW8f4PZGctHd8YBBRvmueR8UgtyDQZpqf2lTU1t68iM=";
+  cargoSha256 = "sha256-HAkJKqoz4vrY4mGFSz6sylV6DdrjWvPfwb4BiLWEyKY=";
 
   nativeBuildInputs = [ perl ];
 
diff --git a/pkgs/applications/misc/todiff/default.nix b/pkgs/applications/misc/todiff/default.nix
index 069a63fb66b..752ab35461e 100644
--- a/pkgs/applications/misc/todiff/default.nix
+++ b/pkgs/applications/misc/todiff/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1y0v8nkaqb8kn61xwarpbyrq019gxx1f5f5p1hzw73nqxadc1rcm";
   };
 
-  cargoSha256 = "1vyc230a2b0dry2057mkdkrjb7s9d0p43fnz4q67aqrpyr4jxwx2";
+  cargoSha256 = "0vrn1vc3rwabv6l2r1qb7mkcxbp75q79bfl3rxhyi51ra3ij507r";
 
   checkPhase = "cargo test --features=integration_tests";
 
diff --git a/pkgs/applications/misc/zktree/default.nix b/pkgs/applications/misc/zktree/default.nix
index fe7b42dcc94..86e12712340 100644
--- a/pkgs/applications/misc/zktree/default.nix
+++ b/pkgs/applications/misc/zktree/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "11w86k1w5zryiq6bqr98pjhffd3l76377yz53qx0n76vc5374fk9";
   };
 
-  cargoSha256 = "1d35jrxvhf7m04s1kh0yrfhy9j9i6qzwbw2mwapgsrcsr5vhxasn";
+  cargoSha256 = "18v7agm39acnblc703278cn8py5971hm8p5kxmznpw119fjp36s5";
 
   meta = with lib; {
     description = "A small tool to display Znodes in Zookeeper in tree structure.";
diff --git a/pkgs/applications/networking/browsers/asuka/default.nix b/pkgs/applications/networking/browsers/asuka/default.nix
index 6702fdaf7a9..b0ef9d890d5 100644
--- a/pkgs/applications/networking/browsers/asuka/default.nix
+++ b/pkgs/applications/networking/browsers/asuka/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1y8v4qc5dng3v9k0bky1xlf3qi9pk2vdsi29lff4ha5310467f0k";
   };
 
-  cargoSha256 = "0p0x4ch04kydg76bfal5zqzr9hvn5268wf3k2v9h7g8r4y8xqlhw";
+  cargoSha256 = "0b8wf12bjsy334g04sv3knw8f177xsmh7lrkyvx9gnn0fax0lmnr";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/applications/networking/browsers/castor/default.nix b/pkgs/applications/networking/browsers/castor/default.nix
index 259a8780901..ae8b7c723ec 100644
--- a/pkgs/applications/networking/browsers/castor/default.nix
+++ b/pkgs/applications/networking/browsers/castor/default.nix
@@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0rwg1w7srjwa23mkypl8zk6674nhph4xsc6nc01f6g5k959szylr";
   };
 
-  cargoSha256 = "0yn2kfiaz6d8wc8rdqli2pwffp5vb1v3zi7520ysrd5b6fc2csf2";
+  cargoSha256 = "0dm3walwi3vzpk69l7nz6yl6w49676x8pjnigpn67q4bn7lpaqb1";
 
   nativeBuildInputs = [
     pkg-config
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index f84ce23309f..2cf3556e7ea 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -137,7 +137,7 @@ let
       ninja pkg-config
       python2WithPackages perl nodejs
       gnutar which
-      llvmPackages.lldClang.bintools
+      llvmPackages.bintools
     ] ++ lib.optionals (chromiumVersionAtLeast "92") [
       python3WithPackages
     ];
diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix
index 48723249323..e35fd6ca701 100644
--- a/pkgs/applications/networking/browsers/firefox/common.nix
+++ b/pkgs/applications/networking/browsers/firefox/common.nix
@@ -98,16 +98,22 @@ let
   # clang LTO on Darwin is broken so the stdenv is not being changed.
   # Target the LLVM version that rustc -Vv reports it is built with for LTO.
   # rustPackages_1_45 -> LLVM 10, rustPackages -> LLVM 11
-  llvmPackages = if stdenv.isDarwin
-                 then buildPackages.llvmPackages
-                 else if lib.versionAtLeast rustc.llvm.version "11"
-                      then buildPackages.llvmPackages_11
-                      else buildPackages.llvmPackages_10;
+  llvmPackages0 =
+    /**/ if stdenv.isDarwin
+      then buildPackages.llvmPackages
+    else if lib.versionAtLeast rustc.llvm.version "11"
+      then buildPackages.llvmPackages_11
+    else buildPackages.llvmPackages_10;
+  # Force the use of lld and other llvm tools for LTO
+  llvmPackages = llvmPackages0.override {
+    bootBintoolsNoLibc = null;
+    bootBintools = null;
+  };
 
   # When LTO for Darwin is fixed, the following will need updating as lld
   # doesn't work on it. For now it is fine since ltoSupport implies no Darwin.
   buildStdenv = if ltoSupport
-                then overrideCC stdenv llvmPackages.lldClang
+                then overrideCC stdenv llvmPackages.clangUseLLVM
                 else stdenv;
 
   nss_pkg = if lib.versionOlder ffversion "83" then nss_3_53 else nss;
@@ -321,11 +327,11 @@ buildStdenv.mkDerivation ({
     "BUILD_OFFICIAL=1"
   ]
   ++ lib.optionals ltoSupport [
-    "AR=${llvmPackages.bintools}/bin/llvm-ar"
-    "LLVM_OBJDUMP=${llvmPackages.bintools}/bin/llvm-objdump"
-    "NM=${llvmPackages.bintools}/bin/llvm-nm"
-    "RANLIB=${llvmPackages.bintools}/bin/llvm-ranlib"
-    "STRIP=${llvmPackages.bintools}/bin/llvm-strip"
+    "AR=${buildStdenv.cc.bintools.bintools}/bin/llvm-ar"
+    "LLVM_OBJDUMP=${buildStdenv.cc.bintools.bintools}/bin/llvm-objdump"
+    "NM=${buildStdenv.cc.bintools.bintools}/bin/llvm-nm"
+    "RANLIB=${buildStdenv.cc.bintools.bintools}/bin/llvm-ranlib"
+    "STRIP=${buildStdenv.cc.bintools.bintools}/bin/llvm-strip"
   ]
   ++ extraMakeFlags;
 
diff --git a/pkgs/applications/networking/cluster/click/default.nix b/pkgs/applications/networking/cluster/click/default.nix
index 1b76406f334..2d76e0a26cb 100644
--- a/pkgs/applications/networking/cluster/click/default.nix
+++ b/pkgs/applications/networking/cluster/click/default.nix
@@ -13,7 +13,7 @@ buildRustPackage rec {
     sha256 = "18mpzvvww2g6y2d3m8wcfajzdshagihn59k03xvcknd5d8zxagl3";
   };
 
-  cargoSha256 = "1f9yn4pvp58laylngdrfdkwygisnzkhkm7pndf6l33k3aqxhz5mm";
+  cargoSha256 = "16r5rwdbqyb5xrjc55i30xb20crpyjc75zn10xxjkicmvrpwydp6";
 
   buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
 
diff --git a/pkgs/applications/networking/cluster/habitat/default.nix b/pkgs/applications/networking/cluster/habitat/default.nix
index d9827039500..88123e212a7 100644
--- a/pkgs/applications/networking/cluster/habitat/default.nix
+++ b/pkgs/applications/networking/cluster/habitat/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0rwi0lkmhlq4i8fba3s9nd9ajhz2dqxzkgfp5i8y0rvbfmhmfd6b";
   };
 
-  cargoSha256 = "08sncz0jgsr2s821j3s4bk7d54xqwmnld7m57avavym1xqvsnbmy";
+  cargoSha256 = "1c058sjgd79ps8ahvxp25qyc3a6b2csb41vamrphv9ygai60mng6";
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ libsodium libarchive openssl zeromq ];
diff --git a/pkgs/applications/networking/cluster/kubernix/default.nix b/pkgs/applications/networking/cluster/kubernix/default.nix
index 88cacfea4f1..8dcfbfc36b5 100644
--- a/pkgs/applications/networking/cluster/kubernix/default.nix
+++ b/pkgs/applications/networking/cluster/kubernix/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "04dzfdzjwcwwaw9min322g30q0saxpq5kqzld4f22fmk820ki6gp";
   };
 
-  cargoSha256 = "17agwqx7nhzi124yq1s6zpqb227drrhp9c11r3jbicc08dz88bwg";
+  cargoSha256 = "133h6mkz9aylhligy16pfjzsl94xxj0rk2zjm08dhg0inj84z3yv";
   doCheck = false;
 
   meta = with lib; {
diff --git a/pkgs/applications/networking/dyndns/cfdyndns/default.nix b/pkgs/applications/networking/dyndns/cfdyndns/default.nix
index 51f62529e9c..afddb6be875 100644
--- a/pkgs/applications/networking/dyndns/cfdyndns/default.nix
+++ b/pkgs/applications/networking/dyndns/cfdyndns/default.nix
@@ -12,7 +12,7 @@ buildRustPackage rec {
     sha256 = "1fba0w2979dmc2wyggqx4fj52rrl1s2vpjk6mkj1811a848l1hdi";
   };
 
-  cargoSha256 = "04ryin24z3pfxjxy4smngy66xs7k85g6gdzsl77cij8ifb29im99";
+  cargoSha256 = "06qbagq4gvm5vk846lxskli02z9lqxsvis6ndq29bj0b9yyvdkay";
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ openssl ];
diff --git a/pkgs/applications/networking/feedreaders/newsboat/default.nix b/pkgs/applications/networking/feedreaders/newsboat/default.nix
index 38bc05b1f86..22fadca3cb3 100644
--- a/pkgs/applications/networking/feedreaders/newsboat/default.nix
+++ b/pkgs/applications/networking/feedreaders/newsboat/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0a0g9km515kipqmz6c09aj3lgy3nkzqwgnp87fh8f2vr098fn144";
   };
 
-  cargoSha256 = "11dn1ixc7i29cv8kpqfkmikdqzr2v79vlyfxcvjwhgd0r34w4xhn";
+  cargoSha256 = "03g14npkisz159gibhfxj7l36vzm7cvg355hndzpxzvhf5r5yjqg";
 
   # TODO: Check if that's still needed
   postPatch = lib.optionalString stdenv.isDarwin ''
diff --git a/pkgs/applications/networking/irc/tiny/default.nix b/pkgs/applications/networking/irc/tiny/default.nix
index 676309a2bae..08e8d6a00bc 100644
--- a/pkgs/applications/networking/irc/tiny/default.nix
+++ b/pkgs/applications/networking/irc/tiny/default.nix
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "07a50shv6k4fwl2gmv4j0maxaqqkjpwwmqkxkqs0gvx38lc5f7m7";
   };
 
-  cargoSha256 = "009jqizj4qg1bqslna35myxcark40hwlqsz58fbps9nsgp1i0hq2";
+  cargoSha256 = "0npkcprcqy2pn7k64jzwg41vk9id6yzw211xw203h80cc5444igr";
 
   cargoPatches = [
     # Fix Cargo.lock version. Remove with the next release.
diff --git a/pkgs/applications/networking/ncgopher/default.nix b/pkgs/applications/networking/ncgopher/default.nix
index 69f214cc571..d96caf372ef 100644
--- a/pkgs/applications/networking/ncgopher/default.nix
+++ b/pkgs/applications/networking/ncgopher/default.nix
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-Yny5zZe5x7/pWda839HcFkHFuL/jl1Q7ykTZzKy871I=";
   };
 
-  cargoSha256 = "sha256-IsRaDhnRamMSbtXG1r1j0jZYjFiSjRdwOaUVyqy4ZJw=";
+  cargoSha256 = "sha256-C4V1WsAUFtr+N64zyBk1V0E8gTM/U54q03J6Nj8ReLk=";
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [
diff --git a/pkgs/applications/networking/opsdroid/default.nix b/pkgs/applications/networking/opsdroid/default.nix
new file mode 100644
index 00000000000..c007144ac48
--- /dev/null
+++ b/pkgs/applications/networking/opsdroid/default.nix
@@ -0,0 +1,36 @@
+{ lib, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonPackage rec {
+  pname = "opsdroid";
+  version = "0.22.0";
+
+  src = fetchFromGitHub {
+    owner = "opsdroid";
+    repo = "opsdroid";
+    rev = "v${version}";
+    sha256 = "003gpzdjfz2jrwx2bkkd1k2mr7yjpaw5s7fy5l0hw72f9zimznd0";
+  };
+
+  disabled = !python3Packages.isPy3k;
+
+  # tests folder is not included in release
+  doCheck = false;
+
+  propagatedBuildInputs = with python3Packages; [
+    click Babel opsdroid_get_image_size slackclient webexteamssdk bleach
+    parse emoji puremagic yamale nbformat websockets pycron nbconvert
+    aiohttp matrix-api-async aioredis aiosqlite arrow pyyaml motor regex
+    mattermostdriver setuptools voluptuous ibm-watson tailer multidict
+    watchgod get-video-properties appdirs bitstring matrix-nio
+  ];
+
+  passthru.python = python3Packages.python;
+
+  meta = with lib; {
+    description = "An open source chat-ops bot framework";
+    homepage = "https://opsdroid.dev";
+    maintainers = with maintainers; [ fpletz globin willibutz lheckemann ];
+    license = licenses.asl20;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/networking/p2p/synapse-bt/default.nix b/pkgs/applications/networking/p2p/synapse-bt/default.nix
index 761d18e5fe3..c7104d9011d 100644
--- a/pkgs/applications/networking/p2p/synapse-bt/default.nix
+++ b/pkgs/applications/networking/p2p/synapse-bt/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "01npv3zwia5d534zdwisd9xfng507adv4qkljf8z0zm0khqqn71a";
   };
 
-  cargoSha256 = "0lhhdzq4sadnp2pnbq309d1mb7ggbf24k5ivlchrjhllbim1wmdz";
+  cargoSha256 = "0sy0vlpkj967g9lyyh7ska8cpw5xh0g04kj071a32idrqc3dcjb1";
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ openssl ]
diff --git a/pkgs/applications/networking/wg-bond/default.nix b/pkgs/applications/networking/wg-bond/default.nix
index bef44d42862..0c8c629208a 100644
--- a/pkgs/applications/networking/wg-bond/default.nix
+++ b/pkgs/applications/networking/wg-bond/default.nix
@@ -10,7 +10,7 @@ rustPlatform.buildRustPackage rec {
     hash = "sha256:04k0maxy39k7qzcsqsv1byddsmjszmnyjffrf22nzbvml83p3l0y";
   };
 
-  cargoSha256 = "1v2az0v6l8mqryvq3898hm7bpvqdd2c4kpv6ck7932jfjyna512k";
+  cargoSha256 = "1nlzhkhk1y0jhj6n3wn4dm783ldsxn7dk0d2xjx6ylczf9z3gp12";
 
   nativeBuildInputs = [ makeWrapper ];
   postInstall = ''
diff --git a/pkgs/applications/office/espanso/default.nix b/pkgs/applications/office/espanso/default.nix
index d20e19c6859..5cbfa5b1b2a 100644
--- a/pkgs/applications/office/espanso/default.nix
+++ b/pkgs/applications/office/espanso/default.nix
@@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1q47r43midkq9574gl8gdv3ylvrnbhdc39rrw4y4yk6jbdf5wwkm";
   };
 
-  cargoSha256 = "0mxksifjagx25qkyg6ym0zlhal8014j8iim54cd44ndbkkiqlyxc";
+  cargoSha256 = "0ba5skn5s6qh0blf6bvivzvqc2l8v488l9n3x98pmf6nygrikfdb";
 
   nativeBuildInputs = [
     extra-cmake-modules
diff --git a/pkgs/applications/office/watson/default.nix b/pkgs/applications/office/watson/default.nix
index b6e318ec083..b212ae05a9d 100644
--- a/pkgs/applications/office/watson/default.nix
+++ b/pkgs/applications/office/watson/default.nix
@@ -19,7 +19,7 @@ buildPythonApplication rec {
   '';
 
   checkInputs = [ pytestCheckHook pytest-mock mock pytest-datafiles ];
-  propagatedBuildInputs = [ arrow_1 click click-didyoumean requests ];
+  propagatedBuildInputs = [ arrow click click-didyoumean requests ];
   nativeBuildInputs = [ installShellFiles ];
 
   meta = with lib; {
diff --git a/pkgs/applications/radio/noaa-apt/default.nix b/pkgs/applications/radio/noaa-apt/default.nix
index 01dc7b5c30d..390bd128ef7 100644
--- a/pkgs/applications/radio/noaa-apt/default.nix
+++ b/pkgs/applications/radio/noaa-apt/default.nix
@@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec {
     pango
   ];
 
-  cargoSha256 = "0w4rbbz8lsh31xkgibzndiic47690nfcjrn1411dskf7ali6djy8";
+  cargoSha256 = "167q9w45lh05l27cdssg8sfz3qfskfaxayzjy6q1cj50jrn0gq13";
 
   preBuild = ''
     # Used by macro pointing to resource location at compile time.
diff --git a/pkgs/applications/science/machine-learning/finalfrontier/default.nix b/pkgs/applications/science/machine-learning/finalfrontier/default.nix
index f2468572101..0dd9a19c95c 100644
--- a/pkgs/applications/science/machine-learning/finalfrontier/default.nix
+++ b/pkgs/applications/science/machine-learning/finalfrontier/default.nix
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1lvwv238p8hrl4sc5pmnvaargl2dd25p44gxl3kibq5ng03afd0n";
   };
 
-  cargoSha256 = "1ibn22v24brdlrar6j7fryiwimbbw7byak265hrw7a5agf1799x0";
+  cargoSha256 = "0lhcazcih48gc23q484h344bzz7p3lh189ljhswdyph2i11caarp";
 
   nativeBuildInputs = [
     installShellFiles
diff --git a/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix b/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix
index d976431e554..6655b415d2a 100644
--- a/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix
+++ b/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0gxcjrhfa86kz5qmdf5h278ydc3nc0nfj61brnykb723mg45jj41";
   };
 
-  cargoSha256 = "03p786hh54zql61vhmsqcdgvz23v2rm12cgwf7clfmk6a6yj6ibx";
+  cargoSha256 = "0dj3xpinzzdfgy06wkp336sp1nyqk7nnvd3hwhyysripmz9apdgg";
 
   # Enables build against a generic BLAS.
   cargoBuildFlags = [
diff --git a/pkgs/applications/version-management/git-and-tools/delta/default.nix b/pkgs/applications/version-management/git-and-tools/delta/default.nix
index 20c7f41bc54..c6a92413949 100644
--- a/pkgs/applications/version-management/git-and-tools/delta/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/delta/default.nix
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "02gm3fxqq91gn1hffy9kc6dkc0y7p09sl6f8njfpsaficij4bs7a";
   };
 
-  cargoSha256 = "1crz7410xfixx2vb1c060fnygwkkp2k2lgh7y1mjjxjzhpybniw5";
+  cargoSha256 = "1w1w98vhjd561mkiwv89zb8k0nf1p5fc67jb5dddwg9nj6mqjrhp";
 
   nativeBuildInputs = [ installShellFiles ];
 
diff --git a/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix b/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix
index 2d6d7401e28..5115f37891a 100644
--- a/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
 
   buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
 
-  cargoSha256 = "0h0vlz4qd8i9bf1mgjr618zbdwfp6bmy7ql9a1xzjmfdpkl3cgk9";
+  cargoSha256 = "0dax6wkbyk5p8p0mm406vfgmqfmfxzyzqps6yk8fachi61x12ja6";
 
   postInstall = ''
     installManPage Documentation/git-absorb.1
diff --git a/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix b/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix
index 2517e20ce9d..862461827eb 100644
--- a/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix
@@ -10,7 +10,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0bzq4ridzb4l1zqrj1r0vlzkjpgfaqwky5jf49cwjhz4ybwrfpkq";
   };
 
-  cargoSha256 = "0r0hyp15knbbs4l9rcn395pzrx2vbibmwvs4pmga363irmi8mcy5";
+  cargoSha256 = "00wi64v2zn8rp8fjwbdwyvl3pva5sn9xclaawp2m222dqnlszb2d";
 
   meta = with lib; {
     homepage = "https://github.com/softprops/git-codeowners";
diff --git a/pkgs/applications/version-management/git-and-tools/git-dit/default.nix b/pkgs/applications/version-management/git-and-tools/git-dit/default.nix
index fb3f555cb13..f1aeda1a5c7 100644
--- a/pkgs/applications/version-management/git-and-tools/git-dit/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-dit/default.nix
@@ -26,7 +26,7 @@ buildRustPackage rec {
     sha256 = "1sx6sc2dj3l61gbiqz8vfyhw5w4xjdyfzn1ixz0y8ipm579yc7a2";
   };
 
-  cargoSha256 = "1wjbwd3scx71l2fpxgvgwaw05lkpw13rm6d2i1x5crhs7py96ky6";
+  cargoSha256 = "1vbcwl4aii0x4l8w9jhm70vi4s95jr138ly65jpkkv26rl6zjiph";
 
   nativeBuildInputs = [
     cmake
diff --git a/pkgs/applications/version-management/git-and-tools/git-gone/default.nix b/pkgs/applications/version-management/git-and-tools/git-gone/default.nix
index c7453aff85b..47d6cc023b8 100644
--- a/pkgs/applications/version-management/git-and-tools/git-gone/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-gone/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0hhy1yazda9r4n753a5m9jf31fbzmm4v8wvl3pksspj2syglmll8";
   };
 
-  cargoSha256 = "1g2jijx8y34lid9qwa26v4svab5v9ki6gn9vcfiy61dqa964c3l9";
+  cargoSha256 = "0mbc1742szpxnqqah6q0yhkn4fyyxqzg830bd1vzr07v273wr06r";
 
   nativeBuildInputs = [ pkg-config makeWrapper installShellFiles ];
 
diff --git a/pkgs/applications/version-management/git-and-tools/git-ignore/default.nix b/pkgs/applications/version-management/git-and-tools/git-ignore/default.nix
index b01976f7632..5ff6d6b1f84 100644
--- a/pkgs/applications/version-management/git-and-tools/git-ignore/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-ignore/default.nix
@@ -13,7 +13,7 @@ buildRustPackage rec {
     sha256 = "sha256-bKIBPqGKiS3ey8vH2F4EoleV1H2PTOp+71d/YW3jkT0=";
   };
 
-  cargoSha256 = "sha256-D1CIITuZSAsKYsK8U0q8HwPsYCyrfkTXZThxufEEkWU=";
+  cargoSha256 = "sha256-7jPNVBf5DYtE8nsh7LIywMCjU7ODZ3qFsmBie2mZ3h8=";
 
   nativeBuildInputs = [ pkg-config installShellFiles ];
   buildInputs = [ openssl ]
diff --git a/pkgs/applications/version-management/git-and-tools/git-subset/default.nix b/pkgs/applications/version-management/git-and-tools/git-subset/default.nix
index 204ded65fd3..53db1c01eef 100644
--- a/pkgs/applications/version-management/git-and-tools/git-subset/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-subset/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "02z2r0kcd0nnn1zjslp6xxam5ddbhrmzn67qzxhlamsw0p9vvkbb";
   };
 
-  cargoSha256 = "1ydrrq35h1h5s59mx8kwwf3bp7lsmla3jl53ccdlsq29x0rj2jhs";
+  cargoSha256 = "0lc9m9prmhr4ipjh95cfczvlmpp9scryksvqd49h4acyr904n7ry";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/applications/version-management/git-and-tools/git-trim/default.nix b/pkgs/applications/version-management/git-and-tools/git-trim/default.nix
index d470b63a0b7..a20c750ade1 100644
--- a/pkgs/applications/version-management/git-and-tools/git-trim/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-trim/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1rb9dhj7b7mjrhsvm9vw5gzjfxj10idnzv488jkfdz7sfhd3fcvz";
   };
 
-  cargoSha256 = "1q62gqqhf78ljcvzp7yrnr0vk65rif2f7axzjq0b87prbcsr7ij4";
+  cargoSha256 = "1gy77c1cnm2qpgf0fr03alvxi3936x36c032865a6ch8bzns7k5v";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/applications/version-management/git-and-tools/git-vanity-hash/default.nix b/pkgs/applications/version-management/git-and-tools/git-vanity-hash/default.nix
index 85a84103118..a77bdd49330 100644
--- a/pkgs/applications/version-management/git-and-tools/git-vanity-hash/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-vanity-hash/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1wf342zawbphlzvji0yba0qg4f6v67h81nhxqcsir132jv397ma7";
   };
 
-  cargoSha256 = "0mbdis1kxmgj3wlgznr9bqf5yv0jwlj2f63gr5c99ja0ijccp99h";
+  cargoSha256 = "1frdw9bs7y6ch5rrbsgvhrs0wxw4hbwm2n3crslp12w55m7k39fc";
 
   postInstall = ''
     mkdir -p $out/share/doc/git-vanity-hash
diff --git a/pkgs/applications/version-management/git-and-tools/git-workspace/default.nix b/pkgs/applications/version-management/git-and-tools/git-workspace/default.nix
index 6c95d7e016f..b0279f004c2 100644
--- a/pkgs/applications/version-management/git-and-tools/git-workspace/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-workspace/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-//EyGhuE8rMRL03TtECIi0X51/p/GvTqvr2FRQEIqFA=";
   };
 
-  cargoSha256 = "sha256-lvxEYjVMJoAFFRG5iVfGwxUeJObIxfEaWokk69l++nI=";
+  cargoSha256 = "sha256-X0jRwDUVzS1s2tG6N2RDaFqwUUAT+mPMEft11VkJy5A=";
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ openssl ]
diff --git a/pkgs/applications/version-management/git-and-tools/rs-git-fsmonitor/default.nix b/pkgs/applications/version-management/git-and-tools/rs-git-fsmonitor/default.nix
index 6968508f8c9..e885b7c0607 100644
--- a/pkgs/applications/version-management/git-and-tools/rs-git-fsmonitor/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/rs-git-fsmonitor/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "021vdk5i7yyrnh4apn0gnsh6ycnx15wm3g2jrfsg7fycnq8167wc";
   };
 
-  cargoSha256 = "0kfj09xq1g866507k3gcbm30pyi1xzfr7gca6dab7sjlvf83h9xs";
+  cargoSha256 = "0hx5nhxci6p0gjjn1f3vpfykq0f7hdvhlv8898vrv0lh5r9hybsn";
 
   nativeBuildInputs = [ makeWrapper ];
 
diff --git a/pkgs/applications/version-management/git-backup/default.nix b/pkgs/applications/version-management/git-backup/default.nix
index d73e77d6d94..8c45fdef3f7 100644
--- a/pkgs/applications/version-management/git-backup/default.nix
+++ b/pkgs/applications/version-management/git-backup/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0h31j8clvk4gkw4mgva9p0ypf26zhf7f0y564fdmzyw6rsz9wzcj";
   };
 
-  cargoSha256 = "09nfvzvgpdl5glzjays4lm50iwvjzbz364y6agya1a94qqwkaj7f";
+  cargoSha256 = "0lb53sk7rikmj365gvcvn1hq70d6dmhp0aj2dyipb2qasypqz5l3";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/applications/version-management/sit/default.nix b/pkgs/applications/version-management/sit/default.nix
index 83370f5c6f0..edb2825d49c 100644
--- a/pkgs/applications/version-management/sit/default.nix
+++ b/pkgs/applications/version-management/sit/default.nix
@@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
     export HOME=$(mktemp -d)
   '';
 
-  cargoSha256 = "092yfpr2svp1qy7xis1q0sdkbsjmmswmdwb0rklrc0yhydcsghp9";
+  cargoSha256 = "1ghr01jcq12ddna5qadvjy6zbgqgma5nf0qv06ayxnra37d2l92l";
 
   meta = with lib; {
     description = "Serverless Information Tracker";
diff --git a/pkgs/applications/video/alass/default.nix b/pkgs/applications/video/alass/default.nix
index c57a224ee0a..73b017ffeff 100644
--- a/pkgs/applications/video/alass/default.nix
+++ b/pkgs/applications/video/alass/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-q1IV9TtmznpR7RO75iN0p16nmTja5ADWqFj58EOPWvU=";
   };
 
-  cargoSha256 = "sha256-6CVa/ypz37bm/3R0Gi65ovu4SIwWcgVde3Z2W1R16mk=";
+  cargoSha256 = "sha256-6swIoVp1B4CMvaGvq868LTKkzpI6zFKJNgUVqjdyH20=";
 
   nativeBuildInputs = [ makeWrapper ];
 
diff --git a/pkgs/applications/video/handbrake/default.nix b/pkgs/applications/video/handbrake/default.nix
index e14d902681d..faa3113690a 100644
--- a/pkgs/applications/video/handbrake/default.nix
+++ b/pkgs/applications/video/handbrake/default.nix
@@ -112,8 +112,6 @@ _EOF
   # look at ./make/configure.py search "enable_nvenc"
   ++ lib.optional stdenv.isLinux nv-codec-headers;
 
-  enableParallelBuilding = true;
-
   configureFlags = [
     "--disable-df-fetch"
     "--disable-df-verify"
diff --git a/pkgs/applications/video/sub-batch/default.nix b/pkgs/applications/video/sub-batch/default.nix
index 9cda6eb0a2b..37daa870c6e 100644
--- a/pkgs/applications/video/sub-batch/default.nix
+++ b/pkgs/applications/video/sub-batch/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-5fDnSmnnVB1RGrNrnmp40OGFF+OAhppnhOjVgnYxXr0=";
   };
 
-  cargoSha256 = "sha256-cj1htJcUPCeYbP0t15UcMv4WQAG7tUROb97v4rUeMvU=";
+  cargoSha256 = "sha256-+ufa4Cgue8o9CTB3JDcQ38SlUq8PcRDyj+qNSAFpTas=";
 
   nativeBuildInputs = [ makeWrapper ];
 
diff --git a/pkgs/applications/virtualization/cntr/default.nix b/pkgs/applications/virtualization/cntr/default.nix
index 9b57be87e44..fa81913d72f 100644
--- a/pkgs/applications/virtualization/cntr/default.nix
+++ b/pkgs/applications/virtualization/cntr/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-z+0bSxoLJTK4e5xS4CHZ2hNUI56Ci1gbWJsRcN6ZqZA=";
   };
 
-  cargoSha256 = "sha256-o8o/ixjYdnezQZEp78brjmR2lvQbiwCJr4Y97tHiYbk=";
+  cargoSha256 = "sha256-3e5wDne6Idu+kDinHPcAKHfH/d4DrGg90GkiMbyF280=";
 
   meta = with lib; {
     description = "A container debugging tool based on FUSE";
diff --git a/pkgs/applications/virtualization/crosvm/default.nix b/pkgs/applications/virtualization/crosvm/default.nix
index 848b93a5381..697741e21f1 100644
--- a/pkgs/applications/virtualization/crosvm/default.nix
+++ b/pkgs/applications/virtualization/crosvm/default.nix
@@ -53,7 +53,7 @@ in
       ./default-seccomp-policy-dir.diff
     ];
 
-    cargoSha256 = "0lhivwvdihslwp81i3sa5q88p5hr83bzkvklrcgf6x73arwk8kdz";
+    cargoSha256 = "0aax0slg59afbyn3ygswwap2anv11k6sr9hfpysb4f8rvymvx7hd";
 
     nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/applications/virtualization/railcar/default.nix b/pkgs/applications/virtualization/railcar/default.nix
index 1a238bb475d..3c7dc0a7d24 100644
--- a/pkgs/applications/virtualization/railcar/default.nix
+++ b/pkgs/applications/virtualization/railcar/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   # Submitted upstream https://github.com/oracle/railcar/pull/44
   cargoPatches = [ ./cargo-lock.patch ];
-  cargoSha256 = "10qxkxpdprl2rcgy52s3q5gyg3i75qmx68rpl7cx1bgjzppfn9c3";
+  cargoSha256 = "1zsch6gpbw96j5wa68ksbk4x6nbsl7dbvdhdprljpcyrwwkhz47x";
 
   buildInputs = [ libseccomp ];
 
diff --git a/pkgs/applications/window-managers/i3/auto-layout.nix b/pkgs/applications/window-managers/i3/auto-layout.nix
index d24715aa980..754163547e7 100644
--- a/pkgs/applications/window-managers/i3/auto-layout.nix
+++ b/pkgs/applications/window-managers/i3/auto-layout.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0ps08lga6qkgc8cgf5cx2lgwlqcnd2yazphh9xd2fznnzrllfxxz";
   };
 
-  cargoSha256 = "1ch5mh515rlqmr65x96xcvrx6iaigqgjxc7sbwbznzkc5kmvwhc0";
+  cargoSha256 = "1i01kqvsykanzs7pi94gab9k2dqg1ki40mmjrwa22n0ypkbnvsmx";
 
   # Currently no tests are implemented, so we avoid building the package twice
   doCheck = false;
diff --git a/pkgs/applications/window-managers/i3/default.nix b/pkgs/applications/window-managers/i3/default.nix
index 70c6b9942db..a51c80bf083 100644
--- a/pkgs/applications/window-managers/i3/default.nix
+++ b/pkgs/applications/window-managers/i3/default.nix
@@ -24,8 +24,6 @@ stdenv.mkDerivation rec {
 
   configureFlags = [ "--disable-builddir" ];
 
-  enableParallelBuilding = true;
-
   postPatch = ''
     patchShebangs .
   '';
diff --git a/pkgs/applications/window-managers/i3/i3-ratiosplit.nix b/pkgs/applications/window-managers/i3/i3-ratiosplit.nix
index 35751da8172..fbd584f2baa 100644
--- a/pkgs/applications/window-managers/i3/i3-ratiosplit.nix
+++ b/pkgs/applications/window-managers/i3/i3-ratiosplit.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0yfmr5zk2c2il9d31yjjbr48sqgcq6hp4a99hl5mjm2ajyhy5bz3";
   };
 
-  cargoSha256 = "0d5qd1wid5l1pl3ckrlfgdb980myi5gxcir39caywb9pkbnfndz6";
+  cargoSha256 = "134sgc9d0j57swknl9sgil6212rws2hhp92s3cg1yzz5ygx21c76";
 
   # Currently no tests are implemented, so we avoid building the package twice
   doCheck = false;
diff --git a/pkgs/applications/window-managers/i3/wmfocus.nix b/pkgs/applications/window-managers/i3/wmfocus.nix
index 9169cfc3817..7033e573049 100644
--- a/pkgs/applications/window-managers/i3/wmfocus.nix
+++ b/pkgs/applications/window-managers/i3/wmfocus.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "09xffklpz62h6yiksxdlv3a9s1z0wr3ax9syl399avwdmq3c0y49";
   };
 
-  cargoSha256 = "0rczas6sgcppacz48xx7sarkvc4s2sgcdz6c661d7vcry1y46xms";
+  cargoSha256 = "0fmz3q3yadymbqnkdhjd2z2g4zgf3z81ccixwywndd9zb7p47zdr";
 
   nativeBuildInputs = [ python3 pkg-config ];
   buildInputs = [ cairo libxkbcommon xorg.xcbutilkeysyms ];
diff --git a/pkgs/applications/window-managers/sway/wsr.nix b/pkgs/applications/window-managers/sway/wsr.nix
index 15bf977f8fd..64d9fd7d7db 100644
--- a/pkgs/applications/window-managers/sway/wsr.nix
+++ b/pkgs/applications/window-managers/sway/wsr.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0bmpbhyvgnbi5baj6v0wdxpdh9cnlzvcc44vh3vihmzsp6i5q05a";
   };
 
-  cargoSha256 = "15wa03279lflr16a6kw7zcn3nvalnjydk9g6nj7xqxmc7zkpf0rm";
+  cargoSha256 = "1pmkyw60ggn5filb47nyf97g1arrw7nfa4yjndnx35zw12mkj61d";
 
   nativeBuildInputs = [ python3 ];
   buildInputs = [ libxcb ];
diff --git a/pkgs/build-support/bintools-wrapper/darwin-install_name_tool-wrapper.sh b/pkgs/build-support/bintools-wrapper/darwin-install_name_tool-wrapper.sh
new file mode 100755
index 00000000000..376a7abfe41
--- /dev/null
+++ b/pkgs/build-support/bintools-wrapper/darwin-install_name_tool-wrapper.sh
@@ -0,0 +1,49 @@
+#! @shell@
+# shellcheck shell=bash
+
+set -eu -o pipefail +o posix
+shopt -s nullglob
+
+if (( "${NIX_DEBUG:-0}" >= 7 )); then
+    set -x
+fi
+
+source @signingUtils@
+
+extraAfter=()
+extraBefore=()
+params=("$@")
+
+input=
+
+pprev=
+prev=
+for p in \
+    ${extraBefore+"${extraBefore[@]}"} \
+    ${params+"${params[@]}"} \
+    ${extraAfter+"${extraAfter[@]}"}
+do
+    if [ "$pprev" != "-change" ] && [[ "$prev" != -* ]] && [[ "$p" != -* ]]; then
+        input="$p"
+    fi
+    pprev="$prev"
+    prev="$p"
+done
+
+# Optionally print debug info.
+if (( "${NIX_DEBUG:-0}" >= 1 )); then
+    # Old bash workaround, see above.
+    echo "extra flags before to @prog@:" >&2
+    printf "  %q\n" ${extraBefore+"${extraBefore[@]}"}  >&2
+    echo "original flags to @prog@:" >&2
+    printf "  %q\n" ${params+"${params[@]}"} >&2
+    echo "extra flags after to @prog@:" >&2
+    printf "  %q\n" ${extraAfter+"${extraAfter[@]}"} >&2
+fi
+
+@prog@ \
+    ${extraBefore+"${extraBefore[@]}"} \
+    ${params+"${params[@]}"} \
+    ${extraAfter+"${extraAfter[@]}"}
+
+sign "$input"
diff --git a/pkgs/build-support/bintools-wrapper/darwin-strip-wrapper.sh b/pkgs/build-support/bintools-wrapper/darwin-strip-wrapper.sh
new file mode 100755
index 00000000000..a67699547a6
--- /dev/null
+++ b/pkgs/build-support/bintools-wrapper/darwin-strip-wrapper.sh
@@ -0,0 +1,78 @@
+#! @shell@
+# shellcheck shell=bash
+
+set -eu -o pipefail +o posix
+shopt -s nullglob
+
+if (( "${NIX_DEBUG:-0}" >= 7 )); then
+    set -x
+fi
+
+source @signingUtils@
+
+extraAfter=()
+extraBefore=()
+params=("$@")
+
+output=
+inputs=()
+
+restAreFiles=
+prev=
+for p in \
+    ${extraBefore+"${extraBefore[@]}"} \
+    ${params+"${params[@]}"} \
+    ${extraAfter+"${extraAfter[@]}"}
+do
+    if [ "$restAreFiles" ]; then
+        inputs+=("$p")
+    else
+        case "$prev" in
+            -s|-R|-d|-arch)
+                # Unrelated arguments with values
+                ;;
+            -o)
+                # Explicit output
+                output="$p"
+                ;;
+            *)
+                # Any other orgument either takes no value, or is a file.
+                if [[ "$p" != -* ]]; then
+                    inputs+=("$p")
+                fi
+                ;;
+        esac
+
+        if [ "$p" == - ]; then
+            restAreFiles=1
+        fi
+    fi
+
+    prev="$p"
+done
+
+# Optionally print debug info.
+if (( "${NIX_DEBUG:-0}" >= 1 )); then
+    # Old bash workaround, see above.
+    echo "extra flags before to @prog@:" >&2
+    printf "  %q\n" ${extraBefore+"${extraBefore[@]}"}  >&2
+    echo "original flags to @prog@:" >&2
+    printf "  %q\n" ${params+"${params[@]}"} >&2
+    echo "extra flags after to @prog@:" >&2
+    printf "  %q\n" ${extraAfter+"${extraAfter[@]}"} >&2
+fi
+
+@prog@ \
+    ${extraBefore+"${extraBefore[@]}"} \
+    ${params+"${params[@]}"} \
+    ${extraAfter+"${extraAfter[@]}"}
+
+if [ "$output" ]; then
+    # Single explicit output
+    signIfRequired "$output"
+else
+    # Multiple inputs, rewritten in place
+    for input in "${inputs[@]}"; do
+      signIfRequired "$input"
+    done
+fi
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix
index 859e3790594..b2b47901981 100644
--- a/pkgs/build-support/bintools-wrapper/default.nix
+++ b/pkgs/build-support/bintools-wrapper/default.nix
@@ -14,6 +14,9 @@
 , extraPackages ? [], extraBuildCommands ? ""
 , buildPackages ? {}
 , useMacosReexportHack ? false
+
+# Darwin code signing support utilities
+, postLinkSignHook ? null, signingUtils ? null
 }:
 
 with lib;
@@ -340,6 +343,24 @@ stdenv.mkDerivation {
     )
 
     ##
+    ## Code signing on Apple Silicon
+    ##
+    + optionalString (targetPlatform.isDarwin && targetPlatform.isAarch64) ''
+      echo 'source ${postLinkSignHook}' >> $out/nix-support/post-link-hook
+
+      export signingUtils=${signingUtils}
+
+      wrap \
+        ${targetPrefix}install_name_tool \
+        ${./darwin-install_name_tool-wrapper.sh} \
+        "${bintools_bin}/bin/${targetPrefix}install_name_tool"
+
+      wrap \
+        ${targetPrefix}strip ${./darwin-strip-wrapper.sh} \
+        "${bintools_bin}/bin/${targetPrefix}strip"
+    ''
+
+    ##
     ## Extra custom steps
     ##
     + extraBuildCommands;
diff --git a/pkgs/build-support/bintools-wrapper/ld-wrapper.sh b/pkgs/build-support/bintools-wrapper/ld-wrapper.sh
index 7ccf5510c88..e54dd6f4714 100644
--- a/pkgs/build-support/bintools-wrapper/ld-wrapper.sh
+++ b/pkgs/build-support/bintools-wrapper/ld-wrapper.sh
@@ -102,6 +102,8 @@ declare -a libDirs
 declare -A libs
 declare -i relocatable=0 link32=0
 
+linkerOutput="a.out"
+
 if
     [ "$NIX_DONT_SET_RPATH_@suffixSalt@" != 1 ] \
         || [ "$NIX_SET_BUILD_ID_@suffixSalt@" = 1 ] \
@@ -153,6 +155,24 @@ then
     done
 fi
 
+# Determine linkerOutput
+prev=
+for p in \
+    ${extraBefore+"${extraBefore[@]}"} \
+    ${params+"${params[@]}"} \
+    ${extraAfter+"${extraAfter[@]}"}
+do
+    case "$prev" in
+        -o)
+            # Informational for post-link-hook
+            linkerOutput="$p"
+            ;;
+        *)
+            ;;
+    esac
+    prev="$p"
+done
+
 if [[ "$link32" = "1" && "$setDynamicLinker" = 1 && -e "@out@/nix-support/dynamic-linker-m32" ]]; then
     # We have an alternate 32-bit linker and we're producing a 32-bit ELF, let's
     # use it.
@@ -223,7 +243,11 @@ fi
 
 PATH="$path_backup"
 # Old bash workaround, see above.
-exec @prog@ \
+@prog@ \
     ${extraBefore+"${extraBefore[@]}"} \
     ${params+"${params[@]}"} \
     ${extraAfter+"${extraAfter[@]}"}
+
+if [ -e "@out@/nix-support/post-link-hook" ]; then
+    source @out@/nix-support/post-link-hook
+fi
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index 36a98a180b3..235d244a7c0 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -64,6 +64,7 @@ let
 
   useGccForLibs = isClang
     && libcxx == null
+    && !stdenv.targetPlatform.isDarwin
     && !(stdenv.targetPlatform.useLLVM or false)
     && !(stdenv.targetPlatform.useAndroidPrebuilt or false)
     && !(stdenv.targetPlatform.isiOS or false)
@@ -432,14 +433,16 @@ stdenv.mkDerivation {
     # Always add -march based on cpu in triple. Sometimes there is a
     # discrepency (x86_64 vs. x86-64), so we provide an "arch" arg in
     # that case.
-    + optionalString ((targetPlatform ? gcc.arch) &&
+    # TODO: aarch64-darwin has mcpu incompatible with gcc
+    + optionalString ((targetPlatform ? gcc.arch) && (isClang || !(stdenv.isDarwin && stdenv.isAarch64)) &&
                       isGccArchSupported targetPlatform.gcc.arch) ''
       echo "-march=${targetPlatform.gcc.arch}" >> $out/nix-support/cc-cflags-before
     ''
 
     # -mcpu is not very useful. You should use mtune and march
     # instead. It’s provided here for backwards compatibility.
-    + optionalString (targetPlatform ? gcc.cpu) ''
+    # TODO: aarch64-darwin has mcpu incompatible with gcc
+    + optionalString ((targetPlatform ? gcc.cpu) && (isClang || !(stdenv.isDarwin && stdenv.isAarch64))) ''
       echo "-mcpu=${targetPlatform.gcc.cpu}" >> $out/nix-support/cc-cflags-before
     ''
 
@@ -491,6 +494,10 @@ stdenv.mkDerivation {
         echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/cc-cflags
     ''
 
+    + optionalString targetPlatform.isAndroid ''
+      echo "-D__ANDROID_API__=${targetPlatform.sdkVer}" >> $out/nix-support/cc-cflags
+    ''
+
     # There are a few tools (to name one libstdcxx5) which do not work
     # well with multi line flags, so make the flags single line again
     + ''
diff --git a/pkgs/build-support/nuke-references/builder.sh b/pkgs/build-support/nuke-references/builder.sh
deleted file mode 100644
index 7da32203218..00000000000
--- a/pkgs/build-support/nuke-references/builder.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-source $stdenv/setup
-
-mkdir -p $out/bin
-cat > $out/bin/nuke-refs <<EOF
-#! $SHELL -e
-
-excludes=""
-while getopts e: o; do
-    case "\$o" in
-        e) storeId=\$(echo "\$OPTARG" | $perl/bin/perl -ne "print \"\\\$1\" if m|^\Q$NIX_STORE\E/([a-z0-9]{32})-.*|")
-           if [ -z "\$storeId" ]; then
-               echo "-e argument must be a Nix store path"
-               exit 1
-           fi
-           excludes="\$excludes(?!\$storeId)"
-        ;;
-    esac
-done
-shift \$((\$OPTIND-1))
-
-for i in "\$@"; do
-    if test ! -L "\$i" -a -f "\$i"; then
-        cat "\$i" | $perl/bin/perl -pe "s|\Q$NIX_STORE\E/\$excludes[a-z0-9]{32}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" > "\$i.tmp"
-        if test -x "\$i"; then chmod +x "\$i.tmp"; fi
-        mv "\$i.tmp" "\$i"
-    fi
-done
-EOF
-chmod +x $out/bin/nuke-refs
diff --git a/pkgs/build-support/nuke-references/darwin-sign-fixup.sh b/pkgs/build-support/nuke-references/darwin-sign-fixup.sh
new file mode 100644
index 00000000000..940c18e5a62
--- /dev/null
+++ b/pkgs/build-support/nuke-references/darwin-sign-fixup.sh
@@ -0,0 +1,5 @@
+# Fixup hook for nukeReferences, not stdenv
+
+source @signingUtils@
+
+fixupHooks+=(signIfRequired)
diff --git a/pkgs/build-support/nuke-references/default.nix b/pkgs/build-support/nuke-references/default.nix
index d894b56d366..03f6fe53b54 100644
--- a/pkgs/build-support/nuke-references/default.nix
+++ b/pkgs/build-support/nuke-references/default.nix
@@ -3,11 +3,35 @@
 # path (/nix/store/eeee...).  This is useful for getting rid of
 # dependencies that you know are not actually needed at runtime.
 
-{ stdenvNoCC, perl }:
+{ lib, stdenvNoCC, perl, signingUtils, shell ? stdenvNoCC.shell }:
+
+let
+  stdenv = stdenvNoCC;
+
+  darwinCodeSign = stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64;
+in
 
 stdenvNoCC.mkDerivation {
   name = "nuke-references";
-  builder = ./builder.sh;
+
+  dontUnpack = true;
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    substituteAll ${./nuke-refs.sh} $out/bin/nuke-refs
+    chmod a+x $out/bin/nuke-refs
+  '';
+
+  postFixup = lib.optionalString darwinCodeSign ''
+    mkdir -p $out/nix-support
+    substituteAll ${./darwin-sign-fixup.sh} $out/nix-support/setup-hooks.sh
+  '';
+
   # FIXME: get rid of perl dependency.
   inherit perl;
+  inherit (builtins) storeDir;
+  shell = lib.getBin shell + (shell.shellPath or "");
+  signingUtils = if darwinCodeSign then signingUtils else null;
 }
diff --git a/pkgs/build-support/nuke-references/nuke-refs.sh b/pkgs/build-support/nuke-references/nuke-refs.sh
new file mode 100644
index 00000000000..21eb855cbad
--- /dev/null
+++ b/pkgs/build-support/nuke-references/nuke-refs.sh
@@ -0,0 +1,33 @@
+#! @shell@
+
+fixupHooks=()
+
+if [ -e @out@/nix-support/setup-hooks.sh ]; then
+    source @out@/nix-support/setup-hooks.sh
+fi
+
+excludes=""
+while getopts e: o; do
+    case "$o" in
+        e) storeId=$(echo "$OPTARG" | @perl@/bin/perl -ne "print \"\$1\" if m|^\Q@storeDir@\E/([a-z0-9]{32})-.*|")
+           if [ -z "$storeId" ]; then
+               echo "-e argument must be a Nix store path"
+               exit 1
+           fi
+           excludes="$excludes(?!$storeId)"
+        ;;
+    esac
+done
+shift $(($OPTIND-1))
+
+for i in "$@"; do
+    if test ! -L "$i" -a -f "$i"; then
+        cat "$i" | @perl@/bin/perl -pe "s|\Q@storeDir@\E/$excludes[a-z0-9]{32}-|@storeDir@/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" > "$i.tmp"
+        if test -x "$i"; then chmod +x "$i.tmp"; fi
+        mv "$i.tmp" "$i"
+
+        for hook in "${fixupHooks[@]}"; do
+            eval "$hook" "$i"
+        done
+    fi
+done
diff --git a/pkgs/build-support/remove-references-to/darwin-sign-fixup.sh b/pkgs/build-support/remove-references-to/darwin-sign-fixup.sh
new file mode 100644
index 00000000000..940c18e5a62
--- /dev/null
+++ b/pkgs/build-support/remove-references-to/darwin-sign-fixup.sh
@@ -0,0 +1,5 @@
+# Fixup hook for nukeReferences, not stdenv
+
+source @signingUtils@
+
+fixupHooks+=(signIfRequired)
diff --git a/pkgs/build-support/remove-references-to/default.nix b/pkgs/build-support/remove-references-to/default.nix
index 8b1d05fc230..f022611ef91 100644
--- a/pkgs/build-support/remove-references-to/default.nix
+++ b/pkgs/build-support/remove-references-to/default.nix
@@ -3,32 +3,33 @@
 # non-existent path (/nix/store/eeee...).  This is useful for getting rid of
 # dependencies that you know are not actually needed at runtime.
 
-{ stdenv, writeScriptBin }:
-
-writeScriptBin "remove-references-to" ''
-#! ${stdenv.shell} -e
-
-# References to remove
-targets=()
-while getopts t: o; do
-    case "$o" in
-        t) storeId=$(echo "$OPTARG" | sed -n "s|^$NIX_STORE/\\([a-z0-9]\{32\}\\)-.*|\1|p")
-           if [ -z "$storeId" ]; then
-               echo "-t argument must be a Nix store path"
-               exit 1
-           fi
-           targets+=("$storeId")
-    esac
-done
-shift $(($OPTIND-1))
-
-# Files to remove the references from
-regions=()
-for i in "$@"; do
-    test ! -L "$i" -a -f "$i" && regions+=("$i")
-done
-
-for target in "''${targets[@]}" ; do
-    sed -i -e "s|$NIX_STORE/$target-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" "''${regions[@]}"
-done
-''
+{ lib, stdenvNoCC, signingUtils, shell ? stdenvNoCC.shell }:
+
+let
+  stdenv = stdenvNoCC;
+
+  darwinCodeSign = stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64;
+in
+
+stdenv.mkDerivation {
+  name = "remove-references-to";
+
+  dontUnpack = true;
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    substituteAll ${./remove-references-to.sh} $out/bin/remove-references-to
+    chmod a+x $out/bin/remove-references-to
+  '';
+
+  postFixup = lib.optionalString darwinCodeSign ''
+    mkdir -p $out/nix-support
+    substituteAll ${./darwin-sign-fixup.sh} $out/nix-support/setup-hooks.sh
+  '';
+
+  inherit (builtins) storeDir;
+  shell = lib.getBin shell + (shell.shellPath or "");
+  signingUtils = if darwinCodeSign then signingUtils else null;
+}
diff --git a/pkgs/build-support/remove-references-to/remove-references-to.sh b/pkgs/build-support/remove-references-to/remove-references-to.sh
new file mode 100644
index 00000000000..d8d38dbd80a
--- /dev/null
+++ b/pkgs/build-support/remove-references-to/remove-references-to.sh
@@ -0,0 +1,37 @@
+#! @shell@ -e
+
+fixupHooks=()
+
+if [ -e @out@/nix-support/setup-hooks.sh ]; then
+    source @out@/nix-support/setup-hooks.sh
+fi
+
+# References to remove
+targets=()
+while getopts t: o; do
+    case "$o" in
+        t) storeId=$(echo "$OPTARG" | sed -n "s|^@storeDir@/\\([a-z0-9]\{32\}\\)-.*|\1|p")
+           if [ -z "$storeId" ]; then
+               echo "-t argument must be a Nix store path"
+               exit 1
+           fi
+           targets+=("$storeId")
+    esac
+done
+shift $(($OPTIND-1))
+
+# Files to remove the references from
+regions=()
+for i in "$@"; do
+    test ! -L "$i" -a -f "$i" && regions+=("$i")
+done
+
+for target in "${targets[@]}" ; do
+    sed -i -e "s|@storeDir@/$target-|@storeDir@/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" "${regions[@]}"
+done
+
+for region in "${regions[@]}"; do
+    for hook in "${fixupHooks[@]}"; do
+        eval "$hook" "$i"
+    done
+done
diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix
index ff9ca642daa..940bd09425d 100644
--- a/pkgs/build-support/rust/default.nix
+++ b/pkgs/build-support/rust/default.nix
@@ -14,6 +14,7 @@
 , git
 , rust
 , rustc
+, libiconv
 , windows
 }:
 
@@ -117,7 +118,9 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // lib.optionalAttrs u
     rustc
   ];
 
-  buildInputs = buildInputs ++ lib.optional stdenv.hostPlatform.isMinGW windows.pthreads;
+  buildInputs = buildInputs
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]
+    ++ lib.optionals stdenv.hostPlatform.isMinGW [ windows.pthreads ];
 
   patches = cargoPatches ++ patches;
 
diff --git a/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh
index af2ff0cc966..55e196e654d 100644
--- a/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh
+++ b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh
@@ -23,7 +23,7 @@ fixDarwinDylibNames() {
     for fn in "$@"; do
         if [ -L "$fn" ]; then continue; fi
         echo "$fn: fixing dylib"
-        int_out=$(install_name_tool -id "$fn" "${flags[@]}" "$fn" 2>&1)
+        int_out=$(@targetPrefix@install_name_tool -id "$fn" "${flags[@]}" "$fn" 2>&1)
         result=$?
         if [ "$result" -ne 0 ] &&
             ! grep "shared library stub file and can't be changed" <<< "$out"
diff --git a/pkgs/desktops/plasma-5/fetch.sh b/pkgs/desktops/plasma-5/fetch.sh
index 398f9a1b97d..f281e11544d 100644
--- a/pkgs/desktops/plasma-5/fetch.sh
+++ b/pkgs/desktops/plasma-5/fetch.sh
@@ -1 +1 @@
-WGET_ARGS=( https://download.kde.org/stable/plasma/5.21.4/ -A '*.tar.xz' )
+WGET_ARGS=( https://download.kde.org/stable/plasma/5.21.5/ -A '*.tar.xz' )
diff --git a/pkgs/desktops/plasma-5/kdeplasma-addons.nix b/pkgs/desktops/plasma-5/kdeplasma-addons.nix
index f214d4070ee..94cf73084bf 100644
--- a/pkgs/desktops/plasma-5/kdeplasma-addons.nix
+++ b/pkgs/desktops/plasma-5/kdeplasma-addons.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation,
   extra-cmake-modules, kdoctools,
-  kconfig, kconfigwidgets, kcoreaddons, kcmutils, kdelibs4support, kholidays,
+  kconfig, kconfigwidgets, kcoreaddons, kcmutils, kholidays,
   kio, knewstuff, kpurpose, kross, krunner, kservice, ksysguard,
   kunitconversion, ibus, plasma-framework, plasma-workspace, qtdeclarative,
   qtwebengine, qtx11extras
@@ -11,7 +11,7 @@ mkDerivation {
   name = "kdeplasma-addons";
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    kconfig kconfigwidgets kcoreaddons kcmutils kdelibs4support kholidays kio
+    kconfig kconfigwidgets kcoreaddons kcmutils kholidays kio
     knewstuff kpurpose kross krunner kservice ksysguard kunitconversion ibus
     plasma-framework plasma-workspace qtdeclarative qtwebengine qtx11extras
   ];
diff --git a/pkgs/desktops/plasma-5/kinfocenter.nix b/pkgs/desktops/plasma-5/kinfocenter.nix
index f7f50dc3b57..e9b9f514816 100644
--- a/pkgs/desktops/plasma-5/kinfocenter.nix
+++ b/pkgs/desktops/plasma-5/kinfocenter.nix
@@ -3,9 +3,9 @@
   extra-cmake-modules, kdoctools,
   qtbase,
   kcmutils, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons,
-  kdeclarative, kdelibs4support, ki18n, kiconthemes, kio, kirigami2, kpackage,
-  kservice, kwayland, kwidgetsaddons, kxmlgui, libraw1394, libGLU, pciutils,
-  solid, systemsettings
+  kdeclarative, ki18n, kiconthemes, kio, kirigami2, kpackage, kservice,
+  kwayland, kwidgetsaddons, kxmlgui, solid, systemsettings,
+  libraw1394, libGLU, pciutils,
 }:
 
 mkDerivation {
@@ -13,12 +13,15 @@ mkDerivation {
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
     kcmutils kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons
-    kdeclarative kdelibs4support ki18n kiconthemes kio kirigami2 kpackage
-    kservice kwayland kwidgetsaddons kxmlgui libraw1394 libGLU pciutils solid systemsettings
+    kdeclarative ki18n kiconthemes kio kirigami2 kpackage kservice kwayland
+    kwidgetsaddons kxmlgui solid systemsettings
+
+    libraw1394 libGLU pciutils
   ];
   preFixup = ''
-    # fix wrong symlink of infocenter pointing to a 'systemsettings5' binary in the same directory,
-    # while it is actually located in a completely different store path
+    # fix wrong symlink of infocenter pointing to a 'systemsettings5' binary in
+    # the same directory, while it is actually located in a completely different
+    # store path
     ln -sf ${lib.getBin systemsettings}/bin/systemsettings5 $out/bin/kinfocenter
   '';
 }
diff --git a/pkgs/desktops/plasma-5/kmenuedit.nix b/pkgs/desktops/plasma-5/kmenuedit.nix
index 016ea940d99..c0cfebcdc0c 100644
--- a/pkgs/desktops/plasma-5/kmenuedit.nix
+++ b/pkgs/desktops/plasma-5/kmenuedit.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation,
   extra-cmake-modules, kdoctools,
-  kdbusaddons, kdelibs4support, khotkeys, ki18n, kiconthemes, kio, kxmlgui,
+  kdbusaddons, khotkeys, ki18n, kiconthemes, kio, kxmlgui,
   sonnet
 }:
 
@@ -9,6 +9,6 @@ mkDerivation {
   name = "kmenuedit";
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    kdbusaddons kdelibs4support khotkeys ki18n kiconthemes kio kxmlgui sonnet
+    kdbusaddons khotkeys ki18n kiconthemes kio kxmlgui sonnet
   ];
 }
diff --git a/pkgs/desktops/plasma-5/kscreenlocker.nix b/pkgs/desktops/plasma-5/kscreenlocker.nix
index 2fc26216bf4..f9b8bb5cfc1 100644
--- a/pkgs/desktops/plasma-5/kscreenlocker.nix
+++ b/pkgs/desktops/plasma-5/kscreenlocker.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
-  kcmutils, kcrash, kdeclarative, kdelibs4support, kglobalaccel, kidletime,
+  kcmutils, kcrash, kdeclarative, kglobalaccel, kidletime,
   kwayland, libXcursor, pam, plasma-framework, qtbase, qtdeclarative, qtx11extras,
   wayland,
 }:
@@ -10,7 +10,7 @@ mkDerivation {
   name = "kscreenlocker";
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    kcmutils kcrash kdeclarative kdelibs4support kglobalaccel kidletime kwayland
+    kcmutils kcrash kdeclarative kglobalaccel kidletime kwayland
     libXcursor pam plasma-framework qtdeclarative qtx11extras wayland
   ];
   outputs = [ "out" "dev" ];
diff --git a/pkgs/desktops/plasma-5/ksysguard.nix b/pkgs/desktops/plasma-5/ksysguard.nix
index fe904bb97a4..2c376b53750 100644
--- a/pkgs/desktops/plasma-5/ksysguard.nix
+++ b/pkgs/desktops/plasma-5/ksysguard.nix
@@ -2,7 +2,7 @@
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
   libcap, libpcap, lm_sensors,
-  kconfig, kcoreaddons, kdelibs4support, ki18n, kiconthemes, kitemviews,
+  kconfig, kcoreaddons, ki18n, kiconthemes, kinit, kitemviews,
   knewstuff, libksysguard, qtbase,
   networkmanager-qt, libnl
 }:
@@ -11,7 +11,7 @@ mkDerivation {
   name = "ksysguard";
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    kconfig kcoreaddons kitemviews knewstuff kiconthemes libksysguard
-    kdelibs4support ki18n libcap libpcap lm_sensors networkmanager-qt libnl
+    kconfig kcoreaddons kitemviews kinit kiconthemes knewstuff libksysguard
+    ki18n libcap libpcap lm_sensors networkmanager-qt libnl
   ];
 }
diff --git a/pkgs/desktops/plasma-5/kwin/default.nix b/pkgs/desktops/plasma-5/kwin/default.nix
index 2008529a38b..e6e49a59181 100644
--- a/pkgs/desktops/plasma-5/kwin/default.nix
+++ b/pkgs/desktops/plasma-5/kwin/default.nix
@@ -2,8 +2,8 @@
   mkDerivation, lib, fetchpatch,
   extra-cmake-modules, kdoctools,
 
-  epoxy,libICE, libSM, libinput, libxkbcommon, udev, wayland, xcb-util-cursor,
-  xwayland,
+  epoxy, lcms2, libICE, libSM, libcap, libdrm, libinput, libxkbcommon, mesa,
+  pipewire, udev, wayland, xcb-util-cursor, xwayland,
 
   qtdeclarative, qtmultimedia, qtquickcontrols2, qtscript, qtsensors,
   qtvirtualkeyboard, qtx11extras,
@@ -11,8 +11,8 @@
   breeze-qt5, kactivities, kcompletion, kcmutils, kconfig, kconfigwidgets,
   kcoreaddons, kcrash, kdeclarative, kdecoration, kglobalaccel, ki18n,
   kiconthemes, kidletime, kinit, kio, knewstuff, knotifications, kpackage,
-  kscreenlocker, kservice, kwayland, kwayland-server, kwidgetsaddons, kwindowsystem, kxmlgui,
-  plasma-framework, libcap, libdrm, mesa, pipewire
+  krunner, kscreenlocker, kservice, kwayland, kwayland-server, kwidgetsaddons,
+  kwindowsystem, kxmlgui, plasma-framework,
 }:
 
 # TODO (ttuegel): investigate qmlplugindump failure
@@ -21,17 +21,18 @@ mkDerivation {
   name = "kwin";
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
-    epoxy libICE libSM libinput libxkbcommon udev wayland xcb-util-cursor
-    xwayland
+    epoxy lcms2 libICE libSM libcap libdrm libinput libxkbcommon mesa pipewire
+    udev wayland xcb-util-cursor xwayland
 
     qtdeclarative qtmultimedia qtquickcontrols2 qtscript qtsensors
     qtvirtualkeyboard qtx11extras
 
     breeze-qt5 kactivities kcmutils kcompletion kconfig kconfigwidgets
     kcoreaddons kcrash kdeclarative kdecoration kglobalaccel ki18n kiconthemes
-    kidletime kinit kio knewstuff knotifications kpackage kscreenlocker kservice
-    kwayland kwayland-server kwidgetsaddons kwindowsystem kxmlgui plasma-framework
-    libcap libdrm mesa pipewire
+    kidletime kinit kio knewstuff knotifications kpackage krunner kscreenlocker
+    kservice kwayland kwayland-server kwidgetsaddons kwindowsystem kxmlgui
+    plasma-framework
+
   ];
   outputs = [ "dev" "out" ];
   patches = [
diff --git a/pkgs/desktops/plasma-5/plasma-desktop/default.nix b/pkgs/desktops/plasma-5/plasma-desktop/default.nix
index a07a50f0492..e6b161a0723 100644
--- a/pkgs/desktops/plasma-5/plasma-desktop/default.nix
+++ b/pkgs/desktops/plasma-5/plasma-desktop/default.nix
@@ -6,13 +6,14 @@
   libxkbfile, xf86inputevdev, xf86inputsynaptics, xinput, xkeyboard_config,
   xorgserver, util-linux,
 
-  qtdeclarative, qtquickcontrols, qtquickcontrols2, qtsvg, qtx11extras,
+  accounts-qt, qtdeclarative, qtquickcontrols, qtquickcontrols2, qtsvg,
+  qtx11extras,
 
-  attica, baloo, kactivities, kactivities-stats, kauth, kcmutils, kdbusaddons,
-  kdeclarative, kded, kdelibs4support, kemoticons, kglobalaccel, ki18n,
-  kitemmodels, knewstuff, knotifications, knotifyconfig, kpeople, krunner,
-  kscreenlocker, ksysguard, kwallet, kwin, phonon, plasma-framework,
-  plasma-workspace, qqc2-desktop-style, xf86inputlibinput
+  attica, baloo, kaccounts-integration, kactivities, kactivities-stats, kauth,
+  kcmutils, kdbusaddons, kdeclarative, kded, kdelibs4support, kemoticons,
+  kglobalaccel, ki18n, kitemmodels, knewstuff, knotifications, knotifyconfig,
+  kpeople, krunner, kscreenlocker, ksysguard, kwallet, kwin, phonon,
+  plasma-framework, plasma-workspace, qqc2-desktop-style, xf86inputlibinput
 }:
 
 mkDerivation {
@@ -22,12 +23,13 @@ mkDerivation {
     boost fontconfig ibus libcanberra_kde libpulseaudio libXcursor libXft xorgserver
     libxkbfile phonon xf86inputevdev xf86inputsynaptics xinput xkeyboard_config
 
-    qtdeclarative qtquickcontrols qtquickcontrols2 qtsvg qtx11extras
+    accounts-qt qtdeclarative qtquickcontrols qtquickcontrols2 qtsvg qtx11extras
 
-    attica baloo kactivities kactivities-stats kauth kcmutils kdbusaddons
-    kdeclarative kded kdelibs4support kemoticons kglobalaccel ki18n kitemmodels
-    knewstuff knotifications knotifyconfig kpeople krunner kscreenlocker
-    ksysguard kwallet kwin plasma-framework plasma-workspace qqc2-desktop-style
+    attica baloo kaccounts-integration kactivities kactivities-stats kauth
+    kcmutils kdbusaddons kdeclarative kded kdelibs4support kemoticons
+    kglobalaccel ki18n kitemmodels knewstuff knotifications knotifyconfig
+    kpeople krunner kscreenlocker ksysguard kwallet kwin plasma-framework
+    plasma-workspace qqc2-desktop-style
   ];
 
   patches = [
diff --git a/pkgs/desktops/plasma-5/plasma-nm/default.nix b/pkgs/desktops/plasma-5/plasma-nm/default.nix
index 585f7462c9b..e563bdd837e 100644
--- a/pkgs/desktops/plasma-5/plasma-nm/default.nix
+++ b/pkgs/desktops/plasma-5/plasma-nm/default.nix
@@ -2,22 +2,26 @@
   mkDerivation, lib, substituteAll,
   extra-cmake-modules, kdoctools,
   kcompletion, kconfigwidgets, kcoreaddons, kdbusaddons, kdeclarative,
-  kdelibs4support, ki18n, kiconthemes, kinit, kio, kitemviews, knotifications,
-  kservice, kwallet, kwidgetsaddons, kwindowsystem, kxmlgui,
-  mobile-broadband-provider-info, modemmanager-qt, networkmanager-qt,
-  openconnect, openvpn, plasma-framework, qca-qt5, qtbase, qtdeclarative,
-  qttools, solid
+  ki18n, kiconthemes, kinit, kio, kitemviews, knotifications, kservice, kwallet,
+  kwidgetsaddons, kwindowsystem, kxmlgui, plasma-framework, prison, solid,
+
+  mobile-broadband-provider-info, openconnect, openvpn,
+  modemmanager-qt, networkmanager-qt, qca-qt5,
+  qtbase, qtdeclarative, qttools,
 }:
 
 mkDerivation {
   name = "plasma-nm";
   nativeBuildInputs = [ extra-cmake-modules kdoctools qttools ];
   buildInputs = [
-    kdeclarative kdelibs4support ki18n kio kwindowsystem plasma-framework
-    qtdeclarative kcompletion kconfigwidgets kcoreaddons kdbusaddons kiconthemes
+    kdeclarative ki18n kio kwindowsystem plasma-framework kcompletion
+    kconfigwidgets kcoreaddons kdbusaddons kiconthemes
     kinit kitemviews knotifications kservice kwallet kwidgetsaddons kxmlgui
-    mobile-broadband-provider-info modemmanager-qt networkmanager-qt openconnect
-    qca-qt5 solid
+    prison solid
+
+    qtdeclarative
+    modemmanager-qt networkmanager-qt qca-qt5
+    mobile-broadband-provider-info openconnect
   ];
   patches = [
     (substituteAll {
diff --git a/pkgs/desktops/plasma-5/powerdevil.nix b/pkgs/desktops/plasma-5/powerdevil.nix
index 28e6db853a1..9d2dc183cf1 100644
--- a/pkgs/desktops/plasma-5/powerdevil.nix
+++ b/pkgs/desktops/plasma-5/powerdevil.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, fetchpatch,
   extra-cmake-modules, kdoctools,
-  bluez-qt, kactivities, kauth, kconfig, kdbusaddons, kdelibs4support,
+  bluez-qt, kactivities, kauth, kconfig, kdbusaddons,
   kglobalaccel, ki18n, kidletime, kio, knotifyconfig, kwayland, libkscreen,
   ddcutil, networkmanager-qt, plasma-workspace, qtx11extras, solid, udev
 }:
@@ -11,18 +11,11 @@ mkDerivation {
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
     kconfig kdbusaddons knotifyconfig solid udev bluez-qt kactivities kauth
-    kdelibs4support kglobalaccel ki18n kio kidletime kwayland libkscreen
+    kglobalaccel ki18n kio kidletime kwayland libkscreen
     networkmanager-qt plasma-workspace qtx11extras
     ddcutil
   ];
   cmakeFlags = [
     "-DHAVE_DDCUTIL=On"
   ];
-  patches = [
-    # Reduce log message spam by setting the default log level to Warning.
-    #(fetchpatch {
-    #  url = "https://invent.kde.org/plasma/powerdevil/-/commit/c7590f9065ec9547b7fabad77a548bbc0c693113.patch";
-    #  sha256 = "077whhi0jrb3bajx357k7n66hv7nchis8jix0nfc1zjvi9fm6pi2";
-    #})
-  ];
 }
diff --git a/pkgs/desktops/plasma-5/srcs.nix b/pkgs/desktops/plasma-5/srcs.nix
index 8fa7ba91c6a..90d70bb8a70 100644
--- a/pkgs/desktops/plasma-5/srcs.nix
+++ b/pkgs/desktops/plasma-5/srcs.nix
@@ -4,419 +4,419 @@
 
 {
   bluedevil = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/bluedevil-5.21.4.tar.xz";
-      sha256 = "0ls6ijk10pgi75ycwcnq3z4j5hn657cnr4s7fky53qkc3y2x25g1";
-      name = "bluedevil-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/bluedevil-5.21.5.tar.xz";
+      sha256 = "12b23xr919lb9hjy0rd9hbcz0x0im2i879affdyjxz4px53kgc16";
+      name = "bluedevil-5.21.5.tar.xz";
     };
   };
   breeze = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/breeze-5.21.4.tar.xz";
-      sha256 = "1n6hwppcbnn3hw5r3f9jssvslnming9qvs4s2czyl0kky1nv8bfm";
-      name = "breeze-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/breeze-5.21.5.tar.xz";
+      sha256 = "034qfnqfhmvszjd4rc41av61qfk60bh5hlzq2r8w8lbxvaawcx4p";
+      name = "breeze-5.21.5.tar.xz";
     };
   };
   breeze-grub = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/breeze-grub-5.21.4.tar.xz";
-      sha256 = "1jd8fy9b5cmv1da27xqbl6x3197pq6m4wwxzylxgnmciivhmnzm2";
-      name = "breeze-grub-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/breeze-grub-5.21.5.tar.xz";
+      sha256 = "1vqdq2kxzyrdy31c2xjp200b40892mvgzmlp7ndc9yp3zj6cj9z7";
+      name = "breeze-grub-5.21.5.tar.xz";
     };
   };
   breeze-gtk = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/breeze-gtk-5.21.4.tar.xz";
-      sha256 = "03aj8rxh46j663m26jsb9hrg0x5j0hvzjqwc8l1ayfcwkdgl4b4i";
-      name = "breeze-gtk-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/breeze-gtk-5.21.5.tar.xz";
+      sha256 = "06f7y19xrn9lr7ra5fszhs69dkpdna7sn0apwl6xyivl4cphbaqg";
+      name = "breeze-gtk-5.21.5.tar.xz";
     };
   };
   breeze-plymouth = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/breeze-plymouth-5.21.4.tar.xz";
-      sha256 = "0ibwl2aikh547k851pb78216v8ld5la9xg3f9945dcbf7ly88nd7";
-      name = "breeze-plymouth-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/breeze-plymouth-5.21.5.tar.xz";
+      sha256 = "0rjbbvmngy4m073z9dyy59cdcvkjbxlqg55n19k8m0f6k0r2ibgk";
+      name = "breeze-plymouth-5.21.5.tar.xz";
     };
   };
   discover = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/discover-5.21.4.tar.xz";
-      sha256 = "1f3hvafyf2kga1ywn5aia37xxgagx6p2b43h7ap7mjkmw7ywyr30";
-      name = "discover-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/discover-5.21.5.tar.xz";
+      sha256 = "112g5xigfpazkh5m8pvd8dhiq44g1vnx7md4789pp6axl88dbf19";
+      name = "discover-5.21.5.tar.xz";
     };
   };
   drkonqi = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/drkonqi-5.21.4.tar.xz";
-      sha256 = "123l0hyyzskjivasp1q8w9y2f2mbjrwjap3yfi23h98zbzcblcaq";
-      name = "drkonqi-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/drkonqi-5.21.5.tar.xz";
+      sha256 = "1bn69i964467k3967934wkkypkzchdmnkxk5nqxs6md835sfb5a0";
+      name = "drkonqi-5.21.5.tar.xz";
     };
   };
   kactivitymanagerd = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kactivitymanagerd-5.21.4.tar.xz";
-      sha256 = "0waawpy5pqllj8iacrxpwsnz4m1yy7z8jih63s7psgr22cbvd116";
-      name = "kactivitymanagerd-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kactivitymanagerd-5.21.5.tar.xz";
+      sha256 = "1j7hkqlbhiq3hc2yb250x7zdidi4wndpnbm0x9aqrmi7mr63kdbp";
+      name = "kactivitymanagerd-5.21.5.tar.xz";
     };
   };
   kde-cli-tools = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kde-cli-tools-5.21.4.tar.xz";
-      sha256 = "1hvfb0qg6hxbyih665xwki8gbxjljgbw6x2blh2cikp7df66nhh1";
-      name = "kde-cli-tools-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kde-cli-tools-5.21.5.tar.xz";
+      sha256 = "0j8yv814qbyl5d5iyzcw5q6w08gkwhsvbdc19nmlbk9zldvy37rn";
+      name = "kde-cli-tools-5.21.5.tar.xz";
     };
   };
   kdecoration = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kdecoration-5.21.4.tar.xz";
-      sha256 = "003yp803gnsszlnbw1lbh043h8xlrrzg92v7vls8k5cb04ib0p8a";
-      name = "kdecoration-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kdecoration-5.21.5.tar.xz";
+      sha256 = "0k6mhwkv4r5q57bm7jc9wf51gdk8h8zwafmkfqp7ddg5zmxhnmdw";
+      name = "kdecoration-5.21.5.tar.xz";
     };
   };
   kde-gtk-config = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kde-gtk-config-5.21.4.tar.xz";
-      sha256 = "0g7h1l5q9hdi2iq1kh5aclxjw1ffpq1l020p37k7f251m49440y8";
-      name = "kde-gtk-config-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kde-gtk-config-5.21.5.tar.xz";
+      sha256 = "07gc8rydqnvsyrjvgy99ggl5imklzzrmhc36q7kdkp5zkjm7i4gk";
+      name = "kde-gtk-config-5.21.5.tar.xz";
     };
   };
   kdeplasma-addons = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kdeplasma-addons-5.21.4.tar.xz";
-      sha256 = "18jny36w6zf4nfqffaqgmdgp4vcaa2civnd2lrrls8jhlz81grid";
-      name = "kdeplasma-addons-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kdeplasma-addons-5.21.5.tar.xz";
+      sha256 = "0zbxc58z4v3hl2m9p8gc035k4bmimwv1k0y6gsdviclvdhkdfv9w";
+      name = "kdeplasma-addons-5.21.5.tar.xz";
     };
   };
   kgamma5 = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kgamma5-5.21.4.tar.xz";
-      sha256 = "1rzn3d7i2i4bba9nfydbsvjqc7wzfz9lgd7qg74k19hzmfiqfhsl";
-      name = "kgamma5-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kgamma5-5.21.5.tar.xz";
+      sha256 = "1qaqcns4xnlxw6pjn7h3gdmwly8w94p9l03bnar7gb75ir342jz6";
+      name = "kgamma5-5.21.5.tar.xz";
     };
   };
   khotkeys = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/khotkeys-5.21.4.tar.xz";
-      sha256 = "05k6b8zilll97s14s50x27dk8p4lzmld95gzgrsv4i81jdvjgx53";
-      name = "khotkeys-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/khotkeys-5.21.5.tar.xz";
+      sha256 = "04wwz6ji4pna4jd8ps14i9r1s86fdmm7dh8qfy3qz4jzf2gjjn1d";
+      name = "khotkeys-5.21.5.tar.xz";
     };
   };
   kinfocenter = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kinfocenter-5.21.4.tar.xz";
-      sha256 = "150kfx4cb10zjsaqkyidh1qis5644849xfqfnd5ldwsn07nkyp1y";
-      name = "kinfocenter-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kinfocenter-5.21.5.tar.xz";
+      sha256 = "177llrwhk54s91f69ny5v17w1kvqizap55h40kc1a5bndlgqfnki";
+      name = "kinfocenter-5.21.5.tar.xz";
     };
   };
   kmenuedit = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kmenuedit-5.21.4.tar.xz";
-      sha256 = "1hmqji2ahkw3knv7pcj5m86zlmxmbsz98xv2igdx2gv6hrjbn8nh";
-      name = "kmenuedit-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kmenuedit-5.21.5.tar.xz";
+      sha256 = "0yzdx80jgjiaw7nk897m151pg67q11qyww2j8r8rx22bz06rfi70";
+      name = "kmenuedit-5.21.5.tar.xz";
     };
   };
   kscreen = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kscreen-5.21.4.tar.xz";
-      sha256 = "1n9ymmysdfipwwi3f6ixg1kh3pkbp5wvi2y8fli0cpjdbrfj5lfr";
-      name = "kscreen-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kscreen-5.21.5.tar.xz";
+      sha256 = "1nl43888jib16z0djzy3mck6h9rahdwwdwk76y1hp3nhbbaqnsa6";
+      name = "kscreen-5.21.5.tar.xz";
     };
   };
   kscreenlocker = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kscreenlocker-5.21.4.tar.xz";
-      sha256 = "1z94p93khl2b8zz965d6wdd4vi1q60f0s2a7ca9ph06gp8d574k4";
-      name = "kscreenlocker-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kscreenlocker-5.21.5.tar.xz";
+      sha256 = "0drnj3xdza9cbw8124ja2bic8y37k8q1p7mwfxvhgqciqyvpdb8x";
+      name = "kscreenlocker-5.21.5.tar.xz";
     };
   };
   ksshaskpass = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/ksshaskpass-5.21.4.tar.xz";
-      sha256 = "0zj4160xs940b9rin43b0a3j6czm3n04drg484y1h2mfqjflgc61";
-      name = "ksshaskpass-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/ksshaskpass-5.21.5.tar.xz";
+      sha256 = "06gi254yq4cr8f5rl83aprsvvham9h5q4jk6cfd67ghwk6ln7yd2";
+      name = "ksshaskpass-5.21.5.tar.xz";
     };
   };
   ksysguard = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/ksysguard-5.21.4.tar.xz";
-      sha256 = "10p5bb80rcawd0qdm4f17whmqrfhzhv6hd20d57f1i9m7ijq456d";
-      name = "ksysguard-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/ksysguard-5.21.5.tar.xz";
+      sha256 = "1c0vr85j3b1pshyd4w12w9i57bg21gkpvdh1rgqimsnj7yw38fqh";
+      name = "ksysguard-5.21.5.tar.xz";
     };
   };
   kwallet-pam = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kwallet-pam-5.21.4.tar.xz";
-      sha256 = "0s3wy9qikciblr6g98kn6s4ii5pnqwcngzng0czr3r4p90w33kkg";
-      name = "kwallet-pam-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kwallet-pam-5.21.5.tar.xz";
+      sha256 = "0svf0iabgfm0sizgar1cbxn2577r04nxh91fznq7jp5zj3lk0gxz";
+      name = "kwallet-pam-5.21.5.tar.xz";
     };
   };
   kwayland-integration = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kwayland-integration-5.21.4.tar.xz";
-      sha256 = "1r3fmmzmdyfdam4hsjvjv3wss5zvyi674xsyn6csclmq3jwfz70k";
-      name = "kwayland-integration-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kwayland-integration-5.21.5.tar.xz";
+      sha256 = "1wh44hy1mmrn4kg8jppqvxk9zzfrbiyqzc2i6lfnzic4llz7275x";
+      name = "kwayland-integration-5.21.5.tar.xz";
     };
   };
   kwayland-server = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kwayland-server-5.21.4.tar.xz";
-      sha256 = "1mkivw3siyxhgyhrm6fkqmp2wiswckrb433q87dh1j9gp7kg8cpz";
-      name = "kwayland-server-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kwayland-server-5.21.5.tar.xz";
+      sha256 = "1j91iqzrip5ady4cz5ipiirs0dhvib05wwa8h7dqa7ysidpc3krg";
+      name = "kwayland-server-5.21.5.tar.xz";
     };
   };
   kwin = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kwin-5.21.4.tar.xz";
-      sha256 = "0br3hxnbqm2vyxcxind01784zd88bkhpz6ira03g3gjq7hlwzjx9";
-      name = "kwin-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kwin-5.21.5.tar.xz";
+      sha256 = "0cc3h1n6g902ff50aj3w631cmg6gjaqfvqsfa5jkbxrvl7xfv1m2";
+      name = "kwin-5.21.5.tar.xz";
     };
   };
   kwrited = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/kwrited-5.21.4.tar.xz";
-      sha256 = "1hrsy1r7b7sgnj0l8zn1yxlrfhrrbk8rq2frbfi329fk3psca247";
-      name = "kwrited-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/kwrited-5.21.5.tar.xz";
+      sha256 = "0ki9j44ccgrnm7nh8ddwwkv0144yn2ygfijf0yjyyzb5p5391rz1";
+      name = "kwrited-5.21.5.tar.xz";
     };
   };
   libkscreen = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/libkscreen-5.21.4.tar.xz";
-      sha256 = "0b0mlc1lzfbkpzxs8rd7s7q5xmqla6p1q1jdnjxly3wj60pas2dc";
-      name = "libkscreen-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/libkscreen-5.21.5.tar.xz";
+      sha256 = "1fkw3rykpj4vvc1iw19kcjhvdbbll6bag91icaxznpir3bvry18k";
+      name = "libkscreen-5.21.5.tar.xz";
     };
   };
   libksysguard = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/libksysguard-5.21.4.tar.xz";
-      sha256 = "0sziqldjwcwpblkn7mn4w9xg34lv9pzdlc87andka4g1lxcln2gc";
-      name = "libksysguard-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/libksysguard-5.21.5.tar.xz";
+      sha256 = "1s7b336ljvnyjsqfn6f6jqbr7k9l4afh2b5rqj7d4ifjm63wdy2z";
+      name = "libksysguard-5.21.5.tar.xz";
     };
   };
   milou = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/milou-5.21.4.tar.xz";
-      sha256 = "0y6mvzc5prgg1n7z2gzv1b7ngh0fygggrhdbk5wvpy6zp8yanwka";
-      name = "milou-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/milou-5.21.5.tar.xz";
+      sha256 = "061vd1slk1h0m4l22sxzkzliag4f8bmrv6cbfhdhhk5a90xxph1i";
+      name = "milou-5.21.5.tar.xz";
     };
   };
   oxygen = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/oxygen-5.21.4.tar.xz";
-      sha256 = "1d7cdpy3k7zyg3k6n6jz2473cqhbi7npgnpka4kc2lfjrkb9s0zj";
-      name = "oxygen-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/oxygen-5.21.5.tar.xz";
+      sha256 = "0j9nv00fxy7l62w7486410ivn8hyfnv736740dqqpl1q4jvd62mc";
+      name = "oxygen-5.21.5.tar.xz";
     };
   };
   plasma-browser-integration = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-browser-integration-5.21.4.tar.xz";
-      sha256 = "14yna45ykfa88a17iy4c5qkd673ay818693qqn13s4zwkxriby3n";
-      name = "plasma-browser-integration-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-browser-integration-5.21.5.tar.xz";
+      sha256 = "16v43m5nd48if8j2rbrkklk3w1rg6icggx9hdcw6765q0h1251ab";
+      name = "plasma-browser-integration-5.21.5.tar.xz";
     };
   };
   plasma-desktop = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-desktop-5.21.4.tar.xz";
-      sha256 = "1drv50601030xvskkw1pa5hi5ngrx2i8lkj7m8i9pym8zy15qqy9";
-      name = "plasma-desktop-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-desktop-5.21.5.tar.xz";
+      sha256 = "09qsnc7dck4j54aj19g94jrd2ifgs7gbxql1ccidj8c0bhq7wl6y";
+      name = "plasma-desktop-5.21.5.tar.xz";
     };
   };
   plasma-disks = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-disks-5.21.4.tar.xz";
-      sha256 = "1hjihh088v1w03lpz5pcz6pycbpd8b8kh54a44pq7zkhh6l6n65g";
-      name = "plasma-disks-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-disks-5.21.5.tar.xz";
+      sha256 = "1850ms6nmff4mlfshdbbjlf77siv9h6isldhxk36n555mrrq4791";
+      name = "plasma-disks-5.21.5.tar.xz";
     };
   };
   plasma-firewall = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-firewall-5.21.4.tar.xz";
-      sha256 = "1in9maphksc7ajj6jhy0qxgw5f7fy4m23dpik6wvxc5r3v5b76z7";
-      name = "plasma-firewall-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-firewall-5.21.5.tar.xz";
+      sha256 = "1wal8izrwhm20jkjiqf55y6pk2l3ljk16racb8isr73m568ii6ak";
+      name = "plasma-firewall-5.21.5.tar.xz";
     };
   };
   plasma-integration = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-integration-5.21.4.tar.xz";
-      sha256 = "0bj2k5c4170apy7ascfdqc052jm35pi2w5zb3m39qb5b7ylq1hhw";
-      name = "plasma-integration-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-integration-5.21.5.tar.xz";
+      sha256 = "0x8chc6r3ibv4xxmgi27c0mkr5ym9imw8zzxl596llm4r5q5ax0y";
+      name = "plasma-integration-5.21.5.tar.xz";
     };
   };
   plasma-nano = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-nano-5.21.4.tar.xz";
-      sha256 = "0v5vr5di9bk57g2xi442qj8yv9219mdpc0l0n2bsvbb8x4f0d5qk";
-      name = "plasma-nano-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-nano-5.21.5.tar.xz";
+      sha256 = "04irqa41y6j4582035inkgwy1q27w0fq7fckfj7pbbjz4p9wqx26";
+      name = "plasma-nano-5.21.5.tar.xz";
     };
   };
   plasma-nm = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-nm-5.21.4.tar.xz";
-      sha256 = "1gy1drykjyipmrpqbb7yk2232g5hzy316gkmr45invgfg3fizl73";
-      name = "plasma-nm-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-nm-5.21.5.tar.xz";
+      sha256 = "18qbf2n08qcdw6pshhipnpr7sab8nmhj7bfr3qb23s4ildhfd64h";
+      name = "plasma-nm-5.21.5.tar.xz";
     };
   };
   plasma-pa = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-pa-5.21.4.tar.xz";
-      sha256 = "1rcghgqvasldmpianxhn980kc3nw1knmdlmxz52kngnpnimmqmz9";
-      name = "plasma-pa-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-pa-5.21.5.tar.xz";
+      sha256 = "00lhr8j5aj1xhyfsdzvm67d1bhqihrp3ki4zl0bqgvy89fi1xvzn";
+      name = "plasma-pa-5.21.5.tar.xz";
     };
   };
   plasma-phone-components = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-phone-components-5.21.4.tar.xz";
-      sha256 = "08dpch4c6q59c9ys4n4w1hky09886hi1wqxgwwr4lyp02g3xmwbd";
-      name = "plasma-phone-components-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-phone-components-5.21.5.tar.xz";
+      sha256 = "0sg78n5fr38n629h0mf66d61hh43hq2r1ag69krb5g0cdycdj6w1";
+      name = "plasma-phone-components-5.21.5.tar.xz";
     };
   };
   plasma-sdk = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-sdk-5.21.4.tar.xz";
-      sha256 = "1cn0lq3d5ipmlwkjzarm7s5ipx6ybjv9cz93pnpxkfxlbi47q0s0";
-      name = "plasma-sdk-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-sdk-5.21.5.tar.xz";
+      sha256 = "15ay8jiyyg2h25w4lnvxjnl606bqjk5j3asgnzjkz3n9ny9c1ah1";
+      name = "plasma-sdk-5.21.5.tar.xz";
     };
   };
   plasma-systemmonitor = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-systemmonitor-5.21.4.tar.xz";
-      sha256 = "16mrq66qripffnj4gskzb6l52hqw9siqr8cwxq618cwk5g7hg544";
-      name = "plasma-systemmonitor-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-systemmonitor-5.21.5.tar.xz";
+      sha256 = "1kwfk3b0y2ssj90qwv3diazl5bpf75aigxy7wvp6izbjsjn7yk9w";
+      name = "plasma-systemmonitor-5.21.5.tar.xz";
     };
   };
   plasma-tests = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-tests-5.21.4.tar.xz";
-      sha256 = "0mxl3laym3wlhqnq7pmjm1g9mm0r306dnsr3yjl5mmhdx3dwb165";
-      name = "plasma-tests-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-tests-5.21.5.tar.xz";
+      sha256 = "107a0rq220mjhd2g77xaxgs9k29iyzfg5s64rbxrqs8kjzb0h90k";
+      name = "plasma-tests-5.21.5.tar.xz";
     };
   };
   plasma-thunderbolt = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-thunderbolt-5.21.4.tar.xz";
-      sha256 = "10r90hjm1ykigy587kdna6cydbbh9y4h7rbifx2r5rjzkhp9mihd";
-      name = "plasma-thunderbolt-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-thunderbolt-5.21.5.tar.xz";
+      sha256 = "161c94haajs7vnbb0lk94h4mb9kd0by7jai1f8lj0zksk6g5vf51";
+      name = "plasma-thunderbolt-5.21.5.tar.xz";
     };
   };
   plasma-vault = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-vault-5.21.4.tar.xz";
-      sha256 = "13d4z2g34skhw11wykhwyigdzxpa12pgq01i30km5cyp0idi6xy5";
-      name = "plasma-vault-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-vault-5.21.5.tar.xz";
+      sha256 = "16wpv37jvcbl0p3s3jh15rsjf81bblpc4vxn508mg7z543dba6bm";
+      name = "plasma-vault-5.21.5.tar.xz";
     };
   };
   plasma-workspace = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-workspace-5.21.4.tar.xz";
-      sha256 = "1m98ssdq4vzhlqazd87qmgryi3fhmp68y47qw95yhaxnf12ih2xs";
-      name = "plasma-workspace-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-workspace-5.21.5.tar.xz";
+      sha256 = "02p931b0iz7gak8i7bhig3j9p7xs6fam7k6hhb5f1bd9pks6xccw";
+      name = "plasma-workspace-5.21.5.tar.xz";
     };
   };
   plasma-workspace-wallpapers = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plasma-workspace-wallpapers-5.21.4.tar.xz";
-      sha256 = "1myqz90b1fcmzgq08a15mlikn83iv6hflmdw7985419w7cly81n7";
-      name = "plasma-workspace-wallpapers-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plasma-workspace-wallpapers-5.21.5.tar.xz";
+      sha256 = "0jj0092mhnf45qk84zbisqbndvwg0c160dnra73p5qp1dldwv6km";
+      name = "plasma-workspace-wallpapers-5.21.5.tar.xz";
     };
   };
   plymouth-kcm = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/plymouth-kcm-5.21.4.tar.xz";
-      sha256 = "1d0na5831azka04n3j78582i3hy5ns1hpdw24y558rly16w80z60";
-      name = "plymouth-kcm-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/plymouth-kcm-5.21.5.tar.xz";
+      sha256 = "1janrgz8934pzz83npk02p63vxasbmr3dy39x36qr4qmk9b8qzv0";
+      name = "plymouth-kcm-5.21.5.tar.xz";
     };
   };
   polkit-kde-agent = {
-    version = "1-5.21.4";
+    version = "1-5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/polkit-kde-agent-1-5.21.4.tar.xz";
-      sha256 = "0lg2ls4fb135p64y3kmkxczrqmqzlzdq4ywsrf58ayi42drghdmj";
-      name = "polkit-kde-agent-1-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/polkit-kde-agent-1-5.21.5.tar.xz";
+      sha256 = "1bc9sqg77xywly7yllzrr81agny96hj5as7gi8n0ji4i9l4av2z6";
+      name = "polkit-kde-agent-1-5.21.5.tar.xz";
     };
   };
   powerdevil = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/powerdevil-5.21.4.tar.xz";
-      sha256 = "0i84k7dv8nvww0pfly2d7mplydjgzdkh14sd17113rlwzyfp5wf6";
-      name = "powerdevil-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/powerdevil-5.21.5.tar.xz";
+      sha256 = "18yxs115qk9mgq0mi2ycaqs43c2m9rha7wz245yz2ib3axdk1c7x";
+      name = "powerdevil-5.21.5.tar.xz";
     };
   };
   qqc2-breeze-style = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/qqc2-breeze-style-5.21.4.tar.xz";
-      sha256 = "0ny9i75zm0j4m103kazs6lnny8lcmisgl6kmyvjwsnxfl0wfrdww";
-      name = "qqc2-breeze-style-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/qqc2-breeze-style-5.21.5.tar.xz";
+      sha256 = "01z91xr2m9j2ch2d3g10vqy60lflvzp8x9wa7p0nsjm5h3fd9jiy";
+      name = "qqc2-breeze-style-5.21.5.tar.xz";
     };
   };
   sddm-kcm = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/sddm-kcm-5.21.4.tar.xz";
-      sha256 = "00940pi4x7is88w6b25f5chqhi97xqvnmn92jzy629p1g8zg75ik";
-      name = "sddm-kcm-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/sddm-kcm-5.21.5.tar.xz";
+      sha256 = "0v9drq9dlgrv5lkxj3sr2a7ky2h2cqghkq2csh43h8v7a7kwi02j";
+      name = "sddm-kcm-5.21.5.tar.xz";
     };
   };
   systemsettings = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/systemsettings-5.21.4.tar.xz";
-      sha256 = "017d42fdb8dn1srni4lvdyvraaflybbcwkdgdl98vwyv9hw0qjq3";
-      name = "systemsettings-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/systemsettings-5.21.5.tar.xz";
+      sha256 = "1kbsk37fmin0afw5wrn70504bn0cd5pm7i0bppmpi5y81mplwy4m";
+      name = "systemsettings-5.21.5.tar.xz";
     };
   };
   xdg-desktop-portal-kde = {
-    version = "5.21.4";
+    version = "5.21.5";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.21.4/xdg-desktop-portal-kde-5.21.4.tar.xz";
-      sha256 = "01klvbvivw2zd478vj7bq0dn7l5mwsrqhnkj8hd5vc9xcaq6kgzg";
-      name = "xdg-desktop-portal-kde-5.21.4.tar.xz";
+      url = "${mirror}/stable/plasma/5.21.5/xdg-desktop-portal-kde-5.21.5.tar.xz";
+      sha256 = "11c2ndmb432j4gwnvmyliycmd0fqyxj76ywki9hi66cv1lifm9xh";
+      name = "xdg-desktop-portal-kde-5.21.5.tar.xz";
     };
   };
 }
diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix
index aebe7b30f1a..1b4aa6b3214 100644
--- a/pkgs/development/compilers/gcc/10/default.nix
+++ b/pkgs/development/compilers/gcc/10/default.nix
@@ -103,9 +103,15 @@ stdenv.mkDerivation ({
 
   hardeningDisable = [ "format" "pie" ];
 
+  postPatch = ''
+    configureScripts=$(find . -name configure)
+    for configureScript in $configureScripts; do
+      patchShebangs $configureScript
+    done
+  ''
   # This should kill all the stdinc frameworks that gcc and friends like to
   # insert into default search paths.
-  prePatch = lib.optionalString hostPlatform.isDarwin ''
+  + lib.optionalString hostPlatform.isDarwin ''
     substituteInPlace gcc/config/darwin-c.c \
       --replace 'if (stdinc)' 'if (0)'
 
@@ -114,14 +120,8 @@ stdenv.mkDerivation ({
 
     substituteInPlace libgfortran/configure \
       --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
-  '';
-
-  postPatch = ''
-    configureScripts=$(find . -name configure)
-    for configureScript in $configureScripts; do
-      patchShebangs $configureScript
-    done
-  '' + (
+  ''
+  + (
     if targetPlatform != hostPlatform || stdenv.cc.libc != null then
       # On NixOS, use the right path to the dynamic linker instead of
       # `/lib/ld*.so'.
diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix
index c9d8663c0c4..cff1abf7267 100644
--- a/pkgs/development/compilers/gcc/11/default.nix
+++ b/pkgs/development/compilers/gcc/11/default.nix
@@ -72,6 +72,11 @@ let majorVersion = "11";
       ++ optional langFortran ../gfortran-driving.patch
       ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch
 
+      ++ optional (stdenv.isDarwin && stdenv.isAarch64) (fetchpatch {
+        url = "https://github.com/fxcoudert/gcc/compare/releases/gcc-11.1.0...gcc-11.1.0-arm-20210504.diff";
+        sha256 = "sha256-JqCGJAfbOxSmkNyq49aFHteK/RFsCSLQrL9mzUCnaD0=";
+      })
+
       # Obtain latest patch with ../update-mcfgthread-patches.sh
       ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch;
 
@@ -103,9 +108,15 @@ stdenv.mkDerivation ({
 
   hardeningDisable = [ "format" "pie" ];
 
+  postPatch = ''
+    configureScripts=$(find . -name configure)
+    for configureScript in $configureScripts; do
+      patchShebangs $configureScript
+    done
+  ''
   # This should kill all the stdinc frameworks that gcc and friends like to
   # insert into default search paths.
-  prePatch = lib.optionalString hostPlatform.isDarwin ''
+  + lib.optionalString hostPlatform.isDarwin ''
     substituteInPlace gcc/config/darwin-c.c \
       --replace 'if (stdinc)' 'if (0)'
 
@@ -114,14 +125,8 @@ stdenv.mkDerivation ({
 
     substituteInPlace libgfortran/configure \
       --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
-  '';
-
-  postPatch = ''
-    configureScripts=$(find . -name configure)
-    for configureScript in $configureScripts; do
-      patchShebangs $configureScript
-    done
-  '' + (
+  ''
+  + (
     if targetPlatform != hostPlatform || stdenv.cc.libc != null then
       # On NixOS, use the right path to the dynamic linker instead of
       # `/lib/ld*.so'.
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index 069d9c18a62..b70d8a57b9d 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -154,7 +154,7 @@ stdenv.mkDerivation ({
 
   hardeningDisable = [ "format" "pie" ];
 
-  prePatch =
+  postPatch =
     # This should kill all the stdinc frameworks that gcc and friends like to
     # insert into default search paths.
     lib.optionalString hostPlatform.isDarwin ''
@@ -166,9 +166,8 @@ stdenv.mkDerivation ({
 
       substituteInPlace libgfortran/configure \
         --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
-    '';
-
-  postPatch =
+    ''
+  + (
     if targetPlatform != hostPlatform || stdenv.cc.libc != null then
       # On NixOS, use the right path to the dynamic linker instead of
       # `/lib/ld*.so'.
@@ -191,7 +190,7 @@ stdenv.mkDerivation ({
             sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
         ''
         )
-    else null;
+    else "");
 
   inherit noSysDirs staticCompiler langJava crossStageStatic
     libcCross crossMingw;
diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix
index 1f153b0fb3a..5ffe6aba90f 100644
--- a/pkgs/development/compilers/gcc/7/default.nix
+++ b/pkgs/development/compilers/gcc/7/default.nix
@@ -114,9 +114,15 @@ stdenv.mkDerivation ({
 
   hardeningDisable = [ "format" "pie" ];
 
+  postPatch = ''
+    configureScripts=$(find . -name configure)
+    for configureScript in $configureScripts; do
+      patchShebangs $configureScript
+    done
+  ''
   # This should kill all the stdinc frameworks that gcc and friends like to
   # insert into default search paths.
-  prePatch = lib.optionalString hostPlatform.isDarwin ''
+  + lib.optionalString hostPlatform.isDarwin ''
     substituteInPlace gcc/config/darwin-c.c \
       --replace 'if (stdinc)' 'if (0)'
 
@@ -125,14 +131,8 @@ stdenv.mkDerivation ({
 
     substituteInPlace libgfortran/configure \
       --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
-  '';
-
-  postPatch = ''
-    configureScripts=$(find . -name configure)
-    for configureScript in $configureScripts; do
-      patchShebangs $configureScript
-    done
-  '' + (
+  ''
+  + (
     if targetPlatform != hostPlatform || stdenv.cc.libc != null then
       # On NixOS, use the right path to the dynamic linker instead of
       # `/lib/ld*.so'.
diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix
index 4d9e216947d..754f189d508 100644
--- a/pkgs/development/compilers/gcc/8/default.nix
+++ b/pkgs/development/compilers/gcc/8/default.nix
@@ -101,9 +101,15 @@ stdenv.mkDerivation ({
 
   hardeningDisable = [ "format" "pie" ];
 
+  postPatch = ''
+    configureScripts=$(find . -name configure)
+    for configureScript in $configureScripts; do
+      patchShebangs $configureScript
+    done
+  ''
   # This should kill all the stdinc frameworks that gcc and friends like to
   # insert into default search paths.
-  prePatch = lib.optionalString hostPlatform.isDarwin ''
+  + lib.optionalString hostPlatform.isDarwin ''
     substituteInPlace gcc/config/darwin-c.c \
       --replace 'if (stdinc)' 'if (0)'
 
@@ -112,14 +118,8 @@ stdenv.mkDerivation ({
 
     substituteInPlace libgfortran/configure \
       --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
-  '';
-
-  postPatch = ''
-    configureScripts=$(find . -name configure)
-    for configureScript in $configureScripts; do
-      patchShebangs $configureScript
-    done
-  '' + (
+  ''
+  + (
     if targetPlatform != hostPlatform || stdenv.cc.libc != null then
       # On NixOS, use the right path to the dynamic linker instead of
       # `/lib/ld*.so'.
diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix
index 09cf7e98db7..5be6dc5811e 100644
--- a/pkgs/development/compilers/gcc/9/default.nix
+++ b/pkgs/development/compilers/gcc/9/default.nix
@@ -117,9 +117,15 @@ stdenv.mkDerivation ({
 
   hardeningDisable = [ "format" "pie" ];
 
+  postPatch = ''
+    configureScripts=$(find . -name configure)
+    for configureScript in $configureScripts; do
+      patchShebangs $configureScript
+    done
+  ''
   # This should kill all the stdinc frameworks that gcc and friends like to
   # insert into default search paths.
-  prePatch = lib.optionalString hostPlatform.isDarwin ''
+  + lib.optionalString hostPlatform.isDarwin ''
     substituteInPlace gcc/config/darwin-c.c \
       --replace 'if (stdinc)' 'if (0)'
 
@@ -128,14 +134,8 @@ stdenv.mkDerivation ({
 
     substituteInPlace libgfortran/configure \
       --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
-  '';
-
-  postPatch = ''
-    configureScripts=$(find . -name configure)
-    for configureScript in $configureScripts; do
-      patchShebangs $configureScript
-    done
-  '' + (
+  ''
+  + (
     if targetPlatform != hostPlatform || stdenv.cc.libc != null then
       # On NixOS, use the right path to the dynamic linker instead of
       # `/lib/ld*.so'.
diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix
index 42deb970dfe..997771c2abf 100644
--- a/pkgs/development/compilers/gcc/common/configure-flags.nix
+++ b/pkgs/development/compilers/gcc/common/configure-flags.nix
@@ -185,7 +185,8 @@ let
     ++ lib.optional javaAwtGtk "--enable-java-awt=gtk"
     ++ lib.optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}"
 
-    ++ (import ../common/platform-flags.nix { inherit (stdenv)  targetPlatform; inherit lib; })
+    # TODO: aarch64-darwin has clang stdenv and its arch and cpu flag values are incompatible with gcc
+    ++ lib.optional (!(stdenv.isDarwin && stdenv.isAarch64)) (import ../common/platform-flags.nix { inherit (stdenv)  targetPlatform; inherit lib; })
     ++ lib.optionals (targetPlatform != hostPlatform) crossConfigureFlags
     ++ lib.optional (targetPlatform != hostPlatform) "--disable-bootstrap"
 
diff --git a/pkgs/development/compilers/llvm/10/bintools.nix b/pkgs/development/compilers/llvm/10/bintools/default.nix
index 53f7941e336..53f7941e336 100644
--- a/pkgs/development/compilers/llvm/10/bintools.nix
+++ b/pkgs/development/compilers/llvm/10/bintools/default.nix
diff --git a/pkgs/development/compilers/llvm/10/clang/default.nix b/pkgs/development/compilers/llvm/10/clang/default.nix
index d228c4261af..e0c52651cad 100644
--- a/pkgs/development/compilers/llvm/10/clang/default.nix
+++ b/pkgs/development/compilers/llvm/10/clang/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
+{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
 , buildLlvmTools
 , fixDarwinDylibNames
 , enableManpages ? false
@@ -96,11 +96,20 @@ let
       inherit libllvm;
     };
 
-    meta = {
-      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
-      homepage    = "https://llvm.org/";
-      license     = lib.licenses.ncsa;
-      platforms   = lib.platforms.all;
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
     };
   } // lib.optionalAttrs enableManpages {
     pname = "clang-manpages";
@@ -119,6 +128,8 @@ let
 
     doCheck = false;
 
-    meta.description = "man page for Clang ${version}";
+    meta = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
   });
 in self
diff --git a/pkgs/development/compilers/llvm/10/compiler-rt/default.nix b/pkgs/development/compilers/llvm/10/compiler-rt/default.nix
index 1f990ac433d..37c7e0599b5 100644
--- a/pkgs/development/compilers/llvm/10/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/10/compiler-rt/default.nix
@@ -1,17 +1,18 @@
-{ lib, stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }:
 
 let
 
   useLLVM = stdenv.hostPlatform.useLLVM or false;
   bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
   inherit (stdenv.hostPlatform) isMusl;
 
 in
 
-stdenv.mkDerivation rec {
-  pname = "compiler-rt";
+stdenv.mkDerivation {
+  pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc";
   inherit version;
-  src = fetch pname "1yjqjri753w0fzmxcyz687nvd97sbc9rsqrxzpq720na47hwh3fr";
+  src = fetch "compiler-rt" "1yjqjri753w0fzmxcyz687nvd97sbc9rsqrxzpq720na47hwh3fr";
 
   nativeBuildInputs = [ cmake python3 llvm.dev ];
   buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
@@ -29,14 +30,15 @@ stdenv.mkDerivation rec {
     "-DCOMPILER_RT_BUILD_XRAY=OFF"
     "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
-  ] ++ lib.optionals (useLLVM || bareMetal) [
+  ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
     "-DCMAKE_C_COMPILER_WORKS=ON"
     "-DCMAKE_CXX_COMPILER_WORKS=ON"
     "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
     "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ lib.optionals (useLLVM && !haveLibc) [
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
   ] ++ lib.optionals (useLLVM) [
     "-DCOMPILER_RT_BUILD_BUILTINS=ON"
-    "-DCMAKE_C_FLAGS=-nodefaultlibs"
     #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
     "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
   ] ++ lib.optionals (bareMetal) [
@@ -58,7 +60,6 @@ stdenv.mkDerivation rec {
   ]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
     ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;
 
-
   # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
   # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
   # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
@@ -89,4 +90,19 @@ stdenv.mkDerivation rec {
     ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
   '';
 
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
 }
diff --git a/pkgs/development/compilers/llvm/10/default.nix b/pkgs/development/compilers/llvm/10/default.nix
index e2e78e16d79..11367d453cd 100644
--- a/pkgs/development/compilers/llvm/10/default.nix
+++ b/pkgs/development/compilers/llvm/10/default.nix
@@ -1,7 +1,19 @@
-{ lowPrio, newScope, pkgs, lib, stdenv, cmake, gccForLibs
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, gccForLibs, preLibcCrossHeaders
 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
 , buildLlvmTools # tools, but from the previous stage, for cross
 , targetLlvmLibraries # libraries, but from the next stage, for cross
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM verion's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
 }:
 
 let
@@ -16,6 +28,12 @@ let
 
   clang-tools-extra_src = fetch "clang-tools-extra" "06n1yp638rh24xdxv9v2df0qajxbjz4w59b7dd4ky36drwmpi4yh";
 
+  llvm_meta = {
+    license     = lib.licenses.ncsa;
+    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
+    platforms   = lib.platforms.all;
+  };
+
   tools = lib.makeExtensible (tools: let
     callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
     mkExtraBuildCommands0 = cc: ''
@@ -29,16 +47,27 @@ let
       ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
     '';
 
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
   in {
 
-    libllvm = callPackage ./llvm { };
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
 
     # `llvm` historically had the binaries.  When choosing an output explicitly,
     # we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
     llvm = tools.libllvm.out // { outputUnspecified = true; };
 
     libclang = callPackage ./clang {
-      inherit clang-tools-extra_src;
+      inherit clang-tools-extra_src llvm_meta;
     };
 
     clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
@@ -82,9 +111,13 @@ let
       extraBuildCommands = mkExtraBuildCommands cc;
     };
 
-    lld = callPackage ./lld {};
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
 
-    lldb = callPackage ./lldb {};
+    lldb = callPackage ./lldb {
+      inherit llvm_meta;
+    };
 
     # Below, is the LLVM bootstrapping logic. It handles building a
     # fully LLVM toolchain from scratch. No GCC toolchain should be
@@ -93,14 +126,21 @@ let
     # doesn’t support like LLVM. Probably we should move to some other
     # file.
 
-    bintools = callPackage ./bintools.nix {};
+    bintools-unwrapped = callPackage ./bintools {};
 
-    lldClang = wrapCCWith rec {
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = targetLlvmLibraries.libcxx;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.libcxxabi
         targetLlvmLibraries.compiler-rt
@@ -112,17 +152,17 @@ let
         echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
       '' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
         echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
+        echo "-lunwind" >> $out/nix-support/cc-ldflags
       '' + lib.optionalString stdenv.targetPlatform.isWasm ''
         echo "-fno-exceptions" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibcxx = wrapCCWith rec {
+    clangNoLibcxx = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -133,13 +173,10 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibc = wrapCCWith rec {
+    clangNoLibc = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -149,52 +186,77 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoCompilerRt = wrapCCWith rec {
+    clangNoCompilerRt = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [ ];
       extraBuildCommands = ''
         echo "-nostartfiles" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands0 cc;
     };
 
+    clangNoCompilerRtWithLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    };
+
   });
 
   libraries = lib.makeExtensible (libraries: let
     callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
   in {
 
-    compiler-rt = callPackage ./compiler-rt ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
-      }));
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
 
     stdenv = overrideCC stdenv buildLlvmTools.clang;
 
     libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
 
-    libcxx = callPackage ./libc++ ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-      }));
-
-    libcxxabi = callPackage ./libc++abi ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-        libunwind = libraries.libunwind;
-      }));
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    openmp = callPackage ./openmp.nix {};
+    libcxxabi = callPackage ./libcxxabi {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    libunwind = callPackage ./libunwind ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-      }));
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
+    openmp = callPackage ./openmp {
+      inherit llvm_meta;
+    };
   });
 
 in { inherit tools libraries; } // libraries // tools
diff --git a/pkgs/development/compilers/llvm/10/libc++/default.nix b/pkgs/development/compilers/llvm/10/libcxx/default.nix
index 1e5dc5b2dac..7c01e731711 100644
--- a/pkgs/development/compilers/llvm/10/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/10/libcxx/default.nix
@@ -1,9 +1,9 @@
-{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
+{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
 stdenv.mkDerivation {
-  pname = "libc++";
+  pname = "libcxx";
   inherit version;
 
   src = fetch "libcxx" "0v78bfr6h2zifvdqnj2wlfk4pvxzrqn3hg1v6lqk3y12bx9p9xny";
@@ -17,7 +17,9 @@ stdenv.mkDerivation {
 
   patches = [
     ./gnu-install-dirs.patch
-  ] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
 
   preConfigure = ''
     # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
@@ -47,10 +49,15 @@ stdenv.mkDerivation {
     isLLVM = true;
   };
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxx.llvm.org/";
-    description = "A new implementation of the C++ standard library, targeting C++11";
-    license = with lib.licenses; [ ncsa mit ];
-    platforms = lib.platforms.all;
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/10/libc++/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/10/libcxx/gnu-install-dirs.patch
index 4b031e90bdd..4b031e90bdd 100644
--- a/pkgs/development/compilers/llvm/10/libc++/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/10/libcxx/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/10/libc++abi/default.nix b/pkgs/development/compilers/llvm/10/libcxxabi/default.nix
index bc5e77b739d..b427949a842 100644
--- a/pkgs/development/compilers/llvm/10/libc++abi/default.nix
+++ b/pkgs/development/compilers/llvm/10/libcxxabi/default.nix
@@ -1,9 +1,9 @@
-{ lib, stdenv, cmake, fetch, libcxx, libunwind, llvm, version
+{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
 stdenv.mkDerivation {
-  pname = "libc++abi";
+  pname = "libcxxabi";
   inherit version;
 
   src = fetch "libcxxabi" "0yqs722y76cwvmfsq0lb917r9m3fci7bf5z3yzl71yz9n88ghzm9";
@@ -63,11 +63,15 @@ stdenv.mkDerivation {
       ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
     '';
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxxabi.llvm.org/";
-    description = "A new implementation of low level support for a standard C++ library";
-    license = with lib.licenses; [ ncsa mit ];
-    maintainers = with lib.maintainers; [ vlstill ];
-    platforms = lib.platforms.all;
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/10/libc++abi/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/10/libcxxabi/gnu-install-dirs.patch
index 0f80ade7c38..0f80ade7c38 100644
--- a/pkgs/development/compilers/llvm/10/libc++abi/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/10/libcxxabi/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/10/libc++abi/no-threads.patch b/pkgs/development/compilers/llvm/10/libcxxabi/no-threads.patch
index 787f3e16500..787f3e16500 100644
--- a/pkgs/development/compilers/llvm/10/libc++abi/no-threads.patch
+++ b/pkgs/development/compilers/llvm/10/libcxxabi/no-threads.patch
diff --git a/pkgs/development/compilers/llvm/10/libc++abi/wasm.patch b/pkgs/development/compilers/llvm/10/libcxxabi/wasm.patch
index 4ebfe46aa81..4ebfe46aa81 100644
--- a/pkgs/development/compilers/llvm/10/libc++abi/wasm.patch
+++ b/pkgs/development/compilers/llvm/10/libcxxabi/wasm.patch
diff --git a/pkgs/development/compilers/llvm/10/libunwind/default.nix b/pkgs/development/compilers/llvm/10/libunwind/default.nix
index d010deb6618..8124cf0821e 100644
--- a/pkgs/development/compilers/llvm/10/libunwind/default.nix
+++ b/pkgs/development/compilers/llvm/10/libunwind/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, version, fetch, cmake, fetchpatch
+{ lib, stdenv, llvm_meta, version, fetch, cmake, fetchpatch
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
@@ -17,4 +17,16 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
 
   cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
 }
diff --git a/pkgs/development/compilers/llvm/10/lld/default.nix b/pkgs/development/compilers/llvm/10/lld/default.nix
index 03a48f02a0c..5d590aec35a 100644
--- a/pkgs/development/compilers/llvm/10/lld/default.nix
+++ b/pkgs/development/compilers/llvm/10/lld/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , buildLlvmTools
 , fetch
 , cmake
@@ -28,10 +28,16 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "lib" "dev" ];
 
-  meta = {
-    description = "The LLVM Linker";
-    homepage    = "https://lld.llvm.org/";
-    license     = lib.licenses.ncsa;
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/10/lldb/default.nix b/pkgs/development/compilers/llvm/10/lldb/default.nix
index ccca340b3e2..04b9e06e77a 100644
--- a/pkgs/development/compilers/llvm/10/lldb/default.nix
+++ b/pkgs/development/compilers/llvm/10/lldb/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , fetch
 , cmake
 , zlib
@@ -76,11 +76,15 @@ stdenv.mkDerivation (rec {
     ln -s $out/bin/llvm-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
   '';
 
-  meta = with lib; {
+  meta = llvm_meta // {
+    homepage = "https://lldb.llvm.org/";
     description = "A next-generation high-performance debugger";
-    homepage    = "https://lldb.llvm.org";
-    license     = licenses.ncsa;
-    platforms   = platforms.all;
+    longDescription = ''
+      LLDB is a next generation, high-performance debugger. It is built as a set
+      of reusable components which highly leverage existing libraries in the
+      larger LLVM Project, such as the Clang expression parser and LLVM
+      disassembler.
+    '';
   };
 } // lib.optionalAttrs enableManpages {
   pname = "lldb-manpages";
@@ -104,5 +108,7 @@ stdenv.mkDerivation (rec {
 
   doCheck = false;
 
-  meta.description = "man pages for LLDB ${version}";
+  meta = llvm_meta // {
+    description = "man pages for LLDB ${version}";
+  };
 })
diff --git a/pkgs/development/compilers/llvm/10/llvm/default.nix b/pkgs/development/compilers/llvm/10/llvm/default.nix
index 22ed308486d..93cdc7307da 100644
--- a/pkgs/development/compilers/llvm/10/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/10/llvm/default.nix
@@ -1,6 +1,7 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , pkgsBuildBuild
 , fetch
+, fetchpatch
 , cmake
 , python3
 , libffi
@@ -57,6 +58,13 @@ in stdenv.mkDerivation (rec {
 
   patches = [
     ./gnu-install-dirs.patch
+    # On older CPUs (e.g. Hydra/wendy) we'd be getting an error in this test.
+    (fetchpatch {
+      name = "uops-CMOV16rm-noreg.diff";
+      url = "https://github.com/llvm/llvm-project/commit/9e9f991ac033.diff";
+      sha256 = "sha256:12s8vr6ibri8b48h2z38f3afhwam10arfiqfy4yg37bmc054p5hi";
+      stripLen = 1;
+    })
   ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
 
   postPatch = optionalString stdenv.isDarwin ''
@@ -172,12 +180,23 @@ in stdenv.mkDerivation (rec {
   checkTarget = "check-all";
 
   requiredSystemFeatures = [ "big-parallel" ];
-  meta = {
-    description = "Collection of modular and reusable compiler and toolchain technologies";
-    homepage    = "https://llvm.org/";
-    license     = lib.licenses.ncsa;
-    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
   };
 } // lib.optionalAttrs enableManpages {
   pname = "llvm-manpages";
@@ -199,5 +218,7 @@ in stdenv.mkDerivation (rec {
 
   doCheck = false;
 
-  meta.description = "man pages for LLVM ${version}";
+  meta = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
 })
diff --git a/pkgs/development/compilers/llvm/10/openmp.nix b/pkgs/development/compilers/llvm/10/openmp.nix
deleted file mode 100644
index 2946c51fafe..00000000000
--- a/pkgs/development/compilers/llvm/10/openmp.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ lib
-, stdenv
-, fetch
-, cmake
-, llvm
-, perl
-, version
-}:
-
-stdenv.mkDerivation rec {
-  pname = "openmp";
-  inherit version;
-
-  src = fetch pname "0i4bn84lkpm5w3qkpvwm5z6jdj8fynp7d3bcasa1xyq4is6757yi";
-
-  nativeBuildInputs = [ cmake perl ];
-  buildInputs = [ llvm ];
-
-  meta = {
-    description = "Components required to build an executable OpenMP program";
-    homepage    = "https://openmp.llvm.org/";
-    license     = lib.licenses.mit;
-    platforms   = lib.platforms.all;
-  };
-}
diff --git a/pkgs/development/compilers/llvm/10/openmp/default.nix b/pkgs/development/compilers/llvm/10/openmp/default.nix
new file mode 100644
index 00000000000..a1b04c7c66b
--- /dev/null
+++ b/pkgs/development/compilers/llvm/10/openmp/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, llvm_meta
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch pname "0i4bn84lkpm5w3qkpvwm5z6jdj8fynp7d3bcasa1xyq4is6757yi";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/pkgs/development/compilers/llvm/11/bintools.nix b/pkgs/development/compilers/llvm/11/bintools/default.nix
index 53f7941e336..53f7941e336 100644
--- a/pkgs/development/compilers/llvm/11/bintools.nix
+++ b/pkgs/development/compilers/llvm/11/bintools/default.nix
diff --git a/pkgs/development/compilers/llvm/11/clang/default.nix b/pkgs/development/compilers/llvm/11/clang/default.nix
index 3b7accffbca..f23394a8b75 100644
--- a/pkgs/development/compilers/llvm/11/clang/default.nix
+++ b/pkgs/development/compilers/llvm/11/clang/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
+{ lib, stdenv, llvm_meta, fetch, fetchpatch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
 , buildLlvmTools
 , fixDarwinDylibNames
 , enableManpages ? false
@@ -45,6 +45,18 @@ let
       ./purity.patch
       # https://reviews.llvm.org/D51899
       ./gnu-install-dirs.patch
+      # Revert: [Driver] Default to -fno-common for all targets
+      # https://reviews.llvm.org/D75056
+      #
+      # Maintains compatibility with packages that haven't been fixed yet, and
+      # matches gcc10's configuration in nixpkgs.
+      (fetchpatch {
+        revert = true;
+        url = "https://github.com/llvm/llvm-project/commit/0a9fc9233e172601e26381810d093e02ef410f65.diff";
+        stripLen = 1;
+        excludes = [ "docs/*" "test/*" ];
+        sha256 = "0gxgmi0qbm89mq911dahallhi8m6wa9vpklklqmxafx4rplrr8ph";
+      })
     ];
 
     postPatch = ''
@@ -95,11 +107,20 @@ let
       inherit libllvm;
     };
 
-    meta = {
-      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
-      homepage    = "https://llvm.org/";
-      license     = lib.licenses.ncsa;
-      platforms   = lib.platforms.all;
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
     };
   } // lib.optionalAttrs enableManpages {
     pname = "clang-manpages";
@@ -118,6 +139,8 @@ let
 
     doCheck = false;
 
-    meta.description = "man page for Clang ${version}";
+    meta = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
   });
 in self
diff --git a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix
index 257bc34092f..65b024e8cc3 100644
--- a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix
@@ -1,20 +1,21 @@
-{ lib, stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }:
 
 let
 
   useLLVM = stdenv.hostPlatform.useLLVM or false;
+  isNewDarwinBootstrap = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;
   bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
   inherit (stdenv.hostPlatform) isMusl;
 
 in
 
-stdenv.mkDerivation rec {
-  pname = "compiler-rt";
+stdenv.mkDerivation {
+  pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc";
   inherit version;
-  src = fetch pname "0x1j8ngf1zj63wlnns9vlibafq48qcm72p4jpaxkmkb4qw0grwfy";
+  src = fetch "compiler-rt" "0x1j8ngf1zj63wlnns9vlibafq48qcm72p4jpaxkmkb4qw0grwfy";
 
   nativeBuildInputs = [ cmake python3 llvm.dev ];
-  buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
 
   NIX_CFLAGS_COMPILE = [
     "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
@@ -24,19 +25,20 @@ stdenv.mkDerivation rec {
     "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
     "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
     "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
-  ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isNewDarwinBootstrap) [
     "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
     "-DCOMPILER_RT_BUILD_XRAY=OFF"
     "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
-  ] ++ lib.optionals (useLLVM || bareMetal) [
+  ] ++ lib.optionals (!haveLibc || bareMetal) [
     "-DCMAKE_C_COMPILER_WORKS=ON"
     "-DCMAKE_CXX_COMPILER_WORKS=ON"
     "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
     "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
-  ] ++ lib.optionals (useLLVM) [
-    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+  ] ++ lib.optionals (!haveLibc) [
     "-DCMAKE_C_FLAGS=-nodefaultlibs"
+  ] ++ lib.optionals (useLLVM || isNewDarwinBootstrap) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
     #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
     "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
   ] ++ lib.optionals (bareMetal) [
@@ -60,6 +62,10 @@ stdenv.mkDerivation rec {
     ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;
 
 
+  preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    cmakeFlagsArray+=("-DCMAKE_LIPO=$(command -v ${stdenv.cc.targetPrefix}lipo)")
+  '';
+
   # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
   # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
   # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
@@ -70,7 +76,7 @@ stdenv.mkDerivation rec {
       --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
   '' + lib.optionalString stdenv.isDarwin ''
     substituteInPlace cmake/builtin-config-ix.cmake \
-      --replace 'set(ARM64 arm64 arm64e)' 'set(ARM64)'
+      --replace 'foreach(arch ''${ARM64})' 'foreach(arch)'
     substituteInPlace cmake/config-ix.cmake \
       --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
   '' + lib.optionalString (useLLVM) ''
@@ -92,4 +98,19 @@ stdenv.mkDerivation rec {
     ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
   '';
 
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
 }
diff --git a/pkgs/development/compilers/llvm/11/default.nix b/pkgs/development/compilers/llvm/11/default.nix
index 69c6564babe..3c6d767561e 100644
--- a/pkgs/development/compilers/llvm/11/default.nix
+++ b/pkgs/development/compilers/llvm/11/default.nix
@@ -1,7 +1,19 @@
-{ lowPrio, newScope, pkgs, lib, stdenv, cmake, gccForLibs
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, gccForLibs, preLibcCrossHeaders
 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
 , buildLlvmTools # tools, but from the previous stage, for cross
 , targetLlvmLibraries # libraries, but from the next stage, for cross
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM verion's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
 }:
 
 let
@@ -18,6 +30,12 @@ let
 
   clang-tools-extra_src = fetch "clang-tools-extra" "18n1w1hkv931xzq02b34wglbv6zd6sd0r5kb8piwvag7klj7qw3n";
 
+  llvm_meta = {
+    license     = lib.licenses.ncsa;
+    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
+    platforms   = lib.platforms.all;
+  };
+
   tools = lib.makeExtensible (tools: let
     callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
     mkExtraBuildCommands0 = cc: ''
@@ -31,16 +49,27 @@ let
       ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
     '';
 
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
   in {
 
-    libllvm = callPackage ./llvm { };
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
 
     # `llvm` historically had the binaries.  When choosing an output explicitly,
     # we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
     llvm = tools.libllvm.out // { outputUnspecified = true; };
 
     libclang = callPackage ./clang {
-      inherit clang-tools-extra_src;
+      inherit clang-tools-extra_src llvm_meta;
     };
 
     clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
@@ -83,9 +112,13 @@ let
       extraBuildCommands = mkExtraBuildCommands cc;
     };
 
-    lld = callPackage ./lld {};
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
 
-    lldb = callPackage ./lldb {};
+    lldb = callPackage ./lldb {
+      inherit llvm_meta;
+    };
 
     # Below, is the LLVM bootstrapping logic. It handles building a
     # fully LLVM toolchain from scratch. No GCC toolchain should be
@@ -94,14 +127,21 @@ let
     # doesn’t support like LLVM. Probably we should move to some other
     # file.
 
-    bintools = callPackage ./bintools.nix {};
+    bintools-unwrapped = callPackage ./bintools {};
 
-    lldClang = wrapCCWith rec {
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = targetLlvmLibraries.libcxx;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.libcxxabi
         targetLlvmLibraries.compiler-rt
@@ -113,17 +153,17 @@ let
         echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
       '' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
         echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
+        echo "-lunwind" >> $out/nix-support/cc-ldflags
       '' + lib.optionalString stdenv.targetPlatform.isWasm ''
         echo "-fno-exceptions" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibcxx = wrapCCWith rec {
+    clangNoLibcxx = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -134,13 +174,10 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibc = wrapCCWith rec {
+    clangNoLibc = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -150,52 +187,77 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoCompilerRt = wrapCCWith rec {
+    clangNoCompilerRt = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [ ];
       extraBuildCommands = ''
         echo "-nostartfiles" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands0 cc;
     };
 
+    clangNoCompilerRtWithLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    };
+
   });
 
   libraries = lib.makeExtensible (libraries: let
     callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
   in {
 
-    compiler-rt = callPackage ./compiler-rt ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
-      }));
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
 
     stdenv = overrideCC stdenv buildLlvmTools.clang;
 
     libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
 
-    libcxx = callPackage ./libc++ ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-      }));
-
-    libcxxabi = callPackage ./libc++abi ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-        libunwind = libraries.libunwind;
-      }));
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    openmp = callPackage ./openmp.nix {};
+    libcxxabi = callPackage ./libcxxabi {
+      inherit llvm_meta;
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    libunwind = callPackage ./libunwind ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-      }));
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
+    openmp = callPackage ./openmp {
+      inherit llvm_meta;
+    };
   });
 
 in { inherit tools libraries; } // libraries // tools
diff --git a/pkgs/development/compilers/llvm/11/libc++/default.nix b/pkgs/development/compilers/llvm/11/libcxx/default.nix
index e095350cea7..596d7f9976b 100644
--- a/pkgs/development/compilers/llvm/11/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/11/libcxx/default.nix
@@ -1,9 +1,9 @@
-{ lib, stdenv, fetch, fetchpatch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
+{ lib, stdenv, llvm_meta, fetch, fetchpatch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
 stdenv.mkDerivation {
-  pname = "libc++";
+  pname = "libcxx";
   inherit version;
 
   src = fetch "libcxx" "1rgqsqpgi0vkga5d7hy0iyfsqgzfz7q1xy7afdfa1snp1qjks8xv";
@@ -25,7 +25,9 @@ stdenv.mkDerivation {
       stripLen = 1;
     })
     ./gnu-install-dirs.patch
-  ] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
 
   preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
     patchShebangs utils/cat_files.py
@@ -44,16 +46,34 @@ stdenv.mkDerivation {
       "-DLIBCXX_ENABLE_THREADS=OFF"
       "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
       "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
-    ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
+    ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"
+
+    # TODO: this is a bit of a hack to cross compile to Apple Silicon.  libcxx
+    # starting with 11 enables CMAKE_BUILD_WITH_INSTALL_NAME_DIR which requires
+    # platform setup for rpaths. In cmake, this is enabled when macos is newer
+    # than 10.5. However CMAKE_SYSTEM_VERSION is set to empty (TODO: why?)
+    # which prevents the conditional configuration, and configure fails.  The
+    # value here corresponds to `uname -r`. If stdenv.hostPlatform.release is
+    # not null, then this property will be set via mkDerivation (TODO: how can
+    # we set this?).
+    ++ lib.optional (
+      stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 &&
+      stdenv.hostPlatform != stdenv.buildPlatform
+    ) "-DCMAKE_SYSTEM_VERSION=20.1.0";
 
   passthru = {
     isLLVM = true;
   };
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxx.llvm.org/";
-    description = "A new implementation of the C++ standard library, targeting C++11";
-    license = with lib.licenses; [ ncsa mit ];
-    platforms = lib.platforms.all;
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/11/libc++/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/11/libcxx/gnu-install-dirs.patch
index 2b95d6a85d8..2b95d6a85d8 100644
--- a/pkgs/development/compilers/llvm/11/libc++/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/11/libcxx/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/11/libc++abi/default.nix b/pkgs/development/compilers/llvm/11/libcxxabi/default.nix
index a79a0d2f07a..65e0139a591 100644
--- a/pkgs/development/compilers/llvm/11/libc++abi/default.nix
+++ b/pkgs/development/compilers/llvm/11/libcxxabi/default.nix
@@ -1,9 +1,9 @@
-{ lib, stdenv, cmake, fetch, libcxx, libunwind, llvm, version
+{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
 stdenv.mkDerivation {
-  pname = "libc++abi";
+  pname = "libcxxabi";
   inherit version;
 
   src = fetch "libcxxabi" "1azcf31mxw59hb1x17xncnm3dyw90ylh8rqx462lvypqh3nr6c8l";
@@ -48,7 +48,7 @@ stdenv.mkDerivation {
         # the magic combination of necessary CMake variables
         # if you fancy a try, take a look at
         # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-        install_name_tool -id $out/$file $file
+        ${stdenv.cc.targetPrefix}install_name_tool -id $out/$file $file
       done
       make install
       install -d 755 $out/include
@@ -64,11 +64,15 @@ stdenv.mkDerivation {
       ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
     '';
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxxabi.llvm.org/";
-    description = "A new implementation of low level support for a standard C++ library";
-    license = with lib.licenses; [ ncsa mit ];
-    maintainers = with lib.maintainers; [ vlstill ];
-    platforms = lib.platforms.all;
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/11/libc++abi/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/11/libcxxabi/gnu-install-dirs.patch
index 10651c1255e..10651c1255e 100644
--- a/pkgs/development/compilers/llvm/11/libc++abi/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/11/libcxxabi/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/11/libc++abi/no-threads.patch b/pkgs/development/compilers/llvm/11/libcxxabi/no-threads.patch
index 787f3e16500..787f3e16500 100644
--- a/pkgs/development/compilers/llvm/11/libc++abi/no-threads.patch
+++ b/pkgs/development/compilers/llvm/11/libcxxabi/no-threads.patch
diff --git a/pkgs/development/compilers/llvm/11/libc++abi/wasm.patch b/pkgs/development/compilers/llvm/11/libcxxabi/wasm.patch
index 4ebfe46aa81..4ebfe46aa81 100644
--- a/pkgs/development/compilers/llvm/11/libc++abi/wasm.patch
+++ b/pkgs/development/compilers/llvm/11/libcxxabi/wasm.patch
diff --git a/pkgs/development/compilers/llvm/11/libunwind/default.nix b/pkgs/development/compilers/llvm/11/libunwind/default.nix
index 6b095f4feae..462d63283ba 100644
--- a/pkgs/development/compilers/llvm/11/libunwind/default.nix
+++ b/pkgs/development/compilers/llvm/11/libunwind/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, version, fetch, cmake, fetchpatch
+{ lib, stdenv, llvm_meta, version, fetch, cmake, fetchpatch
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
@@ -17,4 +17,16 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
 
   cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
 }
diff --git a/pkgs/development/compilers/llvm/11/lld/default.nix b/pkgs/development/compilers/llvm/11/lld/default.nix
index 3ee5ba6e5a6..d344d3d3c11 100644
--- a/pkgs/development/compilers/llvm/11/lld/default.nix
+++ b/pkgs/development/compilers/llvm/11/lld/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , buildLlvmTools
 , fetch
 , cmake
@@ -28,10 +28,16 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "lib" "dev" ];
 
-  meta = {
-    description = "The LLVM Linker";
-    homepage    = "https://lld.llvm.org/";
-    license     = lib.licenses.ncsa;
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/11/lldb/default.nix b/pkgs/development/compilers/llvm/11/lldb/default.nix
index 2979a46a6cc..785ac4671ef 100644
--- a/pkgs/development/compilers/llvm/11/lldb/default.nix
+++ b/pkgs/development/compilers/llvm/11/lldb/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , fetch
 , cmake
 , zlib
@@ -76,11 +76,15 @@ stdenv.mkDerivation (rec {
     ln -s $out/bin/llvm-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
   '';
 
-  meta = with lib; {
+  meta = llvm_meta // {
+    homepage = "https://lldb.llvm.org/";
     description = "A next-generation high-performance debugger";
-    homepage    = "https://lldb.llvm.org";
-    license     = licenses.ncsa;
-    platforms   = platforms.all;
+    longDescription = ''
+      LLDB is a next generation, high-performance debugger. It is built as a set
+      of reusable components which highly leverage existing libraries in the
+      larger LLVM Project, such as the Clang expression parser and LLVM
+      disassembler.
+    '';
   };
 } // lib.optionalAttrs enableManpages {
   pname = "lldb-manpages";
@@ -104,5 +108,7 @@ stdenv.mkDerivation (rec {
 
   doCheck = false;
 
-  meta.description = "man pages for LLDB ${version}";
+  meta = llvm_meta // {
+    description = "man pages for LLDB ${version}";
+  };
 })
diff --git a/pkgs/development/compilers/llvm/11/llvm/default.nix b/pkgs/development/compilers/llvm/11/llvm/default.nix
index c8033b585cb..941a85e6ad0 100644
--- a/pkgs/development/compilers/llvm/11/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/11/llvm/default.nix
@@ -1,6 +1,7 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , pkgsBuildBuild
 , fetch
+, fetchpatch
 , cmake
 , python3
 , libffi
@@ -57,6 +58,13 @@ in stdenv.mkDerivation (rec {
 
   patches = [
     ./gnu-install-dirs.patch
+    # On older CPUs (e.g. Hydra/wendy) we'd be getting an error in this test.
+    (fetchpatch {
+      name = "uops-CMOV16rm-noreg.diff";
+      url = "https://github.com/llvm/llvm-project/commit/9e9f991ac033.diff";
+      sha256 = "sha256:12s8vr6ibri8b48h2z38f3afhwam10arfiqfy4yg37bmc054p5hi";
+      stripLen = 1;
+    })
   ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
 
   postPatch = optionalString stdenv.isDarwin ''
@@ -174,12 +182,23 @@ in stdenv.mkDerivation (rec {
   checkTarget = "check-all";
 
   requiredSystemFeatures = [ "big-parallel" ];
-  meta = {
-    description = "Collection of modular and reusable compiler and toolchain technologies";
-    homepage    = "https://llvm.org/";
-    license     = lib.licenses.ncsa;
-    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
   };
 } // lib.optionalAttrs enableManpages {
   pname = "llvm-manpages";
@@ -201,5 +220,7 @@ in stdenv.mkDerivation (rec {
 
   doCheck = false;
 
-  meta.description = "man pages for LLVM ${version}";
+  meta = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
 })
diff --git a/pkgs/development/compilers/llvm/11/openmp.nix b/pkgs/development/compilers/llvm/11/openmp.nix
deleted file mode 100644
index c99358cd287..00000000000
--- a/pkgs/development/compilers/llvm/11/openmp.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{ lib
-, stdenv
-, fetch
-, fetchpatch
-, cmake
-, llvm
-, perl
-, version
-}:
-
-stdenv.mkDerivation rec {
-  pname = "openmp";
-  inherit version;
-
-  src = fetch pname "0bh5cswgpc79awlq8j5i7hp355adaac7s6zaz0zwp6mkflxli1yi";
-
-  patches = [
-    # Fix compilation on aarch64-darwin, remove after the next release.
-    (fetchpatch {
-      url = "https://github.com/llvm/llvm-project/commit/7b5254223acbf2ef9cd278070c5a84ab278d7e5f.patch";
-      sha256 = "sha256-A+9/IVIoazu68FK5H5CiXcOEYe1Hpp4xTx2mIw7m8Es=";
-      stripLen = 1;
-    })
-  ];
-
-  nativeBuildInputs = [ cmake perl ];
-  buildInputs = [ llvm ];
-
-  meta = {
-    description = "Components required to build an executable OpenMP program";
-    homepage    = "https://openmp.llvm.org/";
-    license     = lib.licenses.mit;
-    platforms   = lib.platforms.all;
-  };
-}
diff --git a/pkgs/development/compilers/llvm/11/openmp/default.nix b/pkgs/development/compilers/llvm/11/openmp/default.nix
new file mode 100644
index 00000000000..330560a677d
--- /dev/null
+++ b/pkgs/development/compilers/llvm/11/openmp/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, llvm_meta
+, fetch
+, fetchpatch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch pname "0bh5cswgpc79awlq8j5i7hp355adaac7s6zaz0zwp6mkflxli1yi";
+
+  patches = [
+    # Fix compilation on aarch64-darwin, remove after the next release.
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/7b5254223acbf2ef9cd278070c5a84ab278d7e5f.patch";
+      sha256 = "sha256-A+9/IVIoazu68FK5H5CiXcOEYe1Hpp4xTx2mIw7m8Es=";
+      stripLen = 1;
+    })
+  ];
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix
index b880a0071b9..895af8f2f02 100644
--- a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix
@@ -4,14 +4,15 @@ let
 
   useLLVM = stdenv.hostPlatform.useLLVM or false;
   bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
   inherit (stdenv.hostPlatform) isMusl;
 
 in
 
-stdenv.mkDerivation rec {
-  pname = "compiler-rt";
+stdenv.mkDerivation {
+  pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc";
   inherit version;
-  src = fetch pname "0d444qihq9jhqnfv003cr704v363va72zl6qaw2algj1c85cva45";
+  src = fetch "compiler-rt" "0d444qihq9jhqnfv003cr704v363va72zl6qaw2algj1c85cva45";
 
   nativeBuildInputs = [ cmake python3 llvm.dev ];
   buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
@@ -29,14 +30,15 @@ stdenv.mkDerivation rec {
     "-DCOMPILER_RT_BUILD_XRAY=OFF"
     "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
-  ] ++ lib.optionals (useLLVM || bareMetal) [
+  ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
     "-DCMAKE_C_COMPILER_WORKS=ON"
     "-DCMAKE_CXX_COMPILER_WORKS=ON"
     "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
     "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ lib.optionals (useLLVM && !haveLibc) [
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
   ] ++ lib.optionals (useLLVM) [
     "-DCOMPILER_RT_BUILD_BUILTINS=ON"
-    "-DCMAKE_C_FLAGS=-nodefaultlibs"
     #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
     "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
   ] ++ lib.optionals (bareMetal) [
@@ -59,7 +61,6 @@ stdenv.mkDerivation rec {
   ]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
     ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;
 
-
   # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
   # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
   # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
diff --git a/pkgs/development/compilers/llvm/12/default.nix b/pkgs/development/compilers/llvm/12/default.nix
index ea054107e05..35228eac43b 100644
--- a/pkgs/development/compilers/llvm/12/default.nix
+++ b/pkgs/development/compilers/llvm/12/default.nix
@@ -1,7 +1,19 @@
-{ lowPrio, newScope, pkgs, lib, stdenv, cmake, gccForLibs
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, gccForLibs, preLibcCrossHeaders
 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
 , buildLlvmTools # tools, but from the previous stage, for cross
 , targetLlvmLibraries # libraries, but from the next stage, for cross
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM verion's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
 , darwin
 }:
 
@@ -38,6 +50,15 @@ let
       ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
     '';
 
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
   in {
 
     libllvm = callPackage ./llvm {
@@ -95,7 +116,7 @@ let
 
     lld = callPackage ./lld {
       inherit llvm_meta;
-      libunwind = libraries.libunwind;
+      inherit (libraries) libunwind;
     };
 
     lldb = callPackage ./lldb {
@@ -112,14 +133,21 @@ let
     # doesn’t support like LLVM. Probably we should move to some other
     # file.
 
-    bintools = callPackage ./bintools {};
+    bintools-unwrapped = callPackage ./bintools {};
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
 
-    lldClang = wrapCCWith rec {
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = targetLlvmLibraries.libcxx;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.libcxxabi
         targetLlvmLibraries.compiler-rt
@@ -131,17 +159,17 @@ let
         echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
       '' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
         echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
+        echo "-lunwind" >> $out/nix-support/cc-ldflags
       '' + lib.optionalString stdenv.targetPlatform.isWasm ''
         echo "-fno-exceptions" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibcxx = wrapCCWith rec {
+    clangNoLibcxx = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -152,13 +180,10 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibc = wrapCCWith rec {
+    clangNoLibc = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -168,52 +193,78 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoCompilerRt = wrapCCWith rec {
+    clangNoCompilerRt = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [ ];
       extraBuildCommands = ''
         echo "-nostartfiles" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands0 cc;
     };
 
+    clangNoCompilerRtWithLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    };
+
   });
 
   libraries = lib.makeExtensible (libraries: let
     callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
   in {
 
-    compiler-rt = callPackage ./compiler-rt ({ inherit llvm_meta; } //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
-      }));
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
 
     stdenv = overrideCC stdenv buildLlvmTools.clang;
 
     libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
 
-    libcxx = callPackage ./libcxx ({ inherit llvm_meta; } //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-      }));
-
-    libcxxabi = callPackage ./libcxxabi ({ inherit llvm_meta; } //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-        libunwind = libraries.libunwind;
-      }));
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    openmp = callPackage ./openmp { inherit llvm_meta; };
+    libcxxabi = callPackage ./libcxxabi {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    libunwind = callPackage ./libunwind ({ inherit llvm_meta; } //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-      }));
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      inherit (buildLlvmTools) llvm;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
+    openmp = callPackage ./openmp {
+      inherit llvm_meta;
+    };
   });
 
 in { inherit tools libraries; } // libraries // tools
diff --git a/pkgs/development/compilers/llvm/12/libcxx/default.nix b/pkgs/development/compilers/llvm/12/libcxx/default.nix
index 7b3b26b959e..1c9a7dd3c53 100644
--- a/pkgs/development/compilers/llvm/12/libcxx/default.nix
+++ b/pkgs/development/compilers/llvm/12/libcxx/default.nix
@@ -15,7 +15,13 @@ stdenv.mkDerivation {
     mv llvm-* llvm
   '';
 
-  patches = lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
 
   preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
     patchShebangs utils/cat_files.py
diff --git a/pkgs/development/compilers/llvm/12/libcxx/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/12/libcxx/gnu-install-dirs.patch
new file mode 100644
index 00000000000..1f9de00a9d5
--- /dev/null
+++ b/pkgs/development/compilers/llvm/12/libcxx/gnu-install-dirs.patch
@@ -0,0 +1,100 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9bf1a02f0908..612cd4aab76c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,6 +28,8 @@ set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD)
+   project(libcxx CXX C)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libcxx)
+   set(PACKAGE_VERSION 12.0.0)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -402,7 +404,7 @@ endif ()
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXX_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR})
+     string(APPEND LIBCXX_INSTALL_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR})
+@@ -410,11 +412,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+   set(LIBCXX_HEADER_DIR  ${LLVM_BINARY_DIR})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX})
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
+ else()
+   set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+   set(LIBCXX_HEADER_DIR  ${CMAKE_BINARY_DIR})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX})
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
+ endif()
+ 
+ file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
+diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
+index 5d2764e870e9..bb1ec5de6ca2 100644
+--- a/cmake/Modules/HandleLibCXXABI.cmake
++++ b/cmake/Modules/HandleLibCXXABI.cmake
+@@ -63,7 +63,7 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs)
+ 
+         if (LIBCXX_INSTALL_HEADERS)
+           install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
+-            DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dstdir}
++            DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dstdir}
+             COMPONENT cxx-headers
+             PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+             )
+diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
+index 29a317b8ae9a..4747263cfd1b 100644
+--- a/include/CMakeLists.txt
++++ b/include/CMakeLists.txt
+@@ -252,7 +252,7 @@ if (LIBCXX_INSTALL_HEADERS)
+   foreach(file ${files})
+     get_filename_component(dir ${file} DIRECTORY)
+     install(FILES ${file}
+-      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dir}
++      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dir}
+       COMPONENT cxx-headers
+       PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+     )
+@@ -260,7 +260,7 @@ if (LIBCXX_INSTALL_HEADERS)
+ 
+   # Install the generated header as __config.
+   install(FILES ${LIBCXX_BINARY_DIR}/__generated_config
+-    DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1
++    DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1
+     PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+     RENAME __config
+     COMPONENT cxx-headers)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 9965104cb5b2..9b55dbb1d822 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -352,21 +352,21 @@ if (LIBCXX_INSTALL_SHARED_LIBRARY)
+   install(TARGETS cxx_shared
+     ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+     LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+ 
+ if (LIBCXX_INSTALL_STATIC_LIBRARY)
+   install(TARGETS cxx_static
+     ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+     LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+ 
+ if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY)
+   install(TARGETS cxx_experimental
+     LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+     ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+ 
+ # NOTE: This install command must go after the cxx install command otherwise
diff --git a/pkgs/development/compilers/llvm/12/libcxxabi/default.nix b/pkgs/development/compilers/llvm/12/libcxxabi/default.nix
index 7c974262438..e360cf8d0b2 100644
--- a/pkgs/development/compilers/llvm/12/libcxxabi/default.nix
+++ b/pkgs/development/compilers/llvm/12/libcxxabi/default.nix
@@ -8,18 +8,7 @@ stdenv.mkDerivation {
 
   src = fetch "libcxxabi" "1cbmzspwjlr8f6sp73pw6ivf4dpg6rpc61by0q1m2zca2k6yif3a";
 
-  nativeBuildInputs = [ cmake python3 ];
-  buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
-
-  cmakeFlags = lib.optionals (stdenv.hostPlatform.useLLVM or false) [
-    "-DLLVM_ENABLE_LIBCXX=ON"
-    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
-  ] ++ lib.optionals stdenv.hostPlatform.isWasm [
-    "-DLIBCXXABI_ENABLE_THREADS=OFF"
-    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
-  ] ++ lib.optionals (!enableShared) [
-    "-DLIBCXXABI_ENABLE_SHARED=OFF"
-  ];
+  outputs = [ "out" "dev" ];
 
   postUnpack = ''
     unpackFile ${libcxx.src}
@@ -34,6 +23,23 @@ stdenv.mkDerivation {
     patch -p1 -d llvm -i ${./wasm.patch}
   '';
 
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  nativeBuildInputs = [ cmake python3 ];
+  buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
+
+  cmakeFlags = lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+  ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+  ] ++ lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
   installPhase = if stdenv.isDarwin
     then ''
       for file in lib/*.dylib; do
diff --git a/pkgs/development/compilers/llvm/12/libcxxabi/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/12/libcxxabi/gnu-install-dirs.patch
new file mode 100644
index 00000000000..b49b1685940
--- /dev/null
+++ b/pkgs/development/compilers/llvm/12/libcxxabi/gnu-install-dirs.patch
@@ -0,0 +1,34 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 426c855288fc..a9812a994f53 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -27,6 +27,8 @@ set(LIBCXXABI_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_BUILD)
+   project(libcxxabi CXX C)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libcxxabi)
+   set(PACKAGE_VERSION 11.0.0)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -180,17 +182,17 @@ set(CMAKE_MODULE_PATH
+ 
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+     string(APPEND LIBCXXABI_INSTALL_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+   endif()
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
+ else()
+   set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
+ endif()
+ 
+ set(LIBCXXABI_INSTALL_PREFIX "" CACHE STRING "Define libc++abi destination prefix.")
diff --git a/pkgs/development/compilers/llvm/12/lld/default.nix b/pkgs/development/compilers/llvm/12/lld/default.nix
index d46f25b68b3..e2c7470d2fc 100644
--- a/pkgs/development/compilers/llvm/12/lld/default.nix
+++ b/pkgs/development/compilers/llvm/12/lld/default.nix
@@ -18,6 +18,13 @@ stdenv.mkDerivation rec {
     ./gnu-install-dirs.patch
   ];
 
+  postPatch = ''
+    substituteInPlace MachO/CMakeLists.txt --replace \
+      '(''${LLVM_MAIN_SRC_DIR}/' '('
+    mkdir -p libunwind/include
+    tar -xf "${libunwind.src}" --wildcards -C libunwind/include --strip-components=2 "libunwind-*/include/"
+  '';
+
   nativeBuildInputs = [ cmake ];
   buildInputs = [ libllvm libxml2 ];
 
@@ -29,13 +36,6 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "lib" "dev" ];
 
-  postPatch = ''
-    substituteInPlace MachO/CMakeLists.txt --replace \
-      '(''${LLVM_MAIN_SRC_DIR}/' '('
-    mkdir -p libunwind/include
-    tar -xf "${libunwind.src}" --wildcards -C libunwind/include --strip-components=2 "libunwind-*/include/"
-  '';
-
   meta = llvm_meta // {
     homepage = "https://lld.llvm.org/";
     description = "The LLVM linker";
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
       LLD is a linker from the LLVM project that is a drop-in replacement for
       system linkers and runs much faster than them. It also provides features
       that are useful for toolchain developers.
-      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS) and
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
       WebAssembly in descending order of completeness. Internally, LLD consists
       of several different linkers.
     '';
diff --git a/pkgs/development/compilers/llvm/12/llvm/default.nix b/pkgs/development/compilers/llvm/12/llvm/default.nix
index 0bc704a8155..d2365745b98 100644
--- a/pkgs/development/compilers/llvm/12/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/12/llvm/default.nix
@@ -1,6 +1,7 @@
 { lib, stdenv, llvm_meta
 , pkgsBuildBuild
 , fetch
+, fetchpatch
 , cmake
 , python3
 , libffi
@@ -56,10 +57,14 @@ in stdenv.mkDerivation (rec {
   propagatedBuildInputs = [ ncurses zlib ];
 
   patches = [
-    # Force a test to evaluate the saved benchmark for a CPU for which LLVM has
-    # an execution model. See NixOS/nixpkgs#119673.
-    ../../exegesis-force-bdver2.patch
     ./gnu-install-dirs.patch
+    # On older CPUs (e.g. Hydra/wendy) we'd be getting an error in this test.
+    (fetchpatch {
+      name = "uops-CMOV16rm-noreg.diff";
+      url = "https://github.com/llvm/llvm-project/commit/9e9f991ac033.diff";
+      sha256 = "sha256:12s8vr6ibri8b48h2z38f3afhwam10arfiqfy4yg37bmc054p5hi";
+      stripLen = 1;
+    })
   ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
 
   postPatch = optionalString stdenv.isDarwin ''
@@ -205,6 +210,8 @@ in stdenv.mkDerivation (rec {
     make docs-llvm-man
   '';
 
+  propagatedBuildInputs = [];
+
   installPhase = ''
     make -C docs install
   '';
diff --git a/pkgs/development/compilers/llvm/5/clang/default.nix b/pkgs/development/compilers/llvm/5/clang/default.nix
index bbeb9277683..b5887a23c65 100644
--- a/pkgs/development/compilers/llvm/5/clang/default.nix
+++ b/pkgs/development/compilers/llvm/5/clang/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
+{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
 , buildLlvmTools
 , fixDarwinDylibNames
 , enableManpages ? false
@@ -88,11 +88,20 @@ let
       inherit libllvm;
     };
 
-    meta = {
-      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
-      homepage    = "https://llvm.org/";
-      license     = lib.licenses.ncsa;
-      platforms   = lib.platforms.all;
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
     };
   } // lib.optionalAttrs enableManpages {
     pname = "clang-manpages";
@@ -111,6 +120,8 @@ let
 
     doCheck = false;
 
-    meta.description = "man page for Clang ${version}";
+    meta = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
   });
 in self
diff --git a/pkgs/development/compilers/llvm/5/compiler-rt/default.nix b/pkgs/development/compilers/llvm/5/compiler-rt/default.nix
index 7e85c420da0..a14823571e1 100644
--- a/pkgs/development/compilers/llvm/5/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/5/compiler-rt/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }:
 
 let
 
@@ -86,4 +86,19 @@ stdenv.mkDerivation {
     ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/linux/crtendS.o
   '';
 
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
 }
diff --git a/pkgs/development/compilers/llvm/5/default.nix b/pkgs/development/compilers/llvm/5/default.nix
index c416964b22a..d11c08329d5 100644
--- a/pkgs/development/compilers/llvm/5/default.nix
+++ b/pkgs/development/compilers/llvm/5/default.nix
@@ -16,30 +16,41 @@ let
 
   clang-tools-extra_src = fetch "clang-tools-extra" "018b3fiwah8f8br5i26qmzh6sjvzchpn358sn8v079m49f2jldm3";
 
+  llvm_meta = {
+    license     = lib.licenses.ncsa;
+    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
+    platforms   = lib.platforms.all;
+  };
+
   tools = lib.makeExtensible (tools: let
     callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
     mkExtraBuildCommands = cc: ''
       rsrc="$out/resource-root"
       mkdir "$rsrc"
       ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
-      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
       echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
     '';
 
   in {
 
-    libllvm = callPackage ./llvm { };
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
 
     # `llvm` historically had the binaries.  When choosing an output explicitly,
     # we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
     llvm = tools.libllvm.out // { outputUnspecified = true; };
 
-    libllvm-polly = callPackage ./llvm { enablePolly = true; };
+    libllvm-polly = callPackage ./llvm {
+      inherit llvm_meta;
+      enablePolly = true;
+    };
 
     llvm-polly = tools.libllvm-polly.lib // { outputUnspecified = true; };
 
     libclang = callPackage ./clang {
-      inherit clang-tools-extra_src;
+      inherit clang-tools-extra_src llvm_meta;
     };
 
     clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
@@ -76,26 +87,38 @@ let
       extraBuildCommands = mkExtraBuildCommands cc;
     };
 
-    lld = callPackage ./lld {};
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
 
-    lldb = callPackage ./lldb {};
+    lldb = callPackage ./lldb {
+      inherit llvm_meta;
+    };
   });
 
   libraries = lib.makeExtensible (libraries: let
     callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
   in {
 
-    compiler-rt = callPackage ./compiler-rt {};
+    compiler-rt = callPackage ./compiler-rt {
+      inherit llvm_meta;
+    };
 
     stdenv = overrideCC stdenv buildLlvmTools.clang;
 
     libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
 
-    libcxx = callPackage ./libc++ {};
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+    };
 
-    libcxxabi = callPackage ./libc++abi {};
+    libcxxabi = callPackage ./libcxxabi {
+      inherit llvm_meta;
+    };
 
-    openmp = callPackage ./openmp.nix {};
+    openmp = callPackage ./openmp {
+      inherit llvm_meta;
+    };
   });
 
 in { inherit tools libraries; } // libraries // tools
diff --git a/pkgs/development/compilers/llvm/5/libc++/default.nix b/pkgs/development/compilers/llvm/5/libcxx/default.nix
index 77421b4e6d8..44026fba187 100644
--- a/pkgs/development/compilers/llvm/5/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/5/libcxx/default.nix
@@ -1,7 +1,7 @@
-{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }:
+{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }:
 
 stdenv.mkDerivation {
-  pname = "libc++";
+  pname = "libcxx";
   inherit version;
 
   src = fetch "libcxx" "1672aaf95fgy4xsfra8pw24f6r93zwzpan1033hkcm8p2glqipvf";
@@ -45,10 +45,15 @@ stdenv.mkDerivation {
     isLLVM = true;
   };
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxx.llvm.org/";
-    description = "A new implementation of the C++ standard library, targeting C++11";
-    license = with lib.licenses; [ ncsa mit ];
-    platforms = lib.platforms.unix;
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/5/libc++/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/5/libcxx/gnu-install-dirs.patch
index d9ea0dc7dfd..d9ea0dc7dfd 100644
--- a/pkgs/development/compilers/llvm/5/libc++/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/5/libcxx/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/5/libc++abi/default.nix b/pkgs/development/compilers/llvm/5/libcxxabi/default.nix
index 8bc3b9e2977..5146e20089b 100644
--- a/pkgs/development/compilers/llvm/5/libc++abi/default.nix
+++ b/pkgs/development/compilers/llvm/5/libcxxabi/default.nix
@@ -1,7 +1,7 @@
-{ lib, stdenv, cmake, fetch, libcxx, libunwind, llvm, version }:
+{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version }:
 
 stdenv.mkDerivation {
-  pname = "libc++abi";
+  pname = "libcxxabi";
   inherit version;
 
   src = fetch "libcxxabi" "12lp799rskr4fc2xr64qn4jfkjnfd8b1aymvsxyn4k9ar7r9pgqv";
@@ -47,11 +47,15 @@ stdenv.mkDerivation {
       ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
     '';
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxxabi.llvm.org/";
-    description = "A new implementation of low level support for a standard C++ library";
-    license = with lib.licenses; [ ncsa mit ];
-    maintainers = with lib.maintainers; [ vlstill ];
-    platforms = lib.platforms.unix;
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/5/libc++abi/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/5/libcxxabi/gnu-install-dirs.patch
index 760d7194f7b..760d7194f7b 100644
--- a/pkgs/development/compilers/llvm/5/libc++abi/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/5/libcxxabi/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/5/lld/default.nix b/pkgs/development/compilers/llvm/5/lld/default.nix
index 73762e2d2e5..7e74e79a15c 100644
--- a/pkgs/development/compilers/llvm/5/lld/default.nix
+++ b/pkgs/development/compilers/llvm/5/lld/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , buildLlvmTools
 , fetch
 , cmake
@@ -6,7 +6,7 @@
 , version
 }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "lld";
   inherit version;
 
@@ -27,11 +27,16 @@ stdenv.mkDerivation {
 
   outputs = [ "out" "lib" "dev" ];
 
-  meta = {
-    description = "The LLVM Linker";
-    homepage    = "https://lld.llvm.org/";
-    license     = lib.licenses.ncsa;
-    platforms   = lib.platforms.all;
-    badPlatforms = [ "x86_64-darwin" ];
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), and Mach-O (macOS)
+      in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/5/lldb/default.nix b/pkgs/development/compilers/llvm/5/lldb/default.nix
index 723792d1341..951e9c8e1ac 100644
--- a/pkgs/development/compilers/llvm/5/lldb/default.nix
+++ b/pkgs/development/compilers/llvm/5/lldb/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , fetch
 , fetchpatch
 , cmake
@@ -73,10 +73,14 @@ stdenv.mkDerivation rec {
     cp ../docs/lldb.1 $out/share/man/man1/
   '';
 
-  meta = with lib; {
+  meta = llvm_meta // {
+    homepage = "https://lldb.llvm.org/";
     description = "A next-generation high-performance debugger";
-    homepage    = "https://llvm.org/";
-    license     = licenses.ncsa;
-    platforms   = platforms.all;
+    longDescription = ''
+      LLDB is a next generation, high-performance debugger. It is built as a set
+      of reusable components which highly leverage existing libraries in the
+      larger LLVM Project, such as the Clang expression parser and LLVM
+      disassembler.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/5/llvm/default.nix b/pkgs/development/compilers/llvm/5/llvm/default.nix
index 0cbd30c783c..54fd783a7c2 100644
--- a/pkgs/development/compilers/llvm/5/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/5/llvm/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , pkgsBuildBuild
 , fetch
 , fetchpatch
@@ -173,12 +173,23 @@ stdenv.mkDerivation ({
   checkTarget = "check-all";
 
   requiredSystemFeatures = [ "big-parallel" ];
-  meta = {
-    description = "Collection of modular and reusable compiler and toolchain technologies";
-    homepage    = "https://llvm.org/";
-    license     = lib.licenses.ncsa;
-    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
   };
 } // lib.optionalAttrs enableManpages {
   pname = "llvm-manpages";
@@ -197,5 +208,7 @@ stdenv.mkDerivation ({
 
   doCheck = false;
 
-  meta.description = "man pages for LLVM ${version}";
+  meta = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
 })
diff --git a/pkgs/development/compilers/llvm/5/openmp.nix b/pkgs/development/compilers/llvm/5/openmp.nix
deleted file mode 100644
index 169c9c50324..00000000000
--- a/pkgs/development/compilers/llvm/5/openmp.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ lib
-, stdenv
-, fetch
-, cmake
-, llvm
-, perl
-, version
-}:
-
-stdenv.mkDerivation {
-  pname = "openmp";
-  inherit version;
-
-  src = fetch "openmp" "0p2n52676wlq6y9q99n5pivq6pvvda1p994r69fxj206ahn59jir";
-
-  nativeBuildInputs = [ cmake perl ];
-  buildInputs = [ llvm ];
-
-  meta = {
-    description = "Components required to build an executable OpenMP program";
-    homepage    = "https://openmp.llvm.org/";
-    license     = lib.licenses.mit;
-    platforms   = lib.platforms.all;
-  };
-}
diff --git a/pkgs/development/compilers/llvm/5/openmp/default.nix b/pkgs/development/compilers/llvm/5/openmp/default.nix
new file mode 100644
index 00000000000..3a1f97919dc
--- /dev/null
+++ b/pkgs/development/compilers/llvm/5/openmp/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, llvm_meta
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch "openmp" "0p2n52676wlq6y9q99n5pivq6pvvda1p994r69fxj206ahn59jir";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/pkgs/development/compilers/llvm/6/clang/default.nix b/pkgs/development/compilers/llvm/6/clang/default.nix
index 5c4894af9da..eba9111d9d3 100644
--- a/pkgs/development/compilers/llvm/6/clang/default.nix
+++ b/pkgs/development/compilers/llvm/6/clang/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
+{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
 , buildLlvmTools
 , fixDarwinDylibNames
 , enableManpages ? false
@@ -88,11 +88,20 @@ let
       inherit libllvm;
     };
 
-    meta = {
-      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
-      homepage    = "https://llvm.org/";
-      license     = lib.licenses.ncsa;
-      platforms   = lib.platforms.all;
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
     };
   } // lib.optionalAttrs enableManpages {
     pname = "clang-manpages";
@@ -111,6 +120,8 @@ let
 
     doCheck = false;
 
-    meta.description = "man page for Clang ${version}";
+    meta = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
   });
 in self
diff --git a/pkgs/development/compilers/llvm/6/compiler-rt/default.nix b/pkgs/development/compilers/llvm/6/compiler-rt/default.nix
index 384305f5cf2..0ba96e5375b 100644
--- a/pkgs/development/compilers/llvm/6/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/6/compiler-rt/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }:
 
 let
 
@@ -88,4 +88,19 @@ stdenv.mkDerivation {
     ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/linux/crtendS.o
   '';
 
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
 }
diff --git a/pkgs/development/compilers/llvm/6/default.nix b/pkgs/development/compilers/llvm/6/default.nix
index b78f7a62506..a0cc84d8d73 100644
--- a/pkgs/development/compilers/llvm/6/default.nix
+++ b/pkgs/development/compilers/llvm/6/default.nix
@@ -16,30 +16,41 @@ let
 
   clang-tools-extra_src = fetch "clang-tools-extra" "1w8ml7fyn4vyxmy59n2qm4r1k1kgwgwkaldp6m45fdv4g0kkfbhd";
 
+  llvm_meta = {
+    license     = lib.licenses.ncsa;
+    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
+    platforms   = lib.platforms.all;
+  };
+
   tools = lib.makeExtensible (tools: let
     callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
     mkExtraBuildCommands = cc: ''
       rsrc="$out/resource-root"
       mkdir "$rsrc"
       ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
-      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
       echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
     '';
 
   in {
 
-    libllvm = callPackage ./llvm { };
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
 
     # `llvm` historically had the binaries.  When choosing an output explicitly,
     # we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
     llvm = tools.libllvm.out // { outputUnspecified = true; };
 
-    libllvm-polly = callPackage ./llvm { enablePolly = true; };
+    libllvm-polly = callPackage ./llvm {
+      inherit llvm_meta;
+      enablePolly = true;
+    };
 
     llvm-polly = tools.libllvm-polly.lib // { outputUnspecified = true; };
 
     libclang = callPackage ./clang {
-      inherit clang-tools-extra_src;
+      inherit clang-tools-extra_src llvm_meta;
     };
 
     clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
@@ -77,26 +88,38 @@ let
       extraBuildCommands = mkExtraBuildCommands cc;
     };
 
-    lld = callPackage ./lld {};
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
 
-    lldb = callPackage ./lldb {};
+    lldb = callPackage ./lldb {
+      inherit llvm_meta;
+    };
   });
 
   libraries = lib.makeExtensible (libraries: let
     callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
   in {
 
-    compiler-rt = callPackage ./compiler-rt {};
+    compiler-rt = callPackage ./compiler-rt {
+      inherit llvm_meta;
+    };
 
     stdenv = overrideCC stdenv buildLlvmTools.clang;
 
     libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
 
-    libcxx = callPackage ./libc++ {};
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+    };
 
-    libcxxabi = callPackage ./libc++abi {};
+    libcxxabi = callPackage ./libcxxabi {
+      inherit llvm_meta;
+    };
 
-    openmp = callPackage ./openmp.nix {};
+    openmp = callPackage ./openmp {
+      inherit llvm_meta;
+    };
   });
 
 in { inherit tools libraries; } // libraries // tools
diff --git a/pkgs/development/compilers/llvm/6/libc++/default.nix b/pkgs/development/compilers/llvm/6/libcxx/default.nix
index 69314fbe2ba..3e39dd84042 100644
--- a/pkgs/development/compilers/llvm/6/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/6/libcxx/default.nix
@@ -1,7 +1,7 @@
-{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }:
+{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }:
 
 stdenv.mkDerivation {
-  pname = "libc++";
+  pname = "libcxx";
   inherit version;
 
   src = fetch "libcxx" "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n";
@@ -45,10 +45,15 @@ stdenv.mkDerivation {
     isLLVM = true;
   };
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxx.llvm.org/";
-    description = "A new implementation of the C++ standard library, targeting C++11";
-    license = with lib.licenses; [ ncsa mit ];
-    platforms = lib.platforms.unix;
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/6/libc++/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/6/libcxx/gnu-install-dirs.patch
index 33ff9ef123a..33ff9ef123a 100644
--- a/pkgs/development/compilers/llvm/6/libc++/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/6/libcxx/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/6/libc++abi/default.nix b/pkgs/development/compilers/llvm/6/libcxxabi/default.nix
index 04054f0ba0e..6a03d8a1835 100644
--- a/pkgs/development/compilers/llvm/6/libc++abi/default.nix
+++ b/pkgs/development/compilers/llvm/6/libcxxabi/default.nix
@@ -1,7 +1,7 @@
-{ lib, stdenv, cmake, fetch, libcxx, libunwind, llvm, version }:
+{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version }:
 
 stdenv.mkDerivation {
-  pname = "libc++abi";
+  pname = "libcxxabi";
   inherit version;
 
   src = fetch "libcxxabi" "0prqvdj317qrc8nddaq1hh2ag9algkd9wbkj3y4mr5588k12x7r0";
@@ -47,11 +47,15 @@ stdenv.mkDerivation {
       ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
     '';
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxxabi.llvm.org/";
-    description = "A new implementation of low level support for a standard C++ library";
-    license = with lib.licenses; [ ncsa mit ];
-    maintainers = with lib.maintainers; [ vlstill ];
-    platforms = lib.platforms.unix;
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/6/libc++abi/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/6/libcxxabi/gnu-install-dirs.patch
index 649d28d6c45..649d28d6c45 100644
--- a/pkgs/development/compilers/llvm/6/libc++abi/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/6/libcxxabi/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/6/lld/default.nix b/pkgs/development/compilers/llvm/6/lld/default.nix
index 5bfd5f60e92..83b1991f453 100644
--- a/pkgs/development/compilers/llvm/6/lld/default.nix
+++ b/pkgs/development/compilers/llvm/6/lld/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , buildLlvmTools
 , fetch
 , cmake
@@ -7,11 +7,11 @@
 , version
 }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "lld";
   inherit version;
 
-  src = fetch "lld" "04afcfq2h7ysyqxxhyhb7ig4p0vdw7mi63kh8mffl74j0rc781p7";
+  src = fetch pname "04afcfq2h7ysyqxxhyhb7ig4p0vdw7mi63kh8mffl74j0rc781p7";
 
   patches = [
     ./gnu-install-dirs.patch
@@ -28,10 +28,16 @@ stdenv.mkDerivation {
 
   outputs = [ "out" "lib" "dev" ];
 
-  meta = {
-    description = "The LLVM Linker";
-    homepage    = "https://lld.llvm.org/";
-    license     = lib.licenses.ncsa;
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), and Mach-O (macOS)
+      in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/6/lldb/default.nix b/pkgs/development/compilers/llvm/6/lldb/default.nix
index 31cc0ca68d7..da3c4a73a59 100644
--- a/pkgs/development/compilers/llvm/6/lldb/default.nix
+++ b/pkgs/development/compilers/llvm/6/lldb/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , fetch
 , fetchpatch
 , cmake
@@ -73,10 +73,14 @@ stdenv.mkDerivation rec {
     cp ../docs/lldb.1 $out/share/man/man1/
   '';
 
-  meta = with lib; {
+  meta = llvm_meta // {
+    homepage = "https://lldb.llvm.org/";
     description = "A next-generation high-performance debugger";
-    homepage    = "https://llvm.org/";
-    license     = licenses.ncsa;
-    platforms   = platforms.all;
+    longDescription = ''
+      LLDB is a next generation, high-performance debugger. It is built as a set
+      of reusable components which highly leverage existing libraries in the
+      larger LLVM Project, such as the Clang expression parser and LLVM
+      disassembler.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/6/llvm/default.nix b/pkgs/development/compilers/llvm/6/llvm/default.nix
index 1c04a62c4d5..0907c895617 100644
--- a/pkgs/development/compilers/llvm/6/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/6/llvm/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , pkgsBuildBuild
 , fetch
 , cmake
@@ -167,12 +167,23 @@ stdenv.mkDerivation ({
   checkTarget = "check-all";
 
   requiredSystemFeatures = [ "big-parallel" ];
-  meta = {
-    description = "Collection of modular and reusable compiler and toolchain technologies";
-    homepage    = "https://llvm.org/";
-    license     = lib.licenses.ncsa;
-    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
   };
 } // lib.optionalAttrs enableManpages {
   pname = "llvm-manpages";
@@ -191,5 +202,7 @@ stdenv.mkDerivation ({
 
   doCheck = false;
 
-  meta.description = "man pages for LLVM ${version}";
+  meta = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
 })
diff --git a/pkgs/development/compilers/llvm/6/openmp.nix b/pkgs/development/compilers/llvm/6/openmp.nix
deleted file mode 100644
index 9de18065918..00000000000
--- a/pkgs/development/compilers/llvm/6/openmp.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ lib
-, stdenv
-, fetch
-, cmake
-, llvm
-, perl
-, version
-}:
-
-stdenv.mkDerivation {
-  pname = "openmp";
-  inherit version;
-
-  src = fetch "openmp" "0nhwfba9c351r16zgyjyfwdayr98nairky3c2f0b2lc360mwmbv6";
-
-  nativeBuildInputs = [ cmake perl ];
-  buildInputs = [ llvm ];
-
-  meta = {
-    description = "Components required to build an executable OpenMP program";
-    homepage    = "https://openmp.llvm.org/";
-    license     = lib.licenses.mit;
-    platforms   = lib.platforms.all;
-  };
-}
diff --git a/pkgs/development/compilers/llvm/6/openmp/default.nix b/pkgs/development/compilers/llvm/6/openmp/default.nix
new file mode 100644
index 00000000000..bc21220af7c
--- /dev/null
+++ b/pkgs/development/compilers/llvm/6/openmp/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, llvm_meta
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch "openmp" "0nhwfba9c351r16zgyjyfwdayr98nairky3c2f0b2lc360mwmbv6";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/pkgs/development/compilers/llvm/7/bintools.nix b/pkgs/development/compilers/llvm/7/bintools/default.nix
index 53f7941e336..53f7941e336 100644
--- a/pkgs/development/compilers/llvm/7/bintools.nix
+++ b/pkgs/development/compilers/llvm/7/bintools/default.nix
diff --git a/pkgs/development/compilers/llvm/7/clang/default.nix b/pkgs/development/compilers/llvm/7/clang/default.nix
index 187602ef361..e1b031ad352 100644
--- a/pkgs/development/compilers/llvm/7/clang/default.nix
+++ b/pkgs/development/compilers/llvm/7/clang/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
+{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
 , buildLlvmTools
 , fixDarwinDylibNames
 , enableManpages ? false
@@ -100,11 +100,20 @@ let
       inherit libllvm;
     };
 
-    meta = {
-      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
-      homepage    = "https://llvm.org/";
-      license     = lib.licenses.ncsa;
-      platforms   = lib.platforms.all;
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
     };
   } // lib.optionalAttrs enableManpages {
     pname = "clang-manpages";
@@ -123,6 +132,8 @@ let
 
     doCheck = false;
 
-    meta.description = "man page for Clang ${version}";
+    meta = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
   });
 in self
diff --git a/pkgs/development/compilers/llvm/7/compiler-rt/default.nix b/pkgs/development/compilers/llvm/7/compiler-rt/default.nix
index 75d61a51e60..5f64e2f2a27 100644
--- a/pkgs/development/compilers/llvm/7/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/7/compiler-rt/default.nix
@@ -1,15 +1,16 @@
-{ lib, stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }:
 
 let
 
   useLLVM = stdenv.hostPlatform.useLLVM or false;
   bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
   inherit (stdenv.hostPlatform) isMusl;
 
 in
 
 stdenv.mkDerivation {
-  pname = "compiler-rt";
+  pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc";
   inherit version;
   src = fetch "compiler-rt" "1n48p8gjarihkws0i2bay5w9bdwyxyxxbpwyng7ba58jb30dlyq5";
 
@@ -29,14 +30,15 @@ stdenv.mkDerivation {
     "-DCOMPILER_RT_BUILD_XRAY=OFF"
     "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
-  ] ++ lib.optionals (useLLVM || bareMetal) [
+  ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
     "-DCMAKE_C_COMPILER_WORKS=ON"
     "-DCMAKE_CXX_COMPILER_WORKS=ON"
     "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
     "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ lib.optionals (useLLVM && !haveLibc) [
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
   ] ++ lib.optionals (useLLVM) [
     "-DCOMPILER_RT_BUILD_BUILTINS=ON"
-    "-DCMAKE_C_FLAGS=-nodefaultlibs"
     #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
     "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
   ] ++ lib.optionals (bareMetal) [
@@ -83,10 +85,25 @@ stdenv.mkDerivation {
   postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
     ln -s "$out/lib"/*/* "$out/lib"
   '' + lib.optionalString (useLLVM) ''
-    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/linux/crtbegin.o
-    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/linux/crtend.o
-    ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/linux/crtbeginS.o
-    ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/linux/crtendS.o
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
+    ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
+    ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
   '';
 
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
 }
diff --git a/pkgs/development/compilers/llvm/7/compiler-rt/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/7/compiler-rt/gnu-install-dirs.patch
index fd7c6a690fa..41b501ec649 100644
--- a/pkgs/development/compilers/llvm/7/compiler-rt/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/7/compiler-rt/gnu-install-dirs.patch
@@ -19,7 +19,7 @@ index cd4c704fc824..5abcd1260381 100644
    # Install in Clang resource directory.
    install(FILES ${file_name}
 -    DESTINATION ${COMPILER_RT_INSTALL_PATH}/share
-+    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}
++    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR}
      COMPONENT ${component})
    add_dependencies(${component} ${target_name})
  
diff --git a/pkgs/development/compilers/llvm/7/default.nix b/pkgs/development/compilers/llvm/7/default.nix
index 7aa3f9099cc..4057f206caf 100644
--- a/pkgs/development/compilers/llvm/7/default.nix
+++ b/pkgs/development/compilers/llvm/7/default.nix
@@ -1,7 +1,19 @@
-{ lowPrio, newScope, pkgs, lib, stdenv, cmake, gccForLibs
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, gccForLibs, preLibcCrossHeaders
 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
 , buildLlvmTools # tools, but from the previous stage, for cross
 , targetLlvmLibraries # libraries, but from the next stage, for cross
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM verion's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
 }:
 
 let
@@ -16,6 +28,12 @@ let
 
   clang-tools-extra_src = fetch "clang-tools-extra" "0lb4kdh7j2fhfz8kd6iv5df7m3pikiryk1vvwsf87spc90n09q0w";
 
+  llvm_meta = {
+    license     = lib.licenses.ncsa;
+    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
+    platforms   = lib.platforms.all;
+  };
+
   tools = lib.makeExtensible (tools: let
     callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
     mkExtraBuildCommands0 = cc: ''
@@ -26,27 +44,43 @@ let
     '';
     mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
       ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
     '';
 
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
   in {
 
-    libllvm = callPackage ./llvm { };
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
 
     # `llvm` historically had the binaries.  When choosing an output explicitly,
     # we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
     llvm = tools.libllvm.out // { outputUnspecified = true; };
 
-    libllvm-polly = callPackage ./llvm { enablePolly = true; };
+    libllvm-polly = callPackage ./llvm {
+      inherit llvm_meta;
+      enablePolly = true;
+    };
 
     llvm-polly = tools.libllvm-polly.lib // { outputUnspecified = true; };
 
     libclang = callPackage ./clang {
-      inherit clang-tools-extra_src;
+      inherit clang-tools-extra_src llvm_meta;
     };
 
     clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
 
     clang-polly-unwrapped = callPackage ./clang {
+      inherit llvm_meta;
       inherit clang-tools-extra_src;
       libllvm = tools.libllvm-polly;
       enablePolly = true;
@@ -84,9 +118,13 @@ let
       extraBuildCommands = mkExtraBuildCommands cc;
     };
 
-    lld = callPackage ./lld {};
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
 
-    lldb = callPackage ./lldb {};
+    lldb = callPackage ./lldb {
+      inherit llvm_meta;
+    };
 
     # Below, is the LLVM bootstrapping logic. It handles building a
     # fully LLVM toolchain from scratch. No GCC toolchain should be
@@ -95,34 +133,43 @@ let
     # doesn’t support like LLVM. Probably we should move to some other
     # file.
 
-    bintools = callPackage ./bintools.nix {};
+    bintools-unwrapped = callPackage ./bintools {};
 
-    lldClang = wrapCCWith rec {
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = targetLlvmLibraries.libcxx;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.libcxxabi
         targetLlvmLibraries.compiler-rt
+      ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
       ];
       extraBuildCommands = ''
         echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
         echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
       '' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
         echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
+        echo "-lunwind" >> $out/nix-support/cc-ldflags
       '' + lib.optionalString stdenv.targetPlatform.isWasm ''
         echo "-fno-exceptions" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibcxx = wrapCCWith rec {
+    clangNoLibcxx = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -133,13 +180,10 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibc = wrapCCWith rec {
+    clangNoLibc = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -149,53 +193,79 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoCompilerRt = wrapCCWith rec {
+    clangNoCompilerRt = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [ ];
       extraBuildCommands = ''
         echo "-nostartfiles" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands0 cc;
     };
 
+    clangNoCompilerRtWithLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    };
+
   });
 
   libraries = lib.makeExtensible (libraries: let
     callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
   in {
 
-    compiler-rt = callPackage ./compiler-rt {
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
       stdenv = if stdenv.hostPlatform.useLLVM or false
-               then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
                else stdenv;
     };
 
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt =
+      if stdenv.hostPlatform.isAndroid || (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isDarwin)
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
+
     stdenv = overrideCC stdenv buildLlvmTools.clang;
 
     libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
 
-    libcxx = callPackage ./libc++ ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-      }));
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    libcxxabi = callPackage ./libc++abi ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-        libunwind = libraries.libunwind;
-      }));
+    libcxxabi = callPackage ./libcxxabi {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    libunwind = callPackage ./libunwind ({
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
       inherit (buildLlvmTools) llvm;
-    } // lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-      stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-    });
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    openmp = callPackage ./openmp.nix {};
+    openmp = callPackage ./openmp {
+      inherit llvm_meta;
+    };
   });
 
 in { inherit tools libraries; } // libraries // tools
diff --git a/pkgs/development/compilers/llvm/7/libc++/default.nix b/pkgs/development/compilers/llvm/7/libcxx/default.nix
index afc59d91179..ac10e8eb77e 100644
--- a/pkgs/development/compilers/llvm/7/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/7/libcxx/default.nix
@@ -1,9 +1,9 @@
-{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
+{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
 stdenv.mkDerivation {
-  pname = "libc++";
+  pname = "libcxx";
   inherit version;
 
   src = fetch "libcxx" "0kmhcapm2cjwalyiqasj9dmqbw59mcwdl8fgl951wg7ax84b8hj4";
@@ -17,7 +17,9 @@ stdenv.mkDerivation {
 
   patches = [
     ./gnu-install-dirs.patch
-  ] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
 
   prePatch = ''
     substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
@@ -34,7 +36,7 @@ stdenv.mkDerivation {
     ++ lib.optional stdenv.hostPlatform.isMusl python3
     ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
 
-  buildInputs = [ libcxxabi ] ;
+  buildInputs = [ libcxxabi ];
 
   cmakeFlags = [
     "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
@@ -48,10 +50,15 @@ stdenv.mkDerivation {
     isLLVM = true;
   };
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxx.llvm.org/";
-    description = "A new implementation of the C++ standard library, targeting C++11";
-    license = with lib.licenses; [ ncsa mit ];
-    platforms = lib.platforms.unix;
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/7/libc++/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/7/libcxx/gnu-install-dirs.patch
index 910e5287a86..910e5287a86 100644
--- a/pkgs/development/compilers/llvm/7/libc++/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/7/libcxx/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/7/libc++abi/default.nix b/pkgs/development/compilers/llvm/7/libcxxabi/default.nix
index 31ead6eb421..1663b8c7291 100644
--- a/pkgs/development/compilers/llvm/7/libc++abi/default.nix
+++ b/pkgs/development/compilers/llvm/7/libcxxabi/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, cmake, fetch, libcxx, libunwind, llvm, version
+{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
 , standalone ? stdenv.hostPlatform.useLLVM or false
 , withLibunwind ? !stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm
   # on musl the shared objects don't build
@@ -6,7 +6,7 @@
 }:
 
 stdenv.mkDerivation {
-  pname = "libc++abi";
+  pname = "libcxxabi";
   inherit version;
 
   src = fetch "libcxxabi" "1zcqxsdjhawgz1cvpk07y3jl6fg9p3ay4nl69zsirqb2ghgyhhb2";
@@ -58,11 +58,15 @@ stdenv.mkDerivation {
       ${lib.optionalString enableShared "ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1"}
     '';
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxxabi.llvm.org/";
-    description = "A new implementation of low level support for a standard C++ library";
-    license = with lib.licenses; [ ncsa mit ];
-    maintainers = with lib.maintainers; [ vlstill ];
-    platforms = lib.platforms.unix;
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/7/libc++abi/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/7/libcxxabi/gnu-install-dirs.patch
index 92d9e94fdee..92d9e94fdee 100644
--- a/pkgs/development/compilers/llvm/7/libc++abi/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/7/libcxxabi/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/7/libunwind/default.nix b/pkgs/development/compilers/llvm/7/libunwind/default.nix
index 14c0abc5153..426895029b3 100644
--- a/pkgs/development/compilers/llvm/7/libunwind/default.nix
+++ b/pkgs/development/compilers/llvm/7/libunwind/default.nix
@@ -1,12 +1,17 @@
-{ lib, stdenv, version, fetch, fetchpatch, cmake, llvm, libcxx
+{ lib, stdenv, llvm_meta, version, fetch, fetchpatch, cmake, llvm
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "libunwind";
   inherit version;
 
-  src = fetch "libunwind" "035dsxs10nyiqd00q07yycvmkjl01yz4jdlrjvmch8klxg4pyjhp";
+  src = fetch pname "035dsxs10nyiqd00q07yycvmkjl01yz4jdlrjvmch8klxg4pyjhp";
+
+  postUnpack = ''
+    unpackFile ${llvm.src}
+    cmakeFlagsArray=($cmakeFlagsArray -DLLVM_PATH=$PWD/$(ls -d llvm-*))
+  '';
 
   patches = [
     ./gnu-install-dirs.patch
@@ -24,12 +29,25 @@ stdenv.mkDerivation {
     })
   ];
 
-  nativeBuildInputs = [ cmake llvm.dev ];
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
 
   cmakeFlags = lib.optionals (!enableShared) [
     "-DLIBUNWIND_ENABLE_SHARED=OFF"
   ] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
-    "-DLIBUNWIND_HAS_NOSTDINCXX_FLAG=ON"
     "-DLLVM_ENABLE_LIBCXX=ON"
   ];
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
 }
diff --git a/pkgs/development/compilers/llvm/7/lld/default.nix b/pkgs/development/compilers/llvm/7/lld/default.nix
index da863d5ad4a..09a0a68e257 100644
--- a/pkgs/development/compilers/llvm/7/lld/default.nix
+++ b/pkgs/development/compilers/llvm/7/lld/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , buildLlvmTools
 , fetch
 , cmake
@@ -7,11 +7,11 @@
 , version
 }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "lld";
   inherit version;
 
-  src = fetch "lld" "0rsqb7zcnij5r5ipfhr129j7skr5n9pyr388kjpqwh091952f3x1";
+  src = fetch pname "0rsqb7zcnij5r5ipfhr129j7skr5n9pyr388kjpqwh091952f3x1";
 
   patches = [
     ./gnu-install-dirs.patch
@@ -28,10 +28,16 @@ stdenv.mkDerivation {
 
   outputs = [ "out" "lib" "dev" ];
 
-  meta = {
-    description = "The LLVM Linker";
-    homepage    = "https://lld.llvm.org/";
-    license     = lib.licenses.ncsa;
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), and Mach-O (macOS)
+      in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/7/lldb/default.nix b/pkgs/development/compilers/llvm/7/lldb/default.nix
index 97888492879..e2eab31697d 100644
--- a/pkgs/development/compilers/llvm/7/lldb/default.nix
+++ b/pkgs/development/compilers/llvm/7/lldb/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , fetch
 , cmake
 , zlib
@@ -76,10 +76,14 @@ stdenv.mkDerivation rec {
     cp ../docs/lldb.1 $out/share/man/man1/
   '';
 
-  meta = with lib; {
+  meta = llvm_meta // {
+    homepage = "https://lldb.llvm.org/";
     description = "A next-generation high-performance debugger";
-    homepage    = "https://llvm.org/";
-    license     = licenses.ncsa;
-    platforms   = platforms.all;
+    longDescription = ''
+      LLDB is a next generation, high-performance debugger. It is built as a set
+      of reusable components which highly leverage existing libraries in the
+      larger LLVM Project, such as the Clang expression parser and LLVM
+      disassembler.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/7/llvm/default.nix b/pkgs/development/compilers/llvm/7/llvm/default.nix
index 6f189779f84..4a9b4f51820 100644
--- a/pkgs/development/compilers/llvm/7/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/7/llvm/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , pkgsBuildBuild
 , fetch
 , fetchpatch
@@ -184,12 +184,23 @@ in stdenv.mkDerivation ({
   checkTarget = "check-all";
 
   requiredSystemFeatures = [ "big-parallel" ];
-  meta = {
-    description = "Collection of modular and reusable compiler and toolchain technologies";
-    homepage    = "https://llvm.org/";
-    license     = lib.licenses.ncsa;
-    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
   };
 } // lib.optionalAttrs enableManpages {
   pname = "llvm-manpages";
@@ -211,5 +222,7 @@ in stdenv.mkDerivation ({
 
   doCheck = false;
 
-  meta.description = "man pages for LLVM ${version}";
+  meta = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
 })
diff --git a/pkgs/development/compilers/llvm/7/openmp.nix b/pkgs/development/compilers/llvm/7/openmp.nix
deleted file mode 100644
index 53f52c326c5..00000000000
--- a/pkgs/development/compilers/llvm/7/openmp.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ lib
-, stdenv
-, fetch
-, cmake
-, llvm
-, perl
-, version
-}:
-
-stdenv.mkDerivation {
-  pname = "openmp";
-  inherit version;
-
-  src = fetch "openmp" "1dg53wzsci2kra8lh1y0chh60h2l8h1by93br5spzvzlxshkmrqy";
-
-  nativeBuildInputs = [ cmake perl ];
-  buildInputs = [ llvm ];
-
-  meta = {
-    description = "Components required to build an executable OpenMP program";
-    homepage    = "https://openmp.llvm.org/";
-    license     = lib.licenses.mit;
-    platforms   = lib.platforms.all;
-  };
-}
diff --git a/pkgs/development/compilers/llvm/7/openmp/default.nix b/pkgs/development/compilers/llvm/7/openmp/default.nix
new file mode 100644
index 00000000000..c331762712f
--- /dev/null
+++ b/pkgs/development/compilers/llvm/7/openmp/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, llvm_meta
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch "openmp" "1dg53wzsci2kra8lh1y0chh60h2l8h1by93br5spzvzlxshkmrqy";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/pkgs/development/compilers/llvm/8/bintools.nix b/pkgs/development/compilers/llvm/8/bintools/default.nix
index 53f7941e336..53f7941e336 100644
--- a/pkgs/development/compilers/llvm/8/bintools.nix
+++ b/pkgs/development/compilers/llvm/8/bintools/default.nix
diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix
index c82b3e873e8..c3399dccd1d 100644
--- a/pkgs/development/compilers/llvm/8/clang/default.nix
+++ b/pkgs/development/compilers/llvm/8/clang/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
+{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
 , buildLlvmTools
 , fixDarwinDylibNames
 , enableManpages ? false
@@ -107,11 +107,20 @@ let
       inherit libllvm;
     };
 
-    meta = {
-      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
-      homepage    = "https://llvm.org/";
-      license     = lib.licenses.ncsa;
-      platforms   = lib.platforms.all;
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
     };
   } // lib.optionalAttrs enableManpages {
     pname = "clang-manpages";
@@ -130,6 +139,8 @@ let
 
     doCheck = false;
 
-    meta.description = "man page for Clang ${version}";
+    meta = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
   });
 in self
diff --git a/pkgs/development/compilers/llvm/8/compiler-rt/default.nix b/pkgs/development/compilers/llvm/8/compiler-rt/default.nix
index d370de031bb..d6d60b24150 100644
--- a/pkgs/development/compilers/llvm/8/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/8/compiler-rt/default.nix
@@ -1,15 +1,16 @@
-{ lib, stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }:
 
 let
 
   useLLVM = stdenv.hostPlatform.useLLVM or false;
   bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
   inherit (stdenv.hostPlatform) isMusl;
 
 in
 
 stdenv.mkDerivation {
-  pname = "compiler-rt";
+  pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc";
   inherit version;
   src = fetch "compiler-rt" "0dqqf8f930l8gag4d9qjgn1n0pj0nbv2anviqqhdi1rkhas8z0hi";
 
@@ -29,14 +30,15 @@ stdenv.mkDerivation {
     "-DCOMPILER_RT_BUILD_XRAY=OFF"
     "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
-  ] ++ lib.optionals (useLLVM || bareMetal) [
+  ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
     "-DCMAKE_C_COMPILER_WORKS=ON"
     "-DCMAKE_CXX_COMPILER_WORKS=ON"
     "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
     "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ lib.optionals (useLLVM && !haveLibc) [
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
   ] ++ lib.optionals (useLLVM) [
     "-DCOMPILER_RT_BUILD_BUILTINS=ON"
-    "-DCMAKE_C_FLAGS=-nodefaultlibs"
     #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
     "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
   ] ++ lib.optionals (bareMetal) [
@@ -89,4 +91,19 @@ stdenv.mkDerivation {
     ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
   '';
 
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
 }
diff --git a/pkgs/development/compilers/llvm/8/compiler-rt/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/8/compiler-rt/gnu-install-dirs.patch
index 1c2e7f0b311..a25fa90f980 100644
--- a/pkgs/development/compilers/llvm/8/compiler-rt/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/8/compiler-rt/gnu-install-dirs.patch
@@ -19,7 +19,7 @@ index 81b110203c27..df7598a11caf 100644
    # Install in Clang resource directory.
    install(FILES ${file_name}
 -    DESTINATION ${COMPILER_RT_INSTALL_PATH}/share
-+    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}
++    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR}
      COMPONENT ${component})
    add_dependencies(${component} ${target_name})
  
diff --git a/pkgs/development/compilers/llvm/8/default.nix b/pkgs/development/compilers/llvm/8/default.nix
index bcbbd155e36..a7a293cfbbf 100644
--- a/pkgs/development/compilers/llvm/8/default.nix
+++ b/pkgs/development/compilers/llvm/8/default.nix
@@ -1,7 +1,19 @@
-{ lowPrio, newScope, pkgs, lib, stdenv, cmake, gccForLibs
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, gccForLibs, preLibcCrossHeaders
 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
 , buildLlvmTools # tools, but from the previous stage, for cross
 , targetLlvmLibraries # libraries, but from the next stage, for cross
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM verion's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
 }:
 
 let
@@ -16,6 +28,12 @@ let
 
   clang-tools-extra_src = fetch "clang-tools-extra" "1qf3097bc5ia8p6cpmbx985rjr3yaah5s8fc0nv7pw742yv7jw8q";
 
+  llvm_meta = {
+    license     = lib.licenses.ncsa;
+    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
+    platforms   = lib.platforms.all;
+  };
+
   tools = lib.makeExtensible (tools: let
     callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
     mkExtraBuildCommands0 = cc: ''
@@ -26,27 +44,43 @@ let
     '';
     mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
       ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
     '';
 
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
   in {
 
-    libllvm = callPackage ./llvm { };
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
 
     # `llvm` historically had the binaries.  When choosing an output explicitly,
     # we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
     llvm = tools.libllvm.out // { outputUnspecified = true; };
 
-    libllvm-polly = callPackage ./llvm { enablePolly = true; };
+    libllvm-polly = callPackage ./llvm {
+      inherit llvm_meta;
+      enablePolly = true;
+    };
 
     llvm-polly = tools.libllvm-polly.lib // { outputUnspecified = true; };
 
     libclang = callPackage ./clang {
-      inherit clang-tools-extra_src;
+      inherit clang-tools-extra_src llvm_meta;
     };
 
     clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
 
     clang-polly-unwrapped = callPackage ./clang {
+      inherit llvm_meta;
       inherit clang-tools-extra_src;
       libllvm = tools.libllvm-polly;
       enablePolly = true;
@@ -85,9 +119,13 @@ let
       extraBuildCommands = mkExtraBuildCommands cc;
     };
 
-    lld = callPackage ./lld {};
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
 
-    lldb = callPackage ./lldb {};
+    lldb = callPackage ./lldb {
+      inherit llvm_meta;
+    };
 
     # Below, is the LLVM bootstrapping logic. It handles building a
     # fully LLVM toolchain from scratch. No GCC toolchain should be
@@ -96,14 +134,21 @@ let
     # doesn’t support like LLVM. Probably we should move to some other
     # file.
 
-    bintools = callPackage ./bintools.nix {};
+    bintools-unwrapped = callPackage ./bintools {};
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
 
-    lldClang = wrapCCWith rec {
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = targetLlvmLibraries.libcxx;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.libcxxabi
         targetLlvmLibraries.compiler-rt
@@ -115,17 +160,17 @@ let
         echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
       '' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
         echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
+        echo "-lunwind" >> $out/nix-support/cc-ldflags
       '' + lib.optionalString stdenv.targetPlatform.isWasm ''
         echo "-fno-exceptions" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibcxx = wrapCCWith rec {
+    clangNoLibcxx = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -136,13 +181,10 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibc = wrapCCWith rec {
+    clangNoLibc = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -152,52 +194,77 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoCompilerRt = wrapCCWith rec {
+    clangNoCompilerRt = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [ ];
       extraBuildCommands = ''
         echo "-nostartfiles" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands0 cc;
     };
 
+    clangNoCompilerRtWithLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    };
+
   });
 
   libraries = lib.makeExtensible (libraries: let
     callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
   in {
 
-    compiler-rt = callPackage ./compiler-rt ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
-      }));
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
 
     stdenv = overrideCC stdenv buildLlvmTools.clang;
 
     libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
 
-    libcxx = callPackage ./libc++ ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-      }));
-
-    libcxxabi = callPackage ./libc++abi ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-        libunwind = libraries.libunwind;
-      }));
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    openmp = callPackage ./openmp.nix {};
+    libcxxabi = callPackage ./libcxxabi {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    libunwind = callPackage ./libunwind ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-      }));
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
+    openmp = callPackage ./openmp {
+      inherit llvm_meta;
+    };
   });
 
 in { inherit tools libraries; } // libraries // tools
diff --git a/pkgs/development/compilers/llvm/8/libc++/default.nix b/pkgs/development/compilers/llvm/8/libcxx/default.nix
index d73600b441d..804b9a53c24 100644
--- a/pkgs/development/compilers/llvm/8/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/8/libcxx/default.nix
@@ -1,9 +1,9 @@
-{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
+{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
 stdenv.mkDerivation {
-  pname = "libc++";
+  pname = "libcxx";
   inherit version;
 
   src = fetch "libcxx" "0y4vc9z36c1zlq15cnibdzxnc1xi5glbc6klnm8a41q3db4541kz";
@@ -17,7 +17,9 @@ stdenv.mkDerivation {
 
   patches = [
     ./gnu-install-dirs.patch
-  ] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
 
   prePatch = ''
     substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
@@ -51,10 +53,15 @@ stdenv.mkDerivation {
     isLLVM = true;
   };
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxx.llvm.org/";
-    description = "A new implementation of the C++ standard library, targeting C++11";
-    license = with lib.licenses; [ ncsa mit ];
-    platforms = lib.platforms.all;
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/8/libc++/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/8/libcxx/gnu-install-dirs.patch
index 6af403ac86b..6af403ac86b 100644
--- a/pkgs/development/compilers/llvm/8/libc++/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/8/libcxx/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/8/libc++abi/default.nix b/pkgs/development/compilers/llvm/8/libcxxabi/default.nix
index 5659bb4f14a..593b1df9b7a 100644
--- a/pkgs/development/compilers/llvm/8/libc++abi/default.nix
+++ b/pkgs/development/compilers/llvm/8/libcxxabi/default.nix
@@ -1,9 +1,9 @@
-{ lib, stdenv, cmake, fetch, libcxx, libunwind, llvm, version
+{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
 stdenv.mkDerivation {
-  pname = "libc++abi";
+  pname = "libcxxabi";
   inherit version;
 
   src = fetch "libcxxabi" "1vznz8n1z1h8af0ga451m98lc2hjnv4fyzl71napsvjhvk4g6nxp";
@@ -63,11 +63,15 @@ stdenv.mkDerivation {
       ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
     '';
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxxabi.llvm.org/";
-    description = "A new implementation of low level support for a standard C++ library";
-    license = with lib.licenses; [ ncsa mit ];
-    maintainers = with lib.maintainers; [ vlstill ];
-    platforms = lib.platforms.all;
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/8/libc++abi/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/8/libcxxabi/gnu-install-dirs.patch
index 3f924b0efbe..3f924b0efbe 100644
--- a/pkgs/development/compilers/llvm/8/libc++abi/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/8/libcxxabi/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/8/libc++abi/no-threads.patch b/pkgs/development/compilers/llvm/8/libcxxabi/no-threads.patch
index 787f3e16500..787f3e16500 100644
--- a/pkgs/development/compilers/llvm/8/libc++abi/no-threads.patch
+++ b/pkgs/development/compilers/llvm/8/libcxxabi/no-threads.patch
diff --git a/pkgs/development/compilers/llvm/8/libc++abi/wasm.patch b/pkgs/development/compilers/llvm/8/libcxxabi/wasm.patch
index 4ebfe46aa81..4ebfe46aa81 100644
--- a/pkgs/development/compilers/llvm/8/libc++abi/wasm.patch
+++ b/pkgs/development/compilers/llvm/8/libcxxabi/wasm.patch
diff --git a/pkgs/development/compilers/llvm/8/libunwind/default.nix b/pkgs/development/compilers/llvm/8/libunwind/default.nix
index e38f2072ced..244b5775bdc 100644
--- a/pkgs/development/compilers/llvm/8/libunwind/default.nix
+++ b/pkgs/development/compilers/llvm/8/libunwind/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, version, fetch, cmake, fetchpatch
+{ lib, stdenv, llvm_meta, version, fetch, cmake, fetchpatch
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
@@ -25,4 +25,16 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
 
   cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
 }
diff --git a/pkgs/development/compilers/llvm/8/lld/default.nix b/pkgs/development/compilers/llvm/8/lld/default.nix
index 696403d1bf6..66b59937e5f 100644
--- a/pkgs/development/compilers/llvm/8/lld/default.nix
+++ b/pkgs/development/compilers/llvm/8/lld/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , buildLlvmTools
 , fetch
 , cmake
@@ -7,11 +7,11 @@
 , version
 }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "lld";
   inherit version;
 
-  src = fetch "lld" "121xhxrlvwy3k5nf6p1wv31whxlb635ssfkci8z93mwv4ja1xflz";
+  src = fetch pname "121xhxrlvwy3k5nf6p1wv31whxlb635ssfkci8z93mwv4ja1xflz";
 
   patches = [
     ./gnu-install-dirs.patch
@@ -28,10 +28,16 @@ stdenv.mkDerivation {
 
   outputs = [ "out" "lib" "dev" ];
 
-  meta = {
-    description = "The LLVM Linker";
-    homepage    = "https://lld.llvm.org/";
-    license     = lib.licenses.ncsa;
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/8/lldb/default.nix b/pkgs/development/compilers/llvm/8/lldb/default.nix
index 95bf4aae054..ee1f678996a 100644
--- a/pkgs/development/compilers/llvm/8/lldb/default.nix
+++ b/pkgs/development/compilers/llvm/8/lldb/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , fetch
 , cmake
 , zlib
@@ -70,10 +70,14 @@ stdenv.mkDerivation rec {
     ln -s $out/bin/llvm-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
   '';
 
-  meta = with lib; {
+  meta = llvm_meta // {
+    homepage = "https://lldb.llvm.org/";
     description = "A next-generation high-performance debugger";
-    homepage    = "https://llvm.org/";
-    license     = licenses.ncsa;
-    platforms   = platforms.all;
+    longDescription = ''
+      LLDB is a next generation, high-performance debugger. It is built as a set
+      of reusable components which highly leverage existing libraries in the
+      larger LLVM Project, such as the Clang expression parser and LLVM
+      disassembler.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/8/llvm/default.nix b/pkgs/development/compilers/llvm/8/llvm/default.nix
index 8ea9b287c7c..6f14b375c62 100644
--- a/pkgs/development/compilers/llvm/8/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/8/llvm/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , pkgsBuildBuild
 , fetch
 , fetchpatch
@@ -168,12 +168,23 @@ in stdenv.mkDerivation ({
   checkTarget = "check-all";
 
   requiredSystemFeatures = [ "big-parallel" ];
-  meta = {
-    description = "Collection of modular and reusable compiler and toolchain technologies";
-    homepage    = "https://llvm.org/";
-    license     = lib.licenses.ncsa;
-    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
   };
 } // lib.optionalAttrs enableManpages {
   pname = "llvm-manpages";
@@ -195,5 +206,7 @@ in stdenv.mkDerivation ({
 
   doCheck = false;
 
-  meta.description = "man pages for LLVM ${version}";
+  meta = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
 })
diff --git a/pkgs/development/compilers/llvm/8/openmp.nix b/pkgs/development/compilers/llvm/8/openmp.nix
deleted file mode 100644
index b5d75d9c872..00000000000
--- a/pkgs/development/compilers/llvm/8/openmp.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ lib
-, stdenv
-, fetch
-, cmake
-, llvm
-, perl
-, version
-}:
-
-stdenv.mkDerivation {
-  pname = "openmp";
-  inherit version;
-
-  src = fetch "openmp" "0b3jlxhqbpyd1nqkpxjfggm5d9va5qpyf7d4i5y7n4a1mlydv19y";
-
-  nativeBuildInputs = [ cmake perl ];
-  buildInputs = [ llvm ];
-
-  meta = {
-    description = "Components required to build an executable OpenMP program";
-    homepage    = "https://openmp.llvm.org/";
-    license     = lib.licenses.mit;
-    platforms   = lib.platforms.all;
-  };
-}
diff --git a/pkgs/development/compilers/llvm/8/openmp/default.nix b/pkgs/development/compilers/llvm/8/openmp/default.nix
new file mode 100644
index 00000000000..e8459d27982
--- /dev/null
+++ b/pkgs/development/compilers/llvm/8/openmp/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, llvm_meta
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch "openmp" "0b3jlxhqbpyd1nqkpxjfggm5d9va5qpyf7d4i5y7n4a1mlydv19y";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/pkgs/development/compilers/llvm/9/bintools.nix b/pkgs/development/compilers/llvm/9/bintools/default.nix
index 53f7941e336..53f7941e336 100644
--- a/pkgs/development/compilers/llvm/9/bintools.nix
+++ b/pkgs/development/compilers/llvm/9/bintools/default.nix
diff --git a/pkgs/development/compilers/llvm/9/clang/default.nix b/pkgs/development/compilers/llvm/9/clang/default.nix
index f1c21083bb6..700fcb414fc 100644
--- a/pkgs/development/compilers/llvm/9/clang/default.nix
+++ b/pkgs/development/compilers/llvm/9/clang/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
+{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
 , buildLlvmTools
 , fixDarwinDylibNames
 , enableManpages ? false
@@ -102,11 +102,20 @@ let
       inherit libllvm;
     };
 
-    meta = {
-      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
-      homepage    = "https://llvm.org/";
-      license     = lib.licenses.ncsa;
-      platforms   = lib.platforms.all;
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
     };
   } // lib.optionalAttrs enableManpages {
     pname = "clang-manpages";
@@ -125,6 +134,8 @@ let
 
     doCheck = false;
 
-    meta.description = "man page for Clang ${version}";
+    meta = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
   });
 in self
diff --git a/pkgs/development/compilers/llvm/9/compiler-rt/default.nix b/pkgs/development/compilers/llvm/9/compiler-rt/default.nix
index 285fe811514..c31ce78ea0f 100644
--- a/pkgs/development/compilers/llvm/9/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/9/compiler-rt/default.nix
@@ -1,17 +1,18 @@
-{ lib, stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }:
 
 let
 
   useLLVM = stdenv.hostPlatform.useLLVM or false;
   bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
   inherit (stdenv.hostPlatform) isMusl;
 
 in
 
-stdenv.mkDerivation rec {
-  pname = "compiler-rt";
+stdenv.mkDerivation {
+  pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc";
   inherit version;
-  src = fetch pname "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2";
+  src = fetch "compiler-rt" "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2";
 
   nativeBuildInputs = [ cmake python3 llvm.dev ];
   buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
@@ -29,14 +30,15 @@ stdenv.mkDerivation rec {
     "-DCOMPILER_RT_BUILD_XRAY=OFF"
     "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
-  ] ++ lib.optionals (useLLVM || bareMetal) [
+  ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
     "-DCMAKE_C_COMPILER_WORKS=ON"
     "-DCMAKE_CXX_COMPILER_WORKS=ON"
     "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
     "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ lib.optionals (useLLVM && !haveLibc) [
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
   ] ++ lib.optionals (useLLVM) [
     "-DCOMPILER_RT_BUILD_BUILTINS=ON"
-    "-DCMAKE_C_FLAGS=-nodefaultlibs"
     #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
     "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
   ] ++ lib.optionals (bareMetal) [
@@ -87,4 +89,20 @@ stdenv.mkDerivation rec {
     ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
     ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
   '';
+
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
 }
diff --git a/pkgs/development/compilers/llvm/9/compiler-rt/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/9/compiler-rt/gnu-install-dirs.patch
index 7967bbc4855..9f63bef2f86 100644
--- a/pkgs/development/compilers/llvm/9/compiler-rt/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/9/compiler-rt/gnu-install-dirs.patch
@@ -19,7 +19,7 @@ index f7ee932f214f..ef94a97c4be9 100644
    # Install in Clang resource directory.
    install(FILES ${file_name}
 -    DESTINATION ${COMPILER_RT_INSTALL_PATH}/share
-+    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}
++    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR}
      COMPONENT ${component})
    add_dependencies(${component} ${target_name})
  
diff --git a/pkgs/development/compilers/llvm/9/default.nix b/pkgs/development/compilers/llvm/9/default.nix
index 0660bac137f..8521354dbb8 100644
--- a/pkgs/development/compilers/llvm/9/default.nix
+++ b/pkgs/development/compilers/llvm/9/default.nix
@@ -1,7 +1,19 @@
-{ lowPrio, newScope, pkgs, lib, stdenv, cmake, gccForLibs
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, gccForLibs, preLibcCrossHeaders
 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
 , buildLlvmTools # tools, but from the previous stage, for cross
 , targetLlvmLibraries # libraries, but from the next stage, for cross
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM verion's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
 }:
 
 let
@@ -16,6 +28,12 @@ let
 
   clang-tools-extra_src = fetch "clang-tools-extra" "01vgzd4k1q93nfs8gyl83mjlc4x0qsgfqw32lacbjzdxg0mdfvxj";
 
+  llvm_meta = {
+    license     = lib.licenses.ncsa;
+    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
+    platforms   = lib.platforms.all;
+  };
+
   tools = lib.makeExtensible (tools: let
     callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
     mkExtraBuildCommands0 = cc: ''
@@ -26,27 +44,43 @@ let
     '';
     mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
       ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
     '';
 
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
   in {
 
-    libllvm = callPackage ./llvm { };
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
 
     # `llvm` historically had the binaries.  When choosing an output explicitly,
     # we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
     llvm = tools.libllvm.out // { outputUnspecified = true; };
 
-    libllvm-polly = callPackage ./llvm { enablePolly = true; };
+    libllvm-polly = callPackage ./llvm {
+      inherit llvm_meta;
+      enablePolly = true;
+    };
 
     llvm-polly = tools.libllvm-polly.lib // { outputUnspecified = true; };
 
     libclang = callPackage ./clang {
-      inherit clang-tools-extra_src;
+      inherit clang-tools-extra_src llvm_meta;
     };
 
     clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
 
     clang-polly-unwrapped = callPackage ./clang {
+      inherit llvm_meta;
       inherit clang-tools-extra_src;
       libllvm = tools.libllvm-polly;
       enablePolly = true;
@@ -85,9 +119,13 @@ let
       extraBuildCommands = mkExtraBuildCommands cc;
     };
 
-    lld = callPackage ./lld {};
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
 
-    lldb = callPackage ./lldb {};
+    lldb = callPackage ./lldb {
+      inherit llvm_meta;
+    };
 
     # Below, is the LLVM bootstrapping logic. It handles building a
     # fully LLVM toolchain from scratch. No GCC toolchain should be
@@ -96,14 +134,21 @@ let
     # doesn’t support like LLVM. Probably we should move to some other
     # file.
 
-    bintools = callPackage ./bintools.nix {};
+    bintools-unwrapped = callPackage ./bintools {};
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
 
-    lldClang = wrapCCWith rec {
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = targetLlvmLibraries.libcxx;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.libcxxabi
         targetLlvmLibraries.compiler-rt
@@ -115,17 +160,17 @@ let
         echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
       '' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
         echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
+        echo "-lunwind" >> $out/nix-support/cc-ldflags
       '' + lib.optionalString stdenv.targetPlatform.isWasm ''
         echo "-fno-exceptions" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibcxx = wrapCCWith rec {
+    clangNoLibcxx = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-      };
+      bintools = bintools';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -136,13 +181,10 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoLibc = wrapCCWith rec {
+    clangNoLibc = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [
         targetLlvmLibraries.compiler-rt
       ];
@@ -152,52 +194,77 @@ let
       '' + mkExtraBuildCommands cc;
     };
 
-    lldClangNoCompilerRt = wrapCCWith rec {
+    clangNoCompilerRt = wrapCCWith rec {
       cc = tools.clang-unwrapped;
       libcxx = null;
-      bintools = wrapBintoolsWith {
-        inherit (tools) bintools;
-        libc = null;
-      };
+      bintools = bintoolsNoLibc';
       extraPackages = [ ];
       extraBuildCommands = ''
         echo "-nostartfiles" >> $out/nix-support/cc-cflags
       '' + mkExtraBuildCommands0 cc;
     };
 
+    clangNoCompilerRtWithLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    };
+
   });
 
   libraries = lib.makeExtensible (libraries: let
     callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
   in {
 
-    compiler-rt = callPackage ./compiler-rt ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
-      }));
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
 
     stdenv = overrideCC stdenv buildLlvmTools.clang;
 
     libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
 
-    libcxx = callPackage ./libc++ ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-      }));
-
-    libcxxabi = callPackage ./libc++abi ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-        libunwind = libraries.libunwind;
-      }));
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    openmp = callPackage ./openmp.nix {};
+    libcxxabi = callPackage ./libcxxabi {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
-    libunwind = callPackage ./libunwind ({} //
-      (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
-        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
-      }));
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
 
+    openmp = callPackage ./openmp {
+      inherit llvm_meta;
+    };
   });
 
 in { inherit tools libraries; } // libraries // tools
diff --git a/pkgs/development/compilers/llvm/9/libc++/default.nix b/pkgs/development/compilers/llvm/9/libcxx/default.nix
index 3cdb4f32a05..b2022f23e51 100644
--- a/pkgs/development/compilers/llvm/9/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/9/libcxx/default.nix
@@ -1,9 +1,9 @@
-{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
+{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
 stdenv.mkDerivation {
-  pname = "libc++";
+  pname = "libcxx";
   inherit version;
 
   src = fetch "libcxx" "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089";
@@ -17,7 +17,9 @@ stdenv.mkDerivation {
 
   patches = [
     ./gnu-install-dirs.patch
-  ] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
 
   preConfigure = ''
     # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
@@ -47,10 +49,15 @@ stdenv.mkDerivation {
     isLLVM = true;
   };
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxx.llvm.org/";
-    description = "A new implementation of the C++ standard library, targeting C++11";
-    license = with lib.licenses; [ ncsa mit ];
-    platforms = lib.platforms.all;
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/9/libc++/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/9/libcxx/gnu-install-dirs.patch
index 424488bd2e5..424488bd2e5 100644
--- a/pkgs/development/compilers/llvm/9/libc++/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/9/libcxx/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/9/libc++abi/default.nix b/pkgs/development/compilers/llvm/9/libcxxabi/default.nix
index 5358985f448..2af3322fd68 100644
--- a/pkgs/development/compilers/llvm/9/libc++abi/default.nix
+++ b/pkgs/development/compilers/llvm/9/libcxxabi/default.nix
@@ -1,9 +1,9 @@
-{ lib, stdenv, cmake, fetch, libcxx, libunwind, llvm, version
+{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
 stdenv.mkDerivation {
-  pname = "libc++abi";
+  pname = "libcxxabi";
   inherit version;
 
   src = fetch "libcxxabi" "1b4aiaa8cirx52vk2p5kfk57qmbqf1ipb4nqnjhdgqps9jm7iyg8";
@@ -63,11 +63,15 @@ stdenv.mkDerivation {
       ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
     '';
 
-  meta = {
+  meta = llvm_meta // {
     homepage = "https://libcxxabi.llvm.org/";
-    description = "A new implementation of low level support for a standard C++ library";
-    license = with lib.licenses; [ ncsa mit ];
-    maintainers = with lib.maintainers; [ vlstill ];
-    platforms = lib.platforms.all;
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
   };
 }
diff --git a/pkgs/development/compilers/llvm/9/libc++abi/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/9/libcxxabi/gnu-install-dirs.patch
index 70b41a6ff53..70b41a6ff53 100644
--- a/pkgs/development/compilers/llvm/9/libc++abi/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/9/libcxxabi/gnu-install-dirs.patch
diff --git a/pkgs/development/compilers/llvm/9/libc++abi/no-threads.patch b/pkgs/development/compilers/llvm/9/libcxxabi/no-threads.patch
index 787f3e16500..787f3e16500 100644
--- a/pkgs/development/compilers/llvm/9/libc++abi/no-threads.patch
+++ b/pkgs/development/compilers/llvm/9/libcxxabi/no-threads.patch
diff --git a/pkgs/development/compilers/llvm/9/libc++abi/wasm.patch b/pkgs/development/compilers/llvm/9/libcxxabi/wasm.patch
index 4ebfe46aa81..4ebfe46aa81 100644
--- a/pkgs/development/compilers/llvm/9/libc++abi/wasm.patch
+++ b/pkgs/development/compilers/llvm/9/libcxxabi/wasm.patch
diff --git a/pkgs/development/compilers/llvm/9/libunwind/default.nix b/pkgs/development/compilers/llvm/9/libunwind/default.nix
index fdb362dcd2e..65b89c6bb18 100644
--- a/pkgs/development/compilers/llvm/9/libunwind/default.nix
+++ b/pkgs/development/compilers/llvm/9/libunwind/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, version, fetch, cmake, fetchpatch
+{ lib, stdenv, llvm_meta, version, fetch, cmake, fetchpatch
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
@@ -17,4 +17,16 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
 
   cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
 }
diff --git a/pkgs/development/compilers/llvm/9/lld/default.nix b/pkgs/development/compilers/llvm/9/lld/default.nix
index cd84afe70e4..d13e6a107dd 100644
--- a/pkgs/development/compilers/llvm/9/lld/default.nix
+++ b/pkgs/development/compilers/llvm/9/lld/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , buildLlvmTools
 , fetch
 , cmake
@@ -28,10 +28,16 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "lib" "dev" ];
 
-  meta = {
-    description = "The LLVM Linker";
-    homepage    = "https://lld.llvm.org/";
-    license     = lib.licenses.ncsa;
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/9/lldb/default.nix b/pkgs/development/compilers/llvm/9/lldb/default.nix
index 6d753ce1a86..9957a0218da 100644
--- a/pkgs/development/compilers/llvm/9/lldb/default.nix
+++ b/pkgs/development/compilers/llvm/9/lldb/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , fetch
 , cmake
 , zlib
@@ -70,10 +70,14 @@ stdenv.mkDerivation rec {
     ln -s $out/bin/llvm-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
   '';
 
-  meta = with lib; {
+  meta = llvm_meta // {
+    homepage = "https://lldb.llvm.org/";
     description = "A next-generation high-performance debugger";
-    homepage    = "https://llvm.org/";
-    license     = licenses.ncsa;
-    platforms   = platforms.all;
+    longDescription = ''
+      LLDB is a next generation, high-performance debugger. It is built as a set
+      of reusable components which highly leverage existing libraries in the
+      larger LLVM Project, such as the Clang expression parser and LLVM
+      disassembler.
+    '';
   };
 }
diff --git a/pkgs/development/compilers/llvm/9/llvm/default.nix b/pkgs/development/compilers/llvm/9/llvm/default.nix
index 78d8d7b30ef..cf064b75b3f 100644
--- a/pkgs/development/compilers/llvm/9/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/9/llvm/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv
+{ lib, stdenv, llvm_meta
 , pkgsBuildBuild
 , fetch
 , cmake
@@ -57,6 +57,9 @@ in stdenv.mkDerivation (rec {
 
   patches = [
     ./gnu-install-dirs.patch
+    # Force a test to evaluate the saved benchmark for a CPU for which LLVM has
+    # an execution model. See NixOS/nixpkgs#119673.
+    ../../exegesis-force-bdver2.patch
   ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
 
   postPatch = optionalString stdenv.isDarwin ''
@@ -179,12 +182,23 @@ in stdenv.mkDerivation (rec {
   checkTarget = "check-all";
 
   requiredSystemFeatures = [ "big-parallel" ];
-  meta = {
-    description = "Collection of modular and reusable compiler and toolchain technologies";
-    homepage    = "https://llvm.org/";
-    license     = lib.licenses.ncsa;
-    maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
-    platforms   = lib.platforms.all;
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
   };
 } // lib.optionalAttrs enableManpages {
   pname = "llvm-manpages";
@@ -206,5 +220,7 @@ in stdenv.mkDerivation (rec {
 
   doCheck = false;
 
-  meta.description = "man pages for LLVM ${version}";
+  meta = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
 })
diff --git a/pkgs/development/compilers/llvm/9/openmp.nix b/pkgs/development/compilers/llvm/9/openmp.nix
deleted file mode 100644
index 416916f57ff..00000000000
--- a/pkgs/development/compilers/llvm/9/openmp.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ lib
-, stdenv
-, fetch
-, cmake
-, llvm
-, perl
-, version
-}:
-
-stdenv.mkDerivation rec {
-  pname = "openmp";
-  inherit version;
-
-  src = fetch pname "1knafnpp0f7hylx8q20lkd6g1sf0flly572dayc5d5kghh7hd52w";
-
-  nativeBuildInputs = [ cmake perl ];
-  buildInputs = [ llvm ];
-
-  meta = {
-    description = "Components required to build an executable OpenMP program";
-    homepage    = "https://openmp.llvm.org/";
-    license     = lib.licenses.mit;
-    platforms   = lib.platforms.all;
-  };
-}
diff --git a/pkgs/development/compilers/llvm/9/openmp/default.nix b/pkgs/development/compilers/llvm/9/openmp/default.nix
new file mode 100644
index 00000000000..bedd191d513
--- /dev/null
+++ b/pkgs/development/compilers/llvm/9/openmp/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, llvm_meta
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch pname "1knafnpp0f7hylx8q20lkd6g1sf0flly572dayc5d5kghh7hd52w";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/pkgs/development/compilers/rust/1_51.nix b/pkgs/development/compilers/rust/1_52.nix
index 17fafa4c7cb..775792d06f6 100644
--- a/pkgs/development/compilers/rust/1_51.nix
+++ b/pkgs/development/compilers/rust/1_52.nix
@@ -19,8 +19,8 @@
 } @ args:
 
 import ./default.nix {
-  rustcVersion = "1.51.0";
-  rustcSha256 = "0ixqkqglv3isxbvl4ldr4byrkx692wghsz3fasy1pn5kr2prnsvs";
+  rustcVersion = "1.52.1";
+  rustcSha256 = "sha256-Om8jom0Oj4erv78yxc19qgwLcdCYar78Vrml+/vQv5g=";
 
   llvmSharedForBuild = pkgsBuildBuild.llvmPackages_11.libllvm.override { enableSharedLibraries = true; };
   llvmSharedForHost = pkgsBuildHost.llvmPackages_11.libllvm.override { enableSharedLibraries = true; };
@@ -33,23 +33,23 @@ import ./default.nix {
 
   # Note: the version MUST be one version prior to the version we're
   # building
-  bootstrapVersion = "1.50.0";
+  bootstrapVersion = "1.51.0";
 
   # fetch hashes by running `print-hashes.sh ${bootstrapVersion}`
   bootstrapHashes = {
-    i686-unknown-linux-gnu = "dee56dc425ed5d8e8112f26fba3060fd324c49f1261e0b7e8e29f7d9b852b09a";
-    x86_64-unknown-linux-gnu = "fa889b53918980aea2dea42bfae4e858dcb2104c6fdca6e4fe359f3a49767701";
-    x86_64-unknown-linux-musl = "867cbfb35f5dc9b43e230132ea9e7bfa98d471a9248e41b08ced2266e5ccd00f";
-    arm-unknown-linux-gnueabihf = "1b72979244450e4047ab536448d6720699e1fae0ab1c4ade114099a3037e274b";
-    armv7-unknown-linux-gnueabihf = "f1dde566c4e6ca2e1133c84170e46e566765a21894e1038e1cdc32745d7274ef";
-    aarch64-unknown-linux-gnu = "1db7a4fbddc68cd29eb9bca9fa7d0d2d9e3d59ede7ddaad66222fb4336a6bacf";
-    aarch64-unknown-linux-musl = "adcc6c76a8967bacb6687b565d3cf739e35fde066b03edb745b05b52fa8b5b36";
-    x86_64-apple-darwin = "1bf5a7ecf6468ce1bf9fe49c8083b3f648b40c16fbfb7539d106fe28eb0e792e";
-    aarch64-apple-darwin = "1ed91a867e7b86cc4bc84c0838240f1c25acd007100ec9f7a14c4873e4b56561";
-    powerpc64le-unknown-linux-gnu = "e0472589d3f9ba7ebf27f033af320e0d5cfb70222955bd8ed73ce2c9a70ae535";
+    i686-unknown-linux-gnu = "de2e8ef724d89ba6f567f07ebacf5a244c7cdae30ee559f1913310eda38d9cd1";
+    x86_64-unknown-linux-gnu = "9e125977aa13f012a68fdc6663629c685745091ae244f0587dd55ea4e3a3e42f";
+    x86_64-unknown-linux-musl = "cb65c3a19ba0e09a94ccfd8551e648efaa1db52b0db19ae475d35a46f8750871";
+    arm-unknown-linux-gnueabihf = "ab26464947ce80b4c361b08242dc215a5664f9f4ad23f66891ec27d55a0440b7";
+    armv7-unknown-linux-gnueabihf = "5d381b7ee16c559efefedfac7ec4d392e838fddaf50049255844dcff2b2614dd";
+    aarch64-unknown-linux-gnu = "fd31c78fffad52c03cac5a7c1ee5db3f34b2a77d7bc862707c0f71e209180a84";
+    aarch64-unknown-linux-musl = "06cdaa1117dcdd392ede938b655b9bc45cf2a76bd42870ca223189e6eb29d435";
+    x86_64-apple-darwin = "765212098a415996b767d1e372ce266caf94027402b269fec33291fffc085ca4";
+    aarch64-apple-darwin = "95d0410bbd20b05f8b7d5adf70e8737873995bc86611a90e643d7081ca35147f";
+    powerpc64le-unknown-linux-gnu = "7362f561104d7be4836507d3a53cd39444efcdf065813d559beb1f54ce9f7680";
   };
 
-  selectRustPackage = pkgs: pkgs.rust_1_51;
+  selectRustPackage = pkgs: pkgs.rust_1_52;
 
   rustcPatches = [
   ];
diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix
index 3a7f29e3229..3ada23e7488 100644
--- a/pkgs/development/compilers/rust/cargo.nix
+++ b/pkgs/development/compilers/rust/cargo.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, file, curl, pkg-config, python3, openssl, cmake, zlib
-, installShellFiles, makeWrapper, libiconv, cacert, rustPlatform, rustc
+, installShellFiles, makeWrapper, cacert, rustPlatform, rustc
 , CoreFoundation, Security
 }:
 
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage {
 
   nativeBuildInputs = [ pkg-config cmake installShellFiles makeWrapper ];
   buildInputs = [ cacert file curl python3 openssl zlib ]
-    ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv ];
+    ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ];
 
   # cargo uses git-rs which is made for a version of libgit2 from recent master that
   # is not compatible with the current version in nixpkgs.
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix
index b9bccf9f16e..b8fca884edc 100644
--- a/pkgs/development/compilers/rust/rustc.nix
+++ b/pkgs/development/compilers/rust/rustc.nix
@@ -3,6 +3,7 @@
 , fetchurl, file, python3
 , darwin, cmake, rust, rustPlatform
 , pkg-config, openssl
+, libiconv
 , which, libffi
 , withBundledLLVM ? false
 , enableRustcDev ? true
@@ -137,7 +138,7 @@ in stdenv.mkDerivation rec {
   ];
 
   buildInputs = [ openssl ]
-    ++ optional stdenv.isDarwin Security
+    ++ optionals stdenv.isDarwin [ libiconv Security ]
     ++ optional (!withBundledLLVM) llvmShared;
 
   outputs = [ "out" "man" "doc" ];
diff --git a/pkgs/development/compilers/sbcl/2.0.8.nix b/pkgs/development/compilers/sbcl/2.0.8.nix
index bbc171a8d98..1784bf672b3 100644
--- a/pkgs/development/compilers/sbcl/2.0.8.nix
+++ b/pkgs/development/compilers/sbcl/2.0.8.nix
@@ -1,4 +1,4 @@
 import ./common.nix {
-  version = "2.0.8";
-  sha256 = "1xwrwvps7drrpyw3wg5h3g2qajmkwqs9gz0fdw1ns9adp7vld390";
+  version = "2.1.2";
+  sha256 = "sha256-t3EFUJOYVe1JWYxKAUSD7RILaZFliio7avpHcT3OTAs=";
 }
diff --git a/pkgs/development/compilers/sbcl/bootstrap.nix b/pkgs/development/compilers/sbcl/bootstrap.nix
index 8bdbbadc9d6..eaf1ff24d3e 100644
--- a/pkgs/development/compilers/sbcl/bootstrap.nix
+++ b/pkgs/development/compilers/sbcl/bootstrap.nix
@@ -2,6 +2,11 @@
 
 let
   options = rec {
+    aarch64-darwin = {
+      version = "2.1.2";
+      system = "arm64-darwin";
+      sha256 = "sha256-H0ALigXcWIypdA+fTf7jERscwbb7QIAfcoxCtGDh0RU=";
+    };
     x86_64-darwin = {
       version = "1.2.11";
       system = "x86-64-darwin";
diff --git a/pkgs/development/compilers/sbcl/common.nix b/pkgs/development/compilers/sbcl/common.nix
index 11ae960a531..b020eeafc5c 100644
--- a/pkgs/development/compilers/sbcl/common.nix
+++ b/pkgs/development/compilers/sbcl/common.nix
@@ -2,7 +2,7 @@
 
 { lib, stdenv, fetchurl, writeText, sbclBootstrap
 , sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
-, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
+, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system || "aarch64-darwin" == stdenv.hostPlatform.system)
 , disableImmobileSpace ? false
   # Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
   # Note that the created binaries still need `patchelf --set-interpreter ...`
@@ -79,7 +79,7 @@ stdenv.mkDerivation rec {
                   lib.concatStringsSep " "
                     (builtins.map (x: "--with-${x}") enableFeatures ++
                      builtins.map (x: "--without-${x}") disableFeatures)
-                }
+                } ${if stdenv.hostPlatform.system == "aarch64-darwin" then "--arch=arm64" else ""}
     (cd doc/manual ; make info)
 
     runHook postBuild
diff --git a/pkgs/development/compilers/zz/default.nix b/pkgs/development/compilers/zz/default.nix
index 81c6e546e95..a0bf9a9ad8f 100644
--- a/pkgs/development/compilers/zz/default.nix
+++ b/pkgs/development/compilers/zz/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
 
   nativeBuildInputs = [ makeWrapper ];
 
-  cargoSha256 = "0i3c459d4699z4dwvdw1495krdv3c2qpygrsw0cz3j0zd2n5gqj6";
+  cargoSha256 = "03xdmm4993hqdb3cihjjv4n4mdk8lnlccva08fh6m1d56p807rni";
 
   postPatch = ''
     # remove search path entry which would reference /build
diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix
index d6ba795d20a..5ee88ebb881 100644
--- a/pkgs/development/interpreters/python/cpython/2.7/default.nix
+++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix
@@ -258,7 +258,7 @@ in with passthru; stdenv.mkDerivation ({
     LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
     inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH;
 
-    NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2"
+    NIX_CFLAGS_COMPILE = optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2"
       + optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000";
     DETERMINISTIC_BUILD = 1;
 
diff --git a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh
index eb45205ff73..0f708f88829 100644
--- a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh
+++ b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh
@@ -2,7 +2,7 @@
 echo "Sourcing pytest-check-hook"
 
 declare -ar disabledTests
-declare -ar disabledTestPaths
+declare -a disabledTestPaths
 
 function _concatSep {
     local result
@@ -37,6 +37,11 @@ function pytestCheckPhase() {
         disabledTestsString=$(_pytestComputeDisabledTestsString "${disabledTests[@]}")
       args+=" -k \""$disabledTestsString"\""
     fi
+
+    if [ -n "${disabledTestPaths-}" ]; then
+        eval "disabledTestPaths=($disabledTestPaths)"
+    fi
+
     for path in ${disabledTestPaths[@]}; do
       if [ ! -e "$path" ]; then
         echo "Disabled tests path \"$path\" does not exist. Aborting"
diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix
index e9c769821d6..4917b167046 100644
--- a/pkgs/development/interpreters/python/mk-python-derivation.nix
+++ b/pkgs/development/interpreters/python/mk-python-derivation.nix
@@ -93,6 +93,8 @@
 
 , doCheck ? config.doCheckByDefault or false
 
+, disabledTestPaths ? []
+
 , ... } @ attrs:
 
 
@@ -108,6 +110,7 @@ let
 
   self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
     "disabled" "checkPhase" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
+    "disabledTestPaths"
   ]) // {
 
     name = namePrefix + name_;
@@ -178,6 +181,8 @@ let
     # If given use the specified checkPhase, otherwise use the setup hook.
     # Longer-term we should get rid of `checkPhase` and use `installCheckPhase`.
     installCheckPhase = attrs.checkPhase;
+  } //  lib.optionalAttrs (disabledTestPaths != []) {
+      disabledTestPaths = lib.escapeShellArgs disabledTestPaths;
   }));
 
   passthru.updateScript = let
diff --git a/pkgs/development/interpreters/wasmer/default.nix b/pkgs/development/interpreters/wasmer/default.nix
index eb17fda0830..d19600f39b8 100644
--- a/pkgs/development/interpreters/wasmer/default.nix
+++ b/pkgs/development/interpreters/wasmer/default.nix
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
     fetchSubmodules = true;
   };
 
-  cargoSha256 = "08r2b4s005w8r207jwq2fd43y3prgd8pg1m72aww1r7yrbxdr0v2";
+  cargoSha256 = "140bzxhsyfif99x5a1m1d45ppb6jzvy9m4xil7z1wg2pnq9k7zz8";
 
   nativeBuildInputs = [ cmake pkg-config ];
 
diff --git a/pkgs/development/interpreters/wasmtime/default.nix b/pkgs/development/interpreters/wasmtime/default.nix
index 9afca8f1f71..675a7cdd6bc 100644
--- a/pkgs/development/interpreters/wasmtime/default.nix
+++ b/pkgs/development/interpreters/wasmtime/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     fetchSubmodules = true;
   };
 
-  cargoSha256 = "1r1fm28zaxfbzd17jzaz8ql6ss6y6djgdhpfpkvpbw9l8l06x4lc";
+  cargoSha256 = "1wlig9gls7s1k1swxwhl82vfga30bady8286livxc4y2zp0vb18w";
 
   nativeBuildInputs = [ python cmake clang ];
   buildInputs = [ llvmPackages.libclang ] ++
diff --git a/pkgs/development/libraries/apr/default.nix b/pkgs/development/libraries/apr/default.nix
index c7a1073d137..03b6c9777df 100644
--- a/pkgs/development/libraries/apr/default.nix
+++ b/pkgs/development/libraries/apr/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl }:
+{ lib, stdenv, fetchurl, autoreconfHook }:
 
 stdenv.mkDerivation rec {
   name = "apr-1.7.0";
@@ -36,6 +36,10 @@ stdenv.mkDerivation rec {
 
   CPPFLAGS=lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-DAPR_IOVEC_DEFINED";
 
+  nativeBuildInputs =
+    # Update libtool for macOS 11 support
+    lib.optional (stdenv.isDarwin && stdenv.isAarch64) [ autoreconfHook ];
+
   enableParallelBuilding = true;
 
   meta = with lib; {
diff --git a/pkgs/development/libraries/catch/default.nix b/pkgs/development/libraries/catch/default.nix
index 2aa5c788dc3..c89fbd477c9 100644
--- a/pkgs/development/libraries/catch/default.nix
+++ b/pkgs/development/libraries/catch/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
 
 stdenv.mkDerivation rec {
   pname = "catch";
@@ -14,6 +14,14 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
   cmakeFlags = [ "-DUSE_CPP14=ON" ];
 
+  patches = [
+    # https://github.com/catchorg/Catch2/pull/2151
+    (fetchpatch {
+      url = "https://github.com/catchorg/Catch2/commit/bb6d08323f23a39eb65dd86671e68f4f5d3f2d6c.patch";
+      sha256 = "1vhbzx84nrhhf9zlbl6h5zmg3r5w5v833ihlswsysb9wp2i4isc5";
+    })
+  ];
+
   doCheck = true;
   checkTarget = "test";
 
diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix
index 5eb180731f3..c0846edbbfe 100644
--- a/pkgs/development/libraries/fontconfig/default.nix
+++ b/pkgs/development/libraries/fontconfig/default.nix
@@ -61,6 +61,11 @@ stdenv.mkDerivation rec {
       url = "https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/409b37c62780728755c908991c912a6b16f2389c.patch";
       sha256 = "zJFh37QErSAINPGFkFVJyhYRP27BuIN7PIgoDl/PIwI=";
     })
+
+    # Combination of
+    # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/88
+    # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/131
+    ./macos-atomics.h
   ];
 
   outputs = [ "bin" "dev" "lib" "out" ]; # $out contains all the config
diff --git a/pkgs/development/libraries/fontconfig/macos-atomics.h b/pkgs/development/libraries/fontconfig/macos-atomics.h
new file mode 100644
index 00000000000..07b0cf1d52d
--- /dev/null
+++ b/pkgs/development/libraries/fontconfig/macos-atomics.h
@@ -0,0 +1,39 @@
+--- a/src/fcatomic.h	2020-11-27 13:23:44.000000000 +0900
++++ b/src/fcatomic.h	2020-11-27 13:24:43.000000000 +0900
+@@ -70,24 +70,25 @@
+ #elif !defined(FC_NO_MT) && defined(__APPLE__)
+ 
+ #include <libkern/OSAtomic.h>
+-#ifdef __MAC_OS_X_MIN_REQUIRED
+ #include <AvailabilityMacros.h>
+-#elif defined(__IPHONE_OS_MIN_REQUIRED)
+-#include <Availability.h>
+-#endif
+ 
+ typedef int fc_atomic_int_t;
+ #define fc_atomic_int_add(AI, V)	(OSAtomicAdd32Barrier ((V), &(AI)) - (V))
+ 
+-#define fc_atomic_ptr_get(P)		(OSMemoryBarrier (), (void *) *(P))
+-#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100)
+-#define fc_atomic_ptr_cmpexch(P,O,N)	OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
+-#else
+-#if __ppc64__ || __x86_64__
+-#define fc_atomic_ptr_cmpexch(P,O,N)	OSAtomicCompareAndSwap64Barrier ((int64_t) (O), (int64_t) (N), (int64_t*) (P))
++#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_OS_VERSION_MIN_REQUIRED >= 20100)
++
++#if SIZEOF_VOID_P == 8
++#define fc_atomic_ptr_get(P)		OSAtomicAdd64Barrier (0, (int64_t*)(P))
++#elif SIZEOF_VOID_P == 4
++#define fc_atomic_ptr_get(P)		OSAtomicAdd32Barrier (0, (int32_t*)(P))
+ #else
+-#define fc_atomic_ptr_cmpexch(P,O,N)	OSAtomicCompareAndSwap32Barrier ((int32_t) (O), (int32_t) (N), (int32_t*) (P))
++#error "SIZEOF_VOID_P not 4 or 8 (assumes CHAR_BIT is 8)"
+ #endif
++
++#define fc_atomic_ptr_cmpexch(P,O,N)	OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
++
++#else
++#error "Your macOS / iOS targets are too old"
+ #endif
+ 
+ #elif !defined(FC_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES)
diff --git a/pkgs/development/libraries/gcr/default.nix b/pkgs/development/libraries/gcr/default.nix
index 94487ff6b4d..37238a5f59e 100644
--- a/pkgs/development/libraries/gcr/default.nix
+++ b/pkgs/development/libraries/gcr/default.nix
@@ -74,8 +74,6 @@ stdenv.mkDerivation rec {
 
   doCheck = false; # fails 21 out of 603 tests, needs dbus daemon
 
-  enableParallelBuilding = true;
-
   preFixup = ''
     wrapProgram "$out/bin/gcr-viewer" \
       --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index 08f7c9a4c78..e15f5975786 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -45,15 +45,16 @@ in
 
 stdenv.mkDerivation rec {
   pname = "glib";
-  version = "2.68.1";
+  version = "2.68.2";
 
   src = fetchurl {
     url = "mirror://gnome/sources/glib/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "sha256-JBZUuWvTa4iqoSgU78SEO1eOVdR0QBA3J5Waw0aUQzM=";
+    sha256 = "sha256-7Md5ipzANOq9/X8kbm3UYc2/EXX8wumGfMfae3MJ4Ps=";
   };
 
   patches = optionals stdenv.isDarwin [
     ./darwin-compilation.patch
+    ./link-with-coreservices.patch
   ] ++ optionals stdenv.hostPlatform.isMusl [
     ./quark_init_on_demand.patch
     ./gobject_init_on_demand.patch
diff --git a/pkgs/development/libraries/glib/link-with-coreservices.patch b/pkgs/development/libraries/glib/link-with-coreservices.patch
new file mode 100644
index 00000000000..dcc0a8998cc
--- /dev/null
+++ b/pkgs/development/libraries/glib/link-with-coreservices.patch
@@ -0,0 +1,11 @@
+--- a/meson.build.orig	2020-11-25 13:47:38.499149252 +0900
++++ b/meson.build	2020-11-25 13:48:47.098444800 +0900
+@@ -742,7 +742,7 @@
+ 
+   if glib_have_carbon
+     glib_conf.set('HAVE_CARBON', true)
+-    osx_ldflags += '-Wl,-framework,Carbon'
++    osx_ldflags += ['-Wl,-framework,Carbon', '-Wl,-framework,CoreServices']
+     glib_have_os_x_9_or_later = objcc.compiles('''#include <AvailabilityMacros.h>
+                                                   #if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
+                                                   #error Compiling for minimum OS X version before 10.9
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index 0108214a56e..3597dd70f2c 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -32,7 +32,7 @@
 , python3Minimal
 }:
 
-{ name
+{ pname
 , withLinuxHeaders ? false
 , profilingLibraries ? false
 , withGd ? false
@@ -50,7 +50,7 @@ assert withLinuxHeaders -> linuxHeaders != null;
 assert withGd -> gd != null && libpng != null;
 
 stdenv.mkDerivation ({
-  inherit version;
+  version = version + patchSuffix;
   linuxHeaders = if withLinuxHeaders then linuxHeaders else null;
 
   inherit (stdenv) is64bit;
@@ -187,14 +187,13 @@ stdenv.mkDerivation ({
   # bootstrap.
   BASH_SHELL = "/bin/sh";
 
+  # Used by libgcc, elf-header, and others to determine ABI
   passthru = { inherit version; };
 }
 
 // (removeAttrs args [ "withLinuxHeaders" "withGd" ]) //
 
 {
-  name = name + "-${version}${patchSuffix}";
-
   src = fetchurl {
     url = "mirror://gnu/glibc/glibc-${version}.tar.xz";
     inherit sha256;
diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix
index 9043c8fd0d4..caaacfe4f43 100644
--- a/pkgs/development/libraries/glibc/default.nix
+++ b/pkgs/development/libraries/glibc/default.nix
@@ -14,7 +14,7 @@ let
 in
 
 callPackage ./common.nix { inherit stdenv; } {
-    name = "glibc" + lib.optionalString withGd "-gd";
+    pname = "glibc" + lib.optionalString withGd "-gd";
 
     inherit withLinuxHeaders profilingLibraries withGd;
 
diff --git a/pkgs/development/libraries/glibc/info.nix b/pkgs/development/libraries/glibc/info.nix
index 5cb004cc870..7c4f3f63bf1 100644
--- a/pkgs/development/libraries/glibc/info.nix
+++ b/pkgs/development/libraries/glibc/info.nix
@@ -1,7 +1,7 @@
 { callPackage, texinfo, perl }:
 
 callPackage ./common.nix {} {
-  name = "glibc-info";
+  pname = "glibc-info";
 
   outputs = [ "out" ];
 
diff --git a/pkgs/development/libraries/glibc/locales.nix b/pkgs/development/libraries/glibc/locales.nix
index 238cebf6209..325e0d09936 100644
--- a/pkgs/development/libraries/glibc/locales.nix
+++ b/pkgs/development/libraries/glibc/locales.nix
@@ -11,7 +11,7 @@
 }:
 
 callPackage ./common.nix { inherit stdenv; } {
-  name = "glibc-locales";
+  pname = "glibc-locales";
 
   builder = ./locales-builder.sh;
 
diff --git a/pkgs/development/libraries/glibmm/default.nix b/pkgs/development/libraries/glibmm/default.nix
index 9c4488a04a9..344fcb43eba 100644
--- a/pkgs/development/libraries/glibmm/default.nix
+++ b/pkgs/development/libraries/glibmm/default.nix
@@ -24,8 +24,6 @@ stdenv.mkDerivation rec {
   ]);
   propagatedBuildInputs = [ glib libsigcxx ];
 
-  enableParallelBuilding = true;
-
   doCheck = false; # fails. one test needs the net, another /etc/fstab
 
   passthru = {
diff --git a/pkgs/development/libraries/gmp/6.x.nix b/pkgs/development/libraries/gmp/6.x.nix
index bf03bf08779..177c1567052 100644
--- a/pkgs/development/libraries/gmp/6.x.nix
+++ b/pkgs/development/libraries/gmp/6.x.nix
@@ -46,7 +46,7 @@ let self = stdenv.mkDerivation rec {
     # to build a .dll on windows, we need --disable-static + --enable-shared
     # see https://gmplib.org/manual/Notes-for-Particular-Systems.html
     ++ optional (!withStatic && stdenv.hostPlatform.isWindows) "--disable-static --enable-shared"
-    ;
+    ++ optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "--disable-assembly";
 
   doCheck = true; # not cross;
 
diff --git a/pkgs/development/libraries/gsl/default.nix b/pkgs/development/libraries/gsl/default.nix
index 04c8bcbbbec..2dc47a93be3 100644
--- a/pkgs/development/libraries/gsl/default.nix
+++ b/pkgs/development/libraries/gsl/default.nix
@@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
     sha256 = "1a460zj9xmbgvcymkdhqh313c4l29mn9cffbi5vf33x3qygk70mp";
   };
 
+  preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '' else null;
+
   # do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html)
   NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isx86_64 "-mno-fma";
 
diff --git a/pkgs/development/libraries/gtk/2.x.nix b/pkgs/development/libraries/gtk/2.x.nix
index ea112b3d33c..1a7cc57fbea 100644
--- a/pkgs/development/libraries/gtk/2.x.nix
+++ b/pkgs/development/libraries/gtk/2.x.nix
@@ -61,6 +61,10 @@ stdenv.mkDerivation rec {
     ++ optionals cupsSupport [ cups ]
     ++ optionals stdenv.isDarwin [ AppKit Cocoa ];
 
+  preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '' else null;
+
   configureFlags = [
     "--with-gdktarget=${gdktarget}"
     "--with-xinput=yes"
diff --git a/pkgs/development/libraries/gtkmm/3.x.nix b/pkgs/development/libraries/gtkmm/3.x.nix
index 1e5932c3854..0f6811815f6 100644
--- a/pkgs/development/libraries/gtkmm/3.x.nix
+++ b/pkgs/development/libraries/gtkmm/3.x.nix
@@ -16,8 +16,6 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ glibmm gtk3 atkmm cairomm pangomm ];
 
-  enableParallelBuilding = true;
-
   # https://bugzilla.gnome.org/show_bug.cgi?id=764521
   doCheck = false;
 
diff --git a/pkgs/development/libraries/kde-frameworks/fetch.sh b/pkgs/development/libraries/kde-frameworks/fetch.sh
index 05506b19385..55c1e02a955 100644
--- a/pkgs/development/libraries/kde-frameworks/fetch.sh
+++ b/pkgs/development/libraries/kde-frameworks/fetch.sh
@@ -1 +1 @@
-WGET_ARGS=( https://download.kde.org/stable/frameworks/5.80/ -A '*.tar.xz' )
+WGET_ARGS=( https://download.kde.org/stable/frameworks/5.81/ -A '*.tar.xz' )
diff --git a/pkgs/development/libraries/kde-frameworks/srcs.nix b/pkgs/development/libraries/kde-frameworks/srcs.nix
index 91d53f4df87..3d5ad663dd3 100644
--- a/pkgs/development/libraries/kde-frameworks/srcs.nix
+++ b/pkgs/development/libraries/kde-frameworks/srcs.nix
@@ -4,667 +4,667 @@
 
 {
   attica = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/attica-5.80.0.tar.xz";
-      sha256 = "0wffjjrk6rka25kgfq05j9fzxawysimpzi8jj3sw3kfz05mqdap3";
-      name = "attica-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/attica-5.81.0.tar.xz";
+      sha256 = "0x1ga3y0kmr2ybgvsmns7imd0agfd5bfc2lf0010ks5s1v50whqr";
+      name = "attica-5.81.0.tar.xz";
     };
   };
   baloo = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/baloo-5.80.0.tar.xz";
-      sha256 = "0wdm03x1zm31nivf04qxih6gg18c97diff7ddaqqbz8c7jlhppzc";
-      name = "baloo-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/baloo-5.81.0.tar.xz";
+      sha256 = "0mnm282mc1yph9x08fkrycb22gsah4km8r7yk3kz20vnrs0wgljy";
+      name = "baloo-5.81.0.tar.xz";
     };
   };
   bluez-qt = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/bluez-qt-5.80.0.tar.xz";
-      sha256 = "08g56gnh0gkh7n92wqama9lbqk6pfdby9xbh8f2vgmnkzy07zrwn";
-      name = "bluez-qt-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/bluez-qt-5.81.0.tar.xz";
+      sha256 = "13wy3nzbq26616s7pa0sx0jrq81v3bvf6a6dlmp1zzycvbk06jp3";
+      name = "bluez-qt-5.81.0.tar.xz";
     };
   };
   breeze-icons = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/breeze-icons-5.80.0.tar.xz";
-      sha256 = "11353lgy2fh1d2fgbhg20fapsjzrpsxlf5zilrfkw8y0my690rm2";
-      name = "breeze-icons-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/breeze-icons-5.81.0.tar.xz";
+      sha256 = "1844jyair0kjflfq98cakis7xfgbdn7an383f02hp4072kjg127g";
+      name = "breeze-icons-5.81.0.tar.xz";
     };
   };
   extra-cmake-modules = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/extra-cmake-modules-5.80.0.tar.xz";
-      sha256 = "0r3gr6qrgljiq7bsks54xc68x9pf7i2gm9pgjq5kslw5ys0gsw13";
-      name = "extra-cmake-modules-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/extra-cmake-modules-5.81.0.tar.xz";
+      sha256 = "10svwghxf5vhbfwz7lza7xid2n1mj6r1n1amv6c616q68fwf8msz";
+      name = "extra-cmake-modules-5.81.0.tar.xz";
     };
   };
   frameworkintegration = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/frameworkintegration-5.80.0.tar.xz";
-      sha256 = "0sk9p4wk4hsr5sg0z24rc7fxrsdbxcpm5fw66v30lhncrlf9c7c7";
-      name = "frameworkintegration-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/frameworkintegration-5.81.0.tar.xz";
+      sha256 = "0vcbm0364zwkyp33nvcl42px6i9hgnp4wl3lg913qvxv1f7pd61v";
+      name = "frameworkintegration-5.81.0.tar.xz";
     };
   };
   kactivities = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kactivities-5.80.0.tar.xz";
-      sha256 = "14im60ig074axryhgz3qw1zjqhfai1gg0hq88spabvz22r5f340s";
-      name = "kactivities-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kactivities-5.81.0.tar.xz";
+      sha256 = "0sskfpc8yfic2s8hvzf7cjk92pxd0idd0xl0azrjnn28ci5kvzvq";
+      name = "kactivities-5.81.0.tar.xz";
     };
   };
   kactivities-stats = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kactivities-stats-5.80.0.tar.xz";
-      sha256 = "1w3khp8p2a1v85s5hay3s0nznjsajaavrjx4iw2cxssxnzlvg2fn";
-      name = "kactivities-stats-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kactivities-stats-5.81.0.tar.xz";
+      sha256 = "0839g6y101qr5mr98ynfm74f554lxx7srnwm3anh7nj6zrlyxrq2";
+      name = "kactivities-stats-5.81.0.tar.xz";
     };
   };
   kapidox = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kapidox-5.80.0.tar.xz";
-      sha256 = "010jigqkw3rs04irf942cwgd9wvi7j9b5lisdcrc3w65a19q053z";
-      name = "kapidox-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kapidox-5.81.0.tar.xz";
+      sha256 = "1wq4py1djmcnqf51l52cij43qw44n5fafz00qslxjb0rdakrvzs2";
+      name = "kapidox-5.81.0.tar.xz";
     };
   };
   karchive = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/karchive-5.80.0.tar.xz";
-      sha256 = "1xaxbhbx562ybd9rqna1bh3bpbyxh02c9x9xyisw84akiibqvq7w";
-      name = "karchive-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/karchive-5.81.0.tar.xz";
+      sha256 = "1flnylyglc2jdb9lfk3dl56wzxdliaaqpg2rzrlclzj14lz3l9hy";
+      name = "karchive-5.81.0.tar.xz";
     };
   };
   kauth = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kauth-5.80.0.tar.xz";
-      sha256 = "1pcnk34b912hhhpx606ajvz9hcz6xr37g7bl002zkar9fzh7vw16";
-      name = "kauth-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kauth-5.81.0.tar.xz";
+      sha256 = "1gf93wk95x1fmi4w3ybkj7acwrv7rlz9nw7f1n4nd1w3w7pn403y";
+      name = "kauth-5.81.0.tar.xz";
     };
   };
   kbookmarks = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kbookmarks-5.80.0.tar.xz";
-      sha256 = "11imylvhw3pc46qiqz72q8rwa9igvgvd9gdchiivcrg4494k502q";
-      name = "kbookmarks-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kbookmarks-5.81.0.tar.xz";
+      sha256 = "0bqgl3vhr5lngajxz7v4l325kcyylj3d1qznaa946dcbsn2wrgzm";
+      name = "kbookmarks-5.81.0.tar.xz";
     };
   };
   kcalendarcore = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kcalendarcore-5.80.0.tar.xz";
-      sha256 = "1z8js2b5zb862ngwsdd2hwi6wqhkvkhsx5akbn7f1gmjs0pfrkg5";
-      name = "kcalendarcore-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kcalendarcore-5.81.0.tar.xz";
+      sha256 = "0a8m8l94cni1fv38sa9wa1mx1m7bnd7qb66wrjrhdd57cfrjij5s";
+      name = "kcalendarcore-5.81.0.tar.xz";
     };
   };
   kcmutils = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kcmutils-5.80.0.tar.xz";
-      sha256 = "0ncyffl60wv5awbfazknqpysaji11xxrpicabfl0mzmwcnlb34wc";
-      name = "kcmutils-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kcmutils-5.81.0.tar.xz";
+      sha256 = "15q2wvnz8s1g508jbssszzfcgssamdsp7s1vply1677ga8pcspmj";
+      name = "kcmutils-5.81.0.tar.xz";
     };
   };
   kcodecs = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kcodecs-5.80.0.tar.xz";
-      sha256 = "06l8c3jwx5z43cyv7vl6yfs91a7zmy0j089x826nn2a7jr678mjg";
-      name = "kcodecs-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kcodecs-5.81.0.tar.xz";
+      sha256 = "0r757k1rbz1bjk7mc0b2m0ybixai4qfidrs5wvbci971lfsaz4j3";
+      name = "kcodecs-5.81.0.tar.xz";
     };
   };
   kcompletion = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kcompletion-5.80.0.tar.xz";
-      sha256 = "14v0d1w01lric532vks9akh7v7z7nf9hgpf866qyhmb236k52hpg";
-      name = "kcompletion-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kcompletion-5.81.0.tar.xz";
+      sha256 = "15bw6g4ag1s0s3x6390r05i299kl279jrfajna9fxgq3fbjigb7p";
+      name = "kcompletion-5.81.0.tar.xz";
     };
   };
   kconfig = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kconfig-5.80.0.tar.xz";
-      sha256 = "1chrvpfr72bdgv6fdgrkbfbiz76jgvzsncxsc6gjvkvcdag48016";
-      name = "kconfig-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kconfig-5.81.0.tar.xz";
+      sha256 = "13xfy3mhi73na4mv0a8l75ba5c8ddnkkdssmsnxp5kj084w9xpqx";
+      name = "kconfig-5.81.0.tar.xz";
     };
   };
   kconfigwidgets = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kconfigwidgets-5.80.0.tar.xz";
-      sha256 = "12rc3l91h2snkxni70brdp8f21g19c0gabpxy7ssv614ci0fz7j7";
-      name = "kconfigwidgets-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kconfigwidgets-5.81.0.tar.xz";
+      sha256 = "1v7xxn6cd17z71cpdyw2qzfqw4vkzy96wwr1zn9dylnvl8mh4xg0";
+      name = "kconfigwidgets-5.81.0.tar.xz";
     };
   };
   kcontacts = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kcontacts-5.80.0.tar.xz";
-      sha256 = "173vpxncdr9mwpksizflvipsf18pnwn500b2xzpkaaz5w84vk1yk";
-      name = "kcontacts-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kcontacts-5.81.0.tar.xz";
+      sha256 = "15wkspgxqj6zh2pr3f7xqcahihbhf45qnqay1v56ry3vl42gncg4";
+      name = "kcontacts-5.81.0.tar.xz";
     };
   };
   kcoreaddons = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kcoreaddons-5.80.0.tar.xz";
-      sha256 = "1l9ydyvbmn2ih07jsy12snxavss7cyxyig0n65sz6gwbcxqr5qzc";
-      name = "kcoreaddons-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kcoreaddons-5.81.0.tar.xz";
+      sha256 = "1nzyijd8753p9n9fqfb14q30jid2k1j7cvwjqv99l5fxhwbcn35c";
+      name = "kcoreaddons-5.81.0.tar.xz";
     };
   };
   kcrash = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kcrash-5.80.0.tar.xz";
-      sha256 = "1c2b8i9qay0mdr0i16jp2167vb18r792dd88nz0in77lzccfk8v4";
-      name = "kcrash-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kcrash-5.81.0.tar.xz";
+      sha256 = "1irw9blm1xsn26mcyaimd8xnygkdpaqh9m8gpf5gpn2s19iz4f81";
+      name = "kcrash-5.81.0.tar.xz";
     };
   };
   kdav = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kdav-5.80.0.tar.xz";
-      sha256 = "1cab4pppqyfqm53dhp5lm4ghijbhym77ndb0pr6crvi70kz4s101";
-      name = "kdav-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kdav-5.81.0.tar.xz";
+      sha256 = "0cxiif5pb8frz0dpqx0f9j7g29iaspx13alwzvzavbmi0bwzs00b";
+      name = "kdav-5.81.0.tar.xz";
     };
   };
   kdbusaddons = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kdbusaddons-5.80.0.tar.xz";
-      sha256 = "1w0vpjzi37z8jaq97p9bxjdl8x4288idm4vvpzxs8lc9hwcl74hl";
-      name = "kdbusaddons-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kdbusaddons-5.81.0.tar.xz";
+      sha256 = "0gbrmgpd8x16zapbqbyh2ipbvysz3z07qk1fc0cmx5x84x1j7xa9";
+      name = "kdbusaddons-5.81.0.tar.xz";
     };
   };
   kdeclarative = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kdeclarative-5.80.0.tar.xz";
-      sha256 = "0gcx6pqyc0izw2cdvdcscxxl4wvksb74kjiq5zimjd2z8wrblmdz";
-      name = "kdeclarative-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kdeclarative-5.81.0.tar.xz";
+      sha256 = "0s6kal2ppw0vskv7baxvbqfip4hzh8s3399c1j7rahdw67nf9k3x";
+      name = "kdeclarative-5.81.0.tar.xz";
     };
   };
   kded = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kded-5.80.0.tar.xz";
-      sha256 = "0skk3zf3b6rlbvdq0fyd8swfrx3fqmppqxrglh6n5imcv5jxwms1";
-      name = "kded-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kded-5.81.0.tar.xz";
+      sha256 = "1100jrccadj50blq5wmr83wdc3ry46rn86y28dfy4h97cvn1nfsi";
+      name = "kded-5.81.0.tar.xz";
     };
   };
   kdelibs4support = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/portingAids/kdelibs4support-5.80.0.tar.xz";
-      sha256 = "01bd188iss14qmzm55dmsgdcs9wnwbdj0kh371achp9zqg55iqj3";
-      name = "kdelibs4support-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/portingAids/kdelibs4support-5.81.0.tar.xz";
+      sha256 = "1ck3i46k8sjkqgnaygy5pjqbw1np35sc6nhgxxcm7q84q3cdj536";
+      name = "kdelibs4support-5.81.0.tar.xz";
     };
   };
   kdesignerplugin = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/portingAids/kdesignerplugin-5.80.0.tar.xz";
-      sha256 = "1d79qg3y7ndrh6yd9sygyz5yd5ig6gp8k71mw96xijdhlf5nxqs3";
-      name = "kdesignerplugin-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/portingAids/kdesignerplugin-5.81.0.tar.xz";
+      sha256 = "1rgnj6bns9dnn0g53xk374knc69ajpprjhyb50ffr0dn7cfcs1s3";
+      name = "kdesignerplugin-5.81.0.tar.xz";
     };
   };
   kdesu = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kdesu-5.80.0.tar.xz";
-      sha256 = "1ksad8wcnjcrb8h73klrs2601482a32x3ycpr17k9fsi8mkylicd";
-      name = "kdesu-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kdesu-5.81.0.tar.xz";
+      sha256 = "176531kcvpmb4sklrqpvx4msna1radd2ki410700yvk0l2v4l2yy";
+      name = "kdesu-5.81.0.tar.xz";
     };
   };
   kdewebkit = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/portingAids/kdewebkit-5.80.0.tar.xz";
-      sha256 = "11q6x9w2majzh6wva4b824dxrpz53xpb3vfsi65pwh199fhfyzci";
-      name = "kdewebkit-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/portingAids/kdewebkit-5.81.0.tar.xz";
+      sha256 = "022dpmw8r5wkb3pr87fycrybv9j5k2wy8d39rilhjvkqk8s65277";
+      name = "kdewebkit-5.81.0.tar.xz";
     };
   };
   kdnssd = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kdnssd-5.80.0.tar.xz";
-      sha256 = "0k8lk3h65ar07l54cmxhpakz1why9vbm5wg58nh16x69dkdhr8dg";
-      name = "kdnssd-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kdnssd-5.81.0.tar.xz";
+      sha256 = "1hl49w55r57abnnwdf4hvyjk7566zbqa24bai3zsq24a4nnm6vii";
+      name = "kdnssd-5.81.0.tar.xz";
     };
   };
   kdoctools = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kdoctools-5.80.0.tar.xz";
-      sha256 = "10xcq0pk1sqw293f2kw52sjj6dgphv17fdax4w0yy1hjch711bhy";
-      name = "kdoctools-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kdoctools-5.81.0.tar.xz";
+      sha256 = "11qayqx47h4h1y2yqzbm8bysdd7xwb2qjmkk59jxpih7xbmpg1ir";
+      name = "kdoctools-5.81.0.tar.xz";
     };
   };
   kemoticons = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kemoticons-5.80.0.tar.xz";
-      sha256 = "0jg5z6dbfprkypj35prlixgc93x65nn7zcw2fmxcqvshrnqzz2hb";
-      name = "kemoticons-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kemoticons-5.81.0.tar.xz";
+      sha256 = "17zv96cfmqg9fxrgm91pn8xwp4f03644g2203c3s7iq3bh8ig3gc";
+      name = "kemoticons-5.81.0.tar.xz";
     };
   };
   kfilemetadata = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kfilemetadata-5.80.0.tar.xz";
-      sha256 = "02k0yyksyl5nn373l25m6ybxhpdyrz8g0mr16zmk12pdxh24vkbm";
-      name = "kfilemetadata-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kfilemetadata-5.81.0.tar.xz";
+      sha256 = "0cba7lsjk563ql0hw2rcjxn2khadx1rz7hx4agjb40145f7x931i";
+      name = "kfilemetadata-5.81.0.tar.xz";
     };
   };
   kglobalaccel = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kglobalaccel-5.80.0.tar.xz";
-      sha256 = "015x173b57vdd16mmd4asz6l6bxw94k1hbkxr09v5cb463cspw1n";
-      name = "kglobalaccel-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kglobalaccel-5.81.0.tar.xz";
+      sha256 = "0adqlfmpfsbbfjiljvbyi4f4blx77qp18anx7npkwh5gjn32hczz";
+      name = "kglobalaccel-5.81.0.tar.xz";
     };
   };
   kguiaddons = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kguiaddons-5.80.0.tar.xz";
-      sha256 = "1iadzp794q9qhs1kcvfp2g2w6rv2ifqcb3n8sv460fhv4qrg4qz5";
-      name = "kguiaddons-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kguiaddons-5.81.0.tar.xz";
+      sha256 = "1q9yrbbsjh98xl3k4yss5h39fd8nz8y5v9sd7vqjmy49mqsyxxz3";
+      name = "kguiaddons-5.81.0.tar.xz";
     };
   };
   kholidays = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kholidays-5.80.0.tar.xz";
-      sha256 = "1knmsz1rzhz5a56q9s0i4747633dq9bhs4j8j6rnk49ccl5hz72z";
-      name = "kholidays-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kholidays-5.81.0.tar.xz";
+      sha256 = "1pcqzwpmyl6jp9w4xvlgj81iyzbazz2kd07g82cjybz0z3jcxs2c";
+      name = "kholidays-5.81.0.tar.xz";
     };
   };
   khtml = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/portingAids/khtml-5.80.0.tar.xz";
-      sha256 = "188j1ssw9qlylqgj06iy2r2jbibzshxcxh9qbn1bgz6d2dq2c6mx";
-      name = "khtml-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/portingAids/khtml-5.81.0.tar.xz";
+      sha256 = "0ag23xwl2f9hiwxnwxvwiz3xr07dxpin49li3q98vqq1qzaj1ngp";
+      name = "khtml-5.81.0.tar.xz";
     };
   };
   ki18n = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/ki18n-5.80.0.tar.xz";
-      sha256 = "0yksjrcq5zip17kq1r97z2145qzzz6k48vz71y6195f7wvbpjfl8";
-      name = "ki18n-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/ki18n-5.81.0.tar.xz";
+      sha256 = "12m7ddyzw80y9y5gqyr7jgdyc5a0fmxa8zzsd41l7418i2sdajrc";
+      name = "ki18n-5.81.0.tar.xz";
     };
   };
   kiconthemes = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kiconthemes-5.80.0.tar.xz";
-      sha256 = "133nv4zgqg6pkkvh1nyqcra847vgn3ai6w0xvynbgrmq7wvdrwlj";
-      name = "kiconthemes-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kiconthemes-5.81.0.tar.xz";
+      sha256 = "053a7zdig796zc3rnwdlkscylg6wldn1dk0dxqzn14cb8vkbwizw";
+      name = "kiconthemes-5.81.0.tar.xz";
     };
   };
   kidletime = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kidletime-5.80.0.tar.xz";
-      sha256 = "1yjjhpkql8s7b4ddzirpyq5p0yicpsbkgbq15257k60xs66qgf83";
-      name = "kidletime-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kidletime-5.81.0.tar.xz";
+      sha256 = "12zrd9k27hx8ncywd9ahhbcv5xrn7rrw82pcvdkjmyniz0nazrqv";
+      name = "kidletime-5.81.0.tar.xz";
     };
   };
   kimageformats = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kimageformats-5.80.0.tar.xz";
-      sha256 = "0q3i6jkx6kahgdzfycygki50f22zjbspx3f9ibg2ak74hcan8r8x";
-      name = "kimageformats-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kimageformats-5.81.0.tar.xz";
+      sha256 = "0kl68dy1v4p403f52y7igv2w3wq6q2pb7n0r7fbnwz2113bs0cm3";
+      name = "kimageformats-5.81.0.tar.xz";
     };
   };
   kinit = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kinit-5.80.0.tar.xz";
-      sha256 = "101lvky2j6bxk3q36040kczchc21d5rb664ddxd89pl2n0f6s9fz";
-      name = "kinit-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kinit-5.81.0.tar.xz";
+      sha256 = "1wv8qyv4mayi80vczf47mdxxa6km4v7r2kz2j483w53nck5hjz4j";
+      name = "kinit-5.81.0.tar.xz";
     };
   };
   kio = {
-    version = "5.80.1";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kio-5.80.1.tar.xz";
-      sha256 = "0a2srmj8w80f2m8s359747xx0wg2gf8nd75ysv9f9y92l1hwwwfr";
-      name = "kio-5.80.1.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kio-5.81.0.tar.xz";
+      sha256 = "0zn0xh07hajcj3h1v5246a167ffm113k8j36p2xn7lbq368sway6";
+      name = "kio-5.81.0.tar.xz";
     };
   };
   kirigami2 = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kirigami2-5.80.0.tar.xz";
-      sha256 = "0wljcyr0g4i5nsc6szy9yd976l180lxfjjzhz24py7czlrpzg3i2";
-      name = "kirigami2-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kirigami2-5.81.0.tar.xz";
+      sha256 = "1bcc2mfb2s4w67q9q35k04mc9154dx1x03vqzclh9ipzdvyjqmyn";
+      name = "kirigami2-5.81.0.tar.xz";
     };
   };
   kitemmodels = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kitemmodels-5.80.0.tar.xz";
-      sha256 = "1bvghm4accgf273aacjng86rxiazmk05pbrnqkldda9958dqv54k";
-      name = "kitemmodels-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kitemmodels-5.81.0.tar.xz";
+      sha256 = "0vs75q08x9yi1953rihk3y234wcsjawdxb3g5xb597f961y634w0";
+      name = "kitemmodels-5.81.0.tar.xz";
     };
   };
   kitemviews = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kitemviews-5.80.0.tar.xz";
-      sha256 = "1j9m4qcmy83dj3k3v4y4skl5lgb8n3z4x9pa1f0rjpwwg4qsa0lp";
-      name = "kitemviews-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kitemviews-5.81.0.tar.xz";
+      sha256 = "0nmhc675bmilqah9fwwzy4p8rksib90cv8iihxd5c9d9snykk01n";
+      name = "kitemviews-5.81.0.tar.xz";
     };
   };
   kjobwidgets = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kjobwidgets-5.80.0.tar.xz";
-      sha256 = "1yy5n9jnj1sdh51n3n1bqzmaml44799kiqdpp3b7mq55fmj9najp";
-      name = "kjobwidgets-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kjobwidgets-5.81.0.tar.xz";
+      sha256 = "1gl8ia858jbmj2i9wp4x0mw27p42xm6mg84nj1a8yvvvbazs3hpa";
+      name = "kjobwidgets-5.81.0.tar.xz";
     };
   };
   kjs = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/portingAids/kjs-5.80.0.tar.xz";
-      sha256 = "1v3jiywzzi20c0pd67pgnwwnz0vg209a0wzzdhrpiz5v7qgji1ij";
-      name = "kjs-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/portingAids/kjs-5.81.0.tar.xz";
+      sha256 = "049aplmp1nlxshwaw0lfhfr09aazxh4vazvb78429gs84j8ir9xr";
+      name = "kjs-5.81.0.tar.xz";
     };
   };
   kjsembed = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/portingAids/kjsembed-5.80.0.tar.xz";
-      sha256 = "083gp9ks7yha90vnk0z4bkb9i4rphz90di8m8z19xgn575a6li57";
-      name = "kjsembed-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/portingAids/kjsembed-5.81.0.tar.xz";
+      sha256 = "0zkazfcrmd0gklzda0hbb4mc493ihsd3dafnmyj6cmgk4lz2w3q9";
+      name = "kjsembed-5.81.0.tar.xz";
     };
   };
   kmediaplayer = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/portingAids/kmediaplayer-5.80.0.tar.xz";
-      sha256 = "0a16rzyjy7j5pn66ahpj3kxpp5c2zmjxg3cmrm14gcm6gzysv56b";
-      name = "kmediaplayer-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/portingAids/kmediaplayer-5.81.0.tar.xz";
+      sha256 = "0z1ji717kwq84i6b2ay9wjhgc4vdkgn1jvwpzgpc1hqs9zly278b";
+      name = "kmediaplayer-5.81.0.tar.xz";
     };
   };
   knewstuff = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/knewstuff-5.80.0.tar.xz";
-      sha256 = "0pbk4j823zs2xikgdhaxqilb5b6f0a8k8hylq1vyhkwlzvvp9s6z";
-      name = "knewstuff-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/knewstuff-5.81.0.tar.xz";
+      sha256 = "0wmf86nndnxs1850bjzbwaag6kjdabz0si7b0p1r6hnwm2km9bnk";
+      name = "knewstuff-5.81.0.tar.xz";
     };
   };
   knotifications = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/knotifications-5.80.0.tar.xz";
-      sha256 = "1sfn61vhdqg3mxfvb802wx0l0k59b312fbh6w9bqv0b8z0a9jz2s";
-      name = "knotifications-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/knotifications-5.81.0.tar.xz";
+      sha256 = "04yfrhd098asr45swslnfkzxkb9892izvyam5rf0h93pw78ggmqs";
+      name = "knotifications-5.81.0.tar.xz";
     };
   };
   knotifyconfig = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/knotifyconfig-5.80.0.tar.xz";
-      sha256 = "0b41ppif2qp7lkqmb7nv1r68hvavdl1lcgs4w50v2c0k4fflwizx";
-      name = "knotifyconfig-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/knotifyconfig-5.81.0.tar.xz";
+      sha256 = "0xrd9771g1x0s796pw6wkhl9jj9607pffmlxrj171c8n8hdfyjbs";
+      name = "knotifyconfig-5.81.0.tar.xz";
     };
   };
   kpackage = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kpackage-5.80.0.tar.xz";
-      sha256 = "104qwyai3ivdw0jqgn6m59bajy07snas51rp75xgvb65hpllv2ch";
-      name = "kpackage-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kpackage-5.81.0.tar.xz";
+      sha256 = "1r1yv5y2swll38l88w559d8q0n4xizwgjp4qd8bh0vvsn24l65ka";
+      name = "kpackage-5.81.0.tar.xz";
     };
   };
   kparts = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kparts-5.80.0.tar.xz";
-      sha256 = "1fkfjazr7bwh5nniylh403qp0g4bgiv01ckv4djf46gjf7qn9d4y";
-      name = "kparts-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kparts-5.81.0.tar.xz";
+      sha256 = "1gjqmwg5pjj41vwfsdffvr1gfbkbm12f77rlyfn9gg4z6bjdx47b";
+      name = "kparts-5.81.0.tar.xz";
     };
   };
   kpeople = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kpeople-5.80.0.tar.xz";
-      sha256 = "1cn9jqiah3j0qi7sg1j9c10yq97pcisvxhm9jjzzzxna39zz16cw";
-      name = "kpeople-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kpeople-5.81.0.tar.xz";
+      sha256 = "1a63s8c946wrivqs8n680jpmcys8iafyy9j3isl4z5n88df2nnih";
+      name = "kpeople-5.81.0.tar.xz";
     };
   };
   kplotting = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kplotting-5.80.0.tar.xz";
-      sha256 = "073icgz0cgg7wis3rf1hlsmxklp9vk8swgihfdlks1jds90s4nxw";
-      name = "kplotting-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kplotting-5.81.0.tar.xz";
+      sha256 = "1s368amqfqjmr99bz4xc0xfm2sf29s99z3zpwbx2lbjvqh3p5yyb";
+      name = "kplotting-5.81.0.tar.xz";
     };
   };
   kpty = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kpty-5.80.0.tar.xz";
-      sha256 = "13blnrzni3n9p3xnn2kyd6g2hlpvvg0aqagknk64kchbvdkd5l4k";
-      name = "kpty-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kpty-5.81.0.tar.xz";
+      sha256 = "0la3jpkki1hskxg12nf3r59fw7r9q8n3sc7wcdik9r9c9rhlyjpk";
+      name = "kpty-5.81.0.tar.xz";
     };
   };
   kquickcharts = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kquickcharts-5.80.0.tar.xz";
-      sha256 = "0kf72i9pkifcwg9njn296fw4d9gy3rc43g17128axj6a5jrd4bln";
-      name = "kquickcharts-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kquickcharts-5.81.0.tar.xz";
+      sha256 = "00w2m0pwilldip873w97l9hvgm6gfy1aj6blyzcxn7x1688lv1jz";
+      name = "kquickcharts-5.81.0.tar.xz";
     };
   };
   kross = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/portingAids/kross-5.80.0.tar.xz";
-      sha256 = "06dyqmhxbr9ykca1bskkgxmsd86jpxnk4adygcw1j84xsl6jiki9";
-      name = "kross-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/portingAids/kross-5.81.0.tar.xz";
+      sha256 = "02jsyarn7ihv547b3vv5xwjm1bs58x5lhdnb74v02cwsgb82wlm3";
+      name = "kross-5.81.0.tar.xz";
     };
   };
   krunner = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/krunner-5.80.0.tar.xz";
-      sha256 = "0bid6h0wmvmxfz664hmfhs4zp35mlk3n1p553rspfs55wh2f9xpw";
-      name = "krunner-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/krunner-5.81.0.tar.xz";
+      sha256 = "1yf04qw82hmz8g9hddyalh73b2dxk492n8g856d5m6ccq89c7ga5";
+      name = "krunner-5.81.0.tar.xz";
     };
   };
   kservice = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kservice-5.80.0.tar.xz";
-      sha256 = "06bk46l3qg7dh57zsg9vwx8vq31ikjmbmy4nqn65mq786yiz4s78";
-      name = "kservice-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kservice-5.81.0.tar.xz";
+      sha256 = "1kb6wz8d879b57hpfi4ybpc9d3r67b205xdjmp3bhz21894haszc";
+      name = "kservice-5.81.0.tar.xz";
     };
   };
   ktexteditor = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/ktexteditor-5.80.0.tar.xz";
-      sha256 = "0g073m18bpzhxdwzhqcyclsclwi91cqsjqq3fjz1hy56ird6b0d0";
-      name = "ktexteditor-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/ktexteditor-5.81.0.tar.xz";
+      sha256 = "1pbxkkqzk4l8n9am5r6w2s1smqwwcc2wagy9in0k80gbyszp9rvm";
+      name = "ktexteditor-5.81.0.tar.xz";
     };
   };
   ktextwidgets = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/ktextwidgets-5.80.0.tar.xz";
-      sha256 = "1292knr3wblbk5j3qfzr1lqyiaa09pkhvkmh3jnlb0jvhc8xvmg8";
-      name = "ktextwidgets-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/ktextwidgets-5.81.0.tar.xz";
+      sha256 = "04mn22xmhkxqb138b9wf6jxz39dfp8rigdg3pzr5llx6gmrln9y8";
+      name = "ktextwidgets-5.81.0.tar.xz";
     };
   };
   kunitconversion = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kunitconversion-5.80.0.tar.xz";
-      sha256 = "1hckj3k3jjsc4y89zvi5l9h6px6ns9kdqjrfkxbax459wha55b4l";
-      name = "kunitconversion-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kunitconversion-5.81.0.tar.xz";
+      sha256 = "1g9i253f3qjpcmfiy12zmbi41gld9fxy89d742b44xc88fhj3z1y";
+      name = "kunitconversion-5.81.0.tar.xz";
     };
   };
   kwallet = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kwallet-5.80.0.tar.xz";
-      sha256 = "1pwrxhjxxdx7hl4456dk4x8z36ddw932cv08010fmz9m4w0yvjg1";
-      name = "kwallet-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kwallet-5.81.0.tar.xz";
+      sha256 = "1i05j20847bb9b7348f85fln6spqnkp3c9ysr7yvnm8wfyzrd1gz";
+      name = "kwallet-5.81.0.tar.xz";
     };
   };
   kwayland = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kwayland-5.80.0.tar.xz";
-      sha256 = "1avr7ckyhw158wi5mlknzkcphn8vlf8dpb96gyizvsvg8b4gffs0";
-      name = "kwayland-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kwayland-5.81.0.tar.xz";
+      sha256 = "1a23zcf6aax1fyq4d6y88flyap8wwkbwnq4vkbybpbnxnkbwl8ny";
+      name = "kwayland-5.81.0.tar.xz";
     };
   };
   kwidgetsaddons = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kwidgetsaddons-5.80.0.tar.xz";
-      sha256 = "1wgwl08cxwzcd0nikvp2ph2dbj5fij6a5l65p9amvi6ladbgv6qs";
-      name = "kwidgetsaddons-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kwidgetsaddons-5.81.0.tar.xz";
+      sha256 = "0hmnlda1hgk6zwx6wnjzqc0b2awv835736sjyczrxcfaxlkfj99g";
+      name = "kwidgetsaddons-5.81.0.tar.xz";
     };
   };
   kwindowsystem = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kwindowsystem-5.80.0.tar.xz";
-      sha256 = "1ch44w27ilh994if3icskyqg6nhnbd5j430jxfj6fzfia9vvclmk";
-      name = "kwindowsystem-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kwindowsystem-5.81.0.tar.xz";
+      sha256 = "11ma5vhq8z570danzq9vdwwcq5n6drsm9m3rpvc1vd3kn2mslls7";
+      name = "kwindowsystem-5.81.0.tar.xz";
     };
   };
   kxmlgui = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/kxmlgui-5.80.0.tar.xz";
-      sha256 = "17dpcv2igkg1pk238bd396mn83nqp325sscx7qsf8cbj15dp7bw1";
-      name = "kxmlgui-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/kxmlgui-5.81.0.tar.xz";
+      sha256 = "1l3a9qzc1x1ai2g1g551w05n2jxshxr03rcy0n8m8lbf518288yv";
+      name = "kxmlgui-5.81.0.tar.xz";
     };
   };
   kxmlrpcclient = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/portingAids/kxmlrpcclient-5.80.0.tar.xz";
-      sha256 = "0aas26kjxsbgrrrazjvsvjqdr9993v2hyxci62mfpi7xsp5js4h4";
-      name = "kxmlrpcclient-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/portingAids/kxmlrpcclient-5.81.0.tar.xz";
+      sha256 = "15q3w6wdn5ynhyv5244irq51qbm66bl7799zfs964c0y6dmmm3hg";
+      name = "kxmlrpcclient-5.81.0.tar.xz";
     };
   };
   modemmanager-qt = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/modemmanager-qt-5.80.0.tar.xz";
-      sha256 = "1q14hx2228xhlggw14r9mhmnn2q3qvy3nc9hq5ynb9mwldns6nl6";
-      name = "modemmanager-qt-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/modemmanager-qt-5.81.0.tar.xz";
+      sha256 = "01rr4j09xqsja7h699yk58xif7qrlbszd0mim4cncy7pkgwn43h6";
+      name = "modemmanager-qt-5.81.0.tar.xz";
     };
   };
   networkmanager-qt = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/networkmanager-qt-5.80.0.tar.xz";
-      sha256 = "1wdzn2n4m7nz6skjc37p70zaq42ighk5f1wg1hjx3yf3rlpprnp0";
-      name = "networkmanager-qt-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/networkmanager-qt-5.81.0.tar.xz";
+      sha256 = "1j26ja4r6ry7134yh8i6rkf6dy6kapnrjap9476mr78ig0d6r2if";
+      name = "networkmanager-qt-5.81.0.tar.xz";
     };
   };
   oxygen-icons5 = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/oxygen-icons5-5.80.0.tar.xz";
-      sha256 = "0kmq993vd6011qny949z13lli4qymprk616kl1628dazniapka9m";
-      name = "oxygen-icons5-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/oxygen-icons5-5.81.0.tar.xz";
+      sha256 = "1s0gvicrfw6dl164cccj05rfhp627mqa9ml0j4dvgvknnrgip6hz";
+      name = "oxygen-icons5-5.81.0.tar.xz";
     };
   };
   plasma-framework = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/plasma-framework-5.80.0.tar.xz";
-      sha256 = "1nckb1801fy64hvm127r5fz14vgw81szw7w7miilqh6651v0zbyk";
-      name = "plasma-framework-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/plasma-framework-5.81.0.tar.xz";
+      sha256 = "0g36a632kafsvhamk33w46cafg1gyir3kkx12fkhyqll2vlpn0v7";
+      name = "plasma-framework-5.81.0.tar.xz";
     };
   };
   prison = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/prison-5.80.0.tar.xz";
-      sha256 = "1fcsvww08f7ihxq6x84jd2klp29m8hrbzp7rxqi7x9ghxxgysbpz";
-      name = "prison-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/prison-5.81.0.tar.xz";
+      sha256 = "1mrrwhg98br4r9g7lj6gn3w1z2gfh9kr7ycispssjalyp6bdf4yg";
+      name = "prison-5.81.0.tar.xz";
     };
   };
   purpose = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/purpose-5.80.0.tar.xz";
-      sha256 = "107xmhbjcw5mk068484gwqrzl2gkgy495737f4vj5q22m9rpal5d";
-      name = "purpose-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/purpose-5.81.0.tar.xz";
+      sha256 = "0188wxxy6rg6sm722db02nzhmlv3c540zs2qh6h9fbbf1k4h82jf";
+      name = "purpose-5.81.0.tar.xz";
     };
   };
   qqc2-desktop-style = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/qqc2-desktop-style-5.80.0.tar.xz";
-      sha256 = "14dy7n6m9vdq6v7h3r0w71vw86yxyza40wyxp0hhj44nb63fvczg";
-      name = "qqc2-desktop-style-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/qqc2-desktop-style-5.81.0.tar.xz";
+      sha256 = "1ac4jc6yi6fwndyivc11brlaz3sncxyxzwrfdak8gg579z67zjx5";
+      name = "qqc2-desktop-style-5.81.0.tar.xz";
     };
   };
   solid = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/solid-5.80.0.tar.xz";
-      sha256 = "023zk7la6ycd7h2j62z7b409w94sq2r9k0c020ywry6psjydqkx5";
-      name = "solid-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/solid-5.81.0.tar.xz";
+      sha256 = "0w144jdhspjgqpv0xyxr6l6bnh2bazn9jfbw5iim8fj4q5dyr6c1";
+      name = "solid-5.81.0.tar.xz";
     };
   };
   sonnet = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/sonnet-5.80.0.tar.xz";
-      sha256 = "13kqdfy6bgmqjfw82d2zh0bq4r53awa1f1cbshci6inwdslyvlmh";
-      name = "sonnet-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/sonnet-5.81.0.tar.xz";
+      sha256 = "0kin6xngk4bxxn7y06q1pm0vk5s66gh6riv58l051px27m6lwz2a";
+      name = "sonnet-5.81.0.tar.xz";
     };
   };
   syndication = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/syndication-5.80.0.tar.xz";
-      sha256 = "1j22yx2i2qxck6gy4jypjvmar4y93j5nmrmf7fkjx7z8hwxjgwhh";
-      name = "syndication-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/syndication-5.81.0.tar.xz";
+      sha256 = "1fxdhnd8kl0q13434vbkmjan9dakhn9bdrad9d4vd3x11c77ggkn";
+      name = "syndication-5.81.0.tar.xz";
     };
   };
   syntax-highlighting = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/syntax-highlighting-5.80.0.tar.xz";
-      sha256 = "060jnfri24rzkryyvxadpr3yn5xn0856j01ba5l38w0khs8mix4i";
-      name = "syntax-highlighting-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/syntax-highlighting-5.81.0.tar.xz";
+      sha256 = "0paazw8y8kdvwg2waa45az5qgyxi2w5nkfbjg84v1is7yhb065yb";
+      name = "syntax-highlighting-5.81.0.tar.xz";
     };
   };
   threadweaver = {
-    version = "5.80.0";
+    version = "5.81.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.80/threadweaver-5.80.0.tar.xz";
-      sha256 = "1j5m8gfjpi9cajhja77lhkrl3shq618wpza1k27azvi7r6jj4dva";
-      name = "threadweaver-5.80.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.81/threadweaver-5.81.0.tar.xz";
+      sha256 = "03mz4zibvmriaa9qxvqsnp3ahjnhylzjj80w5c6nc4jjywmi89af";
+      name = "threadweaver-5.81.0.tar.xz";
     };
   };
 }
diff --git a/pkgs/development/libraries/libevent/default.nix b/pkgs/development/libraries/libevent/default.nix
index b33e94114f6..24ded54d8e9 100644
--- a/pkgs/development/libraries/libevent/default.nix
+++ b/pkgs/development/libraries/libevent/default.nix
@@ -13,6 +13,10 @@ stdenv.mkDerivation rec {
     sha256 = "1fq30imk8zd26x8066di3kpc5zyfc5z6frr3zll685zcx4dxxrlj";
   };
 
+  preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '';
+
   # libevent_openssl is moved into its own output, so that openssl isn't present
   # in the default closure.
   outputs = [ "out" "dev" ]
diff --git a/pkgs/development/libraries/libical/default.nix b/pkgs/development/libraries/libical/default.nix
index d7eb085df7f..909ee73e69a 100644
--- a/pkgs/development/libraries/libical/default.nix
+++ b/pkgs/development/libraries/libical/default.nix
@@ -20,7 +20,7 @@
 
 stdenv.mkDerivation rec {
   pname = "libical";
-  version = "3.0.9";
+  version = "3.0.10";
 
   outputs = [ "out" "dev" ]; # "devdoc" ];
 
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
     owner = "libical";
     repo = "libical";
     rev = "v${version}";
-    sha256 = "sha256-efdiGktLGITaQ6VinnfYG52fMhO0Av+JKROt2kTvS1U=";
+    sha256 = "sha256-fLmEJlkZLYLcKZqZwitf8rH261QDPTJZf/+/+FMsGIg=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/libidn2/default.nix b/pkgs/development/libraries/libidn2/default.nix
index 30a33426639..b1d234476c4 100644
--- a/pkgs/development/libraries/libidn2/default.nix
+++ b/pkgs/development/libraries/libidn2/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, lib, stdenv, libiconv, libunistring, help2man, buildPackages }:
+{ fetchurl, lib, stdenv, libiconv, libunistring, help2man, texinfo, buildPackages }:
 
 # Note: this package is used for bootstrapping fetchurl, and thus
 # cannot use fetchpatch! All mutable patches (generated by GitHub or
@@ -9,18 +9,20 @@ with lib;
 
 stdenv.mkDerivation rec {
   pname = "libidn2";
-  version = "2.3.0";
+  version = "2.3.1";
 
   src = fetchurl {
     url = "mirror://gnu/gnu/libidn/${pname}-${version}.tar.gz";
-    sha256 = "1ddqr80kmz4l8g3r3gf7bmf2v29fgivlc2bgxfiscjg2sarivjz1";
+    sha256 = "sha256-ivaElDg2uLU5ZdX1tnFO8TwmyR6qNs59JC49IfXUDy0=";
   };
 
   outputs = [ "bin" "dev" "out" "info" "devdoc" ];
 
   patches = optional stdenv.isDarwin ./fix-error-darwin.patch;
 
-  nativeBuildInputs = optional stdenv.isDarwin help2man;
+  # The above patch causes the documentation to be regenerated, so the
+  # documentation tools are required.
+  nativeBuildInputs = optionals stdenv.isDarwin [ help2man texinfo ];
   buildInputs = [ libunistring ] ++ optional stdenv.isDarwin libiconv;
   depsBuildBuild = [ buildPackages.stdenv.cc ];
 
diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix
index fc805b2db9e..960591d1a22 100644
--- a/pkgs/development/libraries/libsoup/default.nix
+++ b/pkgs/development/libraries/libsoup/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, glib, libxml2, meson, ninja, pkg-config, gnome, libsysprof-capture
+{ stdenv, lib, fetchurl, fetchpatch, glib, libxml2, meson, ninja, pkg-config, gnome, libsysprof-capture
 , gnomeSupport ? true, sqlite, glib-networking, gobject-introspection, vala
 , libpsl, python3, brotli
 }:
@@ -12,6 +12,14 @@ stdenv.mkDerivation rec {
     sha256 = "11skbyw2pw32178q3h8pi7xqa41b2x4k6q4k9f75zxmh8s23y30p";
   };
 
+  patches = [
+    (fetchpatch {
+      # https://gitlab.gnome.org/GNOME/libsoup/-/issues/222
+      url = "https://gitlab.gnome.org/GNOME/libsoup/commit/b5e4f15a09d197b6a9b4b2d78b33779f27d828af.patch";
+      sha256 = "1hqk8lqzc200hi0nwbwq9qm6f03z296cnd79d4ql30683s80xqws";
+    })
+  ];
+
   postPatch = ''
     patchShebangs libsoup/
   '';
diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix
index 30a65e3a0a3..ca3cbc4a188 100644
--- a/pkgs/development/libraries/libxml2/default.nix
+++ b/pkgs/development/libraries/libxml2/default.nix
@@ -1,18 +1,18 @@
-{ stdenv, lib, fetchurl, fetchpatch
+{ stdenv, lib, fetchurl
 , zlib, xz, libintl, python, gettext, ncurses, findXMLCatalogs
 , pythonSupport ? enableShared && stdenv.buildPlatform == stdenv.hostPlatform
 , icuSupport ? false, icu ? null
 , enableShared ? stdenv.hostPlatform.libc != "msvcrt"
-, enableStatic ? !enableShared,
+, enableStatic ? !enableShared
 }:
 
 stdenv.mkDerivation rec {
   pname = "libxml2";
-  version = "2.9.10";
+  version = "2.9.12";
 
   src = fetchurl {
     url = "http://xmlsoft.org/sources/${pname}-${version}.tar.gz";
-    sha256 = "07xynh8hcxb2yb1fs051xrgszjvj37wnxvxgsj10rzmqzy9y3zma";
+    sha256 = "14hxwzmf5xqppx77z7i0ni9lpzg1a84dqpf8j8l1fvy570g6imn8";
   };
   patches = [
     # Upstream bugs:
@@ -27,28 +27,6 @@ stdenv.mkDerivation rec {
     #   https://github.com/NixOS/nixpkgs/pull/63174
     #   https://github.com/NixOS/nixpkgs/pull/72342
     ./utf8-xmlErrorFuncHandler.patch
-    (fetchpatch {
-      name = "CVE-2019-20388.patch";
-      url = "https://gitlab.gnome.org/GNOME/libxml2/commit/6088a74bcf7d0c42e24cff4594d804e1d3c9fbca.patch";
-      sha256 = "070s7al2r2k92320h9cdfc2097jy4kk04d0disc98ddc165r80jl";
-    })
-    (fetchpatch {
-      name = "CVE-2020-7595.patch";
-      url = "https://gitlab.gnome.org/GNOME/libxml2/commit/0e1a49c8907645d2e155f0d89d4d9895ac5112b5.patch";
-      sha256 = "0klvaxkzakkpyq0m44l9xrpn5kwaii194sqsivfm6zhnb9hhl15l";
-    })
-    (fetchpatch {
-      name = "CVE-2020-24977.patch";
-      url = "https://gitlab.gnome.org/GNOME/libxml2/commit/50f06b3efb638efb0abd95dc62dca05ae67882c2.patch";
-      sha256 = "093f1ic5qfiq8nk9mc6b8p1qcs8m9hir3ardr6r5il4zi2dnjrj4";
-    })
-    # Fix compatibility with Python 3.9.
-    # https://gitlab.gnome.org/GNOME/libxml2/-/issues/149
-    (fetchpatch {
-      name = "python39.patch";
-      url = "https://gitlab.gnome.org/nwellnhof/libxml2/-/commit/e4fb36841800038c289997432ca547c9bfef9db1.patch";
-      sha256 = "0h3vpy9fg3339b14qa64640ypp65z3hrrrmpjl8qm72srkp24ci5";
-    })
   ];
 
   outputs = [ "bin" "dev" "out" "man" "doc" ]
@@ -75,6 +53,10 @@ stdenv.mkDerivation rec {
     (lib.withFeatureAs pythonSupport "python" python)
   ];
 
+  preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '';
+
   enableParallelBuilding = true;
 
   # disable test that's problematic with newer pythons: see
diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix
index 650e17d3179..eb23e16d653 100644
--- a/pkgs/development/libraries/libxslt/default.nix
+++ b/pkgs/development/libraries/libxslt/default.nix
@@ -1,4 +1,6 @@
-{ lib, stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, gettext, python3, libgcrypt
+{ lib, stdenv, fetchurl
+, pkg-config
+, libxml2, findXMLCatalogs, gettext, python3, libgcrypt
 , cryptoSupport ? false
 , pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
 }:
@@ -14,6 +16,10 @@ stdenv.mkDerivation rec {
 
   outputs = [ "bin" "dev" "out" "man" "doc" ] ++ lib.optional pythonSupport "py";
 
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
   buildInputs = [ libxml2.dev ]
     ++ lib.optional stdenv.isDarwin gettext
     ++ lib.optionals pythonSupport [ libxml2.py python3 ]
@@ -22,7 +28,6 @@ stdenv.mkDerivation rec {
   propagatedBuildInputs = [ findXMLCatalogs ];
 
   configureFlags = [
-    "--with-libxml-prefix=${libxml2.dev}"
     "--without-debug"
     "--without-mem-debug"
     "--without-debugger"
diff --git a/pkgs/development/libraries/lmdb/default.nix b/pkgs/development/libraries/lmdb/default.nix
index d1a68cc66c6..0a3515db262 100644
--- a/pkgs/development/libraries/lmdb/default.nix
+++ b/pkgs/development/libraries/lmdb/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
     ++ lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/liblmdb.so";
 
   doCheck = true;
-  checkPhase = "make test";
+  checkTarget = "test";
 
   postInstall = ''
     moveToOutput bin "$bin"
diff --git a/pkgs/development/libraries/lyra/default.nix b/pkgs/development/libraries/lyra/default.nix
index ed02af56f78..31b85b01d6a 100644
--- a/pkgs/development/libraries/lyra/default.nix
+++ b/pkgs/development/libraries/lyra/default.nix
@@ -13,8 +13,6 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ meson ninja ];
 
-  enableParallelBuilding = true;
-
   postPatch = "sed -i s#/usr#$out#g meson.build";
 
   postInstall = ''
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index 743080ee82e..2b94f9c3bb5 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -145,7 +145,6 @@ self = stdenv.mkDerivation {
   ] ++ optional stdenv.isLinux libdrm
     ++ optionals stdenv.isDarwin [ OpenGL Xplugin ];
 
-  enableParallelBuilding = true;
   doCheck = false;
 
   postInstall = ''
diff --git a/pkgs/development/libraries/openbsm/default.nix b/pkgs/development/libraries/openbsm/default.nix
index 269b0138091..4719b7fb747 100644
--- a/pkgs/development/libraries/openbsm/default.nix
+++ b/pkgs/development/libraries/openbsm/default.nix
@@ -13,6 +13,10 @@ stdenv.mkDerivation rec {
 
   patches = lib.optional stdenv.isDarwin [ ./bsm-add-audit_token_to_pid.patch ];
 
+  preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '';
+
   configureFlags = [ "ac_cv_file__usr_include_mach_audit_triggers_defs=no" ];
 
   meta = {
diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix
index fe4704341ef..f9e2b3c0b3f 100644
--- a/pkgs/development/libraries/openldap/default.nix
+++ b/pkgs/development/libraries/openldap/default.nix
@@ -30,6 +30,10 @@ stdenv.mkDerivation rec {
     "CC=${stdenv.cc.targetPrefix}cc"
   ];
 
+  preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '';
+
   configureFlags = [
     "--enable-overlays"
     "--disable-dependency-tracking"   # speeds up one-time build
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix
index a336dd18fae..2a586f9e9ef 100644
--- a/pkgs/development/libraries/openssl/default.nix
+++ b/pkgs/development/libraries/openssl/default.nix
@@ -69,6 +69,7 @@ let
         armv6l-linux = "./Configure linux-armv4 -march=armv6";
         armv7l-linux = "./Configure linux-armv4 -march=armv7-a";
         x86_64-darwin  = "./Configure darwin64-x86_64-cc";
+        aarch64-darwin = "./Configure darwin64-arm64-cc";
         x86_64-linux = "./Configure linux-x86_64";
         x86_64-solaris = "./Configure solaris64-x86_64-gcc";
       }.${stdenv.hostPlatform.system} or (
diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix
index 8d9b9ec0259..c91d4e2bd0c 100644
--- a/pkgs/development/libraries/pcre/default.nix
+++ b/pkgs/development/libraries/pcre/default.nix
@@ -23,7 +23,8 @@ in stdenv.mkDerivation {
 
   outputs = [ "bin" "dev" "out" "doc" "man" ];
 
-  configureFlags = optional (!stdenv.hostPlatform.isRiscV) "--enable-jit" ++ [
+  # Disable jit on Apple Silicon, https://github.com/zherczeg/sljit/issues/51
+  configureFlags = optional (!stdenv.hostPlatform.isRiscV && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit" ++ [
     "--enable-unicode-properties"
     "--disable-cpp"
   ]
diff --git a/pkgs/development/libraries/pcre2/default.nix b/pkgs/development/libraries/pcre2/default.nix
index 6bf6cff98bb..188fa9b16b7 100644
--- a/pkgs/development/libraries/pcre2/default.nix
+++ b/pkgs/development/libraries/pcre2/default.nix
@@ -8,10 +8,11 @@ stdenv.mkDerivation rec {
     sha256 = "0p3699msps07p40g9426lvxa3b41rg7k2fn7qxl2jm0kh4kkkvx9";
   };
 
+  # Disable jit on Apple Silicon, https://github.com/zherczeg/sljit/issues/51
   configureFlags = [
     "--enable-pcre2-16"
     "--enable-pcre2-32"
-  ] ++ lib.optional (!stdenv.hostPlatform.isRiscV) "--enable-jit";
+  ] ++ lib.optional (!stdenv.hostPlatform.isRiscV && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit";
 
   outputs = [ "bin" "dev" "out" "doc" "man" "devdoc" ];
 
diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix
index 5a41fb0c341..0146d80221b 100644
--- a/pkgs/development/libraries/poppler/default.nix
+++ b/pkgs/development/libraries/poppler/default.nix
@@ -1,44 +1,77 @@
-{ stdenv, lib, fetchurl, fetchpatch, cmake, ninja, pkg-config, libiconv, libintl
-, zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg
+{ stdenv
+, lib
+, fetchurl
+, fetchpatch
+, cmake
+, ninja
+, pkg-config
+, libiconv
+, libintl
+, zlib
+, curl
+, cairo
+, freetype
+, fontconfig
+, lcms
+, libjpeg
+, openjpeg
 , withData ? true, poppler_data
 , qt5Support ? false, qtbase ? null
 , introspectionSupport ? false, gobject-introspection ? null
 , utils ? false, nss ? null
-, minimal ? false, suffix ? "glib"
+, minimal ? false
+, suffix ? "glib"
+, inkscape
+, cups-filters
+, texlive
+, scribusUnstable
 }:
 
 let
   mkFlag = optset: flag: "-DENABLE_${flag}=${if optset then "on" else "off"}";
 in
-stdenv.mkDerivation (rec {
+stdenv.mkDerivation rec {
   name = "poppler-${suffix}-${version}";
-  version = "21.02.0"; # beware: updates often break cups-filters build, check texlive and scribusUnstable too!
+  version = "21.05.0"; # beware: updates often break cups-filters build, check texlive and scribusUnstable too!
+
+  outputs = [ "out" "dev" ];
 
   src = fetchurl {
     url = "${meta.homepage}/poppler-${version}.tar.xz";
-    sha256 = "sha256-XBR1nJmJHm5HKs7W1fD/Haz4XYDNkCbTZcVcZT7feSw=";
+    sha256 = "sha256-2v1Te2gPrRIVvED8U9HzjoRJ18GFvGDVqJ4dJskNvYw=";
   };
 
-  outputs = [ "out" "dev" ];
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pkg-config
+  ];
 
-  buildInputs = [ libiconv libintl ] ++ lib.optional withData poppler_data;
+  buildInputs = [
+    libiconv
+    libintl
+  ] ++ lib.optional withData [
+    poppler_data
+  ];
 
   # TODO: reduce propagation to necessary libs
-  propagatedBuildInputs = with lib;
-    [ zlib freetype fontconfig libjpeg openjpeg ]
-    ++ optionals (!minimal) [ cairo lcms curl ]
-    ++ optional qt5Support qtbase
-    ++ optional utils nss
-    ++ optional introspectionSupport gobject-introspection;
-
-  nativeBuildInputs = [ cmake ninja pkg-config ];
-
-  # Workaround #54606
-  preConfigure = lib.optionalString stdenv.isDarwin ''
-    sed -i -e '1i cmake_policy(SET CMP0025 NEW)' CMakeLists.txt
-  '';
-
-  dontWrapQtApps = true;
+  propagatedBuildInputs = [
+    zlib
+    freetype
+    fontconfig
+    libjpeg
+    openjpeg
+  ] ++ lib.optionals (!minimal) [
+    cairo
+    lcms
+    curl
+  ] ++ lib.optionals qt5Support [
+    qtbase
+  ] ++ lib.optionals utils [
+    nss
+  ] ++ lib.optionals introspectionSupport [
+    gobject-introspection
+  ];
 
   cmakeFlags = [
     (mkFlag true "UNSTABLE_API_ABI_HEADERS") # previously "XPDF_HEADERS"
@@ -49,6 +82,20 @@ stdenv.mkDerivation (rec {
     (mkFlag qt5Support "QT5")
   ];
 
+  dontWrapQtApps = true;
+
+  # Workaround #54606
+  preConfigure = lib.optionalString stdenv.isDarwin ''
+    sed -i -e '1i cmake_policy(SET CMP0025 NEW)' CMakeLists.txt
+  '';
+
+  passthru = {
+    tests = {
+      # These depend on internal poppler code that frequently changes.
+      inherit inkscape cups-filters texlive scribusUnstable;
+    };
+  };
+
   meta = with lib; {
     homepage = "https://poppler.freedesktop.org/";
     description = "A PDF rendering library";
@@ -59,21 +106,8 @@ stdenv.mkDerivation (rec {
       installed separately.
     '';
 
-    license = licenses.gpl2;
+    license = licenses.gpl2Plus;
     platforms = platforms.all;
     maintainers = with maintainers; [ ttuegel ] ++ teams.freedesktop.members;
   };
-} // lib.optionalAttrs stdenv.isDarwin {
-  patches = [
-    # Fix build due to improperly used volatile in poppler-glib.
-    # https://gitlab.freedesktop.org/poppler/poppler/merge_requests/836
-    (fetchpatch {
-      url = "https://gitlab.freedesktop.org/poppler/poppler/commit/47de887d7658cfd68df44b3acf710971054f957b.patch";
-      sha256 = "uvYibBn2fOEqdotxK0Wpf8KhGYZXrpHdmS4jjlRNCj8=";
-    })
-    (fetchpatch {
-      url = "https://gitlab.freedesktop.org/poppler/poppler/commit/bdd110b45a38e8a4f80f522892e4c4a9e432abd5.patch";
-      sha256 = "WDUYXX6v5zk7tusz7DGBP58yFzgEvoBlNSLbfk7+QTc=";
-    })
-  ];
-})
+}
diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0003-qtbase-mkspecs.patch b/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0003-qtbase-mkspecs.patch
index d5d8e70b788..506397bc605 100644
--- a/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0003-qtbase-mkspecs.patch
+++ b/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0003-qtbase-mkspecs.patch
@@ -1,6 +1,6 @@
-From 8bdbddc2e5fef1553b1ba0297d3c03b38e9b947b Mon Sep 17 00:00:00 2001
-From: Thomas Tuegel <ttuegel@mailbox.org>
-Date: Wed, 18 Sep 2019 05:39:39 -0500
+From 9ffbcc5e362d17aea3e3d67e43cd3cd993e987eb Mon Sep 17 00:00:00 2001
+From: OPNA2608 <christoph.neidahl@gmail.com>
+Date: Mon, 12 Apr 2021 20:05:25 +0200
 Subject: [PATCH 03/12] qtbase-mkspecs
 
 ---
@@ -12,13 +12,13 @@ Subject: [PATCH 03/12] qtbase-mkspecs
  mkspecs/features/qt_build_paths.prf           |  4 +-
  mkspecs/features/qt_docs.prf                  | 10 +--
  mkspecs/features/qt_example_installs.prf      |  2 +-
- mkspecs/features/qt_functions.prf             |  2 +-
+ mkspecs/features/qt_functions.prf             | 27 ++++---
  mkspecs/features/qt_installs.prf              | 22 ++---
  mkspecs/features/qt_plugin.prf                |  2 +-
- 11 files changed, 39 insertions(+), 142 deletions(-)
+ 11 files changed, 53 insertions(+), 153 deletions(-)
 
 diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
-index 00da9bd33f..bd166fbfea 100644
+index 02e5775983..3782949d32 100644
 --- a/mkspecs/features/create_cmake.prf
 +++ b/mkspecs/features/create_cmake.prf
 @@ -21,7 +21,7 @@ load(cmake_functions)
@@ -96,7 +96,7 @@ index 00da9bd33f..bd166fbfea 100644
      INSTALLS += cmake_qt5_plugin_file
  
      return()
-@@ -333,7 +308,7 @@ exists($$cmake_macros_file.input) {
+@@ -334,7 +309,7 @@ exists($$cmake_macros_file.input) {
      cmake_qt5_module_files.files += $$cmake_macros_file.output
  }
  
@@ -370,18 +370,44 @@ index 43b58817fe..e635b8f67a 100644
  
  check_examples {
 diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
-index 1903e509c8..ae7b585989 100644
+index 1903e509c8..1dc117a388 100644
 --- a/mkspecs/features/qt_functions.prf
 +++ b/mkspecs/features/qt_functions.prf
-@@ -69,7 +69,7 @@ defineTest(qtHaveModule) {
+@@ -69,19 +69,22 @@ defineTest(qtHaveModule) {
  defineTest(qtPrepareTool) {
      cmd = $$eval(QT_TOOL.$${2}.binary)
      isEmpty(cmd) {
 -        cmd = $$[QT_HOST_BINS]/$$2
-+        cmd = $$system("command -v $$2")
-         exists($${cmd}.pl) {
-             $${1}_EXE = $${cmd}.pl
-             cmd = perl -w $$system_path($${cmd}.pl)
+-        exists($${cmd}.pl) {
+-            $${1}_EXE = $${cmd}.pl
+-            cmd = perl -w $$system_path($${cmd}.pl)
+-        } else: contains(QMAKE_HOST.os, Windows) {
+-            $${1}_EXE = $${cmd}.exe
+-            cmd = $$system_path($${cmd}.exe)
+-        } else:contains(QMAKE_HOST.os, Darwin) {
+-            BUNDLENAME = $${cmd}.app/Contents/MacOS/$$2
+-            exists($$BUNDLENAME) {
+-                cmd = $$BUNDLENAME
++        cmd = $$system("command -v $${2}")
++        isEmpty(cmd) {
++            cmd = $$system("command -v $${2}.pl")
++            !isEmpty(cmd) {
++                $${1}_EXE = $$cmd
++                cmd = perl -w $$system_path($${cmd})
++            } else: contains(QMAKE_HOST.os, Windows) {
++                cmd = $$system("command -v $${2}.exe")
++                $${1}_EXE = $$cmd
++            } else: contains(QMAKE_HOST.os, Darwin) {
++                cmd = $$system("command -v $${2}.app")
++                !isEmpty(cmd) {
++                    cmd = $${cmd}/Contents/MacOS/$${2}
++                    $${1}_EXE = $$cmd
++                }
+             }
+-            $${1}_EXE = $$cmd
+         } else {
+             $${1}_EXE = $$cmd
+         }
 diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
 index 1ebca17366..b784441da0 100644
 --- a/mkspecs/features/qt_installs.prf
@@ -461,5 +487,5 @@ index 40528a65e2..903f795284 100644
  
  TARGET = $$qt5LibraryTarget($$TARGET)
 -- 
-2.23.GIT
+2.29.3
 
diff --git a/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0003-qtbase-mkspecs.patch b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0003-qtbase-mkspecs.patch
index b704d0dc872..dbd6b366344 100644
--- a/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0003-qtbase-mkspecs.patch
+++ b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0003-qtbase-mkspecs.patch
@@ -1,6 +1,6 @@
-From 1cb5581d7f20bf87ac8d67a7295447a78a1d9645 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
-Date: Sat, 4 Apr 2020 00:25:52 +0200
+From 87c81a31d65862a2f32fdc575cfb47b7a46bfae7 Mon Sep 17 00:00:00 2001
+From: OPNA2608 <christoph.neidahl@gmail.com>
+Date: Mon, 12 Apr 2021 20:05:25 +0200
 Subject: [PATCH 03/10] qtbase-mkspecs
 
 ---
@@ -12,10 +12,10 @@ Subject: [PATCH 03/10] qtbase-mkspecs
  mkspecs/features/qt_build_paths.prf           |  4 +-
  mkspecs/features/qt_docs.prf                  | 10 +--
  mkspecs/features/qt_example_installs.prf      |  2 +-
- mkspecs/features/qt_functions.prf             |  2 +-
+ mkspecs/features/qt_functions.prf             | 27 ++++---
  mkspecs/features/qt_installs.prf              | 22 ++---
  mkspecs/features/qt_plugin.prf                |  2 +-
- 11 files changed, 38 insertions(+), 141 deletions(-)
+ 11 files changed, 52 insertions(+), 152 deletions(-)
 
 diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
 index 0e71fd0015..ba071d9a70 100644
@@ -369,18 +369,44 @@ index 72b47bce27..d59e949e78 100644
  
  check_examples {
 diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
-index 7777e615bd..abeb03a663 100644
+index 7777e615bd..b0c6880a74 100644
 --- a/mkspecs/features/qt_functions.prf
 +++ b/mkspecs/features/qt_functions.prf
-@@ -87,7 +87,7 @@ defineTest(qtHaveModule) {
+@@ -87,19 +87,22 @@ defineTest(qtHaveModule) {
  defineTest(qtPrepareTool) {
      cmd = $$eval(QT_TOOL.$${2}.binary)
      isEmpty(cmd) {
 -        cmd = $$[QT_HOST_BINS]/$$2
-+        cmd = $$system("command -v $$2")
-         exists($${cmd}.pl) {
-             $${1}_EXE = $${cmd}.pl
-             cmd = perl -w $$system_path($${cmd}.pl)
+-        exists($${cmd}.pl) {
+-            $${1}_EXE = $${cmd}.pl
+-            cmd = perl -w $$system_path($${cmd}.pl)
+-        } else: contains(QMAKE_HOST.os, Windows) {
+-            $${1}_EXE = $${cmd}.exe
+-            cmd = $$system_path($${cmd}.exe)
+-        } else:contains(QMAKE_HOST.os, Darwin) {
+-            BUNDLENAME = $${cmd}.app/Contents/MacOS/$$2
+-            exists($$BUNDLENAME) {
+-                cmd = $$BUNDLENAME
++        cmd = $$system("command -v $${2}")
++        isEmpty(cmd) {
++            cmd = $$system("command -v $${2}.pl")
++            !isEmpty(cmd) {
++                $${1}_EXE = $$cmd
++                cmd = perl -w $$system_path($${cmd})
++            } else: contains(QMAKE_HOST.os, Windows) {
++                cmd = $$system("command -v $${2}.exe")
++                $${1}_EXE = $$cmd
++            } else: contains(QMAKE_HOST.os, Darwin) {
++                cmd = $$system("command -v $${2}.app")
++                !isEmpty(cmd) {
++                    cmd = $${cmd}/Contents/MacOS/$${2}
++                    $${1}_EXE = $$cmd
++                }
+             }
+-            $${1}_EXE = $$cmd
+         } else {
+             $${1}_EXE = $$cmd
+         }
 diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
 index 1ebca17366..a8f958eae8 100644
 --- a/mkspecs/features/qt_installs.prf
@@ -460,5 +486,5 @@ index 573d717eea..024c624cb6 100644
  
  qt_libinfix_plugins: TARGET = $$TARGET$$QT_LIBINFIX
 -- 
-2.25.1
+2.29.3
 
diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch
index 9f8ef67ab5d..1c9012c0f2e 100644
--- a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch
+++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch
@@ -1,6 +1,6 @@
-From 82771c437957b3684ce296997d795432756aa8b1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
-Date: Sat, 4 Apr 2020 00:25:52 +0200
+From 03a5a7eab673d18d00c9b5eb8c7d5b790079e8ff Mon Sep 17 00:00:00 2001
+From: OPNA2608 <christoph.neidahl@gmail.com>
+Date: Mon, 12 Apr 2021 20:20:46 +0200
 Subject: [PATCH 03/11] qtbase-mkspecs
 
 ---
@@ -12,10 +12,10 @@ Subject: [PATCH 03/11] qtbase-mkspecs
  mkspecs/features/qt_build_paths.prf           |  4 +-
  mkspecs/features/qt_docs.prf                  | 10 +--
  mkspecs/features/qt_example_installs.prf      |  2 +-
- mkspecs/features/qt_functions.prf             |  2 +-
+ mkspecs/features/qt_functions.prf             | 27 ++++---
  mkspecs/features/qt_installs.prf              | 22 ++---
  mkspecs/features/qt_plugin.prf                |  2 +-
- 11 files changed, 38 insertions(+), 141 deletions(-)
+ 11 files changed, 52 insertions(+), 152 deletions(-)
 
 diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
 index 24ed125f12..f0666a1986 100644
@@ -105,7 +105,7 @@ index 24ed125f12..f0666a1986 100644
  # We are generating cmake files. Most developers of Qt are not aware of cmake,
  # so we require automatic tests to be available. The only module which should
 diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
-index 309798a767..b6c3ab8609 100644
+index db18dbece6..8246f37931 100644
 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
 +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
 @@ -2,30 +2,6 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0)
@@ -200,7 +200,7 @@ index 309798a767..b6c3ab8609 100644
  !!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS)
      include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL)
  !!ENDIF
-@@ -499,25 +455,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -491,25 +447,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
  !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
  !!IF isEmpty(CMAKE_DEBUG_TYPE)
  !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
@@ -226,7 +226,7 @@ index 309798a767..b6c3ab8609 100644
          _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
  !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
      endif()
-@@ -536,25 +480,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -528,25 +472,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
  !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
  !!IF isEmpty(CMAKE_RELEASE_TYPE)
  !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
@@ -252,7 +252,7 @@ index 309798a767..b6c3ab8609 100644
          _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
  !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
      endif()
-@@ -581,11 +513,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -573,11 +505,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
            IsDebugAndRelease)
          set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
  
@@ -265,7 +265,7 @@ index 309798a767..b6c3ab8609 100644
          set_target_properties(Qt5::${Plugin} PROPERTIES
              \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
 diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf
-index c0b50416c9..cabe39b22e 100644
+index 3d6cd9b3db..ca8b0b2701 100644
 --- a/mkspecs/features/qml_module.prf
 +++ b/mkspecs/features/qml_module.prf
 @@ -51,7 +51,7 @@ builtin_resources {
@@ -369,18 +369,44 @@ index 15b373ba40..5c373fe1d5 100644
  
  check_examples {
 diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
-index 7777e615bd..abeb03a663 100644
+index 7777e615bd..b0c6880a74 100644
 --- a/mkspecs/features/qt_functions.prf
 +++ b/mkspecs/features/qt_functions.prf
-@@ -87,7 +87,7 @@ defineTest(qtHaveModule) {
+@@ -87,19 +87,22 @@ defineTest(qtHaveModule) {
  defineTest(qtPrepareTool) {
      cmd = $$eval(QT_TOOL.$${2}.binary)
      isEmpty(cmd) {
 -        cmd = $$[QT_HOST_BINS]/$$2
-+        cmd = $$system("command -v $$2")
-         exists($${cmd}.pl) {
-             $${1}_EXE = $${cmd}.pl
-             cmd = perl -w $$system_path($${cmd}.pl)
+-        exists($${cmd}.pl) {
+-            $${1}_EXE = $${cmd}.pl
+-            cmd = perl -w $$system_path($${cmd}.pl)
+-        } else: contains(QMAKE_HOST.os, Windows) {
+-            $${1}_EXE = $${cmd}.exe
+-            cmd = $$system_path($${cmd}.exe)
+-        } else:contains(QMAKE_HOST.os, Darwin) {
+-            BUNDLENAME = $${cmd}.app/Contents/MacOS/$$2
+-            exists($$BUNDLENAME) {
+-                cmd = $$BUNDLENAME
++        cmd = $$system("command -v $${2}")
++        isEmpty(cmd) {
++            cmd = $$system("command -v $${2}.pl")
++            !isEmpty(cmd) {
++                $${1}_EXE = $$cmd
++                cmd = perl -w $$system_path($${cmd})
++            } else: contains(QMAKE_HOST.os, Windows) {
++                cmd = $$system("command -v $${2}.exe")
++                $${1}_EXE = $$cmd
++            } else: contains(QMAKE_HOST.os, Darwin) {
++                cmd = $$system("command -v $${2}.app")
++                !isEmpty(cmd) {
++                    cmd = $${cmd}/Contents/MacOS/$${2}
++                    $${1}_EXE = $$cmd
++                }
+             }
+-            $${1}_EXE = $$cmd
+         } else {
+             $${1}_EXE = $$cmd
+         }
 diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
 index 1ebca17366..a8f958eae8 100644
 --- a/mkspecs/features/qt_installs.prf
@@ -460,5 +486,5 @@ index 573d717eea..024c624cb6 100644
  
  qt_libinfix_plugins: TARGET = $$TARGET$$QT_LIBINFIX
 -- 
-2.25.4
+2.29.3
 
diff --git a/pkgs/development/libraries/qt-5/modules/qtcharts.nix b/pkgs/development/libraries/qt-5/modules/qtcharts.nix
index 84d3a17ea8c..f5d034bcc32 100644
--- a/pkgs/development/libraries/qt-5/modules/qtcharts.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtcharts.nix
@@ -1,7 +1,7 @@
 { qtModule, qtbase, qtdeclarative }:
 
 qtModule {
-  name = "qtcharts";
+  pname = "qtcharts";
   qtInputs = [ qtbase qtdeclarative ];
   outputs = [ "out" "dev" "bin" ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix b/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix
index f6aeb23fb7b..ae3aa25427c 100644
--- a/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix
@@ -1,7 +1,7 @@
 { qtModule, lib, stdenv, qtbase, qtdeclarative, bluez }:
 
 qtModule {
-  name = "qtconnectivity";
+  pname = "qtconnectivity";
   qtInputs = [ qtbase qtdeclarative ];
   buildInputs = lib.optional stdenv.isLinux bluez;
   outputs = [ "out" "dev" "bin" ];
diff --git a/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix b/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix
index b611282294c..97248ca1807 100644
--- a/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix
@@ -3,7 +3,7 @@
 with lib;
 
 qtModule {
-  name = "qtdeclarative";
+  pname = "qtdeclarative";
   qtInputs = [ qtbase qtsvg ];
   nativeBuildInputs = [ python3 ];
   outputs = [ "out" "dev" "bin" ];
diff --git a/pkgs/development/libraries/qt-5/modules/qtdoc.nix b/pkgs/development/libraries/qt-5/modules/qtdoc.nix
index 10623962c43..4ef4915000e 100644
--- a/pkgs/development/libraries/qt-5/modules/qtdoc.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtdoc.nix
@@ -1,7 +1,7 @@
 { qtModule, qtdeclarative }:
 
 qtModule {
-  name = "qtdoc";
+  pname = "qtdoc";
   qtInputs = [ qtdeclarative ];
   outputs = [ "out" ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtgamepad.nix b/pkgs/development/libraries/qt-5/modules/qtgamepad.nix
index 6bc023eb9bb..2e266060a34 100644
--- a/pkgs/development/libraries/qt-5/modules/qtgamepad.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtgamepad.nix
@@ -1,7 +1,7 @@
 { qtModule, qtbase, qtdeclarative, pkg-config }:
 
 qtModule {
-  name = "qtgamepad";
+  pname = "qtgamepad";
   qtInputs = [ qtbase qtdeclarative ];
   buildInputs = [ ];
   nativeBuildInputs = [ pkg-config ];
diff --git a/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix b/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix
index d0be6ae7769..c90280090b8 100644
--- a/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix
@@ -1,7 +1,7 @@
 { qtModule, qtdeclarative }:
 
 qtModule {
-  name = "qtgraphicaleffects";
+  pname = "qtgraphicaleffects";
   qtInputs = [ qtdeclarative ];
   outputs = [ "out" "dev" ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtimageformats.nix b/pkgs/development/libraries/qt-5/modules/qtimageformats.nix
index 9c80507b7c7..52fa4d4ba8f 100644
--- a/pkgs/development/libraries/qt-5/modules/qtimageformats.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtimageformats.nix
@@ -1,7 +1,7 @@
 { qtModule, qtbase, libtiff }:
 
 qtModule {
-  name = "qtimageformats";
+  pname = "qtimageformats";
   qtInputs = [ qtbase ];
   propagatedBuildInputs = [ libtiff ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtlocation.nix b/pkgs/development/libraries/qt-5/modules/qtlocation.nix
index 182b5f5bc33..687571f18d2 100644
--- a/pkgs/development/libraries/qt-5/modules/qtlocation.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtlocation.nix
@@ -1,7 +1,7 @@
 { lib, stdenv, qtModule, qtbase, qtmultimedia }:
 
 qtModule {
-  name = "qtlocation";
+  pname = "qtlocation";
   qtInputs = [ qtbase qtmultimedia ];
   outputs = [ "bin" "out" "dev" ];
   qmakeFlags = lib.optional stdenv.isDarwin [
diff --git a/pkgs/development/libraries/qt-5/modules/qtmacextras.nix b/pkgs/development/libraries/qt-5/modules/qtmacextras.nix
index 5e7ccf70204..30e363cff59 100644
--- a/pkgs/development/libraries/qt-5/modules/qtmacextras.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtmacextras.nix
@@ -1,7 +1,7 @@
 { lib, qtModule, qtbase }:
 
 qtModule {
-  name = "qtmacextras";
+  pname = "qtmacextras";
   qtInputs = [ qtbase ];
   meta = with lib; {
     maintainers = with maintainers; [ periklis ];
diff --git a/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix b/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix
index eb2c3bc7431..0af773947f0 100644
--- a/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix
@@ -5,7 +5,7 @@
 with lib;
 
 qtModule {
-  name = "qtmultimedia";
+  pname = "qtmultimedia";
   qtInputs = [ qtbase qtdeclarative ];
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ gstreamer gst-plugins-base libpulseaudio ]
diff --git a/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix b/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix
index e6ef428cc3c..148ed890fc9 100644
--- a/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix
@@ -1,6 +1,6 @@
 { qtModule, qtbase }:
 
 qtModule {
-  name = "qtnetworkauth";
+  pname = "qtnetworkauth";
   qtInputs = [ qtbase ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix b/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix
index ba0f20bc0d8..6c85a91fb78 100644
--- a/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix
@@ -1,6 +1,6 @@
 { qtModule, qtdeclarative }:
 
 qtModule {
-  name = "qtquickcontrols";
+  pname = "qtquickcontrols";
   qtInputs = [ qtdeclarative ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix b/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix
index a9522f4b1f0..a50ad9e2a30 100644
--- a/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix
@@ -1,7 +1,7 @@
 { qtModule, qtdeclarative }:
 
 qtModule {
-  name = "qtquickcontrols2";
+  pname = "qtquickcontrols2";
   qtInputs = [ qtdeclarative ];
   outputs = [ "out" "dev" "bin" ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtscript.nix b/pkgs/development/libraries/qt-5/modules/qtscript.nix
index 5a1a462a964..e7ce86b74a6 100644
--- a/pkgs/development/libraries/qt-5/modules/qtscript.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtscript.nix
@@ -1,6 +1,6 @@
 { qtModule, qtbase, qttools }:
 
 qtModule {
-  name = "qtscript";
+  pname = "qtscript";
   qtInputs = [ qtbase qttools ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtscxml.nix b/pkgs/development/libraries/qt-5/modules/qtscxml.nix
index 62b428b0893..cf9af0bc754 100644
--- a/pkgs/development/libraries/qt-5/modules/qtscxml.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtscxml.nix
@@ -1,7 +1,7 @@
 { qtModule, qtbase, qtdeclarative }:
 
 qtModule {
-  name = "qtscxml";
+  pname = "qtscxml";
   qtInputs = [ qtbase qtdeclarative ];
   outputs = [ "out" "dev" "bin" ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtsensors.nix b/pkgs/development/libraries/qt-5/modules/qtsensors.nix
index 3b8732b6885..3fbd032b968 100644
--- a/pkgs/development/libraries/qt-5/modules/qtsensors.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtsensors.nix
@@ -1,7 +1,7 @@
 { qtModule, qtbase, qtdeclarative }:
 
 qtModule {
-  name = "qtsensors";
+  pname = "qtsensors";
   qtInputs = [ qtbase qtdeclarative ];
   outputs = [ "out" "dev" "bin" ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtserialbus.nix b/pkgs/development/libraries/qt-5/modules/qtserialbus.nix
index 48968a254c6..4fd6d7cb83c 100644
--- a/pkgs/development/libraries/qt-5/modules/qtserialbus.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtserialbus.nix
@@ -1,6 +1,6 @@
 { qtModule, qtbase, qtserialport }:
 
 qtModule {
-  name = "qtserialbus";
+  pname = "qtserialbus";
   qtInputs = [ qtbase qtserialport ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtserialport.nix b/pkgs/development/libraries/qt-5/modules/qtserialport.nix
index 516d38340dc..caeaedbcf3d 100644
--- a/pkgs/development/libraries/qt-5/modules/qtserialport.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtserialport.nix
@@ -3,7 +3,7 @@
 let inherit (lib) getLib optional; in
 
 qtModule {
-  name = "qtserialport";
+  pname = "qtserialport";
   qtInputs = [ qtbase ];
   NIX_CFLAGS_COMPILE =
     optional stdenv.isLinux
diff --git a/pkgs/development/libraries/qt-5/modules/qtspeech.nix b/pkgs/development/libraries/qt-5/modules/qtspeech.nix
index ddef01a9482..d2748ba8d4c 100644
--- a/pkgs/development/libraries/qt-5/modules/qtspeech.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtspeech.nix
@@ -1,7 +1,7 @@
 { qtModule }:
 
 qtModule {
-  name = "qtspeech";
+  pname = "qtspeech";
   qtInputs = [ ];
   outputs = [ "out" "dev" ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtsvg.nix b/pkgs/development/libraries/qt-5/modules/qtsvg.nix
index 3ce68e56e41..59c7cf67448 100644
--- a/pkgs/development/libraries/qt-5/modules/qtsvg.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtsvg.nix
@@ -1,7 +1,7 @@
 { qtModule, qtbase }:
 
 qtModule {
-  name = "qtsvg";
+  pname = "qtsvg";
   qtInputs = [ qtbase ];
   outputs = [ "out" "dev" "bin" ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qttools.nix b/pkgs/development/libraries/qt-5/modules/qttools.nix
index fae90972978..437ec6cef74 100644
--- a/pkgs/development/libraries/qt-5/modules/qttools.nix
+++ b/pkgs/development/libraries/qt-5/modules/qttools.nix
@@ -3,7 +3,7 @@
 with lib;
 
 qtModule {
-  name = "qttools";
+  pname = "qttools";
   qtInputs = [ qtbase qtdeclarative ];
   outputs = [ "out" "dev" "bin" ];
 
diff --git a/pkgs/development/libraries/qt-5/modules/qttranslations.nix b/pkgs/development/libraries/qt-5/modules/qttranslations.nix
index 11a6e3fedcb..f49a4eb9a85 100644
--- a/pkgs/development/libraries/qt-5/modules/qttranslations.nix
+++ b/pkgs/development/libraries/qt-5/modules/qttranslations.nix
@@ -1,6 +1,6 @@
 { qtModule, qttools }:
 
 qtModule {
-  name = "qttranslations";
+  pname = "qttranslations";
   qtInputs = [ qttools ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix b/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix
index 2ba720c8eed..77f1948dbf4 100644
--- a/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix
@@ -1,6 +1,6 @@
 { qtModule, qtbase, qtdeclarative, qtsvg, hunspell  }:
 
 qtModule {
-  name = "qtvirtualkeyboard";
+  pname = "qtvirtualkeyboard";
   qtInputs = [ qtbase qtdeclarative qtsvg hunspell ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtwayland.nix b/pkgs/development/libraries/qt-5/modules/qtwayland.nix
index 5291ea9c9a7..1bd1adedaf0 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwayland.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwayland.nix
@@ -1,7 +1,7 @@
 { qtModule, qtbase, qtquickcontrols, wayland, pkg-config }:
 
 qtModule {
-  name = "qtwayland";
+  pname = "qtwayland";
   qtInputs = [ qtbase qtquickcontrols ];
   buildInputs = [ wayland ];
   nativeBuildInputs = [ pkg-config ];
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix b/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix
index 84fb88385a3..f49e9e23490 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix
@@ -1,7 +1,7 @@
 { qtModule, qtbase, qtdeclarative }:
 
 qtModule {
-  name = "qtwebchannel";
+  pname = "qtwebchannel";
   qtInputs = [ qtbase qtdeclarative ];
   outputs = [ "out" "dev" "bin" ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
index 23ca50ba25a..0229d92d9a2 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
@@ -25,18 +25,10 @@
 with lib;
 
 qtModule {
-  name = "qtwebengine";
+  pname = "qtwebengine";
   qtInputs = [ qtdeclarative qtquickcontrols qtlocation qtwebchannel ];
   nativeBuildInputs = [
     bison coreutils flex git gperf ninja pkg-config python2 which gn nodejs
-
-    # qmake looks for syncqt instead of syncqt.pl and fails with a cryptic
-    # error if it can't find it. syncqt.pl also has a /usr/bin/env shebang, so
-    # it can't be directly used in a sandboxed build environment.
-    (writeScriptBin "syncqt" ''
-      #!${stdenv.shell}
-      exec ${perl}/bin/perl ${qtbase.dev}/bin/syncqt.pl "$@"
-    '')
   ] ++ optional stdenv.isDarwin xcbuild;
   doCheck = true;
   outputs = [ "bin" "dev" "out" ];
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix b/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix
index 444d0c1beae..d8fd7a69237 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix
@@ -1,6 +1,6 @@
 { qtModule, qtbase, qtwebsockets }:
 
 qtModule {
-  name = "qtwebglplugin";
+  pname = "qtwebglplugin";
   qtInputs = [ qtbase qtwebsockets ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix
index 288a0e30f69..e2dd0d4b19c 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix
@@ -22,7 +22,7 @@ let
   usingAnnulenWebkitFork = lib.versionAtLeast qtbase.version "5.11.0";
 in
 qtModule {
-  name = "qtwebkit";
+  pname = "qtwebkit";
   qtInputs = [ qtbase qtdeclarative qtlocation qtsensors ]
     ++ optional (stdenv.isDarwin && lib.versionAtLeast qtbase.version "5.9.0") qtmultimedia
     ++ optional usingAnnulenWebkitFork qtwebchannel;
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix b/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix
index ad5e7625f28..540fcade73c 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix
@@ -1,7 +1,7 @@
 { qtModule, qtbase, qtdeclarative }:
 
 qtModule {
-  name = "qtwebsockets";
+  pname = "qtwebsockets";
   qtInputs = [ qtbase qtdeclarative ];
   outputs = [ "out" "dev" "bin" ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebview.nix b/pkgs/development/libraries/qt-5/modules/qtwebview.nix
index 4034dce49f5..1df8ef86638 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebview.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebview.nix
@@ -3,7 +3,7 @@
 with lib;
 
 qtModule {
-  name = "qtwebview";
+  pname = "qtwebview";
   qtInputs = [ qtdeclarative qtwebengine ];
   buildInputs = optional (stdenv.isDarwin) [
     darwin.apple_sdk.frameworks.CoreFoundation
diff --git a/pkgs/development/libraries/qt-5/modules/qtx11extras.nix b/pkgs/development/libraries/qt-5/modules/qtx11extras.nix
index 4d431fee278..ad743523bb0 100644
--- a/pkgs/development/libraries/qt-5/modules/qtx11extras.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtx11extras.nix
@@ -1,6 +1,6 @@
 { qtModule, qtbase }:
 
 qtModule {
-  name = "qtx11extras";
+  pname = "qtx11extras";
   qtInputs = [ qtbase ];
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix b/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix
index 7ac922421f0..c602b1e39d2 100644
--- a/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix
@@ -1,7 +1,7 @@
 { qtModule, qtbase, qtdeclarative }:
 
 qtModule {
-  name = "qtxmlpatterns";
+  pname = "qtxmlpatterns";
   qtInputs = [ qtbase qtdeclarative ];
   devTools = [ "bin/xmlpatterns" "bin/xmlpatternsvalidator" ];
 }
diff --git a/pkgs/development/libraries/qt-5/qtModule.nix b/pkgs/development/libraries/qt-5/qtModule.nix
index ebd6e887ec9..767cbc91142 100644
--- a/pkgs/development/libraries/qt-5/qtModule.nix
+++ b/pkgs/development/libraries/qt-5/qtModule.nix
@@ -7,7 +7,7 @@ let inherit (lib) licenses maintainers platforms; in
 args:
 
 let
-  pname = args.name;
+  inherit (args) pname;
   version = args.version or srcs.${pname}.version;
   src = args.src or srcs.${pname}.src;
 in
diff --git a/pkgs/development/libraries/spdk/default.nix b/pkgs/development/libraries/spdk/default.nix
index a0c875079c4..755c65d2fa4 100644
--- a/pkgs/development/libraries/spdk/default.nix
+++ b/pkgs/development/libraries/spdk/default.nix
@@ -55,8 +55,6 @@ in stdenv.mkDerivation rec {
 
   NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile.
 
-  enableParallelBuilding = true;
-
   meta = with lib; {
     description = "Set of libraries for fast user-mode storage";
     homepage = "https://spdk.io/";
diff --git a/pkgs/development/libraries/wasilibc/default.nix b/pkgs/development/libraries/wasilibc/default.nix
index f8142f046b7..56ed7367b2b 100644
--- a/pkgs/development/libraries/wasilibc/default.nix
+++ b/pkgs/development/libraries/wasilibc/default.nix
@@ -1,7 +1,8 @@
 { stdenv, fetchFromGitHub, lib }:
 
 stdenv.mkDerivation {
-  name = "wasilibc-20190712";
+  pname = "wasilibc";
+  version = "20190712";
   src = fetchFromGitHub {
     owner = "CraneStation";
     repo = "wasi-libc";
diff --git a/pkgs/development/libraries/wayland/default.nix b/pkgs/development/libraries/wayland/default.nix
index a06d75e53dc..08741c29dd6 100644
--- a/pkgs/development/libraries/wayland/default.nix
+++ b/pkgs/development/libraries/wayland/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , fetchurl
+, fetchpatch
 , substituteAll
 , meson
 , pkg-config
@@ -37,6 +38,11 @@ stdenv.mkDerivation rec {
   };
 
   patches = [
+    # Picked from upstream 'main' branch for Darwin support.
+    (fetchpatch {
+      url = "https://gitlab.freedesktop.org/wayland/wayland/-/commit/f452e41264387dee4fd737cbf1af58b34b53941b.patch";
+      sha256 = "00mk32a01vgn31sm3wk4p8mfwvqv3xv02rxvdj1ygnzgb1ac62r7";
+    })
     (substituteAll {
       src = ./0001-add-placeholder-for-nm.patch;
       nm = "${stdenv.cc.targetPrefix}nm";
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix
index 998550d1fee..a9fadf46c4b 100644
--- a/pkgs/development/libraries/zlib/default.nix
+++ b/pkgs/development/libraries/zlib/default.nix
@@ -37,8 +37,8 @@ stdenv.mkDerivation (rec {
 
   postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
     substituteInPlace configure \
-      --replace '/usr/bin/libtool' 'ar' \
-      --replace 'AR="libtool"' 'AR="ar"' \
+      --replace '/usr/bin/libtool' '${stdenv.cc.targetPrefix}ar' \
+      --replace 'AR="libtool"' 'AR="${stdenv.cc.targetPrefix}ar"' \
       --replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
   '';
 
diff --git a/pkgs/development/misc/loc/default.nix b/pkgs/development/misc/loc/default.nix
index fb518279d00..ce262d946a8 100644
--- a/pkgs/development/misc/loc/default.nix
+++ b/pkgs/development/misc/loc/default.nix
@@ -13,7 +13,7 @@ buildRustPackage rec {
     sha256 = "0086asrx48qlmc484pjz5r5znli85q6qgpfbd81gjlzylj7f57gg";
   };
 
-  cargoSha256 = "1fgv1kxiif48q9mm60ygn88r5nkxfyiacmvbgwp0jxiacv8r7779";
+  cargoSha256 = "1qfqhqimp56g34bir30zgl273yssrbmwf1h8h8yvdpzkybpd92gx";
 
   meta = with lib; {
     homepage = "https://github.com/cgag/loc";
diff --git a/pkgs/development/python-modules/arrow/1.nix b/pkgs/development/python-modules/arrow/1.nix
deleted file mode 100644
index f9b830762b3..00000000000
--- a/pkgs/development/python-modules/arrow/1.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ lib, buildPythonPackage, fetchPypi, pythonOlder
-, simplejson, typing-extensions, python-dateutil, pytz, pytest-mock, sphinx
-, dateparser, pytestcov, pytestCheckHook
-}:
-
-buildPythonPackage rec {
-  pname = "arrow";
-  version = "1.0.3";
-
-  disabled = pythonOlder "3.6";
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "0793badh4hgbk2c5g70hmbl7n3d4g5d87bcflld0w9rjwy59r71r";
-  };
-
-  propagatedBuildInputs = [ python-dateutil ]
-    ++ lib.optionals (!pythonOlder "3.8") [ typing-extensions ];
-
-  checkInputs = [
-    dateparser
-    pytestCheckHook
-    pytestcov
-    pytest-mock
-    pytz
-    simplejson
-    sphinx
-  ];
-
-  # ParserError: Could not parse timezone expression "America/Nuuk"
-  disabledTests = [
-    "test_parse_tz_name_zzz"
-  ];
-
-  meta = with lib; {
-    description = "Python library for date manipulation";
-    homepage = "https://github.com/crsmithdev/arrow";
-    license = licenses.asl20;
-    maintainers = with maintainers; [ thoughtpolice oxzi ];
-  };
-}
diff --git a/pkgs/development/python-modules/arrow/default.nix b/pkgs/development/python-modules/arrow/default.nix
index 93347d7a4b4..159ef917f52 100644
--- a/pkgs/development/python-modules/arrow/default.nix
+++ b/pkgs/development/python-modules/arrow/default.nix
@@ -1,29 +1,39 @@
-{ lib, buildPythonPackage, fetchPypi, isPy27
-, nose, chai, simplejson, backports_functools_lru_cache
-, python-dateutil, pytz, pytest-mock, sphinx, dateparser, pytestcov
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pythonOlder
+, python-dateutil
+, typing-extensions
 , pytestCheckHook
+, pytest-mock
+, pytz
+, simplejson
 }:
 
 buildPythonPackage rec {
   pname = "arrow";
   version = "1.0.3";
 
+  disabled = pythonOlder "3.6";
+
   src = fetchPypi {
     inherit pname version;
     sha256 = "399c9c8ae732270e1aa58ead835a79a40d7be8aa109c579898eb41029b5a231d";
   };
 
+  postPatch = ''
+    # no coverage reports
+    sed -i "/addopts/d" tox.ini
+  '';
+
   propagatedBuildInputs = [ python-dateutil ]
-    ++ lib.optionals isPy27 [ backports_functools_lru_cache ];
+    ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
 
   checkInputs = [
-    dateparser
     pytestCheckHook
-    pytestcov
     pytest-mock
     pytz
     simplejson
-    sphinx
   ];
 
   # ParserError: Could not parse timezone expression "America/Nuuk"
diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix
index 1bf3602a7b1..9b35b5654e2 100644
--- a/pkgs/development/python-modules/cryptography/default.nix
+++ b/pkgs/development/python-modules/cryptography/default.nix
@@ -15,6 +15,7 @@
 , pytest
 , pytest-subtests
 , pretend
+, libiconv
 , iso8601
 , pytz
 , hypothesis
@@ -48,7 +49,7 @@ buildPythonPackage rec {
   ] ++ (with rustPlatform; [ rust.cargo rust.rustc ]);
 
   buildInputs = [ openssl ]
-             ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
+             ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security libiconv ];
   propagatedBuildInputs = [
     packaging
     six
@@ -66,8 +67,18 @@ buildPythonPackage rec {
     pytz
   ];
 
+  pytestFlags = lib.concatStringsSep " " ([
+    "--disable-pytest-warnings"
+  ] ++
+    lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+      # aarch64-darwin forbids W+X memory, but this tests depends on it:
+      # * https://cffi.readthedocs.io/en/latest/using.html#callbacks
+      "--ignore=tests/hazmat/backends/test_openssl_memleak.py"
+    ]
+  );
+
   checkPhase = ''
-    py.test --disable-pytest-warnings tests
+    py.test ${pytestFlags} tests
   '';
 
   # IOKit's dependencies are inconsistent between OSX versions, so this is the best we
diff --git a/pkgs/development/python-modules/dbus/default.nix b/pkgs/development/python-modules/dbus/default.nix
index a6e2e28c6f5..8c9eb476fe0 100644
--- a/pkgs/development/python-modules/dbus/default.nix
+++ b/pkgs/development/python-modules/dbus/default.nix
@@ -1,4 +1,4 @@
-{ lib, fetchPypi, buildPythonPackage, python, pkg-config, dbus, dbus-glib, isPyPy
+{ lib, stdenv, fetchPypi, buildPythonPackage, python, pkg-config, dbus, dbus-glib, isPyPy
 , ncurses, pygobject3, isPy3k }:
 
 buildPythonPackage rec {
@@ -19,6 +19,10 @@ buildPythonPackage rec {
 
   disabled = isPyPy;
 
+  preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '' else null;
+
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ dbus dbus-glib ]
     # My guess why it's sometimes trying to -lncurses.
diff --git a/pkgs/development/python-modules/delorean/default.nix b/pkgs/development/python-modules/delorean/default.nix
new file mode 100644
index 00000000000..3435b461d09
--- /dev/null
+++ b/pkgs/development/python-modules/delorean/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, Babel
+, humanize
+, python-dateutil
+, tzlocal
+}:
+
+buildPythonPackage rec {
+  pname = "Delorean";
+  version = "1.0.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0d31ay7yq2w7xz7m3ssk5phjbm64b2k8hmgcif22719k29p7hrzy";
+  };
+
+  propagatedBuildInputs = [ Babel humanize python-dateutil tzlocal ];
+
+  pythonImportsCheck = [ "delorean" ];
+
+  # test data not included
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Delorean: Time Travel Made Easy";
+    homepage = "https://github.com/myusuf3/delorean";
+    license = licenses.mit;
+    maintainers = with maintainers; [ globin ];
+  };
+}
diff --git a/pkgs/development/python-modules/get-video-properties/default.nix b/pkgs/development/python-modules/get-video-properties/default.nix
new file mode 100644
index 00000000000..89e01fedc13
--- /dev/null
+++ b/pkgs/development/python-modules/get-video-properties/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, ffmpeg
+}:
+
+buildPythonPackage rec {
+  pname = "get-video-properties";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "mvasilkov";
+    repo = "python-get-video-properties";
+    rev = "944c68addbc27e320ebc6313d3f016fb69b5e880";
+    sha256 = "18aslx7amaiw31bl9gambmvzry7hp5nqab6kgp8sg3mz9ih4lzal";
+  };
+
+  # no tests
+  doCheck = false;
+
+  postPatch = ''
+    substituteInPlace videoprops/__init__.py \
+      --replace "which('ffprobe')" "'${ffmpeg}/bin/ffprobe'"
+  '';
+
+  pythonImportsCheck = [ "videoprops" ];
+
+  meta = with lib; {
+    description = "Get video properties";
+    homepage = "https://github.com/mvasilkov/python-get-video-properties";
+    license = licenses.mit;
+    maintainers = with maintainers; [ globin ];
+  };
+
+}
diff --git a/pkgs/development/python-modules/ibm-cloud-sdk-core/default.nix b/pkgs/development/python-modules/ibm-cloud-sdk-core/default.nix
new file mode 100644
index 00000000000..828f51ae28f
--- /dev/null
+++ b/pkgs/development/python-modules/ibm-cloud-sdk-core/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, codecov
+, pyjwt
+, pylint
+, pytestCheckHook
+, pytestcov
+, python-dateutil
+, requests
+, responses
+, tox
+}:
+
+buildPythonPackage rec {
+  pname = "ibm-cloud-sdk-core";
+  version = "3.9.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1gwx0z6yqlym9af6wnzq5alcrx8pfsywxn18a0yxhm1j00rkyh2i";
+  };
+
+  checkInputs = [
+    codecov
+    pylint
+    pytestCheckHook
+    pytestcov
+    responses
+    tox
+  ];
+
+  propagatedBuildInputs = [
+    pyjwt
+    python-dateutil
+    requests
+  ];
+
+  # Various tests try to access credential files which are not included with the source distribution
+  disabledTests = [
+    "test_iam" "test_cwd" "test_configure_service" "test_get_authenticator"
+    "test_read_external_sources_2" "test_files_duplicate_parts" "test_files_list"
+    "test_files_dict" "test_retry_config_external" "test_gzip_compression_external"
+  ];
+
+  meta = with lib; {
+    description = "Client library for the IBM Cloud services";
+    homepage = "https://github.com/IBM/python-sdk-core";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ globin lheckemann ];
+  };
+}
diff --git a/pkgs/development/python-modules/ibm-watson/default.nix b/pkgs/development/python-modules/ibm-watson/default.nix
new file mode 100644
index 00000000000..fe8756fde03
--- /dev/null
+++ b/pkgs/development/python-modules/ibm-watson/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, responses
+, pytestCheckHook
+, python-dotenv
+, pytest-rerunfailures
+, tox
+, requests
+, python-dateutil
+, websocket_client
+, ibm-cloud-sdk-core
+}:
+
+buildPythonPackage rec {
+  pname = "ibm-watson";
+  version = "5.1.0";
+
+  src = fetchFromGitHub {
+    owner = "watson-developer-cloud";
+    repo = "python-sdk";
+    rev = "v${version}";
+    sha256 = "sha256:16llw7kybwndgf2ryrg5698v4j3rhrdx52lf3kdzhxdi0q3kmwdn";
+  };
+
+  checkInputs = [
+    responses
+    pytestCheckHook
+    python-dotenv
+    pytest-rerunfailures
+    tox
+  ];
+
+  propagatedBuildInputs = [
+    requests
+    python-dateutil
+    websocket_client
+    ibm-cloud-sdk-core
+  ];
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace websocket-client==0.48.0 websocket-client>=0.48.0 \
+      --replace ibm_cloud_sdk_core==3.3.6 ibm_cloud_sdk_core>=3.3.6
+  '';
+
+  meta = with lib; {
+    description = "Client library to use the IBM Watson Services";
+    homepage = "https://github.com/watson-developer-cloud/python-sdk";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ globin lheckemann ];
+  };
+}
diff --git a/pkgs/development/python-modules/johnnycanencrypt/default.nix b/pkgs/development/python-modules/johnnycanencrypt/default.nix
index d2d4719dab4..a8ce23d371f 100644
--- a/pkgs/development/python-modules/johnnycanencrypt/default.nix
+++ b/pkgs/development/python-modules/johnnycanencrypt/default.nix
@@ -37,8 +37,6 @@ buildPythonPackage rec {
 
   patches = [ ./Cargo.lock.patch ];
 
-  cargoSha256 = "0ifvpdizcdp2c5x2x2j1bhhy5a75q0pk7a63dmh52mlpmh45fy6r";
-
   LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/matrix-api-async/default.nix b/pkgs/development/python-modules/matrix-api-async/default.nix
new file mode 100644
index 00000000000..d7ae05bddc9
--- /dev/null
+++ b/pkgs/development/python-modules/matrix-api-async/default.nix
@@ -0,0 +1,25 @@
+{ lib, buildPythonPackage, fetchPypi, matrix-client }:
+
+buildPythonPackage rec {
+  pname = "matrix_api_async";
+  version = "0.1.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0xdx8fci0lar3x09dwqgka6ssz9d3g7gsfx4yyr13sdwza7zsqc3";
+  };
+
+  propagatedBuildInputs = [ matrix-client ];
+
+  # no tests
+  doCheck = false;
+
+  pythonImportsCheck = [ "matrix_api_async" ];
+
+  meta = with lib; {
+    description = "An asyncio wrapper of matrix_client.api";
+    license = licenses.mit;
+    homepage = "https://github.com/Cadair/matrix_api_async";
+    maintainers = with maintainers; [ globin ];
+  };
+}
diff --git a/pkgs/development/python-modules/mattermostdriver/default.nix b/pkgs/development/python-modules/mattermostdriver/default.nix
new file mode 100644
index 00000000000..7d9421b5d94
--- /dev/null
+++ b/pkgs/development/python-modules/mattermostdriver/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pythonOlder
+, websockets
+, requests
+}:
+
+buildPythonPackage rec {
+  pname = "mattermostdriver";
+  version = "7.3.0";
+
+  disabled = pythonOlder "3.5";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "17jqcpa1xd9n7bf4d5l7wmscls34kymv27gi17pyyfjxbwk5gsga";
+  };
+
+  propagatedBuildInputs = [ websockets requests ];
+
+  pythonImportsCheck = [ "mattermostdriver" ];
+
+  # no tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "A Python Mattermost Driver";
+    homepage = "https://github.com/Vaelor/python-mattermost-driver";
+    license = licenses.mit;
+    maintainers = with maintainers; [ globin lheckemann ];
+  };
+}
diff --git a/pkgs/development/python-modules/mockupdb/default.nix b/pkgs/development/python-modules/mockupdb/default.nix
new file mode 100644
index 00000000000..341660e1af0
--- /dev/null
+++ b/pkgs/development/python-modules/mockupdb/default.nix
@@ -0,0 +1,24 @@
+{ lib, buildPythonPackage, fetchPypi
+, pymongo
+}:
+
+buildPythonPackage rec {
+  pname = "mockupdb";
+  version = "1.8.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "130z5g96r52h362qc5jbf1g3gw3irb2wr946xlhgcv9ww9z64cl8";
+  };
+
+  propagatedBuildInputs = [ pymongo ];
+
+  pythonImportsCheck = [ "mockupdb" ];
+
+  meta = with lib; {
+    description = "Simulate a MongoDB server";
+    license = licenses.asl20;
+    homepage = "https://github.com/ajdavis/mongo-mockup-db";
+    maintainers = with maintainers; [ globin ];
+  };
+}
diff --git a/pkgs/development/python-modules/motor/default.nix b/pkgs/development/python-modules/motor/default.nix
new file mode 100644
index 00000000000..318d519e57c
--- /dev/null
+++ b/pkgs/development/python-modules/motor/default.nix
@@ -0,0 +1,30 @@
+{ lib, buildPythonPackage, fetchFromGitHub
+, pymongo, mockupdb
+}:
+
+buildPythonPackage rec {
+  pname = "motor";
+  version = "2.4.0";
+
+  src = fetchFromGitHub {
+    owner = "mongodb";
+    repo = pname;
+    rev = version;
+    sha256 = "1sgaqg98h35lazzdi015q1i60ig7krid8b10a5rm6lf755y8yj2c";
+  };
+
+  propagatedBuildInputs = [ pymongo ];
+
+  # network connections
+  doCheck = false;
+  checkInputs = [ mockupdb ];
+
+  pythonImportsCheck = [ "motor" ];
+
+  meta = with lib; {
+    description = "Non-blocking MongoDB driver for Tornado or asyncio";
+    license = licenses.asl20;
+    homepage = "https://github.com/mongodb/motor";
+    maintainers = with maintainers; [ globin ];
+  };
+}
diff --git a/pkgs/development/python-modules/opsdroid_get_image_size/default.nix b/pkgs/development/python-modules/opsdroid_get_image_size/default.nix
new file mode 100644
index 00000000000..0f33da44145
--- /dev/null
+++ b/pkgs/development/python-modules/opsdroid_get_image_size/default.nix
@@ -0,0 +1,24 @@
+{ lib, buildPythonPackage, fetchPypi
+}:
+
+buildPythonPackage rec {
+  pname = "opsdroid_get_image_size";
+  version = "0.2.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "124j2xvfxv09q42qfb8nqlcn55y7f09iayrix3yfyrs2qyzav78a";
+  };
+
+  # test data not included on pypi
+  doCheck = false;
+
+  pythonImportsCheck = [ "get_image_size" ];
+
+  meta = with lib; {
+    description = "Get image width and height given a file path using minimal dependencies";
+    license = licenses.mit;
+    homepage = "https://github.com/opsdroid/image_size";
+    maintainers = with maintainers; [ globin ];
+  };
+}
diff --git a/pkgs/development/python-modules/psutil/default.nix b/pkgs/development/python-modules/psutil/default.nix
index a53005c7426..ba17c5eca73 100644
--- a/pkgs/development/python-modules/psutil/default.nix
+++ b/pkgs/development/python-modules/psutil/default.nix
@@ -15,16 +15,25 @@ buildPythonPackage rec {
     sha256 = "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c";
   };
 
-  # arch doesn't report frequency is the same way
-  # tests segfaults on darwin https://github.com/giampaolo/psutil/issues/1715
-  doCheck = !stdenv.isDarwin && stdenv.isx86_64;
+  # We have many test failures on various parts of the package:
+  #  - segfaults on darwin:
+  #    https://github.com/giampaolo/psutil/issues/1715
+  #  - swap (on linux) might cause test failures if it is fully used:
+  #    https://github.com/giampaolo/psutil/issues/1911
+  #  - some mount paths are required in the build sanbox to make the tests succeed:
+  #    https://github.com/giampaolo/psutil/issues/1912
+  doCheck = false;
   checkInputs = [ pytestCheckHook ]
-    ++ lib.optionals isPy27 [ mock ipaddress unittest2 ];
+  ++ lib.optionals isPy27 [ mock ipaddress unittest2 ];
+  # In addition to the issues listed above there are some that occure due to
+  # our sandboxing which we can work around by disabling some tests:
+  # - cpu_times was flaky on darwin
+  # - the other disabled tests are likely due to sanboxing (missing specific errors)
   pytestFlagsArray = [
     "$out/${python.sitePackages}/psutil/tests/test_system.py"
   ];
-  # disable tests which don't work in sandbox
-  # cpu_times is flakey on darwin
+
+  # Note: $out must be referenced as test import paths are relative
   disabledTests = [
     "user"
     "disk_io_counters"
diff --git a/pkgs/development/python-modules/puremagic/default.nix b/pkgs/development/python-modules/puremagic/default.nix
new file mode 100644
index 00000000000..c635cdac186
--- /dev/null
+++ b/pkgs/development/python-modules/puremagic/default.nix
@@ -0,0 +1,29 @@
+{ lib, buildPythonPackage, fetchPypi
+}:
+
+buildPythonPackage rec {
+  pname = "puremagic";
+  version = "1.10";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "025ih5q1qa40x88j7ngsdr5sf0dp400kwlfzz60i7v6fh0ms1zkg";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace '"argparse"' ""
+  '';
+
+  # test data not included on pypi
+  doCheck = false;
+
+  pythonImportsCheck = [ "puremagic" ];
+
+  meta = with lib; {
+    description = "Pure python implementation of magic file detection";
+    license = licenses.mit;
+    homepage = "https://github.com/cdgriffith/puremagic";
+    maintainers = with maintainers; [ globin ];
+  };
+}
diff --git a/pkgs/development/python-modules/pybind11/default.nix b/pkgs/development/python-modules/pybind11/default.nix
index 0ae0b26e12d..3bd88368e75 100644
--- a/pkgs/development/python-modules/pybind11/default.nix
+++ b/pkgs/development/python-modules/pybind11/default.nix
@@ -23,6 +23,14 @@ buildPythonPackage rec {
     sha256 = "1lsacpawl2gb5qlh0cawj9swsyfbwhzhwiv6553a7lsigdbadqpy";
   };
 
+  patches = [
+    # fix pybind11Config.cmake
+    (fetchpatch {
+      url = "https://github.com/pybind/pybind11/commit/d9c4e1047a95f023633a7260af5a633307438941.patch";
+      sha256 = "0kran295kj31xfs6mfha5ip132zd0pnj2dl36qzgyc1rpnha5gz4";
+    })
+  ];
+
   nativeBuildInputs = [ cmake ];
 
   buildInputs = [ catch ];
diff --git a/pkgs/development/python-modules/pycron/default.nix b/pkgs/development/python-modules/pycron/default.nix
new file mode 100644
index 00000000000..7155ee95723
--- /dev/null
+++ b/pkgs/development/python-modules/pycron/default.nix
@@ -0,0 +1,30 @@
+{ lib, buildPythonPackage, fetchFromGitHub, udatetime, pytz, pendulum, nose
+, delorean, coveralls, arrow
+}:
+
+buildPythonPackage rec {
+  pname = "pycron";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner = "kipe";
+    repo = pname;
+    rev = version;
+    sha256 = "12hkqrdfg3jbqkmck8i00ssyaw1c4hhvdhjxkmh2gm9pd99z5bpv";
+  };
+
+  checkInputs = [ arrow coveralls delorean nose pendulum pytz udatetime ];
+
+  checkPhase = ''
+    nosetests
+  '';
+
+  pythonImportsCheck = [ "pycron" ];
+
+  meta = with lib; {
+    description = "Simple cron-like parser for Python, which determines if current datetime matches conditions";
+    license = licenses.mit;
+    homepage = "https://github.com/kipe/pycron";
+    maintainers = with maintainers; [ globin ];
+  };
+}
diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix
index 59a8c74f709..8fae54c8466 100644
--- a/pkgs/development/python-modules/pytorch/default.nix
+++ b/pkgs/development/python-modules/pytorch/default.nix
@@ -6,7 +6,7 @@
   cudaArchList ? null,
 
   # Native build inputs
-  cmake, util-linux, linkFarm, symlinkJoin, which,
+  cmake, util-linux, linkFarm, symlinkJoin, which, pybind11,
 
   # Build inputs
   numactl,
@@ -216,6 +216,7 @@ in buildPythonPackage rec {
     util-linux
     which
     ninja
+    pybind11
   ] ++ lib.optionals cudaSupport [ cudatoolkit_joined ];
 
   buildInputs = [ blas blas.provider ]
diff --git a/pkgs/development/python-modules/udatetime/default.nix b/pkgs/development/python-modules/udatetime/default.nix
new file mode 100644
index 00000000000..457020af645
--- /dev/null
+++ b/pkgs/development/python-modules/udatetime/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, fetchpatch
+}:
+
+buildPythonPackage rec {
+  pname = "udatetime";
+  version = "0.0.16";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "09vlcskvaxnfk73l9w5xgl2ks9l62g1b24yrm0xxb7gn93qxglw2";
+  };
+
+  patches = [
+    # fix build with python 3.9
+    (fetchpatch {
+      url = "https://github.com/freach/udatetime/pull/33.patch";
+      sha256 = "02wm7ivkv1viqn2wflgd10dgpddfqfrwacmrldigb1mwb79n554j";
+    })
+  ];
+
+  # tests not included on pypi
+  doCheck = false;
+
+  pythonImportsCheck = [ "udatetime" ];
+
+  meta = with lib; {
+    description = "Fast RFC3339 compliant Python date-time library";
+    homepage = "https://github.com/freach/udatetime";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ globin ];
+  };
+}
diff --git a/pkgs/development/python-modules/watchgod/default.nix b/pkgs/development/python-modules/watchgod/default.nix
new file mode 100644
index 00000000000..5bb84258642
--- /dev/null
+++ b/pkgs/development/python-modules/watchgod/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+}:
+
+buildPythonPackage rec {
+  pname = "watchgod";
+  version = "0.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0aagm0n5fkpzdsfgl0r21gkz5qaicgq3f4rqz2fdvsgbn1i0s528";
+  };
+
+  # no tests in release
+  doCheck = false;
+
+  pythonImportsCheck = [ "watchgod" ];
+
+  meta = with lib; {
+    description = "Simple, modern file watching and code reload in python";
+    homepage = "https://github.com/samuelcolvin/watchgod";
+    license = licenses.mit;
+    maintainers = with maintainers; [ globin ];
+  };
+
+}
diff --git a/pkgs/development/tools/analysis/bingrep/default.nix b/pkgs/development/tools/analysis/bingrep/default.nix
index 338bc3e189c..d354b71fc9f 100644
--- a/pkgs/development/tools/analysis/bingrep/default.nix
+++ b/pkgs/development/tools/analysis/bingrep/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-ayA3aEidZPa5GJgbbm5K3X2Xgd5Eb6TgUU80Gw/p07w=";
   };
 
-  cargoSha256 = "sha256-3eGYU5O7HSpawIL/8OVmROCzXfdnoMAnIujjrIp00xg=";
+  cargoSha256 = "sha256-XcXllex7UEufV5URhH7aqln1tNxwaiAETO3fUKmHf7s=";
 
   meta = with lib; {
     description = "Greps through binaries from various OSs and architectures, and colors them";
diff --git a/pkgs/development/tools/analysis/cargo-tarpaulin/default.nix b/pkgs/development/tools/analysis/cargo-tarpaulin/default.nix
index a0f251bfe91..66f2db28068 100644
--- a/pkgs/development/tools/analysis/cargo-tarpaulin/default.nix
+++ b/pkgs/development/tools/analysis/cargo-tarpaulin/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
   ];
   buildInputs = [ openssl ];
 
-  cargoSha256 = "0pn9xgryfb7f0plx50v9i7hsv1wib87pi0fl43cv6hgqyrdb52ny";
+  cargoSha256 = "1hpi9aifn3g19yqkb58lphyw8cbsqllhg5dzbqx15hcfvrb7ip4k";
   #checkFlags = [ "--test-threads" "1" ];
   doCheck = false;
 
diff --git a/pkgs/development/tools/analysis/dotenv-linter/default.nix b/pkgs/development/tools/analysis/dotenv-linter/default.nix
index b05f9b94440..f477da365d7 100644
--- a/pkgs/development/tools/analysis/dotenv-linter/default.nix
+++ b/pkgs/development/tools/analysis/dotenv-linter/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-3Lj5GtWGyWDkZPhxYQu7UWzmh7TO5wk1UJ0lek1jTto=";
   };
 
-  cargoSha256 = "sha256-zdvIC+VUASjhrlyRts+JJeh5xdcdpX6Ixle6HhbMJJU=";
+  cargoSha256 = "sha256-FDkxJuZPzDrgLJgefkRUPS+0Ys3DaBOD3XAuS/Z6TtI=";
 
   meta = with lib; {
     description = "Lightning-fast linter for .env files. Written in Rust";
diff --git a/pkgs/development/tools/analysis/panopticon/default.nix b/pkgs/development/tools/analysis/panopticon/default.nix
index f7f933392ab..500ca632fcf 100644
--- a/pkgs/development/tools/analysis/panopticon/default.nix
+++ b/pkgs/development/tools/analysis/panopticon/default.nix
@@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec {
 
   dontWrapQtApps = true;
 
-  cargoSha256 = "1hdsn011y9invfy7can8c02zwa7birj9y1rxhrj7wyv4gh3659i0";
+  cargoSha256 = "0vhcb3kw1zgchx3nrk8lyrz8p5071y99vsysxvi71klv7dcvn0am";
   doCheck = false;
 
   postInstall = ''
diff --git a/pkgs/development/tools/analysis/qcachegrind/default.nix b/pkgs/development/tools/analysis/qcachegrind/default.nix
index 5e321db01aa..75729d1eea4 100644
--- a/pkgs/development/tools/analysis/qcachegrind/default.nix
+++ b/pkgs/development/tools/analysis/qcachegrind/default.nix
@@ -17,7 +17,7 @@ in stdenv.mkDerivation {
   postInstall = ''
      mkdir -p $out/bin
      cp -p converters/dprof2calltree $out/bin/dprof2calltree
-     cp -p converters/hotshot2calltree.cmake $out/bin/hotshot2calltree
+     cp -p converters/hotshot2calltree.in $out/bin/hotshot2calltree
      cp -p converters/memprof2calltree $out/bin/memprof2calltree
      cp -p converters/op2calltree $out/bin/op2calltree
      cp -p converters/pprof2calltree $out/bin/pprof2calltree
diff --git a/pkgs/development/tools/analysis/svlint/default.nix b/pkgs/development/tools/analysis/svlint/default.nix
index a562a1baeee..dc38728a44a 100644
--- a/pkgs/development/tools/analysis/svlint/default.nix
+++ b/pkgs/development/tools/analysis/svlint/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-p002oWwTQxesWLgLq8oKKzuZKXUdO4C1TZ7lR/Mh1PA=";
   };
 
-  cargoSha256 = "sha256-M0hng1JcR5Q829bVOaTASl0Eq6fFm8mUFsS5zx1JX94=";
+  cargoSha256 = "sha256-1WEPJpU/hLn+qjU+ETkmbfZIJTORe3OUdyl605JnYmU=";
 
   meta = with lib; {
     description = "SystemVerilog linter";
diff --git a/pkgs/development/tools/async/default.nix b/pkgs/development/tools/async/default.nix
index a45e93ab151..ffff8af8b66 100644
--- a/pkgs/development/tools/async/default.nix
+++ b/pkgs/development/tools/async/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "19ypflbayi5l0mb8yw7w0a4bq9a3w8nl9jsxapp9m3xggzmsvrxx";
   };
 
-  cargoSha256 = "1zgds5rjjikvaj0rxc7slyvkjn067s0v8vdnxn3vsv819q5yd707";
+  cargoSha256 = "0y2q46i838gha58p95vcv5r5i14il1kv86k35s30ncfibijgp0lc";
 
   meta = with lib; {
     description = "A tool to parallelize shell commands";
diff --git a/pkgs/development/tools/build-managers/fac/default.nix b/pkgs/development/tools/build-managers/fac/default.nix
index 601f7ea9fea..0d62642e032 100644
--- a/pkgs/development/tools/build-managers/fac/default.nix
+++ b/pkgs/development/tools/build-managers/fac/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
   # workaround for missing Cargo.lock file
   cargoPatches = [ ./cargo-lock.patch ];
 
-  cargoSha256 = "0hjfq61y1ikdcajr2k514k7fad2zxbwq7yb5nk1wx38f1524709q";
+  cargoSha256 = "033wif3wwm3912ppw0gshsyjxipilg9hhvkijw29zmjfm6074b21";
 
   # fac includes a unit test called ls_files_works which assumes it's
   # running in a git repo. Nix's sandbox runs cargo build outside git,
diff --git a/pkgs/development/tools/cargo-flamegraph/default.nix b/pkgs/development/tools/cargo-flamegraph/default.nix
index 3bdbb086d1d..65a49551035 100644
--- a/pkgs/development/tools/cargo-flamegraph/default.nix
+++ b/pkgs/development/tools/cargo-flamegraph/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-IpmvFUWNaFQ1ls7u625vvj1TnRYXR+X1mAGdBcwRFLk=";
   };
 
-  cargoSha256 = "sha256-2YHkEQZqjKEvg4h9kIVhqmgq+SMF1c3r8UbSQivZh7w=";
+  cargoSha256 = "sha256-ccy5ZFS2Gp4Dwo8gsS6vzHHO1siicOp7uZTsCh6SKsM=";
 
   nativeBuildInputs = lib.optionals stdenv.isLinux [ makeWrapper ];
   buildInputs = lib.optionals stdenv.isDarwin [
diff --git a/pkgs/development/tools/cargo-web/default.nix b/pkgs/development/tools/cargo-web/default.nix
index c85ef52564a..2c35e951cda 100644
--- a/pkgs/development/tools/cargo-web/default.nix
+++ b/pkgs/development/tools/cargo-web/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1dl5brj5fnmxmwl130v36lvy4j64igdpdvjwmxw3jgg2c6r6b7cd";
   };
 
-  cargoSha256 = "0i9xp7vd1rp6xgkbbrspm3qq4hxwfwa00di3k73z1x64d3d8r5fm";
+  cargoSha256 = "0q7yxvvngfvn4s889qzp1qnsw2c6qy2ryv9vz9cxhmqidx4dg4va";
 
   nativeBuildInputs = [ openssl perl pkg-config ];
   buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Security ];
diff --git a/pkgs/development/tools/chit/default.nix b/pkgs/development/tools/chit/default.nix
index ac8f15a4158..dd37efb506d 100644
--- a/pkgs/development/tools/chit/default.nix
+++ b/pkgs/development/tools/chit/default.nix
@@ -15,7 +15,7 @@ buildRustPackage rec {
     sha256 = "0iixczy3cad44j2d7zzj8f3lnmp4jwnb0snmwfgiq3vj9wrn28pz";
   };
 
-  cargoSha256 = "1w25k3bqmmcrhpkw510vbwph0rfmrzi2wby0z2rz1q4k1f9k486m";
+  cargoSha256 = "1y6k24p4m67v5773rzid2r0jwxp9piggrp0462z446hbcam2r4gd";
 
   nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
   buildInputs = []
diff --git a/pkgs/development/tools/clog-cli/default.nix b/pkgs/development/tools/clog-cli/default.nix
index c3b477e3ea3..395cd7979d6 100644
--- a/pkgs/development/tools/clog-cli/default.nix
+++ b/pkgs/development/tools/clog-cli/default.nix
@@ -13,7 +13,7 @@ buildRustPackage rec {
     sha256 = "1wxglc4n1dar5qphhj5pab7ps34cjr7jy611fwn72lz0f6c7jp3z";
   };
 
-  cargoSha256 = "1s7g9mcjyp0pjjxma1mb290fi7fk54qy2khh1zksxhr4d3mciv08";
+  cargoSha256 = "0xcgzlcmlk5ycw4kklprm8lzs72j2zp8xm3dcpy606z4r9qn0c6a";
 
   meta = {
     description = "Generate changelogs from local git metadata";
diff --git a/pkgs/development/tools/convco/default.nix b/pkgs/development/tools/convco/default.nix
index c152197358c..44445f86752 100644
--- a/pkgs/development/tools/convco/default.nix
+++ b/pkgs/development/tools/convco/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-eWe7oTWl7QfIqq3GfMILi5S8zUi03ER1Mzfr8hqUvgw=";
   };
 
-  cargoSha256 = "sha256-hAUg2mh4VyyjkBRBs5YWi14yeGlMXxt+cdoz5xOS+1A=";
+  cargoSha256 = "sha256-RuClZ+ChP7d40e9nr1Lg8R0F7rbFbBse79V9Y1AQn3o=";
 
   nativeBuildInputs = [ openssl perl pkg-config ];
 
diff --git a/pkgs/development/tools/diesel-cli/default.nix b/pkgs/development/tools/diesel-cli/default.nix
index 8a976f44bf7..a2c1af2607d 100644
--- a/pkgs/development/tools/diesel-cli/default.nix
+++ b/pkgs/development/tools/diesel-cli/default.nix
@@ -46,7 +46,7 @@ rustPlatform.buildRustPackage rec {
 
   cargoBuildFlags = [ "--no-default-features" "--features" "${lib.concatStringsSep "," features}" ];
   cargoPatches = [ ./cargo-lock.patch ];
-  cargoSha256 = "1vkwp861vm20agj0lkhnnxgg4vwg4d5clvvyzxrmm4y4yw46cdl2";
+  cargoSha256 = "060r90dvdi0s5v3kjagsrrdb4arzzbkin8v5563rdpv0sq1pi3bm";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/development/tools/documentation/gi-docgen/default.nix b/pkgs/development/tools/documentation/gi-docgen/default.nix
index 06de11fde59..2218b441476 100644
--- a/pkgs/development/tools/documentation/gi-docgen/default.nix
+++ b/pkgs/development/tools/documentation/gi-docgen/default.nix
@@ -1,6 +1,5 @@
 { lib
 , fetchFromGitLab
-, fetchpatch
 , meson
 , ninja
 , python3
@@ -8,68 +7,18 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "gi-docgen";
-  version = "2021.2";
+  version = "2021.5";
 
   format = "other";
 
   src = fetchFromGitLab {
     domain = "gitlab.gnome.org";
-    owner = "ebassi";
+    owner = "GNOME";
     repo = pname;
     rev = version;
-    sha256 = "17swx4s60anfyyb6dcsl8fq3s0j9cy54qcw0ciq4qj59d4039w5h";
+    sha256 = "1fz6r6mkp4fw1mn6gn9745wcdcqg7696bbwvdcnmhinlhrcnaiz6";
   };
 
-  patches = [
-    # Add pkg-config file so that Meson projects can find this.
-    # https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/26
-    (fetchpatch {
-      url = "https://gitlab.gnome.org/jtojnar/gi-docgen/commit/d65ed2e4827c4129d26e3c1df9a48054b4e72c50.patch";
-      sha256 = "BEefcHiAd/HTW5zo39J2WtfQjGXUkNFB6MDJj8/Ge80=";
-    })
-
-    # Name generated devhelp files correctly.
-    # https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/27
-    (fetchpatch {
-      url = "https://gitlab.gnome.org/ebassi/gi-docgen/commit/7c4de72f55cbce5670c3a6a1451548e97e5f07f7.patch";
-      sha256 = "ov/PvrZzKmCzw7nHJkbeLCnhtUVw1UbZQjFrWT3AtVg=";
-    })
-
-    # Fix broken link in Devhelp TOC.
-    # https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/28
-    (fetchpatch {
-      url = "https://gitlab.gnome.org/ebassi/gi-docgen/commit/56f0e6f8b4bb9c92d635df60aa5d68f55b036711.patch";
-      sha256 = "5gFGiO9jPpkyZBL4qtWEotE5jY3sCGFGUGN/Fb6jZ+0=";
-    })
-
-    # Devhelp does not like subsections without links.
-    # https://gitlab.gnome.org/GNOME/devhelp/-/issues/28
-    (fetchpatch {
-      # Only visual but needed for the other two to apply.
-      # https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/28
-      url = "https://gitlab.gnome.org/ebassi/gi-docgen/commit/7f67fad5107b73489cb7bffca49177d9ad78e422.patch";
-      sha256 = "OKbC690nJsl1ckm/y9eeKDYX6AEClsNvIFy7DK+JYEc=";
-    })
-    # Add links to index.
-    (fetchpatch {
-      url = "https://gitlab.gnome.org/ebassi/gi-docgen/commit/f891cc5fd481bc4180eec144d14f32c15c91833b.patch";
-      sha256 = "Fcnvdgxei+2ulGoWoCZ8WFrNy01tlNXMkHru3ArGHVQ=";
-    })
-    # Use different link for each symbol type name.
-    # https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/29
-    (fetchpatch {
-      url = "https://gitlab.gnome.org/jtojnar/gi-docgen/commit/08dcc31f62be1a5af9bd9f8f702f321f4b5cffde.patch";
-      sha256 = "vAT8s7zQ9zCoZWK+6PsxcD5/48ZAfIOl4RSNljRCGWQ=";
-    })
-    # make DevHelp sections & index.json have stable ordering
-    # already merged upstream, so patch can removed when we update
-    # beyond 2021.2
-    (fetchpatch {
-      url = "https://gitlab.gnome.org/GNOME/gi-docgen/-/commit/cc21241d4386d4f78dbcb087fd9a92899935cb5c.patch";
-      sha256 = "0wna8mzrlbsv7f3bc7ndqll9l105kp8kdmhbbjhbdhzzzyvh6vcw";
-    })
-  ];
-
   nativeBuildInputs = [
     meson
     ninja
@@ -94,7 +43,7 @@ python3.pkgs.buildPythonApplication rec {
 
   meta = with lib; {
     description = "Documentation generator for GObject-based libraries";
-    homepage = "https://gitlab.gnome.org/ebassi/gi-docgen";
+    homepage = "https://gitlab.gnome.org/GNOME/gi-docgen";
     license = licenses.asl20; # OR GPL-3.0-or-later
     maintainers = teams.gnome.members;
   };
diff --git a/pkgs/development/tools/documentation/mdsh/default.nix b/pkgs/development/tools/documentation/mdsh/default.nix
index 68be931aa44..e9bf3734513 100644
--- a/pkgs/development/tools/documentation/mdsh/default.nix
+++ b/pkgs/development/tools/documentation/mdsh/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1ki6w3qf8ipcf7ch5120mj16vs7yan8k9zjd25v8x6vbsd1iccgy";
   };
 
-  cargoSha256 = "10iqypz8hfyzy1xd78r39z2waa728d97kfnf1bbx8fr4a4pzan7y";
+  cargoSha256 = "0x5fd47rjmzzmwgj14gbj0rbxwbphd7f63mis4ivwlwc9ikjxdxb";
 
   meta = with lib; {
     description = "Markdown shell pre-processor";
diff --git a/pkgs/development/tools/dot-http/default.nix b/pkgs/development/tools/dot-http/default.nix
index b156847870d..d5a507d4ebb 100644
--- a/pkgs/development/tools/dot-http/default.nix
+++ b/pkgs/development/tools/dot-http/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1s2q4kdldhb5gd14g2h6vzrbjgbbbs9zp2dgmna0rhk1h4qv0mml";
   };
 
-  cargoSha256 = "0an3hskq1k2j4gdn8wvhfb9pqsc34ibs5bv7sjznkp5jma6fdr9w";
+  cargoSha256 = "013jyp2bgmssj1c18lm8jkb6q6jlhdrqzmyri6k5lgmfmb9dvkii";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/development/tools/git-series/default.nix b/pkgs/development/tools/git-series/default.nix
index 0f7677c7aa2..752cefad3c2 100644
--- a/pkgs/development/tools/git-series/default.nix
+++ b/pkgs/development/tools/git-series/default.nix
@@ -15,7 +15,7 @@ buildRustPackage rec {
     sha256 = "07mgq5h6r1gf3jflbv2khcz32bdazw7z1s8xcsafdarnm13ps014";
   };
 
-  cargoSha256 = "0ijgx8fksg2najb336dhddxlqfzc338f9ylydkpw6b39k72mm00d";
+  cargoSha256 = "0870f4rd98fbmyl8524ivfg3xf4qpzb1x68q1idnl47mmf68pyx8";
 
   cargoPatches = [
     (fetchpatch {
diff --git a/pkgs/development/tools/misc/autoconf/default.nix b/pkgs/development/tools/misc/autoconf/default.nix
index ae8fc2d9061..3b70e819c89 100644
--- a/pkgs/development/tools/misc/autoconf/default.nix
+++ b/pkgs/development/tools/misc/autoconf/default.nix
@@ -6,11 +6,11 @@
 # files.
 
 stdenv.mkDerivation rec {
-  name = "autoconf-2.70";
+  name = "autoconf-2.71";
 
   src = fetchurl {
     url = "mirror://gnu/autoconf/${name}.tar.xz";
-    sha256 = "1ipckz0wr2mvhj9n3ys54fmf2aksin6bhqvzl304bn6rc1w257ps";
+    sha256 = "197sl23irn6s9pd54rxj5vcp5y8dv65jb9yfqgr2g56cxg7q6k7i";
   };
 
   nativeBuildInputs = [ m4 perl ];
diff --git a/pkgs/development/tools/misc/autogen/default.nix b/pkgs/development/tools/misc/autogen/default.nix
index c6eb6916d1e..75c6471eb4c 100644
--- a/pkgs/development/tools/misc/autogen/default.nix
+++ b/pkgs/development/tools/misc/autogen/default.nix
@@ -62,7 +62,9 @@ stdenv.mkDerivation rec {
       # the configure check for regcomp wants to run a host program
       "libopts_cv_with_libregex=yes"
       #"MAKEINFO=${buildPackages.texinfo}/bin/makeinfo"
-    ]);
+    ])
+    # See: https://sourceforge.net/p/autogen/bugs/187/
+    ++ lib.optionals stdenv.isDarwin [ "ac_cv_func_utimensat=no" ];
 
   #doCheck = true; # not reliable
 
diff --git a/pkgs/development/tools/misc/ctags/default.nix b/pkgs/development/tools/misc/ctags/default.nix
index 90825db2a54..fde7307b27d 100644
--- a/pkgs/development/tools/misc/ctags/default.nix
+++ b/pkgs/development/tools/misc/ctags/default.nix
@@ -15,6 +15,13 @@ stdenv.mkDerivation rec {
   # don't use $T(E)MP which is set to the build directory
   configureFlags= [ "--enable-tmpdir=/tmp" ];
 
+  patches = [
+    # Library defines an `__unused__` which is a reserved name, and may
+    # conflict with the standard library definition. One such conflict is with
+    # macOS headers.
+    ./unused-collision.patch
+  ];
+
   meta = with lib; {
     description = "A tool for fast source code browsing (exuberant ctags)";
     longDescription = ''
diff --git a/pkgs/development/tools/misc/ctags/unused-collision.patch b/pkgs/development/tools/misc/ctags/unused-collision.patch
new file mode 100644
index 00000000000..595f67a01b5
--- /dev/null
+++ b/pkgs/development/tools/misc/ctags/unused-collision.patch
@@ -0,0 +1,246 @@
+--- a/c.c	(revision 816)
++++ b/c.c	(working copy)
+@@ -619,7 +619,7 @@
+ 	return name;
+ }
+ 
+-static void __unused__ pt (tokenInfo *const token)
++static void UNUSED pt (tokenInfo *const token)
+ {
+ 	if (isType (token, TOKEN_NAME))
+ 		printf ("type: %-12s: %-13s   line: %lu\n",
+@@ -634,7 +634,7 @@
+ 			tokenString (token->type), token->lineNumber);
+ }
+ 
+-static void __unused__ ps (statementInfo *const st)
++static void UNUSED ps (statementInfo *const st)
+ {
+ 	unsigned int i;
+ 	printf ("scope: %s   decl: %s   gotName: %s   gotParenName: %s\n",
+--- a/eiffel.c	(revision 816)
++++ b/eiffel.c	(working copy)
+@@ -807,7 +807,7 @@
+ 
+ static boolean parseType (tokenInfo *const token);
+ 
+-static void parseGeneric (tokenInfo *const token, boolean declaration __unused__)
++static void parseGeneric (tokenInfo *const token, boolean declaration UNUSED)
+ {
+ 	unsigned int depth = 0;
+ #ifdef TYPE_REFERENCE_TOOL
+--- a/general.h	(revision 816)
++++ b/general.h	(working copy)
+@@ -57,10 +57,10 @@
+  *  to prevent warnings about unused variables.
+  */
+ #if (__GNUC__ > 2  ||  (__GNUC__ == 2  &&  __GNUC_MINOR__ >= 7)) && !defined (__GNUG__)
+-# define __unused__  __attribute__((unused))
++# define UNUSED  __attribute__((unused))
+ # define __printf__(s,f)  __attribute__((format (printf, s, f)))
+ #else
+-# define __unused__
++# define UNUSED
+ # define __printf__(s,f)
+ #endif
+ 
+--- a/lregex.c	(revision 816)
++++ b/lregex.c	(working copy)
+@@ -538,11 +538,11 @@
+ #endif  /* HAVE_REGEX */
+ 
+ extern void addTagRegex (
+-		const langType language __unused__,
+-		const char* const regex __unused__,
+-		const char* const name __unused__,
+-		const char* const kinds __unused__,
+-		const char* const flags __unused__)
++		const langType language UNUSED,
++		const char* const regex UNUSED,
++		const char* const name UNUSED,
++		const char* const kinds UNUSED,
++		const char* const flags UNUSED)
+ {
+ #ifdef HAVE_REGEX
+ 	Assert (regex != NULL);
+@@ -564,10 +564,10 @@
+ }
+ 
+ extern void addCallbackRegex (
+-		const langType language __unused__,
+-		const char* const regex __unused__,
+-		const char* const flags __unused__,
+-		const regexCallback callback __unused__)
++		const langType language UNUSED,
++		const char* const regex UNUSED,
++		const char* const flags UNUSED,
++		const regexCallback callback UNUSED)
+ {
+ #ifdef HAVE_REGEX
+ 	Assert (regex != NULL);
+@@ -581,7 +581,7 @@
+ }
+ 
+ extern void addLanguageRegex (
+-		const langType language __unused__, const char* const regex __unused__)
++		const langType language UNUSED, const char* const regex UNUSED)
+ {
+ #ifdef HAVE_REGEX
+ 	if (! regexBroken)
+@@ -602,7 +602,7 @@
+ */
+ 
+ extern boolean processRegexOption (const char *const option,
+-								   const char *const parameter __unused__)
++								   const char *const parameter UNUSED)
+ {
+ 	boolean handled = FALSE;
+ 	const char* const dash = strchr (option, '-');
+@@ -624,7 +624,7 @@
+ 	return handled;
+ }
+ 
+-extern void disableRegexKinds (const langType language __unused__)
++extern void disableRegexKinds (const langType language UNUSED)
+ {
+ #ifdef HAVE_REGEX
+ 	if (language <= SetUpper  &&  Sets [language].count > 0)
+@@ -639,8 +639,8 @@
+ }
+ 
+ extern boolean enableRegexKind (
+-		const langType language __unused__,
+-		const int kind __unused__, const boolean mode __unused__)
++		const langType language UNUSED,
++		const int kind UNUSED, const boolean mode UNUSED)
+ {
+ 	boolean result = FALSE;
+ #ifdef HAVE_REGEX
+@@ -660,7 +660,7 @@
+ 	return result;
+ }
+ 
+-extern void printRegexKinds (const langType language __unused__, boolean indent __unused__)
++extern void printRegexKinds (const langType language UNUSED, boolean indent UNUSED)
+ {
+ #ifdef HAVE_REGEX
+ 	if (language <= SetUpper  &&  Sets [language].count > 0)
+--- a/lua.c	(revision 816)
++++ b/lua.c	(working copy)
+@@ -37,7 +37,7 @@
+ */
+ 
+ /* for debugging purposes */
+-static void __unused__ print_string (char *p, char *q)
++static void UNUSED print_string (char *p, char *q)
+ {
+ 	for ( ; p != q; p++)
+ 		fprintf (errout, "%c", *p);
+--- a/main.c	(revision 816)
++++ b/main.c	(working copy)
+@@ -522,7 +522,7 @@
+  *		Start up code
+  */
+ 
+-extern int main (int __unused__ argc, char **argv)
++extern int main (int UNUSED argc, char **argv)
+ {
+ 	cookedArgs *args;
+ #ifdef VMS
+--- a/options.c	(revision 816)
++++ b/options.c	(working copy)
+@@ -730,7 +730,7 @@
+ }
+ 
+ static void processExcludeOption (
+-		const char *const option __unused__, const char *const parameter)
++		const char *const option UNUSED, const char *const parameter)
+ {
+ 	const char *const fileName = parameter + 1;
+ 	if (parameter [0] == '\0')
+@@ -867,7 +867,7 @@
+ }
+ 
+ static void processFilterTerminatorOption (
+-		const char *const option __unused__, const char *const parameter)
++		const char *const option UNUSED, const char *const parameter)
+ {
+ 	freeString (&Option.filterTerminator);
+ 	Option.filterTerminator = stringCopy (parameter);
+@@ -930,8 +930,8 @@
+ }
+ 
+ static void processHelpOption (
+-		const char *const option __unused__,
+-		const char *const parameter __unused__)
++		const char *const option UNUSED,
++		const char *const parameter UNUSED)
+ {
+ 	printProgramIdentification ();
+ 	putchar ('\n');
+@@ -1139,8 +1139,8 @@
+ }
+ 
+ static void processLicenseOption (
+-		const char *const option __unused__,
+-		const char *const parameter __unused__)
++		const char *const option UNUSED,
++		const char *const parameter UNUSED)
+ {
+ 	printProgramIdentification ();
+ 	puts ("");
+@@ -1166,8 +1166,8 @@
+ }
+ 
+ static void processListMapsOption (
+-		const char *const __unused__ option,
+-		const char *const __unused__ parameter)
++		const char *const UNUSED option,
++		const char *const UNUSED parameter)
+ {
+ 	if (parameter [0] == '\0' || strcasecmp (parameter, "all") == 0)
+ 	    printLanguageMaps (LANG_AUTO);
+@@ -1183,8 +1183,8 @@
+ }
+ 
+ static void processListLanguagesOption (
+-		const char *const option __unused__,
+-		const char *const parameter __unused__)
++		const char *const option UNUSED,
++		const char *const parameter UNUSED)
+ {
+ 	printLanguageList ();
+ 	exit (0);
+@@ -1358,8 +1358,8 @@
+ }
+ 
+ static void processVersionOption (
+-		const char *const option __unused__,
+-		const char *const parameter __unused__)
++		const char *const option UNUSED,
++		const char *const parameter UNUSED)
+ {
+ 	printProgramIdentification ();
+ 	exit (0);
+--- a/parse.c	(revision 816)
++++ b/parse.c	(working copy)
+@@ -376,7 +376,7 @@
+ */
+ 
+ extern void processLanguageDefineOption (
+-		const char *const option, const char *const parameter __unused__)
++		const char *const option, const char *const parameter UNUSED)
+ {
+ #ifdef HAVE_REGEX
+ 	if (parameter [0] == '\0')
+--- a/routines.c	(revision 816)
++++ b/routines.c	(working copy)
+@@ -526,7 +526,7 @@
+ 
+ #if ! defined (HAVE_STAT_ST_INO)
+ 
+-static void canonicalizePath (char *const path __unused__)
++static void canonicalizePath (char *const path UNUSED)
+ {
+ #if defined (MSDOS_STYLE_PATH)
+ 	char *p;
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index 66d4e8bc057..ffe1fa3662f 100644
--- a/pkgs/development/tools/misc/gdb/default.nix
+++ b/pkgs/development/tools/misc/gdb/default.nix
@@ -26,11 +26,11 @@ assert pythonSupport -> python3 != null;
 
 stdenv.mkDerivation rec {
   pname = targetPrefix + basename;
-  version = "10.1";
+  version = "10.2";
 
   src = fetchurl {
     url = "mirror://gnu/gdb/${basename}-${version}.tar.xz";
-    sha256 = "1h32dckz1y8fnyxh22iyw8h3hnhxr79v1ng85px3ljn1xv71wbzq";
+    sha256 = "0aag1c0fw875pvhjg1qp7x8pf6gf92bjv5gcic5716scacyj58da";
   };
 
   postPatch = if stdenv.isDarwin then ''
diff --git a/pkgs/development/tools/misc/hydra-cli/default.nix b/pkgs/development/tools/misc/hydra-cli/default.nix
index 9160a336681..1332885bbdb 100644
--- a/pkgs/development/tools/misc/hydra-cli/default.nix
+++ b/pkgs/development/tools/misc/hydra-cli/default.nix
@@ -10,7 +10,7 @@ rustPlatform.buildRustPackage rec {
     rev = "v${version}";
     sha256 = "1fd3swdjx249971ak1bgndm5kh6rlzbfywmydn122lhfi6ry6a03";
   };
-  cargoSha256 = "1fjzcgayyha270bdxl5p6c337nq8zj4h81rk4ih9czyz3yaxga3f";
+  cargoSha256 = "16446ppkvc6l8087x5m5kyy5gk4f7inyj7rzrfysriw4fvqxjsf3";
 
   buildInputs = [ openssl ]
                 ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
diff --git a/pkgs/development/tools/misc/itm-tools/default.nix b/pkgs/development/tools/misc/itm-tools/default.nix
index 32c32b536d9..0abdd017901 100644
--- a/pkgs/development/tools/misc/itm-tools/default.nix
+++ b/pkgs/development/tools/misc/itm-tools/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   cargoPatches = [ ./cargo-lock.patch ];
 
-  cargoSha256 = "0rl2ph5igwjl7rwpwcf6afnxly5av7cd6va6wn82lxm606giyq75";
+  cargoSha256 = "1hqv530x8k4rf9zzyl5p5z58bymk1p4qwrcxs21gr0zm2hqjlxy4";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/development/tools/misc/libtool/libtool2-macos11.patch b/pkgs/development/tools/misc/libtool/libtool2-macos11.patch
new file mode 100644
index 00000000000..1552ae7a949
--- /dev/null
+++ b/pkgs/development/tools/misc/libtool/libtool2-macos11.patch
@@ -0,0 +1,32 @@
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+---
+ m4/libtool.m4 | 13 ++++---------
+ 1 file changed, 4 insertions(+), 9 deletions(-)
+
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index f2d1f398..b971e8e7 100644
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1067,16 +1067,11 @@ _LT_EOF
+       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+     darwin1.*)
+       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+-    darwin*) # darwin 5.x on
+-      # if running on 10.5 or later, the deployment target defaults
+-      # to the OS version, if on x86, and 10.4, the deployment
+-      # target defaults to 10.4. Don't you love it?
+-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+-	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+-	10.[[012]][[,.]]*)
++    darwin*)
++      case ${MACOSX_DEPLOYMENT_TARGET},$host in
++	10.[[012]],*|,*powerpc*)
+ 	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+-	10.*)
++	*)
+ 	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+       esac
+     ;;
+-- 
+2.24.3 (Apple Git-128)
diff --git a/pkgs/development/tools/misc/libtool/libtool2.nix b/pkgs/development/tools/misc/libtool/libtool2.nix
index 6d7c4a9087f..44e4c8665c8 100644
--- a/pkgs/development/tools/misc/libtool/libtool2.nix
+++ b/pkgs/development/tools/misc/libtool/libtool2.nix
@@ -1,6 +1,11 @@
-{ lib, stdenv, fetchurl, m4, perl, help2man
+{ lib, stdenv, fetchurl, fetchpatch, autoconf, automake, m4, perl, help2man
 }:
 
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
 stdenv.mkDerivation rec {
   pname = "libtool";
   version = "2.4.6";
@@ -12,7 +17,26 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "lib" ];
 
-  nativeBuildInputs = [ perl help2man m4 ];
+  patches = [
+    # Suport macOS version 11.0
+    # https://lists.gnu.org/archive/html/libtool-patches/2020-06/msg00001.html
+    ./libtool2-macos11.patch
+  ];
+
+  # Normally we'd use autoreconfHook, but that includes libtoolize.
+  postPatch = ''
+    aclocal -I m4
+    automake
+    autoconf
+
+    pushd libltdl
+    aclocal -I ../m4
+    automake
+    autoconf
+    popd
+  '';
+
+  nativeBuildInputs = [ perl help2man m4 ] ++ [ autoconf automake ];
   propagatedBuildInputs = [ m4 ];
 
   # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the
diff --git a/pkgs/development/tools/misc/mdctags/default.nix b/pkgs/development/tools/misc/mdctags/default.nix
index ac617021601..7d8992b4e20 100644
--- a/pkgs/development/tools/misc/mdctags/default.nix
+++ b/pkgs/development/tools/misc/mdctags/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage {
     sha256 = "14gryhgh9czlkfk75ml0620c6v8r74i6h3ykkkmc7gx2z8h1jxrb";
   };
 
-  cargoSha256 = "01ap2w755vbr01nfqc5185mr2w9y32g0d4ahc3lw2x3m8qv0bh6x";
+  cargoSha256 = "1kdbrcpvxiq91m5vq33vzjhsp4j3flzrpbj5hmxf0k3al1a7qk1g";
 
   meta = {
     description = "tags for markdown file";
diff --git a/pkgs/development/tools/misc/ptags/default.nix b/pkgs/development/tools/misc/ptags/default.nix
index 8406ecf298f..c17bfd67358 100644
--- a/pkgs/development/tools/misc/ptags/default.nix
+++ b/pkgs/development/tools/misc/ptags/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1xr1szh4dfrcmi6s6dj791k1ix2zbv75rqkqbyb1lmh5548kywkg";
   };
 
-  cargoSha256 = "1rsnb4kzfb577xw7jk0939n42sv94vvspvbz783bmpy9vl53i38k";
+  cargoSha256 = "1pz5hvn1iq26i8c2cmqavhnri8h0sn40khrxvcdkj9q47nsj5wcx";
 
   # Sanity check.
   checkPhase = ''
diff --git a/pkgs/development/tools/misc/rtss/default.nix b/pkgs/development/tools/misc/rtss/default.nix
index 505e6d23ef7..36ef4c349e9 100644
--- a/pkgs/development/tools/misc/rtss/default.nix
+++ b/pkgs/development/tools/misc/rtss/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1936w161mkbcwicrxn51b42pgir5yjiw85s74lbfq70nddw18nyn";
   };
 
-  cargoSha256 = "0nll5gg7fjh6sz3cscarknb0gaivmzkcxhwdb2li47r74rcbrj36";
+  cargoSha256 = "1b1xiaaxbw6y80pkzd594dikm372l1mmymf1wn2acmlz979nmas8";
 
   meta = with lib; {
     description = "Annotate output with relative durations between lines";
diff --git a/pkgs/development/tools/misc/sccache/default.nix b/pkgs/development/tools/misc/sccache/default.nix
index 4379efd5071..cbdee69ce2c 100644
--- a/pkgs/development/tools/misc/sccache/default.nix
+++ b/pkgs/development/tools/misc/sccache/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1kygk7ilv7la36kv4jdn1ird7f3896wgr88kyqf0iagfqkzb2vsb";
   };
 
-  cargoSha256 = "1cfdwf00jgwsv0f72427asid1xr57s56jk5xj489dgppvgy7wdbj";
+  cargoSha256 = "1f42cqaqnjwi9k4ihqil6z2dqh5dnf76x54gk7mndzkrfg3rl573";
 
   cargoBuildFlags = lib.optionals (!stdenv.isDarwin) [ "--features=dist-client,dist-server" ];
 
diff --git a/pkgs/development/tools/misc/svls/default.nix b/pkgs/development/tools/misc/svls/default.nix
index 6af24ed5d10..13b52914799 100644
--- a/pkgs/development/tools/misc/svls/default.nix
+++ b/pkgs/development/tools/misc/svls/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-+/4D0pRZs1Gy6DJnsDZA8wWi1FKhr7gRS0oq1TyWpuE=";
   };
 
-  cargoSha256 = "sha256-o6/L/4QcIei4X1pHYjV72hcEmTMp+pvJkwbb+niqWP8=";
+  cargoSha256 = "sha256-xkRlUXlkXQwvzIuhExf+tSSBi+8BZv58btvln05UI+k=";
 
   meta = with lib; {
     description = "SystemVerilog language server";
diff --git a/pkgs/development/tools/misc/tokei/default.nix b/pkgs/development/tools/misc/tokei/default.nix
index 557ff4fa967..e87f0706756 100644
--- a/pkgs/development/tools/misc/tokei/default.nix
+++ b/pkgs/development/tools/misc/tokei/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-jqDsxUAMD/MCCI0hamkGuCYa8rEXNZIR8S+84S8FbgI=";
   };
 
-  cargoSha256 = "sha256-iUDc54E8AiLMJw9h99kg/3VmaSi8GqfQyrPwa9nJ994=";
+  cargoSha256 = "sha256-U7Bode8qwDsNf4FVppfEHA9uiOFz74CtKgXG6xyYlT8=";
 
   buildInputs = lib.optionals stdenv.isDarwin [
     libiconv Security
diff --git a/pkgs/development/tools/misc/unused/default.nix b/pkgs/development/tools/misc/unused/default.nix
index 1a5f3efe0e6..58e4ba0bc98 100644
--- a/pkgs/development/tools/misc/unused/default.nix
+++ b/pkgs/development/tools/misc/unused/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
 
   nativeBuildInputs = [ cmake ];
 
-  cargoSha256 = "1c0gj2wp0nydv0binxj3ikm5sm6y5z3pklp5b06dgvq02licz57a";
+  cargoSha256 = "0y7vsba4r4v2lwf02i2dxwicnhknajbbzsdlnn5srvg6nvl3kspi";
 
   meta = with lib; {
     description = "A tool to identify potentially unused code";
diff --git a/pkgs/development/tools/misc/wishbone-tool/default.nix b/pkgs/development/tools/misc/wishbone-tool/default.nix
index d900d14e33c..0465fb74aa1 100644
--- a/pkgs/development/tools/misc/wishbone-tool/default.nix
+++ b/pkgs/development/tools/misc/wishbone-tool/default.nix
@@ -19,7 +19,7 @@ rustPlatform.buildRustPackage {
   cargoDepsHook = ''
     ln -s wishbone-tool source
   '';
-  cargoSha256 = "0d5kcwy0cgxqfxf2xysw65ng84q4knhp4fgvh6dwqhf0nsca9gvs";
+  cargoSha256 = "1b12wpmzv7wxidc4hd8hmp8iwqhqlycxh8bdv3rf701sqsazkc5x";
 
   buildInputs = [ libusb-compat-0_1 ];
 
diff --git a/pkgs/development/tools/pactorio/default.nix b/pkgs/development/tools/pactorio/default.nix
index 8defc8c06ca..3790440f1b8 100644
--- a/pkgs/development/tools/pactorio/default.nix
+++ b/pkgs/development/tools/pactorio/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "07h9hywz0pc29411myhxjq6pks4p6q6czbqjv7fxf3xkb1mg9grq";
   };
 
-  cargoSha256 = "1m7bvi6i52xqvssjx5fr2dz25ny7hkmb8w8p23pczpdmpd2y0r7r";
+  cargoSha256 = "1rac2s36j88vm231aji8d0ndfbaa2gzxwsrxrvsi0zp9cqisc6rh";
 
   nativeBuildInputs = [ installShellFiles ];
   buildInputs = lib.optional stdenv.isDarwin Security;
diff --git a/pkgs/development/tools/parinfer-rust/default.nix b/pkgs/development/tools/parinfer-rust/default.nix
index 2cd8ff4fdb6..59253a4f7da 100644
--- a/pkgs/development/tools/parinfer-rust/default.nix
+++ b/pkgs/development/tools/parinfer-rust/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0hj5in5h7pj72m4ag80ing513fh65q8xlsf341qzm3vmxm3y3jgd";
   };
 
-  cargoSha256 = "16ylk125p368mcz8nandmfqlygrqjlf8mqaxlbpixqga378saidl";
+  cargoSha256 = "1lam4gwzcj6w0pyxf61l2cpbvvf5gmj2gwi8dangnhd60qhlnvrx";
 
   nativeBuildInputs = [ llvmPackages.clang ];
   buildInputs = [ llvmPackages.libclang ];
diff --git a/pkgs/development/tools/parsing/flex/default.nix b/pkgs/development/tools/parsing/flex/default.nix
index 42b007300a9..0bc26db5750 100644
--- a/pkgs/development/tools/parsing/flex/default.nix
+++ b/pkgs/development/tools/parsing/flex/default.nix
@@ -34,8 +34,8 @@ stdenv.mkDerivation rec {
   propagatedBuildInputs = [ m4 ];
 
   preConfigure = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
-    "ac_cv_func_malloc_0_nonnull=yes"
-    "ac_cv_func_realloc_0_nonnull=yes"
+    "export ac_cv_func_malloc_0_nonnull=yes"
+    "export ac_cv_func_realloc_0_nonnull=yes"
   ];
 
   postConfigure = lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) ''
diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix
index 293b8bb095a..29edf0f9f27 100644
--- a/pkgs/development/tools/parsing/tree-sitter/default.nix
+++ b/pkgs/development/tools/parsing/tree-sitter/default.nix
@@ -30,7 +30,7 @@ let
   # 3) run the ./result script that is output by that (it updates ./grammars)
   version = "0.19.3";
   sha256 = "0zd1p9x32bwdc5cdqr0x8i9fpcykk1zczb8zdjawrrr92465d26y";
-  cargoSha256 = "0mlrbl85x1x2ynwrps94mxn95rjj1r7gb3vdivfaxqv1xvp25m41";
+  cargoSha256 = "1n63lxp8rknb5xqp02csj649cxs7d891a520djl3lb4k1finhsjj";
 
   src = fetchFromGitHub {
     owner = "tree-sitter";
diff --git a/pkgs/development/tools/pax-rs/default.nix b/pkgs/development/tools/pax-rs/default.nix
index ff4219ad09c..248a137c49f 100644
--- a/pkgs/development/tools/pax-rs/default.nix
+++ b/pkgs/development/tools/pax-rs/default.nix
@@ -36,5 +36,5 @@ buildRustPackage rec {
       cp ${cargo-lock} $out/Cargo.lock
     '';
 
-  cargoSha256 = "0wx5x7ll21bb6v34csk63kkvxdk3as720hdkaj0izdkpy0xf1knr";
+  cargoSha256 = "0d6g52hjflnw2zvlx10pz78527vh7mw5n43yi8q6dwr3pkbds1fs";
 }
diff --git a/pkgs/development/tools/pqrs/default.nix b/pkgs/development/tools/pqrs/default.nix
index fb91709bde0..24efea2036a 100644
--- a/pkgs/development/tools/pqrs/default.nix
+++ b/pkgs/development/tools/pqrs/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1vx952ki1rhwfmr3faxs363m9fh61b37b0bkbs57ggn9r44sk1z2";
   };
 
-  cargoSha256 = "1c482y83gzpvazdsxsx5n509mkqmyz640s18y4yg928mmqbsz9c4";
+  cargoSha256 = "0mjwazsnryhlfyzcik8052q0imz5f104x86k6b5rncbbbjaj17q1";
 
   meta = with lib; {
     description = "CLI tool to inspect Parquet files";
diff --git a/pkgs/development/tools/py-spy/default.nix b/pkgs/development/tools/py-spy/default.nix
index 89480f53a37..94c706c0210 100644
--- a/pkgs/development/tools/py-spy/default.nix
+++ b/pkgs/development/tools/py-spy/default.nix
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
 
   checkInputs = [ python3 ];
 
-  cargoSha256 = "sha256-GFH8RzyAMtdfoHPcCV3pKf24fKU65vhMLQfLtkhD0Ns=";
+  cargoSha256 = "sha256-hmqrVGNu3zb109TQfhLI3wvGVnlc4CfbkrIKMfRSn7M=";
 
   meta = with lib; {
     description = "Sampling profiler for Python programs";
diff --git a/pkgs/development/tools/rebazel/default.nix b/pkgs/development/tools/rebazel/default.nix
index 73a58ee100b..5dee0a1b9e8 100644
--- a/pkgs/development/tools/rebazel/default.nix
+++ b/pkgs/development/tools/rebazel/default.nix
@@ -10,7 +10,7 @@ rustPlatform.buildRustPackage rec {
     hash = "sha256-v84ZXhtJpejQmP61NmP06+qrtMu/0yb7UyD7U12xlME=";
   };
 
-  cargoSha256 = "sha256-2FmtbvtNfNoocj3Ly553KBLfOgBAa/eAxOrfZ3NGzzw=";
+  cargoSha256 = "sha256-cBAm8LyNKEVJkhZJ+QZU5XtQutb1oNvad8xH70Bi2LM=";
 
   meta = with lib; {
     description = "tool for expediting bazel build workflows";
diff --git a/pkgs/development/tools/rnix-lsp/default.nix b/pkgs/development/tools/rnix-lsp/default.nix
index e938526ecbf..98670e9e184 100644
--- a/pkgs/development/tools/rnix-lsp/default.nix
+++ b/pkgs/development/tools/rnix-lsp/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0fy620c34kxl27sd62x9mj0555bcdmnmbsxavmyiwb497z1m9wnn";
   };
 
-  cargoSha256 = "0xmaa7rds7hlagfxj65pv9vgflcv4nwbwbw4g7cyj88cbb1kbxxj";
+  cargoSha256 = "1akapxrh38g44531r25dgik8y5qyy9y6zb031hg8v61px2ajs39s";
 
   meta = with lib; {
     description = "A work-in-progress language server for Nix, with syntax checking and basic completion";
diff --git a/pkgs/development/tools/rq/default.nix b/pkgs/development/tools/rq/default.nix
index c9e78650f60..7d222e03bc9 100644
--- a/pkgs/development/tools/rq/default.nix
+++ b/pkgs/development/tools/rq/default.nix
@@ -11,6 +11,11 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0km9d751jr6c5qy4af6ks7nv3xfn13iqi03wq59a1c73rnf0zinp";
   };
 
+  cargoSha256 = "0071q08f75qrxdkbx1b9phqpbj15r79jbh391y32acifi7hr35hj";
+
+  buildInputs = [ llvmPackages.libclang v8 ]
+  ++ lib.optionals stdenv.isDarwin [ libiconv ];
+
   postPatch = ''
     # Remove #[deny(warnings)] which is equivalent to -Werror in C.
     # Prevents build failures when upgrading rustc, which may give more warnings.
@@ -18,11 +23,6 @@ rustPlatform.buildRustPackage rec {
       --replace "#![deny(warnings)]" ""
   '';
 
-  cargoSha256 = "0c5vwy3c5ji602dj64z6jqvcpi2xff03zvjbnwihb3ydqwnb3v67";
-
-  buildInputs = [ llvmPackages.libclang v8 ]
-  ++ lib.optionals stdenv.isDarwin [ libiconv ];
-
   configurePhase = ''
     export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
     export V8_SOURCE="${v8}"
diff --git a/pkgs/development/tools/rust/cargo-asm/default.nix b/pkgs/development/tools/rust/cargo-asm/default.nix
index f453955a5c7..cd657967e9a 100644
--- a/pkgs/development/tools/rust/cargo-asm/default.nix
+++ b/pkgs/development/tools/rust/cargo-asm/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1f6kzsmxgdms9lq5z9ynnmxymk9k2lzlp3caa52wqjvdw1grw0rb";
   };
 
-  cargoSha256 = "0d797cisiydblh64vqpfdjf37wmxrvs77phdrqh582lbrvnfhx2j";
+  cargoSha256 = "1c22aal3i7zbyxr2c41fimfx13fwp9anmhh641951yd7cqb8xij2";
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/development/tools/rust/cargo-binutils/default.nix b/pkgs/development/tools/rust/cargo-binutils/default.nix
index 05629d613d7..f499512ce53 100644
--- a/pkgs/development/tools/rust/cargo-binutils/default.nix
+++ b/pkgs/development/tools/rust/cargo-binutils/default.nix
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
       cp ${./Cargo.lock} $out/Cargo.lock
     '';
 
-  cargoSha256 = "sha256-Zrl269PacPi81TrGTIDzmVndgGY5i5lYyspiOj43rpw=";
+  cargoSha256 = "sha256-6du86HxkDQAeIXScXBKuv0j4YZiG4O6IwVIXZnJgTO8=";
 
   meta = with lib; {
     description = "Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain.";
diff --git a/pkgs/development/tools/rust/cargo-bloat/default.nix b/pkgs/development/tools/rust/cargo-bloat/default.nix
index 51d19f5ad6f..c0baf9f3964 100644
--- a/pkgs/development/tools/rust/cargo-bloat/default.nix
+++ b/pkgs/development/tools/rust/cargo-bloat/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0bqzzh8vfqm7dpnb0fv4calnhsg9p3c5j06ycvg621p4zp4fydh2";
   };
 
-  cargoSha256 = "1323lcl8fa21pgx3jhwl4w9f8qz3jjxb5qdvib9jdzqxnnw320xs";
+  cargoSha256 = "0f7hmwrs99qdvhn4lvs8cqva68w2y04fy3ca1xlhk7ncdmclcc4g";
 
   meta = with lib; {
     description = "A tool and Cargo subcommand that helps you find out what takes most of the space in your executable";
diff --git a/pkgs/development/tools/rust/cargo-c/default.nix b/pkgs/development/tools/rust/cargo-c/default.nix
index 7db1ea7f374..9458cb030a7 100644
--- a/pkgs/development/tools/rust/cargo-c/default.nix
+++ b/pkgs/development/tools/rust/cargo-c/default.nix
@@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec {
     '';
   };
 
-  cargoSha256 = "1rmhg9xhljgd5yq3xs0fzw1b0bgz7jfpf5mr2gviwqahl5vxvfiq";
+  cargoSha256 = "0pxakfiidxfczh3harnjhb1zv340r812jxzwam8z2kyw3mkyhh8z";
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ openssl ]
diff --git a/pkgs/development/tools/rust/cargo-criterion/default.nix b/pkgs/development/tools/rust/cargo-criterion/default.nix
index 664f3688eaf..38723bbf3c1 100644
--- a/pkgs/development/tools/rust/cargo-criterion/default.nix
+++ b/pkgs/development/tools/rust/cargo-criterion/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-NiuK+PexfF2wmA8drqqkv/RQlVwYLT3q2QWvV0ghJwg=";
   };
 
-  cargoSha256 = "sha256-A6Kkm/4MSAEJfehA6zSQJU+JwVIhKPcfMZCO9S6Zyx4=";
+  cargoSha256 = "sha256-5Z9Oz8jjyM3+cHAZ++thRDdNlb0Kj54Mg7JjF9JrLdw=";
 
   meta = with lib; {
     description = "Cargo extension for running Criterion.rs benchmarks";
diff --git a/pkgs/development/tools/rust/cargo-cross/default.nix b/pkgs/development/tools/rust/cargo-cross/default.nix
index f7ce0283f6f..276d6e50eee 100644
--- a/pkgs/development/tools/rust/cargo-cross/default.nix
+++ b/pkgs/development/tools/rust/cargo-cross/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256:1py5w4kf612x4qxi190ilsrx0zzwdzk9i47ppvqblska1s47qa2w";
   };
 
-  cargoSha256 = "sha256-3xSuTBcWRGn5HH7LnvwioeRWjehaPW1HCPjN5SUUVfo=";
+  cargoSha256 = "sha256-zk6cbN4iSHnyoeWupufVf2yQK6aq3S99uk9lqpjCw4c=";
 
   cargoPatches = [
     (fetchpatch {
diff --git a/pkgs/development/tools/rust/cargo-feature/default.nix b/pkgs/development/tools/rust/cargo-feature/default.nix
index f3fc148f029..062cb9f027d 100644
--- a/pkgs/development/tools/rust/cargo-feature/default.nix
+++ b/pkgs/development/tools/rust/cargo-feature/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0n5kzh756ghfs3cydlcn9mfvpgwy1cjg41h0nd9dbi5cr1fp9x1n";
   };
 
-  cargoSha256 = "0nvl5smibl81b826xcsrjx8p89lcfpj7wqdsvywnj7jd3p5ag03n";
+  cargoSha256 = "1jh1h6v4mxx03b4diw9325ga0k3js0czs504lx07hvbx8yai1wkq";
 
   buildInputs = lib.optional stdenv.isDarwin libiconv;
 
diff --git a/pkgs/development/tools/rust/cargo-fund/default.nix b/pkgs/development/tools/rust/cargo-fund/default.nix
index 70a2e6feca6..43655fd6a89 100644
--- a/pkgs/development/tools/rust/cargo-fund/default.nix
+++ b/pkgs/development/tools/rust/cargo-fund/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1jim5bgq3fc33391qpa1q1csbzqf4hk1qyfzwxpcs5pb4ixb6vgk";
   };
 
-  cargoSha256 = "181gcmaw2w5a6ah8a2ahsnc1zkadpmx1azkwh2a6x8myhzw2dxsj";
+  cargoSha256 = "1c2zryxn1bbg3ksp8azk9xmwfgwr6663hlmdv9c358hzqdfp9hli";
 
   # The tests need a GitHub API token.
   doCheck = false;
diff --git a/pkgs/development/tools/rust/cargo-geiger/default.nix b/pkgs/development/tools/rust/cargo-geiger/default.nix
index 3b2702c66f6..bd71a14b4a0 100644
--- a/pkgs/development/tools/rust/cargo-geiger/default.nix
+++ b/pkgs/development/tools/rust/cargo-geiger/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1z920p8i3gkjadyd6bqjk4i5yr5ds3m3sbcnf7plcqr69dsjr4b8";
   };
 
-  cargoSha256 = "1zh6fjfynkn4kgk1chigzd0sh4x1bagizyn7x6qyxgzc57a49bp7";
+  cargoSha256 = "1wf9758gyaxgyajjzy5phirg922n9wv0qmy67zjmxj56ayf0l9lm";
 
   checkPhase = ''
     ${cargo-insta}/bin/cargo-insta test
diff --git a/pkgs/development/tools/rust/cargo-generate/default.nix b/pkgs/development/tools/rust/cargo-generate/default.nix
index e4eb2965fd6..040109da3ad 100644
--- a/pkgs/development/tools/rust/cargo-generate/default.nix
+++ b/pkgs/development/tools/rust/cargo-generate/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-RrDwq5VufMDsPlqRmBP3x2RUWU740L0L18noByO1IDY=";
   };
 
-  cargoSha256 = "sha256-W6+RGzCYJF9f44QaFDOI414/vCfKIuIOXoH+GYY0GwY=";
+  cargoSha256 = "sha256-/0pxEQFhovPRI4Knv5xq6+PHRuGN6+tF8CdK5X30LKI=";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/development/tools/rust/cargo-inspect/default.nix b/pkgs/development/tools/rust/cargo-inspect/default.nix
index 9339660388b..1644929074b 100644
--- a/pkgs/development/tools/rust/cargo-inspect/default.nix
+++ b/pkgs/development/tools/rust/cargo-inspect/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   buildInputs = lib.optionals stdenv.isDarwin [ Security ];
 
-  cargoSha256 = "1ryi5qi1zz2yljyj4rn84q9zkzafc9w4nw3zc01hlzpnb1sjw5sw";
+  cargoSha256 = "069i8ydrp1pssnjq7d6mydwr7xh2cmcpzpf8bzd6nfjr6xx1pipr";
 
   meta = with lib; {
     description = "See what Rust is doing behind the curtains";
diff --git a/pkgs/development/tools/rust/cargo-play/default.nix b/pkgs/development/tools/rust/cargo-play/default.nix
index 5e12c1cae1d..f5faed06faf 100644
--- a/pkgs/development/tools/rust/cargo-play/default.nix
+++ b/pkgs/development/tools/rust/cargo-play/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "01r00akfmvpzp924yqqybd9s0pwiwxy8vklsg4m9ypzljc3nlv02";
   };
 
-  cargoSha256 = "0fvsdyivq5991ka6avh12aqdkjx0myk61kmzlr19p2vlfpg70q07";
+  cargoSha256 = "1xkscd9ci9vlkmbsaxvavrna1xpi16xcf9ri879lw8bdh7sa3nx8";
 
   # some tests require internet access
   doCheck = false;
diff --git a/pkgs/development/tools/rust/cargo-readme/default.nix b/pkgs/development/tools/rust/cargo-readme/default.nix
index 358c58bef4d..fb45763b50b 100644
--- a/pkgs/development/tools/rust/cargo-readme/default.nix
+++ b/pkgs/development/tools/rust/cargo-readme/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-/ufHHM13L83M3UYi6mjdhIjgXx7bZgzvR/X02Zsx7Fw=";
   };
 
-  cargoSha256 = "sha256-QVRl6xCvztWi5zAs3PXYR4saTqO5nTBPIjdlMiMXFTM=";
+  cargoSha256 = "sha256-Isd05qOuVBNfXOI5qsaDOhjF7QIKAG5xrZsBFK2PpQQ=";
 
   patches = [
     (fetchpatch {
diff --git a/pkgs/development/tools/rust/cargo-sweep/default.nix b/pkgs/development/tools/rust/cargo-sweep/default.nix
index f20bdb9cc17..537275c68f6 100644
--- a/pkgs/development/tools/rust/cargo-sweep/default.nix
+++ b/pkgs/development/tools/rust/cargo-sweep/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0zwdrh4z5x79qs8cwmwh3phzy4brw0ggv2qyf6pylv99vha5acyf";
   };
 
-  cargoSha256 = "1sxjc64g8h77a3dvzb99f1f72zrak1nh4jgfjfkw4yc4dhkpyrmz";
+  cargoSha256 = "023gbq8izpbaxq1pdzs8428k24myd2b8gi9g4kl2hx79yciiscnz";
 
   meta = with lib; {
     description = "A Cargo subcommand for cleaning up unused build files generated by Cargo";
diff --git a/pkgs/development/tools/rust/cargo-sync-readme/default.nix b/pkgs/development/tools/rust/cargo-sync-readme/default.nix
index 54f21ab4627..07c51c3163c 100644
--- a/pkgs/development/tools/rust/cargo-sync-readme/default.nix
+++ b/pkgs/development/tools/rust/cargo-sync-readme/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1c38q87fyfmj6nlwdpavb1xxpi26ncywkgqcwbvblad15c6ydcyc";
   };
 
-  cargoSha256 = "1x15q6wv5278hm3ns2wmw4i8602g35y1jyv1b8wa5i4dnh52dj83";
+  cargoSha256 = "0vrbgs49ghhl4z4ljhghcs9fnbf7qx1an9kwbrgv9wng8m1dccah";
 
   meta = with lib; {
     description = "A cargo plugin that generates a Markdown section in your README based on your Rust documentation";
diff --git a/pkgs/development/tools/rust/cargo-valgrind/default.nix b/pkgs/development/tools/rust/cargo-valgrind/default.nix
index 3cfea727435..e1f26dc02b2 100644
--- a/pkgs/development/tools/rust/cargo-valgrind/default.nix
+++ b/pkgs/development/tools/rust/cargo-valgrind/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-PltYUU2O/D1PrU+K8JN4+aUVLzHCeNyIsXMU6HLodXE=";
   };
 
-  cargoSha256 = "sha256-zR826fFSCSsJxGKSc7ugrLwMDvsjRBjs4eotKTfhGqI=";
+  cargoSha256 = "sha256-XiQGkZ6pfyGkNPjpcPoY66qBl7ABTcRHCBjgmXSRrL0=";
 
   passthru = {
     updateScript = nix-update-script {
diff --git a/pkgs/development/tools/rust/cargo-whatfeatures/default.nix b/pkgs/development/tools/rust/cargo-whatfeatures/default.nix
index 34440ce9305..7041f0ebd6c 100644
--- a/pkgs/development/tools/rust/cargo-whatfeatures/default.nix
+++ b/pkgs/development/tools/rust/cargo-whatfeatures/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0vki37pxngg15za9c1z61dc6sqk0j59s0qhcf9hplnym4ib5kqx1";
   };
 
-  cargoSha256 = "sha256-nNV7UXjKZNFmTqW4H0qsNuBW9XOP2V9nfotewtI9mYE";
+  cargoSha256 = "sha256-ZEkSj/JzXXTHjaxBVS5RDk/ECvOPPjzH4eS3CmlQA9I=";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/development/tools/rust/cargo-wipe/default.nix b/pkgs/development/tools/rust/cargo-wipe/default.nix
index c4c079c523b..a59a124317b 100644
--- a/pkgs/development/tools/rust/cargo-wipe/default.nix
+++ b/pkgs/development/tools/rust/cargo-wipe/default.nix
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-sVekfGHg2wspP5/zJzXTXupspwJr4hQBucY5+8iUjUQ=";
   };
 
-  cargoSha256 = "sha256-IzEurJcPoM/JMQlSL7N84wzZddNpynrsjQEOUNms2YQ=";
+  cargoSha256 = "sha256-EoXgsWg1Rh7C+fIqvefkLdck4Yj3kox2ZAU3kn6nH8Q=";
 
   passthru = {
     updateScript = nix-update-script {
diff --git a/pkgs/development/tools/rust/cargo-xbuild/default.nix b/pkgs/development/tools/rust/cargo-xbuild/default.nix
index 8aa701779bc..e8d62c9252f 100644
--- a/pkgs/development/tools/rust/cargo-xbuild/default.nix
+++ b/pkgs/development/tools/rust/cargo-xbuild/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "01whdjryz6zjsk4149h72w5xdjnkpcn5daf0xnsb59b0q38hjgg9";
   };
 
-  cargoSha256 = "1gcixzxca1yi4rvy55s986my6j0vx7n6fm1g5r4v4w0zgzlz4d89";
+  cargoSha256 = "036a50shzl6wdjk5wypkacx1kjwbyb4x1aqhbzgjgpxxxrf0lj16";
 
   meta = with lib; {
     description = "Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc";
diff --git a/pkgs/development/tools/rust/crate2nix/default.nix b/pkgs/development/tools/rust/crate2nix/default.nix
index b5a3486da71..e68eea50ff3 100644
--- a/pkgs/development/tools/rust/crate2nix/default.nix
+++ b/pkgs/development/tools/rust/crate2nix/default.nix
@@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
 
   sourceRoot = "source/crate2nix";
 
-  cargoSha256 = "sha256-6V0ifH63/s5XLo4BCexPtvlUH0UQPHFW8YHF8OCH3ik=";
+  cargoSha256 = "sha256-shWhzCaH8ZttUcq82tA7T1hwNl6F1XJy7ansA5lt+Mw=";
 
   nativeBuildInputs = [ makeWrapper ];
 
diff --git a/pkgs/development/tools/rust/racerd/default.nix b/pkgs/development/tools/rust/racerd/default.nix
index 33d6721610e..6ffa49aa6b9 100644
--- a/pkgs/development/tools/rust/racerd/default.nix
+++ b/pkgs/development/tools/rust/racerd/default.nix
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
     })
   ];
 
-  cargoSha256 = "1z0dh2j9ik66i6nww3z7z2gw7nhc0b061zxbjzamk1jybpc845lq";
+  cargoSha256 = "08zn65c5ivhn2qs02aiixyqwhywrw8kfvs0kgzxdzsipic47n2qq";
 
   # a nightly compiler is required unless we use this cheat code.
   RUSTC_BOOTSTRAP=1;
diff --git a/pkgs/development/tools/so/default.nix b/pkgs/development/tools/so/default.nix
index cd52f319bb9..e7324ff7c5b 100644
--- a/pkgs/development/tools/so/default.nix
+++ b/pkgs/development/tools/so/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-WAUPB4hhvroE1/8nQcgLVWgGyXcFh7qxdFg6UtQzM9A=";
   };
 
-  cargoSha256 = "sha256-wt6ClN9fpEAETk3kYeQRieTXnZQe4JEnQiA8CG4ZLog=";
+  cargoSha256 = "sha256-aaIzGvf+PvH8nz2BSJapi1P5gSVfXT92X62FqJ1Z2L0=";
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
diff --git a/pkgs/development/tools/the-way/default.nix b/pkgs/development/tools/the-way/default.nix
index 6d7fbef2f19..65c889aee83 100644
--- a/pkgs/development/tools/the-way/default.nix
+++ b/pkgs/development/tools/the-way/default.nix
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
 
   buildInputs = lib.optionals stdenv.isDarwin  [ AppKit Security ];
 
-  cargoSha256 = "sha256-jTZso61Lyt6jprBxBAhvchgOsgM9y1qBleTxUx1jCnE=";
+  cargoSha256 = "sha256-sULjd+weixTQYFIQlluPwY4MFlZ1+vMMoMn4GP79oQs=";
   checkFlagsArray = lib.optionals stdenv.isDarwin [ "--skip=copy" ];
   dontUseCargoParallelTests = true;
 
diff --git a/pkgs/development/tools/trunk/default.nix b/pkgs/development/tools/trunk/default.nix
index 9284e1df454..e8a7392ff3b 100644
--- a/pkgs/development/tools/trunk/default.nix
+++ b/pkgs/development/tools/trunk/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
     then [ libiconv CoreServices Security ]
     else [ openssl ];
 
-  cargoSha256 = "Qv7knTmNYtw0tbyWhFIV7tYkQiwFxcNPAeNiGCyeV8s=";
+  cargoSha256 = "sha256-0ehz0ETNA2gOvTJUu8uq5H+bv4VXOJMq6AA8kn65m/Q=";
 
   meta = with lib; {
     homepage = "https://github.com/thedodd/trunk";
diff --git a/pkgs/development/tools/wasm-bindgen-cli/default.nix b/pkgs/development/tools/wasm-bindgen-cli/default.nix
index e566d4cb1c9..a52f7b6550c 100644
--- a/pkgs/development/tools/wasm-bindgen-cli/default.nix
+++ b/pkgs/development/tools/wasm-bindgen-cli/default.nix
@@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
   buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security curl ];
   nativeBuildInputs = [ pkg-config ];
 
-  cargoSha256 = "sha256-2UBCcA4eBrSHrJjJdDprsysiOObg2GrC7QtveAydbhk=";
+  cargoSha256 = "sha256-GUdoOms4FrNmPkELFX1PXcU/ww7CSN8JGHoCvnm73PQ=";
   cargoBuildFlags = [ "-p" pname ];
 
   meta = with lib; {
diff --git a/pkgs/development/tools/wasm-pack/default.nix b/pkgs/development/tools/wasm-pack/default.nix
index 9c6d3ed8cb8..59051895512 100644
--- a/pkgs/development/tools/wasm-pack/default.nix
+++ b/pkgs/development/tools/wasm-pack/default.nix
@@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec {
     ./update-deps.patch
   ];
 
-  cargoSha256 = "0br7r8wz3knzgl3gjpq6z8w33my0yiaq711s1wih9jizhia02y5r";
+  cargoSha256 = "130gqvzpyr055xkqcy1r0y7l5k2dcv7n9zgr4ja7dm7iayzbwwi1";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/development/tools/xcbuild/platforms.nix b/pkgs/development/tools/xcbuild/platforms.nix
index e20dc878b53..0108ac8ef69 100644
--- a/pkgs/development/tools/xcbuild/platforms.nix
+++ b/pkgs/development/tools/xcbuild/platforms.nix
@@ -1,4 +1,4 @@
-{ runCommand, lib, sdks, xcodePlatform, writeText }:
+{ stdenv, runCommand, lib, sdks, xcodePlatform, writeText }:
 
 let
 
@@ -15,23 +15,23 @@ let
   };
 
   # These files are all based off of Xcode spec fies found in
-  # /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Speciications/.
+  # /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/PrivatePlugIns/IDEOSXSupportCore.ideplugin/Contents/Resources.
 
-  # Based off of the MacOSX Architectures.xcpsec file. All i386 stuff
-  # is removed because NixPkgs only supports darwin-x86_64.
+  # Based off of the "MacOSX Architectures.xcspec" file. All i386 stuff
+  # is removed because NixPkgs only supports darwin-x86_64 and darwin-arm64.
   Architectures = [
     {
       Identifier = "Standard";
       Type = "Architecture";
-      Name = "Standard Architectures (64-bit Intel)";
-      RealArchitectures = [ "x86_64" ];
+      Name = "Standard Architectures (Apple Silicon, 64-bit Intel)";
+      RealArchitectures = [ "arm64" "x86_64" ];
       ArchitectureSetting = "ARCHS_STANDARD";
     }
     {
       Identifier = "Universal";
       Type = "Architecture";
-      Name = "Universal (64-bit Intel)";
-      RealArchitectures = [ "x86_64" ];
+      Name = "Universal (Apple Silicon, 64-bit Intel)";
+      RealArchitectures = [ "arm64" "x86_64" ];
       ArchitectureSetting = "ARCHS_STANDARD_32_64_BIT";
     }
     {
@@ -43,25 +43,25 @@ let
     {
       Identifier = "Standard64bit";
       Type = "Architecture";
-      Name = "64-bit Intel";
-      RealArchitectures = [ "x86_64" ];
+      Name = "Apple Silicon, 64-bit Intel";
+      RealArchitectures = [ "arm64" "x86_64" ];
       ArchitectureSetting = "ARCHS_STANDARD_64_BIT";
     }
     {
-      Identifier = "x86_64";
+      Identifier = if stdenv.isAarch64 then "arm64" else "x86_64";
       Type = "Architecture";
-      Name = "Intel 64-bit";
+      Name = "Apple Silicon or Intel 64-bit";
     }
     {
       Identifier = "Standard_Including_64_bit";
       Type = "Architecture";
       Name = "Standard Architectures (including 64-bit)";
-      RealArchitectures = [ "x86_64" ];
+      RealArchitectures = [ "arm64" "x86_64" ];
       ArchitectureSetting = "ARCHS_STANDARD_INCLUDING_64_BIT";
     }
   ];
 
-  # Based off of the MacOSX Package Types.xcpsec file. Only keep the
+  # Based off of the "MacOSX Package Types.xcspec" file. Only keep the
   # bare minimum needed.
   PackageTypes = [
     {
@@ -169,7 +169,7 @@ let
     }
   ];
 
-  # Based off of the MacOSX Product Types.xcpsec file. All
+  # Based off of the "MacOSX Product Types.xcspec" file. All
   # bundles/wrapper are removed, because we prefer dynamic products in
   # NixPkgs.
   ProductTypes = [
diff --git a/pkgs/development/tools/xcbuild/wrapper.nix b/pkgs/development/tools/xcbuild/wrapper.nix
index 4f74b093717..ca69bbe907d 100644
--- a/pkgs/development/tools/xcbuild/wrapper.nix
+++ b/pkgs/development/tools/xcbuild/wrapper.nix
@@ -28,7 +28,7 @@ let
   };
 
   platforms = callPackage ./platforms.nix {
-    inherit sdks xcodePlatform;
+    inherit sdks xcodePlatform stdenv;
   };
 
   xcconfig = writeText "nix.xcconfig" ''
diff --git a/pkgs/games/eidolon/default.nix b/pkgs/games/eidolon/default.nix
index 7112c6bf49c..a224ba112e0 100644
--- a/pkgs/games/eidolon/default.nix
+++ b/pkgs/games/eidolon/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
   };
   cargoPatches = [ ./cargo-lock.patch ];
 
-  cargoSha256 = "1i8qfphynwi42pkhhgllxq42dnw9f0dd6f829z94a3g91czyqvsw";
+  cargoSha256 = "01mnfn6j4sj9iqw5anpx8lqm9jmk7wdrx3h2hcvqcmkyrk1nggx0";
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ openssl ];
diff --git a/pkgs/games/freenukum/default.nix b/pkgs/games/freenukum/default.nix
index 36639140702..ff1e8872233 100644
--- a/pkgs/games/freenukum/default.nix
+++ b/pkgs/games/freenukum/default.nix
@@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0yqfzh0c8fqk92q9kmidy15dc5li0ak1gbn3v7p3xw5fkrzf99gy";
   };
 
-  cargoSha256 = "1mi98ccp4026gdc5x9jc6518zb7z4dplxl8vir78ivgdpifzz4pw";
+  cargoSha256 = "1nss5zbdvxkr1mfb6vi6yjxcih99w836kvfr4r3n5dvzlkvga2vf";
 
   nativeBuildInputs = [
     installShellFiles
diff --git a/pkgs/games/ja2-stracciatella/default.nix b/pkgs/games/ja2-stracciatella/default.nix
index 4f186c3c60a..3ad5ba20c53 100644
--- a/pkgs/games/ja2-stracciatella/default.nix
+++ b/pkgs/games/ja2-stracciatella/default.nix
@@ -11,7 +11,7 @@ let
     pname = "libstracciatella";
     inherit version;
     src = "${src}/rust";
-    cargoSha256 = "0blb971cv9k6c460mwq3zq8vih687bdnb39b9gph1hr90pxjviba";
+    cargoHash = "sha256-asUt+wUpwwDvSyuNZds6yMC4Ef4D8woMYWamzcJJiy4=";
 
     preBuild = ''
       mkdir -p $out/include/stracciatella
diff --git a/pkgs/games/portmod/default.nix b/pkgs/games/portmod/default.nix
index 108d81815fa..464939084c2 100644
--- a/pkgs/games/portmod/default.nix
+++ b/pkgs/games/portmod/default.nix
@@ -16,7 +16,7 @@ let
     inherit src version;
     pname = "portmod-rust";
 
-    cargoSha256 = "14p1aywwbkf2pk85sir5g9ni08zam2hid0kaz111718b006nrxh7";
+    cargoHash = "sha256-7Ce+EIbZuOur7iGOUXNWiXReuZO54LQJu+sJPw1CJGg=";
 
     nativeBuildInputs = [ python3Packages.python ];
 
diff --git a/pkgs/games/system-syzygy/default.nix b/pkgs/games/system-syzygy/default.nix
index 4343a27fb49..f01f93572ba 100644
--- a/pkgs/games/system-syzygy/default.nix
+++ b/pkgs/games/system-syzygy/default.nix
@@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
   nativeBuildInputs = [ makeWrapper ];
   buildInputs = [ SDL2 ];
 
-  cargoSha256 = "001cwdq8zxji56yahwfsydi7s0j7c5zsip60lxk3qmn078wcipdp";
+  cargoSha256 = "1jp9wnavq92w52ksj2q9fi3y58wq7ybfkx2kfbx2i2xv8d7y88ax";
 
   postInstall = ''
     mkdir -p $out/share/syzygy/
diff --git a/pkgs/misc/emulators/snes9x-gtk/default.nix b/pkgs/misc/emulators/snes9x-gtk/default.nix
index 3b5cb487f77..8cebc664bca 100644
--- a/pkgs/misc/emulators/snes9x-gtk/default.nix
+++ b/pkgs/misc/emulators/snes9x-gtk/default.nix
@@ -12,7 +12,6 @@ stdenv.mkDerivation rec {
     sha256 = "12hpn7zcdvp30ldpw2zf115yjqv55n1ldjbids7vx0lvbpr06dm1";
   };
 
-  enableParallelBuilding = true;
   nativeBuildInputs = [ meson ninja pkg-config wrapGAppsHook ];
   buildInputs = [ SDL2 zlib gtk3 libxml2 libXv epoxy minizip pulseaudio portaudio ];
 
diff --git a/pkgs/misc/uq/default.nix b/pkgs/misc/uq/default.nix
index 5c0fb954910..e0c62ca92ca 100755
--- a/pkgs/misc/uq/default.nix
+++ b/pkgs/misc/uq/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1qqqmdk0v1d3ckasmmw5lbrkvhkv0nws4bzi9cfi1ndhrbvbkbxb";
   };
 
-  cargoSha256 = "1fv13rbghfw7114h7sda04gpqrjrsgnnki0p9kdd6r6sk5cbhn9x";
+  cargoSha256 = "1p6008vxm2pi9v31qhsq7zysanal6rcvcl8553373bkqlfd7w5c4";
 
   meta = with lib; {
     description = "A simple, user-friendly alternative to sort | uniq";
diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix
index d9629688c3e..bafc7147efd 100644
--- a/pkgs/misc/vim-plugins/overrides.nix
+++ b/pkgs/misc/vim-plugins/overrides.nix
@@ -720,7 +720,7 @@ self: super: {
       vim-markdown-composer-bin = rustPlatform.buildRustPackage rec {
         pname = "vim-markdown-composer-bin";
         inherit (super.vim-markdown-composer) src version;
-        cargoSha256 = "iuhq2Zhdkib8hw4uvXBjwE5ZiN1kzairlzufaGuVkWc=";
+        cargoSha256 = "1cvnjsw5dd02wrm1q5xi8b033rsn44f7fkmw5j7lhskv5j286zrh";
       };
     in
     super.vim-markdown-composer.overrideAttrs (oldAttrs: rec {
diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/default.nix b/pkgs/misc/vscode-extensions/vscode-lldb/default.nix
index c4d22828103..3ebb30fac65 100644
--- a/pkgs/misc/vscode-extensions/vscode-lldb/default.nix
+++ b/pkgs/misc/vscode-extensions/vscode-lldb/default.nix
@@ -24,7 +24,7 @@ let
     # It will pollute the build environment of `buildRustPackage`.
     cargoPatches = [ ./reset-cargo-config.patch ];
 
-    cargoSha256 = "sha256-HPVbqYsst/iFrHn5wvmWtqeVHOHR7JT8lu+/xZq1lK0=";
+    cargoSha256 = "sha256-vcL/nSGhyE0INQVWxEIpYwXmnOl1soBn+mymZr1FaSM=";
 
     nativeBuildInputs = [ makeWrapper ];
 
diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix
index 801d574b5bc..7aad67e777e 100644
--- a/pkgs/os-specific/bsd/netbsd/default.nix
+++ b/pkgs/os-specific/bsd/netbsd/default.nix
@@ -106,8 +106,8 @@ in lib.makeScopeWithSplicing
   ##
   makeMinimal = mkDerivation {
     path = "tools/make";
-    sha256 = "1xbzfd4i7allrkk1if74a8ymgpizyj0gkvdigzzj37qar7la7nc1";
-    version = "8.0";
+    sha256 = "0fh0nrnk18m613m5blrliq2aydciv51qhc0ihsj4k63incwbk90n";
+    version = "9.1";
 
     buildInputs = with self; [];
     nativeBuildInputs = with buildPackages.netbsd; [ bsdSetupHook ];
@@ -139,11 +139,11 @@ in lib.makeScopeWithSplicing
   };
 
   compat = mkDerivation (let
-    version = "8.0";
+    version = "9.1";
     commonDeps = [ zlib ];
   in {
     path = "tools/compat";
-    sha256 = "050449lq5gpxqsripdqip5ks49g5ypjga188nd3ss8dg1zf7ydz3";
+    sha256 = "1vsxg7136nlhc72vpa664vs22874xh7ila95nkmsd8crn3z3cyn0";
     inherit version;
 
     setupHooks = [
@@ -191,12 +191,15 @@ in lib.makeScopeWithSplicing
       install -D $BSDSRCDIR/include/vis.h $out/include/vis.h
       install -D $BSDSRCDIR/include/db.h $out/include/db.h
       install -D $BSDSRCDIR/include/netconfig.h $out/include/netconfig.h
-      install -D $BSDSRCDIR/include/rpc/types.h $out/include/rpc/types.h
       install -D $BSDSRCDIR/include/utmpx.h $out/include/utmpx.h
       install -D $BSDSRCDIR/include/tzfile.h $out/include/tzfile.h
       install -D $BSDSRCDIR/sys/sys/tree.h $out/include/sys/tree.h
       install -D $BSDSRCDIR/include/nl_types.h $out/include/nl_types.h
       install -D $BSDSRCDIR/include/stringlist.h $out/include/stringlist.h
+
+      # Collapse includes slightly to fix dangling reference
+      install -D $BSDSRCDIR/common/include/rpc/types.h $out/include/rpc/types.h
+      sed -i '1s;^;#include "nbtool_config.h"\n;' $out/include/rpc/types.h
    '' + lib.optionalString stdenv.isDarwin ''
       mkdir -p $out/include/ssp
       touch $out/include/ssp/ssp.h
@@ -206,11 +209,11 @@ in lib.makeScopeWithSplicing
         --subst-var-by out $out \
         --subst-var-by version ${version}
     '';
-    extraPaths = with self; [ libc.src libutil.src
-      (fetchNetBSD "include" "8.0" "128m77k16i7frvk8kifhmxzk7a37m7z1s0bbmja3ywga6sx6v6sq")
-      (fetchNetBSD "external/bsd/flex" "8.0" "0yxcjshz9nj827qhmjwwjmzvmmqgaf0d25b42k7lj84vliwrgyr6")
-      (fetchNetBSD "sys/sys" "8.0" "0b0yjjy0c0cvk5nyffppqwxlwh2s1qr2xzl97a9ldck00dibar94")
-    ] ++ libutil.extraPaths ++ libc.extraPaths;
+    extraPaths = with self; [ include.src libc.src libutil.src
+      (fetchNetBSD "external/bsd/flex" "9.1" "0h98jpfj7vx5zh7vd7bk6b1hmzgkcb757a8j6d9zgygxxv13v43m")
+      (fetchNetBSD "sys/sys" "9.1" "1xx633pvmdgdb0h1x0bw1rvkc63h29ziwh51166rc3q5bil7y01n")
+      (fetchNetBSD "common/include/rpc/types.h" "9.1" "0n2df12mlc3cbc48jxq35yzl1y7ghgpykvy7jnfh898rdhac7m9a")
+    ] ++ libutil.extraPaths ++ _mainLibcExtraPaths;
   });
 
   # HACK: to ensure parent directories exist. This emulates GNU
@@ -222,7 +225,7 @@ in lib.makeScopeWithSplicing
     xinstall "$@"
   ''; in mkDerivation {
     path = "usr.bin/xinstall";
-    version = "8.0";
+    version = "9.1";
     sha256 = "1f6pbz3qv1qcrchdxif8p5lbmnwl8b9nq615hsd3cyl4avd5bfqj";
     extraPaths = with self; [ mtree.src make.src ];
     nativeBuildInputs = with buildPackages.netbsd; [
@@ -248,15 +251,15 @@ in lib.makeScopeWithSplicing
     pname = "fts";
     path = "include/fts.h";
     sha256 = "01d4fpxvz1pgzfk5xznz5dcm0x0gdzwcsfm1h3d0xc9kc6hj2q77";
-    version = "8.0";
+    version = "9.1";
     nativeBuildInputs = with buildPackages.netbsd; [
       bsdSetupHook
     ];
     propagatedBuildInputs = with self; compatIfNeeded;
     extraPaths = with self; [
-      (fetchNetBSD "lib/libc/gen/fts.c" "8.0" "1a8hmf26242nmv05ipn3ircxb0jqmmi66rh78kkyi9vjwkfl3qn7")
-      (fetchNetBSD "lib/libc/include/namespace.h" "8.0" "1sjvh9nw3prnk4rmdwrfsxh6gdb9lmilkn46jcfh3q5c8glqzrd7")
-      (fetchNetBSD "lib/libc/gen/fts.3" "8.0" "1asxw0n3fhjdadwkkq3xplfgqgl3q32w1lyrvbakfa3gs0wz5zc1")
+      (fetchNetBSD "lib/libc/gen/fts.c" "9.1" "1a8hmf26242nmv05ipn3ircxb0jqmmi66rh78kkyi9vjwkfl3qn7")
+      (fetchNetBSD "lib/libc/include/namespace.h" "9.1" "0kksr3pdwdc1cplqf5z12ih4cml6l11lqrz91f7hjjm64y7785kc")
+      (fetchNetBSD "lib/libc/gen/fts.3" "9.1" "1asxw0n3fhjdadwkkq3xplfgqgl3q32w1lyrvbakfa3gs0wz5zc1")
     ];
     skipIncludesPhase = true;
     buildPhase = ''
@@ -283,8 +286,8 @@ in lib.makeScopeWithSplicing
   # Don't add this to nativeBuildInputs directly.  Use statHook instead.
   stat = mkDerivation {
     path = "usr.bin/stat";
-    version = "8.0";
-    sha256 = "0z4r96id2r4cfy443rw2s1n52n186xm0lqvs8s3qjf4314z7r7yh";
+    version = "9.1";
+    sha256 = "18nqwlndfc34qbbgqx5nffil37jfq9aw663ippasfxd2hlyc106x";
     nativeBuildInputs = with buildPackages.netbsd; [
       bsdSetupHook
       makeMinimal
@@ -305,7 +308,7 @@ in lib.makeScopeWithSplicing
 
   tsort = mkDerivation {
     path = "usr.bin/tsort";
-    version = "8.0";
+    version = "9.1";
     sha256 = "1dqvf9gin29nnq3c4byxc7lfd062pg7m84843zdy6n0z63hnnwiq";
     nativeBuildInputs = with buildPackages.netbsd; [
       bsdSetupHook
@@ -316,7 +319,7 @@ in lib.makeScopeWithSplicing
 
   lorder = mkDerivation {
     path = "usr.bin/lorder";
-    version = "8.0";
+    version = "9.1";
     sha256 = "0rjf9blihhm0n699vr2bg88m4yjhkbxh6fxliaay3wxkgnydjwn2";
     nativeBuildInputs = with buildPackages.netbsd; [
       bsdSetupHook
@@ -333,8 +336,8 @@ in lib.makeScopeWithSplicing
   ##
   make = mkDerivation {
     path = "usr.bin/make";
-    sha256 = "103643qs3w5kiahir6cca2rkm5ink81qbg071qyzk63qvspfq10c";
-    version = "8.0";
+    sha256 = "09szl3lp9s081h7f3nci5h9zc78wlk9a6g18mryrznrss90q9ngx";
+    version = "9.1";
     postPatch = ''
       # make needs this to pick up our sys make files
       export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\""
@@ -352,39 +355,39 @@ in lib.makeScopeWithSplicing
       make -C $BSDSRCDIR/share/mk FILESDIR=$out/share/mk install
     '';
     extraPaths = [
-      (fetchNetBSD "share/mk" "8.0" "033q4w3rmvwznz6m7fn9xcf13chyhwwl8ijj3a9mrn80fkwm55qs")
+      (fetchNetBSD "share/mk" "9.1" "0qi3ypd5dsxk2c33885fsn68a550nibsxb1jwf5w6bfrvcblzn2z")
     ];
   };
 
   mtree = mkDerivation {
     path = "usr.sbin/mtree";
-    version = "8.0";
-    sha256 = "0hanmzm8bgwz2bhsinmsgfmgy6nbdhprwmgwbyjm6bl17vgn7vid";
+    version = "9.1";
+    sha256 = "04p7w540vz9npvyb8g8hcf2xa05phn1y88hsyrcz3vwanvpc0yv9";
     extraPaths = with self; [ mknod.src ];
   };
 
   mknod = mkDerivation {
     path = "sbin/mknod";
-    version = "8.0";
-    sha256 = "0vq66v0hj0r4z2r2z2d3l3c5vh48pvcdmddc8bhm8hzq2civ5df2";
+    version = "9.1";
+    sha256 = "1d9369shzwgixz3nph991i8q5vk7hr04py3n9avbfbhzy4gndqs2";
   };
 
   getent = mkDerivation {
     path = "usr.bin/getent";
-    sha256 = "1ylhw4dnpyrmcy8n5kjcxywm8qc9p124dqnm17x4magiqx1kh9iz";
-    version = "8.0";
+    sha256 = "1qngywcmm0y7nl8h3n8brvkxq4jw63szbci3kc1q6a6ndhycbbvr";
+    version = "9.1";
     patches = [ ./getent.patch ];
   };
 
   getconf = mkDerivation {
     path = "usr.bin/getconf";
     sha256 = "122vslz4j3h2mfs921nr2s6m078zcj697yrb75rwp2hnw3qz4s8q";
-    version = "8.0";
+    version = "9.1";
   };
 
   locale = mkDerivation {
     path = "usr.bin/locale";
-    version = "8.0";
+    version = "9.1";
     sha256 = "0kk6v9k2bygq0wf9gbinliqzqpzs9bgxn0ndyl2wcv3hh2bmsr9p";
     patches = [ ./locale.patch ];
     NIX_CFLAGS_COMPILE = "-DYESSTR=__YESSTR -DNOSTR=__NOSTR";
@@ -392,31 +395,31 @@ in lib.makeScopeWithSplicing
 
   rpcgen = mkDerivation {
     path = "usr.bin/rpcgen";
-    version = "8.0";
+    version = "9.1";
     sha256 = "1kfgfx54jg98wbg0d95p0rvf4w0302v8fz724b0bdackdsrd4988";
   };
 
   genassym = mkDerivation {
     path = "usr.bin/genassym";
-    version = "8.0";
+    version = "9.1";
     sha256 = "1acl1dz5kvh9h5806vkz2ap95rdsz7phmynh5i3x5y7agbki030c";
   };
 
   gencat = mkDerivation {
     path = "usr.bin/gencat";
-    version = "8.0";
-    sha256 = "1696lgh2lhz93247lklvpvkd0f5asg6z27w2g4bmpfijlgw2h698";
+    version = "9.1";
+    sha256 = "0gd463x1hg36bhr7y0xryb5jyxk0z0g7xvy8rgk82nlbnlnsbbwb";
   };
 
   nbperf = mkDerivation {
     path = "usr.bin/nbperf";
-    version = "8.0";
-    sha256 = "0gzm0zv2400lasnsswnjw9bwzyizhxzdbrcjwcl1k65aj86aqyqb";
+    version = "9.1";
+    sha256 = "1nxc302vgmjhm3yqdivqyfzslrg0vjpbss44s74rcryrl19mma9r";
   };
 
   tic = mkDerivation {
     path = "tools/tic";
-    version = "8.0";
+    version = "9.1";
     sha256 = "092y7db7k4kh2jq8qc55126r5qqvlb8lq8mhmy5ipbi36hwb4zrz";
     HOSTPROG = "tic";
     buildInputs = with self; compatIfNeeded;
@@ -428,29 +431,29 @@ in lib.makeScopeWithSplicing
     makeFlags = [ "TOOLDIR=$(out)" ];
     extraPaths = with self; [
       libterminfo.src
-      (fetchNetBSD "usr.bin/tic" "8.0" "0diirnzmdnpc5bixyb34c9rid9paw2a4zfczqrpqrfvjsf1nnljf")
-      (fetchNetBSD "tools/Makefile.host" "8.0" "1p23dsc4qrv93vc6gzid9w2479jwswry9qfn88505s0pdd7h6nvp")
+      (fetchNetBSD "usr.bin/tic" "9.1" "1mwdfg7yx1g43ss378qsgl5rqhsxskqvsd2mqvrn38qw54i8v5i1")
+      (fetchNetBSD "tools/Makefile.host" "9.1" "15b4ab0n36lqj00j5lz2xs83g7l8isk3wx1wcapbrn66qmzz2sxy")
     ];
   };
 
   uudecode = mkDerivation {
     path = "usr.bin/uudecode";
-    version = "8.0";
+    version = "9.1";
     sha256 = "00a3zmh15pg4vx6hz0kaa5mi8d2b1sj4h512d7p6wbvxq6mznwcn";
     NIX_CFLAGS_COMPILE = lib.optional stdenv.isLinux "-DNO_BASE64";
   };
 
   cksum = mkDerivation {
     path = "usr.bin/cksum";
-    version = "8.0";
-    sha256 = "0327820171djn9dzb2q1arypxw2zsxiixnd1ahy34dagd9cwcphj";
+    version = "9.1";
+    sha256 = "0msfhgyvh5c2jmc6qjnf12c378dhw32ffsl864qz4rdb2b98rfcq";
     meta.platforms = lib.platforms.netbsd;
   };
 
   config = mkDerivation {
     path = "usr.bin/config";
-    version = "8.0";
-    sha256 = "0piyn8lgdqxwz9wkgc2plzp2xpj93fs4xncri8l0jfas9rv5j2m5";
+    version = "9.1";
+    sha256 = "08mqq0izd9550dwk181smni51cbiim7rwp208phf25c4mqzaznf4";
     NIX_CFLAGS_COMPILE = [ "-DMAKE_BOOTSTRAP" ];
     nativeBuildInputs = with buildPackages.netbsd; [
       bsdSetupHook
@@ -468,8 +471,8 @@ in lib.makeScopeWithSplicing
   ##
   include = mkDerivation {
     path = "include";
-    version = "8.0";
-    sha256 = "128m77k16i7frvk8kifhmxzk7a37m7z1s0bbmja3ywga6sx6v6sq";
+    version = "9.1";
+    sha256 = "127kj61prvj3klc2an5rpgavgah2g6igfgprl45255i264wyg8v3";
     nativeBuildInputs = with buildPackages.netbsd; [
       bsdSetupHook
       makeMinimal
@@ -482,13 +485,17 @@ in lib.makeScopeWithSplicing
     makeFlags = [ "RPCGEN_CPP=${buildPackages.stdenv.cc.cc}/bin/cpp" ];
   };
 
-  common = fetchNetBSD "common" "8.0" "1fsm2b7p7zkhiz523jw75088cq2h39iknp0fp3di9a64bikwbhi1";
+  common = fetchNetBSD "common" "9.1" "000n9frjm02h1bdwhb9rbr7wphs8vrj7n09l3v9hhnqrkn7nhy30";
 
   sys-headers = mkDerivation {
     pname = "sys-headers";
     path = "sys";
-    version = "8.0";
-    sha256 = "123ilg8fqmp69bw6bs6nh98fpi1v2n9lamrzar61p27ji6sj7g0w";
+    version = "9.1";
+    sha256 = "03sv6d7nvnkas4m5z87zxh1rpmggr91ls7di88fwc3cwd3mg3iyx";
+
+    # Fix this error when building bootia32.efi and bootx64.efi:
+    # error: PHDR segment not covered by LOAD segment
+    patches = [ ./no-dynamic-linker.patch ];
 
     CONFIG = "GENERIC";
 
@@ -536,7 +543,7 @@ in lib.makeScopeWithSplicing
   };
 
   headers = symlinkJoin {
-    name = "netbsd-headers-8.0";
+    name = "netbsd-headers-9.1";
     paths = with self; [
       include
       sys-headers
@@ -553,8 +560,8 @@ in lib.makeScopeWithSplicing
   ##
   libutil = mkDerivation {
     path = "lib/libutil";
-    version = "8.0";
-    sha256 = "077syyxd303m4x7avs5nxzk4c9n13d5lyk5aicsacqjvx79qrk3i";
+    version = "9.1";
+    sha256 = "02gm5a5zhh8qp5r5q5r7x8x6x50ir1i0ncgsnfwh1vnrz6mxbq7z";
     extraPaths = with self; [ common libc.src sys.src ];
     nativeBuildInputs = with buildPackages.netbsd; [
       bsdSetupHook
@@ -567,8 +574,8 @@ in lib.makeScopeWithSplicing
 
   libedit = mkDerivation {
     path = "lib/libedit";
-    version = "8.0";
-    sha256 = "0pmqh2mkfp70bwchiwyrkdyq9jcihx12g1awd6alqi9bpr3f9xmd";
+    version = "9.1";
+    sha256 = "1wqhngraxwqk4jgrf5f18jy195yrp7c06n1gf31pbplq79mg1bcj";
     buildInputs = with self; [ libterminfo libcurses ];
     propagatedBuildInputs = with self; compatIfNeeded;
     SHLIBINSTALLDIR = "$(out)/lib";
@@ -588,8 +595,8 @@ in lib.makeScopeWithSplicing
 
   libterminfo = mkDerivation {
     path = "lib/libterminfo";
-    version = "8.0";
-    sha256 = "14gp0d6fh6zjnbac2yjhyq5m6rca7gm6q1s9gilhzpdgl9m7vb9r";
+    version = "9.1";
+    sha256 = "0pq05k3dj0dfsczv07frnnji92mazmy2qqngqbx2zgqc1x251414";
     nativeBuildInputs = with buildPackages.netbsd; [
       bsdSetupHook
       makeMinimal install tsort lorder mandoc statHook nbperf tic
@@ -608,14 +615,14 @@ in lib.makeScopeWithSplicing
       make -C $BSDSRCDIR/share/terminfo $makeFlags BINDIR=$out/share install
     '';
     extraPaths = with self; [
-      (fetchNetBSD "share/terminfo" "8.0" "18db0fk1dw691vk6lsm6dksm4cf08g8kdm0gc4052ysdagg2m6sm")
+      (fetchNetBSD "share/terminfo" "9.1" "1vh9rl4w8118a9qdpblfxmv1wkpm83rm9gb4rzz5bpm56i6d7kk7")
     ];
   };
 
   libcurses = mkDerivation {
     path = "lib/libcurses";
-    version = "8.0";
-    sha256 = "0azhzh1910v24dqx45zmh4z4dl63fgsykajrbikx5xfvvmkcq7xs";
+    version = "9.1";
+    sha256 = "0pd0dggl3w4bv5i5h0s1wrc8hr66n4hkv3zlklarwfdhc692fqal";
     buildInputs = with self; [ libterminfo ];
     NIX_CFLAGS_COMPILE = [
       "-D__scanflike(a,b)="
@@ -636,21 +643,21 @@ in lib.makeScopeWithSplicing
 
   column = mkDerivation {
     path = "usr.bin/column";
-    version = "8.0";
+    version = "9.1";
     sha256 = "0r6b0hjn5ls3j3sv6chibs44fs32yyk2cg8kh70kb4cwajs4ifyl";
   };
 
   libossaudio = mkDerivation {
     path = "lib/libossaudio";
-    version = "8.0";
-    sha256 = "03azp5anavhjr15sinjlik9792lyf7w4zmkcihlkksrywhs05axh";
+    version = "9.1";
+    sha256 = "16l3bfy6dcwqnklvh3x0ps8ld1y504vf57v9rx8f9adzhb797jh0";
     meta.platforms = lib.platforms.netbsd;
   };
 
   librpcsvc = mkDerivation {
     path = "lib/librpcsvc";
-    version = "8.0";
-    sha256 = "14ri9w6gdhsm4id5ck133syyvbmkbknfa8w0xkklm726nskhfkj7";
+    version = "9.1";
+    sha256 = "1q34pfiyjbrgrdqm46jwrsqms49ly6z3b0xh1wg331zga900vq5n";
     makeFlags = [ "INCSDIR=$(out)/include/rpcsvc" ];
     meta.platforms = lib.platforms.netbsd;
     nativeBuildInputs = with buildPackages.netbsd; [
@@ -662,10 +669,10 @@ in lib.makeScopeWithSplicing
 
   librt = mkDerivation {
     path = "lib/librt";
-    version = "8.0";
-    sha256 = "078qsi4mg1hyyxr1awvjs9b0c2gicg3zw4vl603g1m9vm8gfxw9l";
+    version = "9.1";
+    sha256 = "07f8mpjcqh5kig5z5sp97fg55mc4dz6aa1x5g01nv2pvbmqczxc6";
     meta.platforms = lib.platforms.netbsd;
-    extraPaths = with self; [ common libc.src ];
+    extraPaths = with self; [ libc.src ] ++ libc.extraPaths;
     postPatch = ''
       sed -i 's,/usr\(/include/sys/syscall.h\),${self.headers}\1,g' \
         $BSDSRCDIR/lib/{libc,librt}/sys/Makefile.inc
@@ -674,7 +681,7 @@ in lib.makeScopeWithSplicing
 
   libcrypt = mkDerivation {
     path = "lib/libcrypt";
-    version = "8.0";
+    version = "9.1";
     sha256 = "0siqan1wdqmmhchh2n8w6a8x1abbff8n4yb6jrqxap3hqn8ay54g";
     SHLIBINSTALLDIR = "$(out)/lib";
     meta.platforms = lib.platforms.netbsd;
@@ -683,8 +690,8 @@ in lib.makeScopeWithSplicing
   libpthread-headers = mkDerivation {
     pname = "libpthread-headers";
     path = "lib/libpthread";
-    version = "8.0";
-    sha256 = "0pcz61klc3ijf5z2zf8s78nj7bwjfblzjllx7vr4z5qv3m0sdb3j";
+    version = "9.1";
+    sha256 = "0mlmc31k509dwfmx5s2x010wxjc44mr6y0cbmk30cfipqh8c962h";
     installPhase = "includesPhase";
     dontBuild = true;
     noCC = true;
@@ -697,21 +704,22 @@ in lib.makeScopeWithSplicing
     noCC = false;
     dontBuild = false;
     buildInputs = with self; [ headers ];
-    extraPaths = with self; [ common libc.src sys.src ];
+    SHLIBINSTALLDIR = "$(out)/lib";
+    extraPaths = with self; [ common libc.src librt.src sys.src ];
   };
 
   libresolv = mkDerivation {
     path = "lib/libresolv";
-    version = "8.0";
-    sha256 = "11vpb3p2343wyrhw4v9gwz7i0lcpb9ysmfs9gsx56b5gkgipdy4v";
+    version = "9.1";
+    sha256 = "1am74s74mf1ynwz3p4ncjkg63f78a1zjm983q166x4sgzps15626";
     meta.platforms = lib.platforms.netbsd;
     extraPaths = with self; [ libc.src ];
   };
 
   libm = mkDerivation {
     path = "lib/libm";
-    version = "8.0";
-    sha256 = "0i22603cgj6n00gn2m446v4kn1pk109qs1g6ylrslmihfmiy2h1d";
+    version = "9.1";
+    sha256 = "1apwfr26shdmbqqnmg7hxf7bkfxw44ynqnnnghrww9bnhqdnsy92";
     SHLIBINSTALLDIR = "$(out)/lib";
     meta.platforms = lib.platforms.netbsd;
     extraPaths = with self; [ sys.src ];
@@ -719,7 +727,7 @@ in lib.makeScopeWithSplicing
 
   i18n_module = mkDerivation {
     path = "lib/i18n_module";
-    version = "8.0";
+    version = "9.1";
     sha256 = "0w6y5v3binm7gf2kn7y9jja8k18rhnyl55cvvfnfipjqdxvxd9jd";
     meta.platforms = lib.platforms.netbsd;
     extraPaths = with self; [ libc.src ];
@@ -727,8 +735,8 @@ in lib.makeScopeWithSplicing
 
   csu = mkDerivation {
     path = "lib/csu";
-    version = "8.0";
-    sha256 = "0630lbvz6v4ic13bfg8ccwfhqkgcv76bfdw9f36rfsnwfgpxqsmq";
+    version = "9.1";
+    sha256 = "0al5jfazvhlzn9hvmnrbchx4d0gm282hq5gp4xs2zmj9ycmf6d03";
     meta.platforms = lib.platforms.netbsd;
     nativeBuildInputs = with buildPackages.netbsd; [
       bsdSetupHook
@@ -742,8 +750,8 @@ in lib.makeScopeWithSplicing
 
   ld_elf_so = mkDerivation {
     path  = "libexec/ld.elf_so";
-    version = "8.0";
-    sha256 = "1jmqpi0kg2daiqnvpwdyfy8rpnszxsm70sxizz0r7wn53xjr5hva";
+    version = "9.1";
+    sha256 = "0ia9mqzdljly0vqfwflm5mzz55k7qsr4rw2bzhivky6k30vgirqa";
     meta.platforms = lib.platforms.netbsd;
     LIBC_PIC = "${stdenv.cc.libc}/lib/libc_pic.a";
     # Hack to prevent a symlink being installed here for compatibility.
@@ -753,16 +761,20 @@ in lib.makeScopeWithSplicing
     extraPaths = with self; [ libc.src ] ++ libc.extraPaths;
   };
 
+  _mainLibcExtraPaths = with self; [
+      common i18n_module.src sys.src
+      ld_elf_so.src libpthread.src libm.src libresolv.src
+      librpcsvc.src libutil.src librt.src libcrypt.src
+  ];
+
   libc = mkDerivation {
     path = "lib/libc";
-    version = "8.0";
-    sha256 = "0lgbc58qgn8kwm3l011x1ml1kgcf7jsgq7hbf0hxhlbvxq5bljl3";
+    version = "9.1";
+    sha256 = "0jg6kpi1xn4wvlqpwnkcv8655hxi0nhcxbk8lzbj7mlr6srxci8j";
     USE_FORT = "yes";
     MKPROFILE = "no";
-    extraPaths = with self; [
-      common i18n_module.src sys.src
-      ld_elf_so.src libpthread.src libm.src libresolv.src
-      librpcsvc.src libutil.src librt.src libcrypt.src
+    extraPaths = with self; _mainLibcExtraPaths ++ [
+      (fetchNetBSD "external/bsd/jemalloc" "9.1" "0cq704swa0h2yxv4gc79z2lwxibk9k7pxh3q5qfs7axx3jx3n8kb")
     ];
     nativeBuildInputs = with buildPackages.netbsd; [
       bsdSetupHook
@@ -774,6 +786,7 @@ in lib.makeScopeWithSplicing
     NIX_CFLAGS_COMPILE = "-B${self.csu}/lib";
     meta.platforms = lib.platforms.netbsd;
     SHLIBINSTALLDIR = "$(out)/lib";
+    MKPICINSTALL = "yes";
     NLSDIR = "$(out)/share/nls";
     makeFlags = [ "FILESDIR=$(out)/var/db"];
     postInstall = ''
@@ -827,24 +840,24 @@ in lib.makeScopeWithSplicing
   dict = mkDerivation {
     path = "share/dict";
     noCC = true;
-    version = "8.0";
-    sha256 = "1pk0y3xc5ihc2k89wjkh33qqx3w9q34k03k2qcffvbqh1l6wm36l";
+    version = "9.1";
+    sha256 = "0svfc0byk59ri37pyjslv4c4rc7zw396r73mr593i78d39q5g3ad";
     makeFlags = [ "BINDIR=$(out)/share" ];
   };
 
   misc = mkDerivation {
     path = "share/misc";
     noCC = true;
-    version = "8.0";
-    sha256 = "0d34b3irjbqsqfk8v8aaj36fjyvwyx410igl26jcx2ryh3ispch8";
+    version = "9.1";
+    sha256 = "1j2cdssdx6nncv8ffj7f7ybl7m9hadjj8vm8611skqdvxnjg6nbc";
     makeFlags = [ "BINDIR=$(out)/share" ];
   };
 
   man = mkDerivation {
     path = "share/man";
     noCC = true;
-    version = "8.0";
-    sha256 = "0yp48syf3y5psm0mymxp6va6spym5izjym0ybr628iqwji21cqdz";
+    version = "9.1";
+    sha256 = "14sfvz9a5x0kmr9ywsdz09jhw8r1cmhq45wrrz2xwy09b8ykhip6";
     makeFlags = [ "FILESDIR=$(out)/share" ];
   };
   #
diff --git a/pkgs/os-specific/bsd/netbsd/no-dynamic-linker.patch b/pkgs/os-specific/bsd/netbsd/no-dynamic-linker.patch
new file mode 100644
index 00000000000..5a2b9092a5c
--- /dev/null
+++ b/pkgs/os-specific/bsd/netbsd/no-dynamic-linker.patch
@@ -0,0 +1,16 @@
+===================================================================
+RCS file: /ftp/cvs/cvsroot/src/sys/arch/i386/stand/efiboot/Makefile.efiboot,v
+rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/i386/stand/efiboot/Makefile.efiboot,v: warning: Unknown phrases like `commitid ...;' are present.
+retrieving revision 1.16
+retrieving revision 1.17
+diff -u -p -r1.16 -r1.17
+--- sys/arch/i386/stand/efiboot/Makefile.efiboot	2019/09/13 02:19:45	1.16
++++ sys/arch/i386/stand/efiboot/Makefile.efiboot	2020/04/04 15:30:46	1.17
+@@ -41,6 +41,7 @@ BINMODE=444
+ .PATH:	${.CURDIR}/../../libsa
+ 
+ LDSCRIPT?= ${.CURDIR}/ldscript
++LDFLAGS+= --no-dynamic-linker --noinhibit-exec
+ LDFLAGS+= -nostdlib -T${LDSCRIPT} -Bsymbolic -shared -nocombreloc
+ CPPFLAGS+= -I$S -I${.CURDIR} -I${.CURDIR}/.. -I$S/lib/libsa
+ CPPFLAGS+= -I${.OBJDIR}
diff --git a/pkgs/os-specific/darwin/DarwinTools/default.nix b/pkgs/os-specific/darwin/DarwinTools/default.nix
index 5badf2434d6..588769c7bfc 100644
--- a/pkgs/os-specific/darwin/DarwinTools/default.nix
+++ b/pkgs/os-specific/darwin/DarwinTools/default.nix
@@ -8,7 +8,11 @@ stdenv.mkDerivation rec {
     sha256 = "0hh4jl590jv3v830p77r3jcrnpndy7p2b8ajai3ldpnx2913jfhp";
   };
 
-  patchPhase = ''
+  patches = [
+    ./sw_vers-CFPriv.patch
+  ];
+
+  postPatch = ''
     substituteInPlace Makefile \
       --replace gcc cc
   '';
diff --git a/pkgs/os-specific/darwin/DarwinTools/sw_vers-CFPriv.patch b/pkgs/os-specific/darwin/DarwinTools/sw_vers-CFPriv.patch
new file mode 100644
index 00000000000..6faeaa75025
--- /dev/null
+++ b/pkgs/os-specific/darwin/DarwinTools/sw_vers-CFPriv.patch
@@ -0,0 +1,19 @@
+--- a/sw_vers.c	2021-04-19 13:06:50.131346864 +0900
++++ b/sw_vers.c	2021-04-19 13:07:32.481967474 +0900
+@@ -28,7 +28,15 @@
+  */
+ 
+ #include <CoreFoundation/CoreFoundation.h>
+-#include <CoreFoundation/CFPriv.h>
++
++// Avoid dependency on CoreFoundation/CFPriv, which no longer appears to be
++// part of the upstream sdk.
++
++CFDictionaryRef _CFCopyServerVersionDictionary(void);
++CFDictionaryRef _CFCopySystemVersionDictionary(void);
++extern CFStringRef _kCFSystemVersionProductNameKey;
++extern CFStringRef _kCFSystemVersionProductVersionKey;
++extern CFStringRef _kCFSystemVersionBuildVersionKey;
+ 
+ void usage(char *progname) {
+ 	fprintf(stderr, "Usage: %s [-productName|-productVersion|-buildVersion]\n", progname);
diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix
new file mode 100644
index 00000000000..a4242405b41
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix
@@ -0,0 +1,151 @@
+{ lib, stdenvNoCC, buildPackages, fetchurl, xar, cpio, pkgs, python3, pbzx, MacOSX-SDK }:
+
+# TODO: reorganize to make this just frameworks, and move libs to default.nix
+
+let
+  stdenv = stdenvNoCC;
+
+  standardFrameworkPath = name: private:
+    "/System/Library/${lib.optionalString private "Private"}Frameworks/${name}.framework";
+
+  mkDepsRewrites = deps:
+  let
+    mergeRewrites = x: y: {
+      prefix = lib.mergeAttrs (x.prefix or {}) (y.prefix or {});
+      const = lib.mergeAttrs (x.const or {}) (y.const or {});
+    };
+
+    rewriteArgs = { prefix ? {}, const ? {} }: lib.concatLists (
+      (lib.mapAttrsToList (from: to: [ "-p" "${from}:${to}" ]) prefix) ++
+      (lib.mapAttrsToList (from: to: [ "-c" "${from}:${to}" ]) const)
+    );
+
+    rewrites = depList: lib.fold mergeRewrites {}
+      (map (dep: dep.tbdRewrites)
+        (lib.filter (dep: dep ? tbdRewrites) depList));
+  in
+    lib.escapeShellArgs (rewriteArgs (rewrites (builtins.attrValues deps)));
+
+  mkFramework = { name, deps, private ? false }:
+    let self = stdenv.mkDerivation {
+      pname = "apple-${lib.optionalString private "private-"}framework-${name}";
+      version = MacOSX-SDK.version;
+
+      dontUnpack = true;
+
+      # because we copy files from the system
+      preferLocalBuild = true;
+
+      disallowedRequisites = [ MacOSX-SDK ];
+
+      nativeBuildInputs = [ buildPackages.darwin.rewrite-tbd ];
+
+      installPhase = ''
+        mkdir -p $out/Library/Frameworks
+
+        cp -r ${MacOSX-SDK}${standardFrameworkPath name private} $out/Library/Frameworks
+
+        # Fix and check tbd re-export references
+        chmod u+w -R $out
+        find $out -name '*.tbd' -type f | while read tbd; do
+          echo "Fixing re-exports in $tbd"
+          rewrite-tbd \
+            -p ${standardFrameworkPath name private}/:$out/Library/Frameworks/${name}.framework/ \
+            ${mkDepsRewrites deps} \
+            -r ${builtins.storeDir} \
+            "$tbd"
+        done
+      '';
+
+      propagatedBuildInputs = builtins.attrValues deps;
+
+      passthru = {
+        tbdRewrites = {
+          prefix."${standardFrameworkPath name private}/" = "${self}/Library/Frameworks/${name}.framework/";
+        };
+      };
+
+      meta = with lib; {
+        description = "Apple SDK framework ${name}";
+        maintainers = with maintainers; [ copumpkin ];
+        platforms   = platforms.darwin;
+      };
+    };
+  in self;
+
+  framework = name: deps: mkFramework { inherit name deps; private = false; };
+  privateFramework = name: deps: mkFramework { inherit name deps; private = true; };
+in rec {
+  libs = {
+    xpc = stdenv.mkDerivation {
+      name   = "apple-lib-xpc";
+      dontUnpack = true;
+
+      installPhase = ''
+        mkdir -p $out/include
+        pushd $out/include >/dev/null
+        cp -r "${MacOSX-SDK}/usr/include/xpc" $out/include/xpc
+        cp "${MacOSX-SDK}/usr/include/launch.h" $out/include/launch.h
+        popd >/dev/null
+      '';
+    };
+
+    Xplugin = stdenv.mkDerivation {
+      name   = "apple-lib-Xplugin";
+      dontUnpack = true;
+
+      propagatedBuildInputs = with frameworks; [
+        OpenGL ApplicationServices Carbon IOKit CoreGraphics CoreServices CoreText
+      ];
+
+      installPhase = ''
+        mkdir -p $out/include $out/lib
+        ln -s "${MacOSX-SDK}/include/Xplugin.h" $out/include/Xplugin.h
+        cp ${MacOSX-SDK}/usr/lib/libXplugin.1.tbd $out/lib
+        ln -s libXplugin.1.tbd $out/lib/libXplugin.tbd
+      '';
+    };
+
+    utmp = stdenv.mkDerivation {
+      name   = "apple-lib-utmp";
+      dontUnpack = true;
+
+      installPhase = ''
+        mkdir -p $out/include
+        pushd $out/include >/dev/null
+        ln -s "${MacOSX-SDK}/include/utmp.h"
+        ln -s "${MacOSX-SDK}/include/utmpx.h"
+        popd >/dev/null
+      '';
+    };
+
+    libDER = stdenv.mkDerivation {
+      name = "apple-lib-libDER";
+      dontUnpack = true;
+      installPhase = ''
+        mkdir -p $out/include
+        cp -r ${MacOSX-SDK}/usr/include/libDER $out/include
+      '';
+    };
+  };
+
+  overrides = super: {
+    CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: {
+      setupHook = ./cf-setup-hook.sh;
+    });
+  };
+
+  bareFrameworks = (
+    lib.mapAttrs framework (import ./frameworks.nix {
+      inherit frameworks libs;
+      inherit (pkgs.darwin) libobjc Libsystem;
+      inherit (pkgs.darwin.apple_sdk) libnetwork;
+    })
+  ) // (
+    lib.mapAttrs privateFramework (import ./private-frameworks.nix {
+      inherit frameworks;
+    })
+  );
+
+  frameworks = bareFrameworks // overrides bareFrameworks;
+}
diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh
new file mode 100644
index 00000000000..3b08c51d196
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh
@@ -0,0 +1,6 @@
+forceLinkCoreFoundationFramework() {
+  NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks${NIX_CFLAGS_COMPILE:+ }${NIX_CFLAGS_COMPILE-}"
+  NIX_LDFLAGS+=" @out@/Library/Frameworks/CoreFoundation.framework/CoreFoundation"
+}
+
+preConfigureHooks+=(forceLinkCoreFoundationFramework)
diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix
new file mode 100644
index 00000000000..03a6650d9d9
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix
@@ -0,0 +1,58 @@
+{ stdenvNoCC, fetchurl, newScope, pkgs
+, xar, cpio, python3, pbzx }:
+
+let
+  MacOSX-SDK = stdenvNoCC.mkDerivation rec {
+    pname = "MacOSX-SDK";
+    version = "11.0.0";
+
+    # https://swscan.apple.com/content/catalogs/others/index-10.16.merged-1.sucatalog
+    src = fetchurl {
+      url = "http://swcdn.apple.com/content/downloads/58/37/001-75138-A_59RXKDS8YM/12ksm19hgzscfc7cau3yhecz4vpkps7wbq/CLTools_macOSNMOS_SDK.pkg";
+      sha256 = "0n51ba926ckwm62w5c8lk3w5hj4ihk0p5j02321qi75wh824hl8m";
+    };
+
+    dontBuild = true;
+    darwinDontCodeSign = true;
+
+    nativeBuildInputs = [ cpio pbzx ];
+
+    outputs = [ "out" ];
+
+    unpackPhase = ''
+      pbzx $src | cpio -idm
+    '';
+
+    installPhase = ''
+      cd Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
+
+      mkdir $out
+      cp -r System usr $out/
+    '';
+
+    passthru = {
+      inherit version;
+    };
+  };
+
+  callPackage = newScope (packages // pkgs.darwin // { inherit MacOSX-SDK; });
+
+  packages = {
+    inherit (callPackage ./apple_sdk.nix {}) frameworks libs;
+
+    # TODO: this is nice to be private. is it worth the callPackage above?
+    # Probably, I don't think that callPackage costs much at all.
+    inherit MacOSX-SDK;
+
+    Libsystem = callPackage ./libSystem.nix {};
+    LibsystemCross = pkgs.darwin.Libsystem;
+    libcharset = callPackage ./libcharset.nix {};
+    libunwind = callPackage ./libunwind.nix {};
+    libnetwork = callPackage ./libnetwork.nix {};
+    objc4 = callPackage ./libobjc.nix {};
+
+    # questionable aliases
+    configd = pkgs.darwin.apple_sdk.frameworks.SystemConfiguration;
+    IOKit = pkgs.darwin.apple_sdk.frameworks.IOKit;
+  };
+in packages
diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix
new file mode 100644
index 00000000000..c8f8ccc4a08
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix
@@ -0,0 +1,193 @@
+{ frameworks, libs, libobjc, Libsystem, libnetwork }: with frameworks; with libs;
+{
+  AGL                              = { inherit Carbon OpenGL; };
+  AVFoundation                     = { inherit ApplicationServices AVFCapture AVFCore CoreGraphics; };
+  AVKit                            = {};
+  Accelerate                       = { inherit CoreWLAN IOBluetooth; };
+  Accessibility                    = {};
+  Accounts                         = {};
+  AdSupport                        = {};
+  AddressBook                      = { inherit AddressBookCore Carbon ContactsPersistence libobjc; };
+  AppKit                           = { inherit ApplicationServices AudioToolbox AudioUnit Foundation QuartzCore UIFoundation; };
+  AppTrackingTransparency          = {};
+  AppleScriptKit                   = {};
+  AppleScriptObjC                  = {};
+  ApplicationServices              = { inherit ColorSync CoreGraphics CoreServices CoreText ImageIO; };
+  AudioToolbox                     = { inherit AudioToolboxCore CoreAudio CoreMIDI; };
+  AudioUnit                        = { inherit AudioToolbox Carbon CoreAudio; };
+  AudioVideoBridging               = { inherit Foundation; };
+  AuthenticationServices           = {};
+  AutomaticAssessmentConfiguration = {};
+  Automator                        = {};
+  BackgroundTasks                  = {};
+  BusinessChat                     = {};
+  CFNetwork                        = {};
+  CalendarStore                    = {};
+  CallKit                          = {};
+  Carbon                           = { inherit ApplicationServices CoreServices Foundation IOKit QuartzCore Security libobjc; };
+  ClassKit                         = {};
+  CloudKit                         = { inherit CoreLocation; };
+  Cocoa                            = { inherit AppKit CoreData; };
+  Collaboration                    = {};
+  ColorSync                        = {};
+  Combine                          = {};
+  Contacts                         = {};
+  ContactsUI                       = {};
+  CoreAudio                        = { inherit IOKit CoreAudioTypes; };
+  CoreAudioKit                     = { inherit AudioUnit; };
+  CoreAudioTypes                   = {};
+  CoreBluetooth                    = {};
+  CoreData                         = { inherit CloudKit; };
+  CoreDisplay                      = {};
+  CoreFoundation                   = { inherit libobjc; };
+  CoreGraphics                     = { inherit Accelerate IOKit IOSurface SystemConfiguration; };
+  CoreHaptics                      = {};
+  CoreImage                        = {};
+  CoreLocation                     = {};
+  CoreMIDI                         = {};
+  CoreMIDIServer                   = { inherit CoreMIDI; };
+  CoreML                           = {};
+  CoreMedia                        = { inherit ApplicationServices AudioToolbox AudioUnit CoreAudio CoreGraphics CoreVideo; };
+  CoreMediaIO                      = { inherit CoreMedia; };
+  CoreMotion                       = {};
+  CoreServices                     = { inherit CFNetwork CoreAudio CoreData CoreFoundation DiskArbitration NetFS OpenDirectory Security ServiceManagement; };
+  CoreSpotlight                    = {};
+  CoreTelephony                    = {};
+  CoreText                         = { inherit CoreGraphics; };
+  CoreVideo                        = { inherit ApplicationServices CoreGraphics IOSurface OpenGL; };
+  CoreWLAN                         = { inherit SecurityFoundation; };
+  CryptoKit                        = {};
+  CryptoTokenKit                   = {};
+  DVDPlayback                      = {};
+  DeveloperToolsSupport            = {};
+  DeviceCheck                      = {};
+  DirectoryService                 = {};
+  DiscRecording                    = { inherit CoreServices IOKit libobjc; };
+  DiscRecordingUI                  = {};
+  DiskArbitration                  = { inherit IOKit; };
+  DriverKit                        = {};
+  EventKit                         = {};
+  ExceptionHandling                = {};
+  ExecutionPolicy                  = {};
+  ExternalAccessory                = {};
+  FWAUserLib                       = {};
+  FileProvider                     = {};
+  FileProviderUI                   = {};
+  FinderSync                       = {};
+  ForceFeedback                    = { inherit IOKit; };
+  Foundation                       = { inherit ApplicationServices CoreFoundation Security SystemConfiguration libobjc; };
+  GLKit                            = {};
+  GLUT                             = { inherit OpenGL; };
+  GSS                              = {};
+  GameController                   = {};
+  GameKit                          = { inherit Cocoa Foundation GameCenterFoundation GameCenterUI GameCenterUICore GameController GameplayKit Metal MetalKit ModelIO ReplayKit SceneKit SpriteKit; };
+  GameplayKit                      = {};
+  HIDDriverKit                     = {};
+  Hypervisor                       = {};
+  ICADevices                       = { inherit Carbon IOBluetooth libobjc; };
+  IMServicePlugIn                  = {};
+  IOBluetooth                      = { inherit CoreBluetooth IOKit; };
+  IOBluetoothUI                    = { inherit IOBluetooth; };
+  IOKit                            = {};
+  IOSurface                        = { inherit IOKit xpc; };
+  IOUSBHost                        = {};
+  IdentityLookup                   = {};
+  ImageCaptureCore                 = {};
+  ImageIO                          = { inherit CoreGraphics; };
+  InputMethodKit                   = { inherit Carbon; };
+  InstallerPlugins                 = {};
+  InstantMessage                   = {};
+  Intents                          = {};
+  JavaNativeFoundation             = {};
+  JavaRuntimeSupport               = {};
+  JavaScriptCore                   = { inherit libobjc; };
+  Kerberos                         = {};
+  Kernel                           = { inherit IOKit; };
+  KernelManagement                 = {};
+  LDAP                             = {};
+  LatentSemanticMapping            = { inherit Carbon; };
+  LinkPresentation                 = { inherit URLFormatting; };
+  LocalAuthentication              = {};
+  MLCompute                        = {};
+  MapKit                           = {};
+  MediaAccessibility               = { inherit CoreGraphics CoreText QuartzCore; };
+  MediaLibrary                     = {};
+  MediaPlayer                      = {};
+  MediaToolbox                     = { inherit AudioToolbox AudioUnit CoreMedia; };
+  Message                          = {};
+  Metal                            = {};
+  MetalKit                         = { inherit Metal ModelIO; };
+  MetalPerformanceShaders          = {};
+  MetalPerformanceShadersGraph     = {};
+  MetricKit                        = { inherit SignpostMetrics; };
+  ModelIO                          = {};
+  MultipeerConnectivity            = {};
+  NaturalLanguage                  = {};
+  NearbyInteraction                = {};
+  NetFS                            = {};
+  Network                          = { inherit libnetwork; };
+  NetworkExtension                 = { inherit Network; };
+  NetworkingDriverKit              = {};
+  NotificationCenter               = {};
+  OSAKit                           = { inherit Carbon; };
+  OSLog                            = {};
+  OpenAL                           = {};
+  OpenCL                           = { inherit IOSurface OpenGL; };
+  OpenDirectory                    = {};
+  OpenGL                           = {};
+  PCIDriverKit                     = {};
+  PCSC                             = { inherit CoreData; };
+  PDFKit                           = {};
+  ParavirtualizedGraphics          = {};
+  PassKit                          = { inherit PassKitCore; };
+  PencilKit                        = {};
+  Photos                           = {};
+  PhotosUI                         = {};
+  PreferencePanes                  = {};
+  PushKit                          = {};
+  Python                           = {};
+  QTKit                            = { inherit CoreMedia CoreMediaIO MediaToolbox VideoToolbox; };
+  Quartz                           = { inherit QTKit QuartzCore QuickLook PDFKit; };
+  QuartzCore                       = { inherit ApplicationServices CoreImage CoreVideo Metal OpenCL libobjc; };
+  QuickLook                        = { inherit ApplicationServices; };
+  QuickLookThumbnailing            = {};
+  RealityKit                       = {};
+  ReplayKit                        = {};
+  Ruby                             = {};
+  SafariServices                   = {};
+  SceneKit                         = {};
+  ScreenSaver                      = {};
+  ScreenTime                       = {};
+  ScriptingBridge                  = {};
+  Security                         = { inherit IOKit libDER; };
+  SecurityFoundation               = { inherit Security; };
+  SecurityInterface                = { inherit Security SecurityFoundation; };
+  SensorKit                        = {};
+  ServiceManagement                = { inherit Security; };
+  Social                           = {};
+  SoundAnalysis                    = {};
+  Speech                           = {};
+  SpriteKit                        = {};
+  StoreKit                         = {};
+  SwiftUI                          = {};
+  SyncServices                     = {};
+  System                           = {};
+  SystemConfiguration              = { inherit Security; };
+  SystemExtensions                 = {};
+  TWAIN                            = { inherit Carbon; };
+  Tcl                              = {};
+  Tk                               = {};
+  USBDriverKit                     = {};
+  UniformTypeIdentifiers           = {};
+  UserNotifications                = {};
+  UserNotificationsUI              = {};
+  VideoDecodeAcceleration          = { inherit CoreVideo; };
+  VideoSubscriberAccount           = {};
+  VideoToolbox                     = { inherit CoreMedia CoreVideo; };
+  Virtualization                   = {};
+  Vision                           = {};
+  WebKit                           = { inherit ApplicationServices Carbon JavaScriptCore OpenGL libobjc; };
+  WidgetKit                        = {};
+  iTunesLibrary                    = {};
+  vmnet                            = {};
+}
diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libSystem.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libSystem.nix
new file mode 100644
index 00000000000..f04b964f755
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-sdk-11.0/libSystem.nix
@@ -0,0 +1,78 @@
+{ stdenvNoCC, buildPackages, MacOSX-SDK }:
+
+stdenvNoCC.mkDerivation {
+  pname = "libSystem";
+  version = MacOSX-SDK.version;
+
+  dontBuild = true;
+  dontUnpack = true;
+
+  nativeBuildInputs = [ buildPackages.darwin.rewrite-tbd ];
+
+  includeDirs = [
+    "CommonCrypto" "_types" "architecture" "arpa" "atm" "bank" "bsd" "bsm"
+    "corecrypto" "corpses" "default_pager" "device" "dispatch" "hfs" "i386"
+    "iokit" "kern" "libkern" "mach" "mach-o" "mach_debug" "machine" "malloc"
+    "miscfs" "net" "netinet" "netinet6" "netkey" "nfs" "os" "osfmk" "pexpert"
+    "platform" "protocols" "pthread" "rpc" "rpcsvc" "secure" "security"
+    "servers" "sys" "uuid" "vfs" "voucher" "xlocale"
+  ] ++ [
+    "arm" "xpc" "arm64"
+  ];
+
+  csu = [
+    "bundle1.o" "crt0.o" "crt1.10.5.o" "crt1.10.6.o" "crt1.o" "dylib1.10.5.o"
+    "dylib1.o" "gcrt1.o" "lazydylib1.o"
+  ];
+
+  installPhase = ''
+    mkdir -p $out/{include,lib}
+
+    for dir in $includeDirs; do
+      from=${MacOSX-SDK}/usr/include/$dir
+      if [ -e "$from" ]; then
+        cp -dr $from $out/include
+      else
+        echo "Header directory '$from' doesn't exist: skipping"
+      fi
+    done
+
+    cp -d \
+      ${MacOSX-SDK}/usr/include/*.h \
+      $out/include
+
+    rm $out/include/tk*.h $out/include/tcl*.h
+
+    cp -dr \
+      ${MacOSX-SDK}/usr/lib/libSystem.* \
+      ${MacOSX-SDK}/usr/lib/system \
+      $out/lib
+
+    # Extra libraries
+    for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.1 resolv; do
+      cp -d \
+        ${MacOSX-SDK}/usr/lib/lib$name.tbd \
+        ${MacOSX-SDK}/usr/lib/lib$name.*.tbd \
+        $out/lib
+    done
+
+    for f in $csu; do
+      from=${MacOSX-SDK}/usr/lib/$f
+      if [ -e "$from" ]; then
+        cp -d $from $out/lib
+      else
+        echo "Csu file '$from' doesn't exist: skipping"
+      fi
+    done
+
+    chmod u+w -R $out/lib
+    find $out -name '*.tbd' -type f | while read tbd; do
+      rewrite-tbd \
+        -c /usr/lib/libsystem.dylib:$out/lib/libsystem.dylib \
+        -p /usr/lib/system/:$out/lib/system/ \
+        -r ${builtins.storeDir} \
+        "$tbd"
+    done
+  '';
+}
+
diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libcharset.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libcharset.nix
new file mode 100644
index 00000000000..bf55037ab60
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-sdk-11.0/libcharset.nix
@@ -0,0 +1,16 @@
+{ stdenvNoCC, buildPackages, MacOSX-SDK }:
+
+stdenvNoCC.mkDerivation {
+  pname = "libcharset";
+  version = MacOSX-SDK.version;
+
+  dontUnpack = true;
+  dontBuild = true;
+
+  nativeBuildInputs = [ buildPackages.darwin.checkReexportsHook ];
+
+  installPhase = ''
+    mkdir -p $out/{include,lib}
+    cp ${MacOSX-SDK}/usr/lib/libcharset* $out/lib
+  '';
+}
diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libnetwork.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libnetwork.nix
new file mode 100644
index 00000000000..2e5c0593bf4
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-sdk-11.0/libnetwork.nix
@@ -0,0 +1,20 @@
+{ stdenvNoCC, buildPackages, MacOSX-SDK }:
+
+let self = stdenvNoCC.mkDerivation {
+  pname = "libnetwork";
+  version = MacOSX-SDK.version;
+
+  dontUnpack = true;
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/lib
+    cp ${MacOSX-SDK}/usr/lib/libnetwork* $out/lib
+  '';
+
+  passthru = {
+    tbdRewrites = {
+      const."/usr/lib/libnetwork.dylib" = "${self}/lib/libnetwork.dylib";
+    };
+  };
+}; in self
diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libobjc.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libobjc.nix
new file mode 100644
index 00000000000..63ef2a1c263
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-sdk-11.0/libobjc.nix
@@ -0,0 +1,21 @@
+{ stdenvNoCC, MacOSX-SDK, libcharset }:
+
+let self = stdenvNoCC.mkDerivation {
+  pname = "libobjc";
+  version = MacOSX-SDK.version;
+
+  dontUnpack = true;
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/{include,lib}
+    cp -r ${MacOSX-SDK}/usr/include/objc $out/include
+    cp ${MacOSX-SDK}/usr/lib/libobjc* $out/lib
+  '';
+
+  passthru = {
+    tbdRewrites = {
+      const."/usr/lib/libobjc.A.dylib" = "${self}/lib/libobjc.A.dylib";
+    };
+  };
+}; in self
diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libunwind.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libunwind.nix
new file mode 100644
index 00000000000..885780eba75
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-sdk-11.0/libunwind.nix
@@ -0,0 +1,24 @@
+{ stdenvNoCC, buildPackages, MacOSX-SDK }:
+
+stdenvNoCC.mkDerivation {
+  pname = "libunwind";
+  version = MacOSX-SDK.version;
+
+  dontUnpack = true;
+  dontBuild = true;
+
+  nativeBuildInputs = [ buildPackages.darwin.checkReexportsHook ];
+
+  installPhase = ''
+    mkdir -p $out/include/mach-o
+
+    cp \
+      ${MacOSX-SDK}/usr/include/libunwind.h \
+      ${MacOSX-SDK}/usr/include/unwind.h \
+      $out/include
+
+    cp \
+      ${MacOSX-SDK}/usr/include/mach-o/compact_unwind_encoding.h \
+      $out/include/mach-o
+  '';
+}
diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix
new file mode 100644
index 00000000000..48b373bbd22
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix
@@ -0,0 +1,17 @@
+{ frameworks }: with frameworks;
+# generated by hand to avoid exposing all private frameworks
+# frameworks here are only the necessary ones used by public frameworks.
+{
+  AVFCapture = {};
+  AVFCore = {};
+  AddressBookCore = { inherit ContactsPersistence; };
+  AudioToolboxCore = {};
+  ContactsPersistence = {};
+  UIFoundation = {};
+  GameCenterFoundation = {};
+  GameCenterUI = {};
+  GameCenterUICore = {};
+  URLFormatting = {};
+  SignpostMetrics = {};
+  PassKitCore = {};
+}
diff --git a/pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix
index b53c5985a21..25e1df3773d 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix
@@ -1,6 +1,6 @@
-{ lib, appleDerivation }:
+{ lib, appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   dontBuild = true;
 
   installPhase = ''
diff --git a/pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix
index 476a77c59d7..36013fe307c 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix
@@ -1,6 +1,6 @@
-{ lib, appleDerivation }:
+{ lib, appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   installPhase = ''
     mkdir -p $out/include/CommonCrypto
     cp include/* $out/include/CommonCrypto
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix
index e3b3179d4a3..ac09a282f51 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix
@@ -1,13 +1,14 @@
-{ lib, appleDerivation }:
+{ lib, appleDerivation', stdenv }:
+
+appleDerivation' stdenv {
 
-appleDerivation {
   prePatch = ''
     substituteInPlace Makefile \
       --replace /usr/lib /lib \
       --replace /usr/local/lib /lib \
       --replace /usr/bin "" \
       --replace /bin/ "" \
-      --replace "CC = " "CC = cc #" \
+      --replace "CC = " "#" \
       --replace "SDK_DIR = " "SDK_DIR = . #" \
 
     # Mac OS didn't support rpaths back before 10.5, but we don't care about it.
diff --git a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix
index 032b1447463..cdebfe6d2f7 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix
@@ -1,8 +1,20 @@
-{ appleDerivation, python3 }:
+{ appleDerivation, lib, stdenv, buildPackages, python3 }:
+
+let
+  formatVersionNumeric = version:
+    let
+      versionParts = lib.versions.splitVersion version;
+      major = lib.toInt (lib.elemAt versionParts 0);
+      minor = lib.toInt (lib.elemAt versionParts 1);
+      patch = if lib.length versionParts > 2 then lib.toInt (lib.elemAt versionParts 2) else 0;
+    in toString (major * 10000 + minor * 100 + patch);
+in
 
 appleDerivation {
   nativeBuildInputs = [ python3 ];
 
+  depsBuildBuild = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.stdenv.cc ];
+
   postPatch = ''
     substituteInPlace makefile \
       --replace "/usr/bin/" "" \
@@ -26,6 +38,13 @@ appleDerivation {
       --replace "&TestMailFilterCSS" "NULL"
 
     patchShebangs icuSources
+  '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+
+    # This looks like a bug in the makefile. It defines ENV_BUILDHOST to
+    # propagate the correct value of CC, CXX, etc, but has the following double
+    # expansion that results in the empty string.
+    substituteInPlace makefile \
+      --replace '$($(ENV_BUILDHOST))' '$(ENV_BUILDHOST)'
   '';
 
   # APPLE is using makefile to save its default configuration and call ./configure, so we hack makeFlags
@@ -40,10 +59,21 @@ appleDerivation {
 
     "DATA_INSTALL_DIR=/share/icu/"
     "DATA_LOOKUP_DIR=$(DSTROOT)$(DATA_INSTALL_DIR)"
-
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # darwin* platform properties are only defined on darwin
     # hack to use our lower macos version
-    "MAC_OS_X_VERSION_MIN_REQUIRED=__MAC_OS_X_VERSION_MIN_REQUIRED"
-    "OSX_HOST_VERSION_MIN_STRING=$(MACOSX_DEPLOYMENT_TARGET)"
+    "MAC_OS_X_VERSION_MIN_REQUIRED=${formatVersionNumeric stdenv.hostPlatform.darwinMinVersion}"
+    "ICU_TARGET_VERSION=-m${stdenv.hostPlatform.darwinPlatform}-version-min=${stdenv.hostPlatform.darwinMinVersion}"
+  ]
+  ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "CROSS_BUILD=YES"
+    "BUILD_TYPE="
+    "RC_ARCHS=${stdenv.hostPlatform.darwinArch}"
+    "HOSTCC=cc"
+    "HOSTCXX=c++"
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "CXX=${stdenv.cc.targetPrefix}c++"
+    "HOSTISYSROOT="
+    "OSX_HOST_VERSION_MIN_STRING=${stdenv.buildPlatform.darwinMinVersion}"
   ];
 
   doCheck = true;
diff --git a/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix b/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix
index 0ba61ccb491..085d223bd04 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix
@@ -1,7 +1,7 @@
-{ lib, appleDerivation, IOKitSrcs, xnu, darwin-stubs }:
+{ lib, appleDerivation', stdenv, IOKitSrcs, xnu, darwin-stubs }:
 
 # Someday it'll make sense to split these out into their own packages, but today is not that day.
-appleDerivation {
+appleDerivation' stdenv {
   srcs = lib.attrValues IOKitSrcs;
   sourceRoot = ".";
 
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix
index 29aa3d64cb0..c9202b53658 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix
@@ -1,6 +1,6 @@
-{ appleDerivation, ed, unifdef }:
+{ appleDerivation', stdenvNoCC, ed, unifdef }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   nativeBuildInputs = [ ed unifdef ];
 
   installPhase = ''
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
index 3554a2e15b0..9bec0b103c9 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation, ed, unifdef, Libc_old, Libc_10-9 }:
+{ appleDerivation', stdenvNoCC, ed, unifdef, Libc_old, Libc_10-9 }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   nativeBuildInputs = [ ed unifdef ];
 
   # TODO: asl.h actually comes from syslog project now
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix
index 5481ae74d38..789e536b8a7 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   installPhase = ''
     substituteInPlace xcodescripts/install_files.sh \
       --replace "/usr/local/" "/" \
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix
index df5f6b7b8fd..6e6712f375e 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   installPhase = ''
     mkdir -p $out/include
 
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix
index 2ee80d70264..969e64427c9 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   installPhase = ''
     mkdir -p $out/include
     cp notify.h      $out/include
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
index 2c98dd35e39..cb85566b512 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
@@ -1,9 +1,13 @@
-{ lib, appleDerivation, cpio, xnu, Libc, Libm, libdispatch, cctools, Libinfo
+{ lib, stdenv, buildPackages
+, appleDerivation', cpio, xnu, Libc, Libm, libdispatch, Libinfo
 , dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto
-, copyfile, removefile, libresolv, Libnotify, libplatform, libpthread
-, mDNSResponder, launchd, libutil, hfs, darling, darwin-stubs }:
+, copyfile, removefile, libresolvHeaders, libresolv, Libnotify, libplatform, libpthread
+, mDNSResponder, launchd, libutilHeaders, hfsHeaders, darling, darwin-stubs
+, headersOnly ? false
+, withLibresolv ? !headersOnly
+}:
 
-appleDerivation {
+appleDerivation' stdenv {
   dontBuild = true;
   dontFixup = true;
 
@@ -21,13 +25,13 @@ appleDerivation {
 
     for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} \
                ${libclosure} ${CarbonHeaders} ${libdispatch} ${ncurses.dev} \
-               ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \
+               ${CommonCrypto} ${copyfile} ${removefile} ${libresolvHeaders} \
                ${Libnotify} ${libplatform} ${mDNSResponder} ${launchd} \
-               ${libutil} ${libpthread} ${hfs}; do
+               ${libutilHeaders} ${libpthread} ${hfsHeaders}; do
       (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include)
     done
 
-    (cd ${cctools.dev}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o)
+    (cd ${buildPackages.darwin.cctools.dev}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o)
 
     mkdir -p $out/include/os
 
@@ -84,6 +88,7 @@ appleDerivation {
     #define TARGET_RT_64_BIT        1
     #endif  /* __TARGETCONDITIONALS__ */
     EOF
+  '' + lib.optionalString (!headersOnly) ''
 
     # The startup object files
     cp ${Csu}/lib/* $out/lib
@@ -101,14 +106,15 @@ appleDerivation {
     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.tbd $out/lib/lib$name.tbd
     done
+  '' + lib.optionalString withLibresolv ''
 
     # This probably doesn't belong here, but we want to stay similar to glibc, which includes resolv internally...
     cp ${libresolv}/lib/libresolv.9.dylib $out/lib/libresolv.9.dylib
-    resolv_libSystem=$(otool -L "$out/lib/libresolv.9.dylib" | tail -n +3 | grep -o "$NIX_STORE.*-\S*") || true
+    resolv_libSystem=$(${stdenv.cc.bintools.targetPrefix}otool -L "$out/lib/libresolv.9.dylib" | tail -n +3 | grep -o "$NIX_STORE.*-\S*") || true
     echo $libs
 
     chmod +w $out/lib/libresolv.9.dylib
-    install_name_tool \
+    ${stdenv.cc.bintools.targetPrefix}install_name_tool \
       -id $out/lib/libresolv.9.dylib \
       -change "$resolv_libSystem" /usr/lib/libSystem.dylib \
       $out/lib/libresolv.9.dylib
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix b/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix
index b819057f0c1..bb09adce252 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix
@@ -1,6 +1,6 @@
-{ appleDerivation, darwin-stubs }:
+{ appleDerivation', stdenv, darwin-stubs }:
 
-appleDerivation {
+appleDerivation' stdenv {
   phases = [ "unpackPhase" "installPhase" ];
 
   __propagatedImpureHostDeps = [
diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix
index b4c28e23c14..2ca2d061591 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix
@@ -1,4 +1,4 @@
-{ lib, appleDerivation, fetchzip, bsdmake, perl, flex, bison
+{ lib, stdenv, buildPackages, appleDerivation, fetchzip, bsdmake, perl, flex, bison
 }:
 
 # this derivation sucks
@@ -16,6 +16,7 @@ let recentAdvCmds = fetchzip {
 };
 
 in appleDerivation {
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
   nativeBuildInputs = [ bsdmake perl bison flex ];
   buildInputs = [ flex ];
 
@@ -61,7 +62,7 @@ in appleDerivation {
 
     bsdmake -C usr-share-locale.tproj
 
-    clang ${recentAdvCmds}/ps/*.c -o ps
+    ${stdenv.cc.targetPrefix}clang ${recentAdvCmds}/ps/*.c -o ps
   '';
 
   installPhase = ''
diff --git a/pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix b/pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix
index 74327bc4c42..e0e27255b72 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix
@@ -1,6 +1,6 @@
-{ lib, appleDerivation }:
+{ lib, appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   dontBuild = true;
 
   postPatch = ''
diff --git a/pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix
index 800da92dae9..ff98ed88804 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix
@@ -1,4 +1,13 @@
-{ lib, stdenv, appleDerivation, bison, flex }:
+{ lib, appleDerivation, stdenv, bison, flex }:
+
+let
+
+  # Hard to get CC to pull this off without infinite recursion
+  targetTargetPrefix = lib.optionalString
+    (with stdenv; hostPlatform != targetPlatform)
+    (stdenv.targetPlatform.config + "-");
+
+in
 
 appleDerivation {
   nativeBuildInputs = [ bison flex ];
@@ -12,7 +21,7 @@ appleDerivation {
     yacc -d parser.y
     flex --header-file=lexxer.yy.h -o lexxer.yy.c lexxer.l
 
-    cc -std=gnu99 -Os -dead_strip -DMIG_VERSION=\"$pname-$version\" -I. -o migcom *.c
+    $CC -std=gnu99 -Os -dead_strip -DMIG_VERSION=\"$pname-$version\" -I. -o migcom *.c
   '';
 
   installPhase = ''
@@ -29,6 +38,6 @@ appleDerivation {
       --replace 'arch=`/usr/bin/arch`' 'arch=${stdenv.targetPlatform.darwinArch}' \
       --replace '/usr/bin/' "" \
       --replace '/bin/rmdir' "rmdir" \
-      --replace 'C=''${MIGCC}' "C=cc"
+      --replace 'C=''${MIGCC}' "C=${targetTargetPrefix}cc"
   '';
 }
diff --git a/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix b/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix
index 20168d24dd7..879d3a7b5f7 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, appleDerivation, launchd, bootstrap_cmds, xnu, ppp, IOKit, eap8021x, Security }:
+{ stdenv, appleDerivation', launchd, bootstrap_cmds, xnu, ppp, IOKit, eap8021x, Security }:
 
-appleDerivation {
+appleDerivation' stdenv {
   meta.broken = stdenv.cc.nativeLibc;
 
   nativeBuildInputs = [ bootstrap_cmds ];
@@ -127,78 +127,78 @@ appleDerivation {
     mig -arch x86_64 -header derived/helper.h          -user derived/helperUser.c          -sheader /dev/null -server /dev/null helper/helper.defs
     mig -arch x86_64 -header derived/pppcontroller.h   -user derived/pppcontrollerUser.c   -sheader /dev/null -server /dev/null pppcontroller.defs
 
-    cc -I. -Ihelper -Iderived -F. -c SCSchemaDefinitions.c -o SCSchemaDefinitions.o
-    cc -I. -Ihelper -Iderived -F. -c SCD.c -o SCD.o
-    cc -I. -Ihelper -Iderived -F. -c SCDKeys.c -o SCDKeys.o
-    cc -I. -Ihelper -Iderived -F. -c SCDPrivate.c -o SCDPrivate.o
-    cc -I. -Ihelper -Iderived -F. -c SCDPlugin.c -o SCDPlugin.o
-    cc -I. -Ihelper -Iderived -F. -c CaptiveNetwork.c -o CaptiveNetwork.o
-    cc -I. -Ihelper -Iderived -F. -c SCDOpen.c -o SCDOpen.o
-    cc -I. -Ihelper -Iderived -F. -c SCDList.c -o SCDList.o
-    cc -I. -Ihelper -Iderived -F. -c SCDAdd.c -o SCDAdd.o
-    cc -I. -Ihelper -Iderived -F. -c SCDGet.c -o SCDGet.o
-    cc -I. -Ihelper -Iderived -F. -c SCDSet.c -o SCDSet.o
-    cc -I. -Ihelper -Iderived -F. -c SCDRemove.c -o SCDRemove.o
-    cc -I. -Ihelper -Iderived -F. -c SCDNotify.c -o SCDNotify.o
-    cc -I. -Ihelper -Iderived -F. -c SCDNotifierSetKeys.c -o SCDNotifierSetKeys.o
-    cc -I. -Ihelper -Iderived -F. -c SCDNotifierAdd.c -o SCDNotifierAdd.o
-    cc -I. -Ihelper -Iderived -F. -c SCDNotifierRemove.c -o SCDNotifierRemove.o
-    cc -I. -Ihelper -Iderived -F. -c SCDNotifierGetChanges.c -o SCDNotifierGetChanges.o
-    cc -I. -Ihelper -Iderived -F. -c SCDNotifierWait.c -o SCDNotifierWait.o
-    cc -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaCallback.c -o SCDNotifierInformViaCallback.o
-    cc -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaFD.c -o SCDNotifierInformViaFD.o
-    cc -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaSignal.c -o SCDNotifierInformViaSignal.o
-    cc -I. -Ihelper -Iderived -F. -c SCDNotifierCancel.c -o SCDNotifierCancel.o
-    cc -I. -Ihelper -Iderived -F. -c SCDSnapshot.c -o SCDSnapshot.o
-    cc -I. -Ihelper -Iderived -F. -c SCP.c -o SCP.o
-    cc -I. -Ihelper -Iderived -F. -c SCPOpen.c -o SCPOpen.o
-    cc -I. -Ihelper -Iderived -F. -c SCPLock.c -o SCPLock.o
-    cc -I. -Ihelper -Iderived -F. -c SCPUnlock.c -o SCPUnlock.o
-    cc -I. -Ihelper -Iderived -F. -c SCPList.c -o SCPList.o
-    cc -I. -Ihelper -Iderived -F. -c SCPGet.c -o SCPGet.o
-    cc -I. -Ihelper -Iderived -F. -c SCPAdd.c -o SCPAdd.o
-    cc -I. -Ihelper -Iderived -F. -c SCPSet.c -o SCPSet.o
-    cc -I. -Ihelper -Iderived -F. -c SCPRemove.c -o SCPRemove.o
-    cc -I. -Ihelper -Iderived -F. -c SCPCommit.c -o SCPCommit.o
-    cc -I. -Ihelper -Iderived -F. -c SCPApply.c -o SCPApply.o
-    cc -I. -Ihelper -Iderived -F. -c SCPPath.c -o SCPPath.o
-    cc -I. -Ihelper -Iderived -F. -c SCDConsoleUser.c -o SCDConsoleUser.o
-    cc -I. -Ihelper -Iderived -F. -c SCDHostName.c -o SCDHostName.o
-    cc -I. -Ihelper -Iderived -F. -c SCLocation.c -o SCLocation.o
-    cc -I. -Ihelper -Iderived -F. -c SCNetwork.c -o SCNetwork.o
-    cc -I. -Ihelper -Iderived -F. -c derived/pppcontrollerUser.c -o pppcontrollerUser.o
-    cc -I. -Ihelper -Iderived -F. -c SCNetworkConnection.c -o SCNetworkConnection.o
-    cc -I. -Ihelper -Iderived -F. -c SCNetworkConnectionPrivate.c -o SCNetworkConnectionPrivate.o
-    cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c SCNetworkReachability.c -o SCNetworkReachability.o
-    cc -I. -Ihelper -Iderived -F. -c SCProxies.c -o SCProxies.o
-    cc -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o
-    cc -I. -Ihelper -Iderived -F. -c moh.c -o moh.o
-    cc -I. -Ihelper -Iderived -F. -c DeviceOnHold.c -o DeviceOnHold.o
-    cc -I. -Ihelper -Iderived -I $HACK -F. -c LinkConfiguration.c -o LinkConfiguration.o
-    cc -I. -Ihelper -Iderived -F. -c dy_framework.c -o dy_framework.o
-    cc -I. -Ihelper -Iderived -I $HACK -F. -c VLANConfiguration.c -o VLANConfiguration.o
-    cc -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o
-    cc -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o
-    cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o
-    cc -I. -Ihelper -Iderived -F. -c SCNetworkConfigurationInternal.c -o SCNetworkConfigurationInternal.o
-    cc -I. -Ihelper -Iderived -F. -c SCNetworkInterface.c -o SCNetworkInterface.o
-    cc -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o
-    cc -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o
-    cc -I. -Ihelper -Iderived -F. -c SCNetworkSet.c -o SCNetworkSet.o
-    cc -I. -Ihelper -Iderived -I $HACK -F. -c BondConfiguration.c -o BondConfiguration.o
-    cc -I. -Ihelper -Iderived -I $HACK -F. -c BridgeConfiguration.c -o BridgeConfiguration.o
-    cc -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o
-    cc -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o
-    cc -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o
-    cc -I. -Ihelper -Iderived -F. -c VPNPrivate.c -o VPNPrivate.o
-    cc -I. -Ihelper -Iderived -F. -c VPNConfiguration.c -o VPNConfiguration.o
-    cc -I. -Ihelper -Iderived -F. -c VPNTunnel.c -o VPNTunnel.o
-    cc -I. -Ihelper -Iderived -F. -c derived/helperUser.c -o helperUser.o
-    cc -I. -Ihelper -Iderived -F. -c reachability/SCNetworkReachabilityServer_client.c -o SCNetworkReachabilityServer_client.o
-    cc -I. -Ihelper -Iderived -F. -c reachability/rb.c -o rb.o
-    cc -I. -Ihelper -Iderived -F. -c derived/SystemConfiguration_vers.c -o SystemConfiguration_vers.o
-
-    cc -dynamiclib *.o -install_name $out/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration -dead_strip -framework CoreFoundation -single_module -o SystemConfiguration.framework/SystemConfiguration
+    $CC -I. -Ihelper -Iderived -F. -c SCSchemaDefinitions.c -o SCSchemaDefinitions.o
+    $CC -I. -Ihelper -Iderived -F. -c SCD.c -o SCD.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDKeys.c -o SCDKeys.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDPrivate.c -o SCDPrivate.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDPlugin.c -o SCDPlugin.o
+    $CC -I. -Ihelper -Iderived -F. -c CaptiveNetwork.c -o CaptiveNetwork.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDOpen.c -o SCDOpen.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDList.c -o SCDList.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDAdd.c -o SCDAdd.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDGet.c -o SCDGet.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDSet.c -o SCDSet.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDRemove.c -o SCDRemove.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDNotify.c -o SCDNotify.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDNotifierSetKeys.c -o SCDNotifierSetKeys.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDNotifierAdd.c -o SCDNotifierAdd.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDNotifierRemove.c -o SCDNotifierRemove.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDNotifierGetChanges.c -o SCDNotifierGetChanges.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDNotifierWait.c -o SCDNotifierWait.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaCallback.c -o SCDNotifierInformViaCallback.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaFD.c -o SCDNotifierInformViaFD.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaSignal.c -o SCDNotifierInformViaSignal.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDNotifierCancel.c -o SCDNotifierCancel.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDSnapshot.c -o SCDSnapshot.o
+    $CC -I. -Ihelper -Iderived -F. -c SCP.c -o SCP.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPOpen.c -o SCPOpen.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPLock.c -o SCPLock.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPUnlock.c -o SCPUnlock.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPList.c -o SCPList.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPGet.c -o SCPGet.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPAdd.c -o SCPAdd.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPSet.c -o SCPSet.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPRemove.c -o SCPRemove.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPCommit.c -o SCPCommit.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPApply.c -o SCPApply.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPPath.c -o SCPPath.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDConsoleUser.c -o SCDConsoleUser.o
+    $CC -I. -Ihelper -Iderived -F. -c SCDHostName.c -o SCDHostName.o
+    $CC -I. -Ihelper -Iderived -F. -c SCLocation.c -o SCLocation.o
+    $CC -I. -Ihelper -Iderived -F. -c SCNetwork.c -o SCNetwork.o
+    $CC -I. -Ihelper -Iderived -F. -c derived/pppcontrollerUser.c -o pppcontrollerUser.o
+    $CC -I. -Ihelper -Iderived -F. -c SCNetworkConnection.c -o SCNetworkConnection.o
+    $CC -I. -Ihelper -Iderived -F. -c SCNetworkConnectionPrivate.c -o SCNetworkConnectionPrivate.o
+    $CC -I. -Ihelper -Iderived -I../dnsinfo -F. -c SCNetworkReachability.c -o SCNetworkReachability.o
+    $CC -I. -Ihelper -Iderived -F. -c SCProxies.c -o SCProxies.o
+    $CC -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o
+    $CC -I. -Ihelper -Iderived -F. -c moh.c -o moh.o
+    $CC -I. -Ihelper -Iderived -F. -c DeviceOnHold.c -o DeviceOnHold.o
+    $CC -I. -Ihelper -Iderived -I $HACK -F. -c LinkConfiguration.c -o LinkConfiguration.o
+    $CC -I. -Ihelper -Iderived -F. -c dy_framework.c -o dy_framework.o
+    $CC -I. -Ihelper -Iderived -I $HACK -F. -c VLANConfiguration.c -o VLANConfiguration.o
+    $CC -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o
+    $CC -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o
+    $CC -I. -Ihelper -Iderived -F. -c SCNetworkConfigurationInternal.c -o SCNetworkConfigurationInternal.o
+    $CC -I. -Ihelper -Iderived -F. -c SCNetworkInterface.c -o SCNetworkInterface.o
+    $CC -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o
+    $CC -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o
+    $CC -I. -Ihelper -Iderived -F. -c SCNetworkSet.c -o SCNetworkSet.o
+    $CC -I. -Ihelper -Iderived -I $HACK -F. -c BondConfiguration.c -o BondConfiguration.o
+    $CC -I. -Ihelper -Iderived -I $HACK -F. -c BridgeConfiguration.c -o BridgeConfiguration.o
+    $CC -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o
+    $CC -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o
+    $CC -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o
+    $CC -I. -Ihelper -Iderived -F. -c VPNPrivate.c -o VPNPrivate.o
+    $CC -I. -Ihelper -Iderived -F. -c VPNConfiguration.c -o VPNConfiguration.o
+    $CC -I. -Ihelper -Iderived -F. -c VPNTunnel.c -o VPNTunnel.o
+    $CC -I. -Ihelper -Iderived -F. -c derived/helperUser.c -o helperUser.o
+    $CC -I. -Ihelper -Iderived -F. -c reachability/SCNetworkReachabilityServer_client.c -o SCNetworkReachabilityServer_client.o
+    $CC -I. -Ihelper -Iderived -F. -c reachability/rb.c -o rb.o
+    $CC -I. -Ihelper -Iderived -F. -c derived/SystemConfiguration_vers.c -o SystemConfiguration_vers.o
+
+    $CC -dynamiclib *.o -install_name $out/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration -dead_strip -framework CoreFoundation -single_module -o SystemConfiguration.framework/SystemConfiguration
 
     popd >/dev/null
   '';
diff --git a/pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix b/pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix
index 7e1dc5309b1..5e7f38e84d7 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   dontBuild = true;
   installPhase = ''
     mkdir -p $out/include/
diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix
index 3e431810f20..5e098926d29 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, stdenvNoCC, fetchurl, fetchzip, pkgs }:
+{ lib, stdenv, fetchurl, fetchzip, pkgs }:
 
 let
   # This attrset can in theory be computed automatically, but for that to work nicely we need
@@ -154,7 +154,7 @@ let
     version = versions.${sdkName}.${pname};
   in fetchApple' pname version sha256;
 
-  appleDerivation' = pname: version: sdkName: sha256: attrs: stdenv.mkDerivation ({
+  appleDerivation'' = stdenv: pname: version: sdkName: sha256: attrs: stdenv.mkDerivation ({
     inherit pname version;
 
     src = if attrs ? srcs then null else (fetchApple' pname version sha256);
@@ -223,8 +223,9 @@ let
   applePackage' = namePath: version: sdkName: sha256:
     let
       pname = builtins.head (lib.splitString "/" namePath);
-      appleDerivation = appleDerivation' pname version sdkName sha256;
-      callPackage = self.newScope { inherit appleDerivation; };
+      appleDerivation' = stdenv: appleDerivation'' stdenv pname version sdkName sha256;
+      appleDerivation = appleDerivation' stdenv;
+      callPackage = self.newScope { inherit appleDerivation' appleDerivation; };
     in callPackage (./. + "/${namePath}");
 
   applePackage = namePath: sdkName: sha256: let
@@ -272,17 +273,16 @@ developerToolsPackages_11_3_1 // macosPackages_11_0_1 // {
     libplatform     = applePackage "libplatform"       "osx-10.12.6"     "0rh1f5ybvwz8s0nwfar8s0fh7jbgwqcy903cv2x8m15iq1x599yn" {};
     libpthread      = applePackage "libpthread"        "osx-10.12.6"     "1j6541rcgjpas1fc77ip5krjgw4bvz6jq7bq7h9q7axb0jv2ns6c" {};
     libresolv       = applePackage "libresolv"         "osx-10.12.6"     "077j6ljfh7amqpk2146rr7dsz5vasvr3als830mgv5jzl7l6vz88" {};
-    Libsystem       = applePackage "Libsystem"         "osx-10.12.6"     "1082ircc1ggaq3wha218vmfa75jqdaqidsy1bmrc4ckfkbr3bwx2" {
-      libutil = pkgs.darwin.libutil.override { headersOnly = true; };
-      hfs = pkgs.darwin.hfs.override { headersOnly = true; };
-    };
+    Libsystem       = applePackage "Libsystem"         "osx-10.12.6"     "1082ircc1ggaq3wha218vmfa75jqdaqidsy1bmrc4ckfkbr3bwx2" {};
     libutil         = applePackage "libutil"           "osx-10.12.6"     "0lqdxaj82h8yjbjm856jjz9k2d96k0viimi881akfng08xk1246y" {};
     libunwind       = applePackage "libunwind"         "osx-10.12.6"     "0miffaa41cv0lzf8az5k1j1ng8jvqvxcr4qrlkf3xyj479arbk1b" {};
     mDNSResponder   = applePackage "mDNSResponder"     "osx-10.12.6"     "02ms1p8zlgmprzn65jzr7yaqxykh3zxjcrw0c06aayim6h0dsqfy" {};
     objc4           = applePackage "objc4"             "osx-10.12.6"     "1cj1vhbcs9pkmag2ms8wslagicnq9bxi2qjkszmp3ys7z7ccrbwz" {};
     ppp             = applePackage "ppp"               "osx-10.12.6"     "1kcc2nc4x1kf8sz0a23i6nfpvxg381kipi0qdisrp8x9z2gbkxb8" {};
     removefile      = applePackage "removefile"        "osx-10.12.6"     "0jzjxbmxgjzhssqd50z7kq9dlwrv5fsdshh57c0f8mdwcs19bsyx" {};
-    xnu             = applePackage "xnu"               "osx-10.12.6"     "1sjb0i7qzz840v2h4z3s4jyjisad4r5yyi6sg8pakv3wd81i5fg5" {};
+    xnu             = applePackage "xnu"               "osx-10.12.6"     "1sjb0i7qzz840v2h4z3s4jyjisad4r5yyi6sg8pakv3wd81i5fg5" {
+      python3 = pkgs.buildPackages.buildPackages.python3; # TODO(@Ericson2314) this shouldn't be needed.
+    };
     hfs             = applePackage "hfs"               "osx-10.12.6"     "1mj3xvqpq1mgd80b6kl1s04knqnap7hccr0gz8rjphalq14rbl5g" {};
     Librpcsvc       = applePackage "Librpcsvc"         "osx-10.11.6"     "1zwfwcl9irxl1dlnf2b4v30vdybp0p0r6n6g1pd14zbdci1jcg2k" {};
     adv_cmds        = applePackage "adv_cmds"          "osx-10.11.6"    "12gbv35i09aij9g90p6b3x2f3ramw43qcb2gjrg8lzkzmwvcyw9q" {};
@@ -297,6 +297,10 @@ developerToolsPackages_11_3_1 // macosPackages_11_0_1 // {
     top             = applePackage "top"               "osx-10.11.6"     "0i9120rfwapgwdvjbfg0ya143i29s1m8zbddsxh39pdc59xnsg5l" {};
     PowerManagement = applePackage "PowerManagement"   "osx-10.11.6"     "1llimhvp0gjffd47322lnjq7cqwinx0c5z7ikli04ad5srpa68mh" {};
 
+    libutilHeaders  = pkgs.darwin.libutil.override { headersOnly = true; };
+    hfsHeaders      = pkgs.darwin.hfs.override { headersOnly = true; };
+    libresolvHeaders= pkgs.darwin.libresolv.override { headersOnly = true; };
+
     # TODO(matthewbauer):
     # To be removed, once I figure out how to build a newer Security version.
     Security        = applePackage "Security/boot.nix" "osx-10.9.5"      "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {};
diff --git a/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix
index 77de079e2f0..f2c4ec32146 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix
@@ -1,7 +1,7 @@
-{ lib, appleDerivation, xcbuildHook, llvmPackages }:
+{ lib, appleDerivation, xcbuildHook, llvmPackages, makeWrapper }:
 
 appleDerivation {
-  nativeBuildInputs = [ xcbuildHook ];
+  nativeBuildInputs = [ xcbuildHook makeWrapper ];
 
   patches = [
     # The following copied from
@@ -11,8 +11,9 @@ appleDerivation {
   ];
 
   postPatch = ''
+    makeWrapper ${llvmPackages.clang}/bin/clang $out/bin/clang-cpp --add-flags "--driver-mode=cpp"
     substituteInPlace rpcgen/rpc_main.c \
-      --replace "/usr/bin/cpp" "${llvmPackages.clang-unwrapped}/bin/clang-cpp"
+      --replace "/usr/bin/cpp" "$out/bin/clang-cpp"
   '';
 
   # temporary install phase until xcodebuild has "install" support
diff --git a/pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix b/pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix
index 01d44d22f5e..ca3b70cd092 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix
@@ -1,6 +1,6 @@
-{ lib, appleDerivation }:
+{ lib, appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   installPhase = ''
     mkdir -p $out/lib $out/include
     ln -s /usr/lib/dyld $out/lib/dyld
diff --git a/pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix b/pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix
index b24d94b9d70..f5c47f01d37 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenv }:
 
-appleDerivation {
+appleDerivation' stdenv {
   dontBuild = true;
   installPhase = ''
     mkdir -p $out/Library/Frameworks/EAP8021X.framework/Headers
diff --git a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix
index 53f98e2b457..981e1370437 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix
@@ -1,8 +1,8 @@
-{ lib, appleDerivation, xcbuildHook, zlib, bzip2, xz, ncurses, libutil }:
+{ lib, appleDerivation, xcbuildHook, zlib, bzip2, xz, ncurses, libutil, Libinfo }:
 
 appleDerivation {
   nativeBuildInputs = [ xcbuildHook ];
-  buildInputs = [ zlib bzip2 xz ncurses libutil ];
+  buildInputs = [ zlib bzip2 xz ncurses libutil Libinfo ];
 
   # some commands not working:
   # mtree: _simple.h not found
diff --git a/pkgs/os-specific/darwin/apple-source-releases/hfs/default.nix b/pkgs/os-specific/darwin/apple-source-releases/hfs/default.nix
index 58bac765a95..093e8525e58 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/hfs/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/hfs/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation, lib, headersOnly ? true }:
+{ appleDerivation', stdenv, stdenvNoCC, lib, headersOnly ? true }:
 
-appleDerivation {
+appleDerivation' (if headersOnly then stdenvNoCC else stdenv) {
   installPhase = lib.optionalString headersOnly ''
     mkdir -p $out/include/hfs
     cp core/*.h $out/include/hfs
diff --git a/pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix b/pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix
index c882b83d0a3..67e051d5685 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   # No clue why the same file has two different names. Ask Apple!
   installPhase = ''
     mkdir -p $out/include/ $out/include/servers
diff --git a/pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix
index d42a288208c..976658b7e5d 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   installPhase = ''
     mkdir -p $out/include
     cp *.h $out/include/
diff --git a/pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix
index 3b9d4a34cc6..e91ee86cde0 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   dontConfigure = true;
   dontBuild = true;
   installPhase = ''
diff --git a/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix
index 9acbcb212e4..39c80196269 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   installPhase = ''
     mkdir $out
     cp -r include $out/include
diff --git a/pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix
index 20eccd82059..3d62270d76c 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix
@@ -1,6 +1,6 @@
-{ lib, appleDerivation, libdispatch, xnu }:
+{ lib, appleDerivation', stdenvNoCC, libdispatch, xnu }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   propagatedBuildInputs = [ libdispatch xnu ];
 
   installPhase = ''
diff --git a/pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix
index f3c7558cfc6..53fc019768d 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix
@@ -1,37 +1,39 @@
-{ appleDerivation, Libinfo, configd, mDNSResponder }:
+{ lib, appleDerivation', stdenv, stdenvNoCC, Libinfo, configd, mDNSResponder
+, headersOnly ? false
+}:
 
-appleDerivation {
-  buildInputs = [ Libinfo configd mDNSResponder ];
+appleDerivation' (if headersOnly then stdenvNoCC else stdenv) {
+  buildInputs = lib.optionals (!headersOnly) [ Libinfo configd mDNSResponder ];
 
-  buildPhase = ''
-    cc -I. -c dns_util.c
-    cc -I. -c dns.c
-    cc -I. -c dns_async.c
-    cc -I. -c base64.c
-    cc -I. -c dst_api.c
-    cc -I. -c dst_hmac_link.c
-    cc -I. -c dst_support.c
-    cc -I. -c ns_date.c
-    cc -I. -c ns_name.c
-    cc -I. -c ns_netint.c
-    cc -I. -c ns_parse.c
-    cc -I. -c ns_print.c
-    cc -I. -c ns_samedomain.c
-    cc -I. -c ns_sign.c
-    cc -I. -c ns_ttl.c
-    cc -I. -c ns_verify.c
-    cc -I. -c res_comp.c
-    cc -I. -c res_data.c
-    cc -I. -c res_debug.c
-    cc -I. -c res_findzonecut.c
-    cc -I. -c res_init.c
-    cc -I. -c res_mkquery.c
-    cc -I. -c res_mkupdate.c
-    cc -I. -c res_query.c
-    cc -I. -c res_send.c
-    cc -I. -c res_sendsigned.c
-    cc -I. -c res_update.c
-    cc -dynamiclib -install_name $out/lib/libresolv.9.dylib -current_version 1.0.0 -compatibility_version 1.0.0 -o libresolv.9.dylib *.o
+  buildPhase = lib.optionalString (!headersOnly) ''
+    $CC -I. -c dns_util.c
+    $CC -I. -c dns.c
+    $CC -I. -c dns_async.c
+    $CC -I. -c base64.c
+    $CC -I. -c dst_api.c
+    $CC -I. -c dst_hmac_link.c
+    $CC -I. -c dst_support.c
+    $CC -I. -c ns_date.c
+    $CC -I. -c ns_name.c
+    $CC -I. -c ns_netint.c
+    $CC -I. -c ns_parse.c
+    $CC -I. -c ns_print.c
+    $CC -I. -c ns_samedomain.c
+    $CC -I. -c ns_sign.c
+    $CC -I. -c ns_ttl.c
+    $CC -I. -c ns_verify.c
+    $CC -I. -c res_comp.c
+    $CC -I. -c res_data.c
+    $CC -I. -c res_debug.c
+    $CC -I. -c res_findzonecut.c
+    $CC -I. -c res_init.c
+    $CC -I. -c res_mkquery.c
+    $CC -I. -c res_mkupdate.c
+    $CC -I. -c res_query.c
+    $CC -I. -c res_send.c
+    $CC -I. -c res_sendsigned.c
+    $CC -I. -c res_update.c
+    $CC -dynamiclib -install_name $out/lib/libresolv.9.dylib -current_version 1.0.0 -compatibility_version 1.0.0 -o libresolv.9.dylib *.o
   '';
 
   installPhase = ''
@@ -42,6 +44,7 @@ appleDerivation {
     cp nameser.h       $out/include
     ln -s ../nameser.h $out/include/arpa
     cp resolv.h        $out/include
+  '' + lib.optionalString (!headersOnly) ''
 
     cp libresolv.9.dylib $out/lib
     ln -s libresolv.9.dylib $out/lib/libresolv.dylib
diff --git a/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix
index ea9ca75e7e5..e7c8a6b1113 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix
@@ -1,9 +1,9 @@
-{ lib, appleDerivation, xcbuildHook
+{ lib, stdenv, stdenvNoCC, appleDerivation', xcbuildHook
 
 # headersOnly is true when building for libSystem
 , headersOnly ? false }:
 
-appleDerivation {
+appleDerivation' (if headersOnly then stdenvNoCC else stdenv) {
   nativeBuildInputs = lib.optional (!headersOnly) xcbuildHook;
 
   prePatch = ''
diff --git a/pkgs/os-specific/darwin/apple-source-releases/mDNSResponder/default.nix b/pkgs/os-specific/darwin/apple-source-releases/mDNSResponder/default.nix
index f17ed785360..64de728805f 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/mDNSResponder/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/mDNSResponder/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   phases = [ "unpackPhase" "installPhase" ];
 
   installPhase = ''
diff --git a/pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix b/pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix
index 5668c376130..4ced564ffb7 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenv }:
 
-appleDerivation {
+appleDerivation' stdenv {
   dontBuild = true;
   installPhase = ''
     mkdir -p $out/include/ppp
diff --git a/pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix b/pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix
index 0b2c1c9c7dc..611f445e1ec 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix
@@ -1,6 +1,6 @@
-{ appleDerivation }:
+{ appleDerivation', stdenvNoCC }:
 
-appleDerivation {
+appleDerivation' stdenvNoCC {
   installPhase = ''
     mkdir -p $out/include/
     cp removefile.h checkint.h $out/include/
diff --git a/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/default.nix
index e2e13a168f0..a8352285c78 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/default.nix
@@ -1,7 +1,7 @@
-{ lib, appleDerivation, xcbuildHook }:
+{ lib, appleDerivation, xcbuildHook, launchd }:
 
 appleDerivation {
-  nativeBuildInputs = [ xcbuildHook ];
+  nativeBuildInputs = [ xcbuildHook launchd ];
 
   patchPhase = ''
     # NOTE: these hashes must be recalculated for each version change
diff --git a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix
index 34d093b7cc0..d42d142ef6e 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix
@@ -1,5 +1,5 @@
 { stdenv, appleDerivation, lib
-, Librpcsvc, apple_sdk, pam, CF, openbsm }:
+, libutil, Librpcsvc, apple_sdk, pam, CF, openbsm }:
 
 appleDerivation {
   # xcbuild fails with:
@@ -7,7 +7,7 @@ appleDerivation {
   # see issue facebook/xcbuild#188
   # buildInputs = [ xcbuild ];
 
-  buildInputs = [ Librpcsvc apple_sdk.frameworks.OpenDirectory pam CF
+  buildInputs = [ libutil Librpcsvc apple_sdk.frameworks.OpenDirectory pam CF
                   apple_sdk.frameworks.IOKit openbsm ];
   # NIX_CFLAGS_COMPILE = lib.optionalString hostPlatform.isi686 "-D__i386__"
   #                    + lib.optionalString hostPlatform.isx86_64 "-D__x86_64__"
@@ -35,6 +35,11 @@ appleDerivation {
       --replace bsm/audit_session.h bsm/audit.h
     substituteInPlace login.tproj/login_audit.c \
       --replace bsm/audit_session.h bsm/audit.h
+  '' + lib.optionalString stdenv.isAarch64 ''
+    substituteInPlace sysctl.tproj/sysctl.c \
+      --replace "GPROF_STATE" "0"
+    substituteInPlace login.tproj/login.c \
+      --replace "defined(__arm__)" "defined(__arm__) || defined(__arm64__)"
   '';
 
   buildPhase = ''
diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix
index 9892814468e..90f572d3940 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix
@@ -1,8 +1,12 @@
-{ appleDerivation, lib, bootstrap_cmds, bison, flex
+{ appleDerivation', lib, stdenv, stdenvNoCC, buildPackages
+, bootstrap_cmds, bison, flex
 , gnum4, unifdef, perl, python3
-, headersOnly ? true }:
+, headersOnly ? true
+}:
+
+appleDerivation' (if headersOnly then stdenvNoCC else stdenv) ({
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
 
-appleDerivation ({
   nativeBuildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl python3 ];
 
   patches = [ ./python3.patch ];
@@ -44,16 +48,16 @@ appleDerivation ({
 
   PLATFORM = "MacOSX";
   SDKVERSION = "10.11";
-  CC = "cc";
-  CXX = "c++";
+  CC = "${stdenv.cc.targetPrefix or ""}cc";
+  CXX = "${stdenv.cc.targetPrefix or ""}c++";
   MIG = "mig";
   MIGCOM = "migcom";
-  STRIP = "strip";
-  NM = "nm";
+  STRIP = "${stdenv.cc.bintools.targetPrefix or ""}strip";
+  NM = "${stdenv.cc.bintools.targetPrefix or ""}nm";
   UNIFDEF = "unifdef";
   DSYMUTIL = "dsymutil";
   HOST_OS_VERSION = "10.10";
-  HOST_CC = "cc";
+  HOST_CC = "${buildPackages.stdenv.cc.targetPrefix or ""}cc";
   HOST_FLEX = "flex";
   HOST_BISON = "bison";
   HOST_GM4 = "m4";
diff --git a/pkgs/os-specific/darwin/binutils/default.nix b/pkgs/os-specific/darwin/binutils/default.nix
index 29ae1871ddb..5dc57f43e4a 100644
--- a/pkgs/os-specific/darwin/binutils/default.nix
+++ b/pkgs/os-specific/darwin/binutils/default.nix
@@ -9,6 +9,7 @@ let
   cmds = [
     "ar" "ranlib" "as" "install_name_tool"
     "ld" "strip" "otool" "lipo" "nm" "strings" "size"
+    "codesign_allocate"
   ];
 in
 
diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix
index 50e0a2eb3fb..bace6f0689d 100644
--- a/pkgs/os-specific/darwin/cctools/port.nix
+++ b/pkgs/os-specific/darwin/cctools/port.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, autoreconfHook
 , installShellFiles
-, libcxxabi, libuuid
+, libuuid
 , libobjc ? null, maloader ? null
 , enableTapiSupport ? true, libtapi
 }:
@@ -32,7 +32,7 @@ stdenv.mkDerivation {
 
   nativeBuildInputs = [ autoconf automake libtool autoreconfHook installShellFiles ];
   buildInputs = [ libuuid ]
-    ++ lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]
+    ++ lib.optionals stdenv.isDarwin [ libobjc ]
     ++ lib.optional enableTapiSupport libtapi;
 
   patches = [ ./ld-ignore-rpath-link.patch ./ld-rpath-nonfinal.patch ];
diff --git a/pkgs/os-specific/darwin/darwin-stubs/default.nix b/pkgs/os-specific/darwin/darwin-stubs/default.nix
index aa946eb5bf0..6e3439455cc 100644
--- a/pkgs/os-specific/darwin/darwin-stubs/default.nix
+++ b/pkgs/os-specific/darwin/darwin-stubs/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl }:
+{ stdenvNoCC, fetchurl }:
 
-stdenv.mkDerivation {
+stdenvNoCC.mkDerivation {
   pname = "darwin-stubs";
   version = "10.12";
 
diff --git a/pkgs/os-specific/darwin/libtapi/default.nix b/pkgs/os-specific/darwin/libtapi/default.nix
index 8c83b4ae1e6..da071074097 100644
--- a/pkgs/os-specific/darwin/libtapi/default.nix
+++ b/pkgs/os-specific/darwin/libtapi/default.nix
@@ -1,6 +1,6 @@
-{ lib, stdenv, fetchFromGitHub, cmake, python3, ncurses }:
+{ lib, stdenv, fetchFromGitHub, pkgsBuildBuild, cmake, python3, ncurses }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
   pname = "libtapi";
   version = "1100.0.11"; # determined by looking at VERSION.txt
 
@@ -13,13 +13,43 @@ stdenv.mkDerivation rec {
 
   sourceRoot = "source/src/llvm";
 
+  # Backported from newer llvm, fixes configure error when cross compiling.
+  # Also means we don't have to manually fix the result with install_name_tool.
+  patches = [
+    ./disable-rpath.patch
+  ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
+    # TODO: make unconditional and rebuild the world
+    # TODO: send upstream
+    ./native-clang-tblgen.patch
+  ];
+
   nativeBuildInputs = [ cmake python3 ];
 
   # 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" ];
+  cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=OFF" ]
+    ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) [
+      "-DCMAKE_CROSSCOMPILING=True"
+      # This package could probably have a llvm_6 llvm-tblgen and clang-tblgen
+      # provided to reduce some building. This package seems intended to
+      # include all of its dependencies, including enough of LLVM to build the
+      # required tablegens.
+      (
+        let
+          nativeCC = pkgsBuildBuild.stdenv.cc;
+          nativeBintools = nativeCC.bintools.bintools;
+          nativeToolchainFlags = [
+            "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
+            "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
+            "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
+            "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
+            "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
+          ];
+        in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=${lib.concatStringsSep ";" nativeToolchainFlags}"
+      )
+    ];
 
   # fixes: fatal error: 'clang/Basic/Diagnostic.h' file not found
   # adapted from upstream
@@ -35,10 +65,6 @@ stdenv.mkDerivation rec {
 
   installTargets = [ "install-libtapi" "install-tapi-headers" "install-tapi" ];
 
-  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";
diff --git a/pkgs/os-specific/darwin/libtapi/disable-rpath.patch b/pkgs/os-specific/darwin/libtapi/disable-rpath.patch
new file mode 100644
index 00000000000..87c0cf3330d
--- /dev/null
+++ b/pkgs/os-specific/darwin/libtapi/disable-rpath.patch
@@ -0,0 +1,14 @@
+diff --git a/src/llvm/cmake/modules/AddLLVM.cmake b/src/llvm/cmake/modules/AddLLVM.cmake
+index a53016eb0..b65e608a4 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -1683,8 +1683,7 @@ function(llvm_setup_rpath name)
+   endif()
+ 
+   if (APPLE)
+-    set(_install_name_dir INSTALL_NAME_DIR "@rpath")
+-    set(_install_rpath "@loader_path/../lib" ${extra_libdir})
++    set(_install_name_dir)
+   elseif(UNIX)
+     set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
diff --git a/pkgs/os-specific/darwin/libtapi/native-clang-tblgen.patch b/pkgs/os-specific/darwin/libtapi/native-clang-tblgen.patch
new file mode 100644
index 00000000000..9b715766a12
--- /dev/null
+++ b/pkgs/os-specific/darwin/libtapi/native-clang-tblgen.patch
@@ -0,0 +1,21 @@
+diffprojects/libtapi/CMakeLists.txt b/src/llvm/projects/libtapi/CMakeLists.txt
+index 8ee6d8138..8277be147 100644
+--- a/projects/libtapi/CMakeLists.txt
++++ b/projects/libtapi/CMakeLists.txt
+@@ -193,7 +193,15 @@ if (NOT DEFINED CLANG_VERSION)
+   set(CLANG_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
+ endif ()
+ if (NOT DEFINED CLANG_TABLEGEN_EXE)
+-  set(CLANG_TABLEGEN_EXE "${LLVM_TOOLS_BINARY_DIR}/clang-tblgen")
++  if(LLVM_USE_HOST_TOOLS)
++    if (NOT CMAKE_CONFIGURATION_TYPES)
++      set(CLANG_TABLEGEN_EXE "${LLVM_NATIVE_BUILD}/bin/clang-tblgen")
++    else()
++      set(CLANG_TABLEGEN_EXE "${LLVM_NATIVE_BUILD}/Release/bin/clang-tblgen")
++    endif()
++  else()
++    set(CLANG_TABLEGEN_EXE "${LLVM_TOOLS_BINARY_DIR}/clang-tblgen")
++  endif ()
+ endif ()
+ 
+ # Include must go first.
diff --git a/pkgs/os-specific/darwin/apple-sdk/print-reexports/default.nix b/pkgs/os-specific/darwin/print-reexports/default.nix
index a548d8da753..740bcb48ef5 100644
--- a/pkgs/os-specific/darwin/apple-sdk/print-reexports/default.nix
+++ b/pkgs/os-specific/darwin/print-reexports/default.nix
@@ -7,11 +7,11 @@ stdenv.mkDerivation {
   buildInputs = [ libyaml ];
 
   buildPhase = ''
-    $CC -lyaml -o $name main.c
+    $CC -lyaml -o print-reexports main.c
   '';
 
   installPhase = ''
     mkdir -p $out/bin
-    mv $name $out/bin
+    mv print-reexports $out/bin
   '';
 }
diff --git a/pkgs/os-specific/darwin/apple-sdk/print-reexports/main.c b/pkgs/os-specific/darwin/print-reexports/main.c
index df46e3f18e8..e6ff527da96 100644
--- a/pkgs/os-specific/darwin/apple-sdk/print-reexports/main.c
+++ b/pkgs/os-specific/darwin/print-reexports/main.c
@@ -21,6 +21,10 @@
 #include <sys/errno.h>
 #include <yaml.h>
 
+#define LOG(str, ...) fprintf(stderr, "%s", str)
+
+#define LOGF(...) fprintf(stderr, __VA_ARGS__)
+
 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");
@@ -35,12 +39,12 @@ static yaml_node_t *get_mapping_entry(yaml_document_t *document, yaml_node_t *ma
     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);
+      LOGF("key (%d) is null\n", pair->key);
       return NULL;
     }
 
     if (key->type != YAML_SCALAR_NODE) {
-      fprintf(stderr, "get_mapping_entry: key is not a scalar\n");
+      LOG("get_mapping_entry: key is not a scalar\n");
       return NULL;
     }
 
@@ -54,18 +58,17 @@ static yaml_node_t *get_mapping_entry(yaml_document_t *document, yaml_node_t *ma
   return NULL;
 }
 
-static int emit_reexports(yaml_document_t *document) {
+static int emit_reexports_v2(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;
+    return 1;
   }
 
   if (exports->type != YAML_SEQUENCE_NODE) {
-    fprintf(stderr, "emit_reexports, value is not a sequence\n");
+    LOG("value is not a sequence\n");
     return 0;
   }
 
@@ -82,6 +85,11 @@ static int emit_reexports(yaml_document_t *document) {
       continue;
     }
 
+    if (reexports->type != YAML_SEQUENCE_NODE) {
+      LOG("re-exports is not a sequence\n");
+      return 0;
+    }
+
     for (
         yaml_node_item_t *reexport = reexports->data.sequence.items.start;
         reexport < reexports->data.sequence.items.top;
@@ -90,7 +98,58 @@ static int emit_reexports(yaml_document_t *document) {
       yaml_node_t *val = yaml_document_get_node(document, *reexport);
 
       if (val->type != YAML_SCALAR_NODE) {
-        fprintf(stderr, "item is not a scalar\n");
+        LOG("item is not a scalar\n");
+        return 0;
+      }
+
+      fwrite(val->data.scalar.value, val->data.scalar.length, 1, stdout);
+      putchar('\n');
+    }
+  }
+
+  return 1;
+}
+
+static int emit_reexports_v4(yaml_document_t *document) {
+  yaml_node_t *root = yaml_document_get_root_node(document);
+  yaml_node_t *reexports = get_mapping_entry(document, root, "reexported-libraries");
+
+  if (!reexports) {
+    return 1;
+  }
+
+  if (reexports->type != YAML_SEQUENCE_NODE) {
+    LOG("value is not a sequence\n");
+    return 0;
+  }
+
+  for (
+      yaml_node_item_t *entry = reexports->data.sequence.items.start;
+      entry < reexports->data.sequence.items.top;
+      ++entry
+  ) {
+    yaml_node_t *entry_node = yaml_document_get_node(document, *entry);
+
+    yaml_node_t *libs = get_mapping_entry(document, entry_node, "libraries");
+
+    if (!libs) {
+      continue;
+    }
+
+    if (libs->type != YAML_SEQUENCE_NODE) {
+      LOG("libraries is not a sequence\n");
+      return 0;
+    }
+
+    for (
+        yaml_node_item_t *lib = libs->data.sequence.items.start;
+        lib < libs->data.sequence.items.top;
+        ++lib
+    ) {
+      yaml_node_t *val = yaml_document_get_node(document, *lib);
+
+      if (val->type != YAML_SCALAR_NODE) {
+        LOG("item is not a scalar\n");
         return 0;
       }
 
@@ -135,7 +194,13 @@ int main(int argc, char **argv) {
     goto err_yaml;
   }
 
-  emit_reexports(&yaml_document);
+  // Try both, only fail if one reports an error.  A lack of re-exports is not
+  // considered an error.
+  int ok = 1;
+  ok = ok && emit_reexports_v2(&yaml_document);
+  ok = ok && emit_reexports_v4(&yaml_document);
+
+  result = !ok;
 
 err_yaml:
   yaml_parser_delete(&yaml_parser);
diff --git a/pkgs/os-specific/darwin/print-reexports/setup-hook.sh b/pkgs/os-specific/darwin/print-reexports/setup-hook.sh
new file mode 100644
index 00000000000..9efb00aeb4d
--- /dev/null
+++ b/pkgs/os-specific/darwin/print-reexports/setup-hook.sh
@@ -0,0 +1,19 @@
+fixupOutputHooks+=('checkTbdReexports')
+
+checkTbdReexports() {
+  local dir="$1"
+
+  while IFS= read -r -d $'\0' tbd; do
+    echo "checkTbdRexports: checking re-exports in $tbd"
+    while read -r 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 < <(print-reexports "$tbd")
+  done < <(find $prefix -type f -name '*.tbd' -print0)
+}
diff --git a/pkgs/os-specific/darwin/rewrite-tbd/default.nix b/pkgs/os-specific/darwin/rewrite-tbd/default.nix
new file mode 100644
index 00000000000..f41b81b3bc9
--- /dev/null
+++ b/pkgs/os-specific/darwin/rewrite-tbd/default.nix
@@ -0,0 +1,16 @@
+{ stdenv, fetchFromGitHub, cmake, pkg-config, libyaml }:
+
+stdenv.mkDerivation {
+  pname = "rewrite-tbd";
+  version = "20201114";
+
+  src = fetchFromGitHub {
+    owner = "thefloweringash";
+    repo = "rewrite-tbd";
+    rev = "988f29c6ccbca9b883966225263d8d78676da6a3";
+    sha256 = "08sk91zwj6n9x2ymwid2k7y0rwv5b7p6h1b25ipx1dv0i43p6v1a";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ libyaml ];
+}
diff --git a/pkgs/os-specific/darwin/signing-utils/auto-sign-hook.sh b/pkgs/os-specific/darwin/signing-utils/auto-sign-hook.sh
new file mode 100644
index 00000000000..430aba8cdc7
--- /dev/null
+++ b/pkgs/os-specific/darwin/signing-utils/auto-sign-hook.sh
@@ -0,0 +1,20 @@
+fixupOutputHooks+=('signDarwinBinariesIn $prefix')
+
+# Uses signingUtils, see definition of autoSignDarwinBinariesHook in
+# darwin-packages.nix
+
+signDarwinBinariesIn() {
+  local dir="$1"
+
+  if [ ! -d "$dir" ]; then
+    return 0
+  fi
+
+  if [ "${darwinDontCodeSign:-}" ]; then
+    return 0
+  fi
+
+  while IFS= read -r -d $'\0' f; do
+    signIfRequired "$f"
+  done < <(find "$dir" -type f -print0)
+}
diff --git a/pkgs/os-specific/darwin/signing-utils/default.nix b/pkgs/os-specific/darwin/signing-utils/default.nix
new file mode 100644
index 00000000000..035ac59b725
--- /dev/null
+++ b/pkgs/os-specific/darwin/signing-utils/default.nix
@@ -0,0 +1,24 @@
+{ stdenvNoCC
+, sigtool
+, cctools
+}:
+
+let
+  stdenv = stdenvNoCC;
+in
+
+stdenv.mkDerivation {
+  name = "signing-utils";
+
+  dontUnpack = true;
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    substituteAll ${./utils.sh} $out
+  '';
+
+  # Substituted variables
+  inherit sigtool;
+  codesignAllocate = "${cctools}/bin/${cctools.targetPrefix}codesign_allocate";
+}
diff --git a/pkgs/os-specific/darwin/signing-utils/utils.sh b/pkgs/os-specific/darwin/signing-utils/utils.sh
new file mode 100644
index 00000000000..6d23a461fc9
--- /dev/null
+++ b/pkgs/os-specific/darwin/signing-utils/utils.sh
@@ -0,0 +1,43 @@
+# Work around for some odd behaviour where we can't codesign a file
+# in-place if it has been called before. This happens for example if
+# you try to fix-up a binary using strip/install_name_tool, after it
+# had been used previous.  The solution is to copy the binary (with
+# the corrupted signature from strip/install_name_tool) to some
+# location, sign it there and move it back into place.
+#
+# This does not appear to happen with the codesign tool that ships
+# with recent macOS BigSur installs on M1 arm64 machines.  However it
+# had also been happening with the tools that shipped with the DTKs.
+sign() {
+    local tmpdir
+    tmpdir=$(mktemp -d)
+
+    # $1 is the file
+
+    cp "$1" "$tmpdir"
+    CODESIGN_ALLOCATE=@codesignAllocate@ \
+        @sigtool@/bin/codesign -f -s - "$tmpdir/$(basename "$1")"
+    mv "$tmpdir/$(basename "$1")" "$1"
+    rmdir "$tmpdir"
+}
+
+checkRequiresSignature() {
+    local file=$1
+    local rc=0
+
+    @sigtool@/bin/sigtool --file "$file" check-requires-signature || rc=$?
+
+    if [ "$rc" -eq 0 ] || [ "$rc" -eq 1 ]; then
+        return "$rc"
+    fi
+
+    echo "Unexpected exit status from sigtool: $rc"
+    exit 1
+}
+
+signIfRequired() {
+    local file=$1
+    if checkRequiresSignature "$file"; then
+        sign "$file"
+    fi
+}
diff --git a/pkgs/os-specific/darwin/sigtool/default.nix b/pkgs/os-specific/darwin/sigtool/default.nix
new file mode 100644
index 00000000000..933ef784879
--- /dev/null
+++ b/pkgs/os-specific/darwin/sigtool/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, makeWrapper, openssl }:
+
+stdenv.mkDerivation {
+  name = "sigtool";
+
+  src = fetchFromGitHub {
+    owner = "thefloweringash";
+    repo = "sigtool";
+    rev = "4a3719b42dc91c3f513df94048851cc98e7c7fcf";
+    sha256 = "04ra1cx7k1sdbkj5yrvl0s3l333vpir8rnm8k1dh2zy1w0a6hpqa";
+  };
+
+  nativeBuildInputs = [ pkg-config makeWrapper ];
+  buildInputs = [ openssl ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  # Upstream (me) asserts the driver script is optional.
+  postInstall = ''
+    substitute $NIX_BUILD_TOP/$sourceRoot/codesign.sh $out/bin/codesign \
+      --replace sigtool "$out/bin/sigtool"
+    chmod a+x $out/bin/codesign
+  '';
+}
diff --git a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix
index ab934d7eaaa..0512d9dd46a 100644
--- a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix
+++ b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix
@@ -41,6 +41,7 @@ rec {
       mv cc-cflags.tmp $out/nix-support/cc-cflags
       echo "-target ${targetPlatform.config}" >> $out/nix-support/cc-cflags
       echo "-isystem ${sdk}/usr/include${lib.optionalString (lib.versionAtLeast "10" sdk.version) " -isystem ${sdk}/usr/include/c++/4.2.1/ -stdlib=libstdc++"}" >> $out/nix-support/cc-cflags
+      ${lib.optionalString (lib.versionAtLeast sdk.version "14") "echo -isystem ${xcode}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 >> $out/nix-support/cc-cflags"}
     '';
   }) // {
     inherit sdk;
diff --git a/pkgs/os-specific/linux/bionic-prebuilt/default.nix b/pkgs/os-specific/linux/bionic-prebuilt/default.nix
new file mode 100644
index 00000000000..920732a2020
--- /dev/null
+++ b/pkgs/os-specific/linux/bionic-prebuilt/default.nix
@@ -0,0 +1,113 @@
+{ stdenvNoCC, lib, fetchzip, pkgs
+}:
+let
+
+  prebuilt_crt = fetchzip {
+    url =  "https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/+archive/98dce673ad97a9640c5d90bbb1c718e75c21e071/lib/gcc/aarch64-linux-android/4.9.x.tar.gz";
+    sha256 = "sha256-LLD2OJi78sNN5NulOsJZl7Ei4F1EUYItGG6eUsKWULc=";
+    stripRoot = false;
+  };
+
+  prebuilt_libs = fetchzip {
+    url = "https://android.googlesource.com/platform/prebuilts/ndk/+archive/f2c77d8ba8a7f5c2d91771e31164f29be0b8ff98/platform/platforms/android-30/arch-arm64/usr/lib.tar.gz";
+    sha256 = "sha256-TZBV7+D1QvKOCEi+VNGT5SStkgj0xRbyWoLH65zSrjw=";
+    stripRoot = false;
+  };
+
+  prebuilt_ndk_crt = fetchzip {
+    url = "https://android.googlesource.com/toolchain/prebuilts/ndk/r23/+archive/6c5fa4c0d3999b9ee932f6acbd430eb2f31f3151/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/30.tar.gz";
+    sha256 = "sha256-KHw+cCwAwlm+5Nwp1o8WONqdi4BBDhFaVVr+7GxQ5uE=";
+    stripRoot = false;
+  };
+
+  ndk_support_headers = fetchzip {
+    url ="https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/0e7f808fa26cce046f444c9616d9167dafbfb272/clang-r416183b/include/c++/v1/support.tar.gz";
+    sha256 = "sha256-NBv7Pk1CEaz8ns9moleEERr3x/rFmVmG33LgFSeO6fY=";
+    stripRoot = false;
+  };
+
+  kernelHeaders = pkgs.makeLinuxHeaders {
+    version = "android-common-11-5.4";
+    src = fetchzip {
+      url = "https://android.googlesource.com/kernel/common/+archive/48ffcbf0b9e7f0280bfb8c32c68da0aaf0fdfef6.tar.gz";
+      sha256 = "1y7cmlmcr5vdqydd9n785s139yc4aylc3zhqa59xsylmkaf5habk";
+      stripRoot = false;
+    };
+  };
+
+in
+stdenvNoCC.mkDerivation rec {
+  pname = "bionic-prebuilt";
+  version = "ndk-release-r23";
+
+  src = fetchzip {
+    url = "https://android.googlesource.com/platform/bionic/+archive/00e8ce1142d8823b0d2fc8a98b40119b0f1f02cd.tar.gz";
+    sha256 = "10z5mp4w0acvjvgxv7wlqa7m70hcyarmjdlfxbd9rwzf4mrsr8d1";
+    stripRoot = false;
+  };
+
+  NIX_DONT_SET_RPATH = true;
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  patches = [
+    ./ndk-version.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace libc/include/sys/cdefs.h --replace \
+      "__has_builtin(__builtin_umul_overflow)" "1"
+    substituteInPlace libc/include/bits/ioctl.h --replace \
+      "!defined(BIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD)" "0"
+  '';
+
+  installPhase= ''
+    # copy the bionic headers
+    mkdir -p $out/include/support $out/include/android
+    cp -vr libc/include/* $out/include
+    # copy the kernel headers
+    cp -vr ${kernelHeaders}/include/*  $out/include/
+
+    chmod -R +w $out/include/linux
+
+    # fix a bunch of kernel headers so that things can actually be found
+    sed -i 's,struct epoll_event {,#include <bits/epoll_event.h>\nstruct Xepoll_event {,' $out/include/linux/eventpoll.h
+    sed -i 's,struct in_addr {,typedef unsigned int in_addr_t;\nstruct in_addr {,' $out/include/linux/in.h
+    sed -i 's,struct udphdr {,struct Xudphdr {,' $out/include/linux/udp.h
+    sed -i 's,union semun {,union Xsemun {,' $out/include/linux/sem.h
+    sed -i 's,struct __kernel_sockaddr_storage,#define sockaddr_storage __kernel_sockaddr_storage\nstruct __kernel_sockaddr_storage,' $out/include/linux/socket.h
+    sed -i 's,#ifndef __UAPI_DEF_.*$,#if 1,' $out/include/linux/libc-compat.h
+    substituteInPlace $out/include/linux/in.h --replace "__be32		imr_" "struct in_addr		imr_"
+    substituteInPlace $out/include/linux/in.h --replace "__be32		imsf_" "struct in_addr		imsf_"
+    substituteInPlace $out/include/linux/sysctl.h --replace "__unused" "_unused"
+
+    # what could possibly live in <linux/compiler.h>
+    touch $out/include/linux/compiler.h
+
+    # copy the support headers
+    cp -vr ${ndk_support_headers}* $out/include/support/
+
+    mkdir $out/lib
+    cp -v ${prebuilt_crt.out}/*.o $out/lib/
+    cp -v ${prebuilt_crt.out}/libgcc.a $out/lib/
+    cp -v ${prebuilt_ndk_crt.out}/*.o $out/lib/
+    for i in libc.so libm.so libdl.so liblog.so; do
+      cp -v ${prebuilt_libs.out}/$i $out/lib/
+    done
+
+    mkdir -p $dev/include
+    cp -v $out/include/*.h $dev/include/
+  '';
+
+  outputs = [ "out" "dev" ];
+  passthru.linuxHeaders = kernelHeaders;
+
+  meta = with lib; {
+    description = "The Android libc implementation";
+    homepage    = "https://android.googlesource.com/platform/bionic/";
+    license     = licenses.mit;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ s1341 ];
+  };
+}
diff --git a/pkgs/os-specific/linux/bionic-prebuilt/ndk-version.patch b/pkgs/os-specific/linux/bionic-prebuilt/ndk-version.patch
new file mode 100644
index 00000000000..a6842ed479f
--- /dev/null
+++ b/pkgs/os-specific/linux/bionic-prebuilt/ndk-version.patch
@@ -0,0 +1,42 @@
+--- a/libc/include/android/ndk-version.h	2021-04-01 16:08:03.109183965 +0300
++++ b/libc/include/android/ndk-version.h	2021-04-01 16:07:19.811424641 +0300
+@@ -0,0 +1,39 @@
++#pragma once
++
++/**
++ * Set to 1 if this is an NDK, unset otherwise. See
++ * https://android.googlesource.com/platform/bionic/+/master/docs/defines.md.
++ */
++#define __ANDROID_NDK__ 1
++
++/**
++ * Major version of this NDK.
++ *
++ * For example: 16 for r16.
++ */
++#define __NDK_MAJOR__ 22
++
++/**
++ * Minor version of this NDK.
++ *
++ * For example: 0 for r16 and 1 for r16b.
++ */
++#define __NDK_MINOR__ 0
++
++/**
++ * Set to 0 if this is a release build, or 1 for beta 1,
++ * 2 for beta 2, and so on.
++ */
++#define __NDK_BETA__ 0
++
++/**
++ * Build number for this NDK.
++ *
++ * For a local development build of the NDK, this is -1.
++ */
++#define __NDK_BUILD__ 7026061
++
++/**
++ * Set to 1 if this is a canary build, 0 if not.
++ */
++#define __NDK_CANARY__ 0
diff --git a/pkgs/os-specific/linux/catfs/default.nix b/pkgs/os-specific/linux/catfs/default.nix
index 0ca585fab47..dbb525e0e29 100644
--- a/pkgs/os-specific/linux/catfs/default.nix
+++ b/pkgs/os-specific/linux/catfs/default.nix
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0zca0c4n2p9s5kn8c9f9lyxdf3df88a63nmhprpgflj86bh8wgf5";
   };
 
-  cargoSha256 = "0v6lxwj4vcph32np68awpncafvf1dwcik9a2asa0lkb7kmfdjsjk";
+  cargoSha256 = "1agcwq409s40kyij487wjrp8mj7942r9l2nqwks4xqlfb0bvaimf";
 
   cargoPatches = [
     # update cargo lock
diff --git a/pkgs/os-specific/linux/dlm/default.nix b/pkgs/os-specific/linux/dlm/default.nix
index 9e81ea38348..3b6f4773a29 100644
--- a/pkgs/os-specific/linux/dlm/default.nix
+++ b/pkgs/os-specific/linux/dlm/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1r3w7my0g3v2ya317qnvjx8wnagjahpj7yx72a65hf2pjbf5x42p";
   };
 
-  cargoSha256 = "OFMCsUmrRYlobiUAqm1huuzDxdf1BWmU2RqZ9Y6Yjew=";
+  cargoSha256 = "01a8k60qnx2pgxb2adgw30c2hjb60w6230khm5hyqgmp7z4rm8k8";
 
   meta = with lib; {
     description = "A stupid simple graphical login manager";
diff --git a/pkgs/os-specific/linux/dpdk/default.nix b/pkgs/os-specific/linux/dpdk/default.nix
index e71da643bb4..38dac78b3fe 100644
--- a/pkgs/os-specific/linux/dpdk/default.nix
+++ b/pkgs/os-specific/linux/dpdk/default.nix
@@ -63,8 +63,6 @@ in stdenv.mkDerivation rec {
 
   outputs = [ "out" ] ++ lib.optional mod "kmod";
 
-  enableParallelBuilding = true;
-
   meta = with lib; {
     description = "Set of libraries and drivers for fast packet processing";
     homepage = "http://dpdk.org/";
diff --git a/pkgs/os-specific/linux/firmware/firmware-manager/default.nix b/pkgs/os-specific/linux/firmware/firmware-manager/default.nix
index 80730fdbefb..ee36ab57442 100644
--- a/pkgs/os-specific/linux/firmware/firmware-manager/default.nix
+++ b/pkgs/os-specific/linux/firmware/firmware-manager/default.nix
@@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec {
 
   installPhase = "make prefix='$(out)' install";
 
-  cargoSha256 = "sha256-TISYaSOu8c+74ie4QHLqflXfLWwcLHEOch/hAx3iu60=";
+  cargoSha256 = "sha256-BUo77ERHvuc8IkDdU3Z/gZZicNHT26IbAgEBnVM3O4U=";
 
   doCheck = false;
 
diff --git a/pkgs/os-specific/linux/firmware/system76-firmware/default.nix b/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
index 9d47d50b43f..ca750d89cc5 100644
--- a/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
+++ b/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
 
   cargoBuildFlags = [ "--workspace" ];
 
-  cargoSha256 = "sha256-sKC0jfpy7mxGwO+mKU3W5e9HsJx+HQNzqq78YViNJcs=";
+  cargoSha256 = "sha256-gGw3zpxLxQZ3rglpDERO0fSxBOez1Q10Fljis6nyB/4=";
 
   # Purposefully don't install systemd unit file, that's for NixOS
   postInstall = ''
diff --git a/pkgs/os-specific/linux/fuse/common.nix b/pkgs/os-specific/linux/fuse/common.nix
index c1217f66938..5adb1b5355a 100644
--- a/pkgs/os-specific/linux/fuse/common.nix
+++ b/pkgs/os-specific/linux/fuse/common.nix
@@ -82,8 +82,6 @@ in stdenv.mkDerivation rec {
     cp ${fusePackages.fuse_3.common}/etc/udev/rules.d/99-fuse.rules etc/udev/rules.d/99-fuse.rules
   '');
 
-  enableParallelBuilding = true;
-
   meta = with lib; {
     description = "Library that allows filesystems to be implemented in user space";
     longDescription = ''
diff --git a/pkgs/os-specific/linux/greetd/default.nix b/pkgs/os-specific/linux/greetd/default.nix
index fc5dd04b43c..6f305c5d6eb 100644
--- a/pkgs/os-specific/linux/greetd/default.nix
+++ b/pkgs/os-specific/linux/greetd/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "b+S3fuJ8gjnSQzLHl3Bs9iO/Un2ynggAplz01GjJvFI=";
   };
 
-  cargoSha256 = "w6d8rIc03Qa2/TpztpyVijjd3y0Vo38+JDhsOkSFG5E=";
+  cargoHash = "sha256-YSC7osyBPwx+lo7P1ftI72mRWeQlDc2srRPzTFqVTxM=";
 
   nativeBuildInputs = [
     scdoc
diff --git a/pkgs/os-specific/linux/hwdata/default.nix b/pkgs/os-specific/linux/hwdata/default.nix
index bd52f37e62f..f700bf035de 100644
--- a/pkgs/os-specific/linux/hwdata/default.nix
+++ b/pkgs/os-specific/linux/hwdata/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "hwdata";
-  version = "0.344";
+  version = "0.347";
 
   src = fetchFromGitHub {
     owner = "vcrhonek";
     repo = "hwdata";
     rev = "v${version}";
-    sha256 = "0rsnm94r814shr86jk6f2323i1n4p58inkgkx7362yz9k4a8ir7a";
+    sha256 = "19kmz25zq6qqs67ppqhws4mh3qf6zrp55cpyxyw36q95yjdcqp21";
   };
 
   preConfigure = "patchShebangs ./configure";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   outputHashMode = "recursive";
   outputHashAlgo = "sha256";
-  outputHash = "011lyldzskfb4sfn4i7qyyq3i4gaf1v9yfbc82889cabka0n4nfz";
+  outputHash = "0haaczd6pi9q2vdlvbwn7100sb87zsy64z94xhpbmlari4vzjmz0";
 
   meta = {
     homepage = "https://github.com/vcrhonek/hwdata";
diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix
index 34e80ac8222..9d727838b3f 100644
--- a/pkgs/os-specific/linux/kernel-headers/default.nix
+++ b/pkgs/os-specific/linux/kernel-headers/default.nix
@@ -1,4 +1,9 @@
-{ stdenvNoCC, lib, buildPackages, fetchurl, perl, elf-header }:
+{ stdenvNoCC, lib, buildPackages, fetchurl, perl, elf-header
+, bison ? null, flex ? null, python ? null, rsync ? null
+}:
+
+assert stdenvNoCC.hostPlatform.isAndroid ->
+  (flex != null && bison != null && python != null && rsync != null);
 
 let
   makeLinuxHeaders = { src, version, patches ? [] }: stdenvNoCC.mkDerivation {
@@ -13,7 +18,11 @@ let
     # We do this so we have a build->build, not build->host, C compiler.
     depsBuildBuild = [ buildPackages.stdenv.cc ];
     # `elf-header` is null when libc provides `elf.h`.
-    nativeBuildInputs = [ perl elf-header ];
+    nativeBuildInputs = [
+      perl elf-header
+    ] ++ lib.optionals stdenvNoCC.hostPlatform.isAndroid [
+      flex bison python rsync
+    ];
 
     extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
 
@@ -36,9 +45,12 @@ let
     # Skip clean on darwin, case-sensitivity issues.
     buildPhase = lib.optionalString (!stdenvNoCC.buildPlatform.isDarwin) ''
       make mrproper $makeFlags
-    '' + ''
+    '' + (if stdenvNoCC.hostPlatform.isAndroid then ''
+      make defconfig
+      make headers_install
+    '' else ''
       make headers $makeFlags
-    '';
+    '');
 
     checkPhase = ''
       make headers_check $makeFlags
diff --git a/pkgs/os-specific/linux/kernel/generate-config.pl b/pkgs/os-specific/linux/kernel/generate-config.pl
index 6a2aec809a1..82e1cb66e2b 100644
--- a/pkgs/os-specific/linux/kernel/generate-config.pl
+++ b/pkgs/os-specific/linux/kernel/generate-config.pl
@@ -40,7 +40,7 @@ close ANSWERS;
 sub runConfig {
 
     # Run `make config'.
-    my $pid = open2(\*IN, \*OUT, "make -C $ENV{SRC} O=$buildRoot config SHELL=bash ARCH=$ENV{ARCH}");
+    my $pid = open2(\*IN, \*OUT, "make -C $ENV{SRC} O=$buildRoot config SHELL=bash ARCH=$ENV{ARCH} CC=$ENV{CC} HOSTCC=$ENV{HOSTCC} HOSTCXX=$ENV{HOSTCXX}");
 
     # Parse the output, look for questions and then send an
     # appropriate answer.
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix
index 68a1fcdb0e6..b35c84513e6 100644
--- a/pkgs/os-specific/linux/kernel/generic.nix
+++ b/pkgs/os-specific/linux/kernel/generic.nix
@@ -128,12 +128,16 @@ let
 
     buildPhase = ''
       export buildRoot="''${buildRoot:-build}"
+      export HOSTCC=$CC_FOR_BUILD
+      export HOSTCXX=$CXX_FOR_BUILD
+      export HOSTAR=$AR_FOR_BUILD
+      export HOSTLD=$LD_FOR_BUILD
 
       # Get a basic config file for later refinement with $generateConfig.
-      make -C .  O="$buildRoot" $kernelBaseConfig \
+      make -C . O="$buildRoot" $kernelBaseConfig \
           ARCH=$kernelArch \
-          HOSTCC=${buildPackages.stdenv.cc.targetPrefix}gcc \
-          HOSTCXX=${buildPackages.stdenv.cc.targetPrefix}g++
+          HOSTCC=$HOSTCC HOSTCXX=$HOSTCXX HOSTAR=$HOSTAR HOSTLD=$HOSTLD \
+          CC=$CC OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP READELF=$READELF
 
       # Create the config file.
       echo "generating kernel configuration..."
diff --git a/pkgs/os-specific/linux/libsepol/default.nix b/pkgs/os-specific/linux/libsepol/default.nix
index 12a94d6fc42..732ad88c70d 100644
--- a/pkgs/os-specific/linux/libsepol/default.nix
+++ b/pkgs/os-specific/linux/libsepol/default.nix
@@ -13,6 +13,11 @@ stdenv.mkDerivation rec {
     sha256 = "0ygb6dh5lng91xs6xiqf5v0nxa68qmjc787p0s5h9w89364f2yjv";
   };
 
+  postPatch = lib.optionalString stdenv.hostPlatform.isStatic ''
+    substituteInPlace src/Makefile --replace 'all: $(LIBA) $(LIBSO)' 'all: $(LIBA)'
+    sed -i $'/^\t.*LIBSO/d' src/Makefile
+  '';
+
   nativeBuildInputs = [ flex ];
 
   makeFlags = [
@@ -34,6 +39,6 @@ stdenv.mkDerivation rec {
     homepage = "http://userspace.selinuxproject.org";
     platforms = platforms.linux;
     maintainers = [ maintainers.phreedom ];
-    license = lib.licenses.gpl2;
+    license = lib.licenses.gpl2Plus;
   };
 }
diff --git a/pkgs/os-specific/linux/lvm2/default.nix b/pkgs/os-specific/linux/lvm2/default.nix
index 3db9c5e9eb6..d822ceed714 100644
--- a/pkgs/os-specific/linux/lvm2/default.nix
+++ b/pkgs/os-specific/linux/lvm2/default.nix
@@ -16,11 +16,11 @@ assert enableDmeventd -> enableCmdlib;
 
 stdenv.mkDerivation rec {
   pname = "lvm2" + lib.optionalString enableDmeventd "with-dmeventd";
-  version = "2.03.11";
+  version = "2.03.12";
 
   src = fetchurl {
     url = "https://mirrors.kernel.org/sourceware/lvm2/LVM2.${version}.tgz";
-    sha256 = "1m4xpda8vbyd89ca0w8nacvnl4j34yzsa625gn990fb5sh84ab44";
+    sha256 = "1shczwfd0888dchjiaqzd48ampm6f8y0ngsqd99fy4nxlbr5q1vn";
   };
 
   nativeBuildInputs = [ pkg-config ];
diff --git a/pkgs/os-specific/linux/miraclecast/default.nix b/pkgs/os-specific/linux/miraclecast/default.nix
index 8545d31c71a..b5efaa40afe 100644
--- a/pkgs/os-specific/linux/miraclecast/default.nix
+++ b/pkgs/os-specific/linux/miraclecast/default.nix
@@ -16,8 +16,6 @@ stdenv.mkDerivation {
 
   buildInputs = [ glib pcre readline systemd udev ];
 
-  enableParallelBuilding = true;
-
   mesonFlags = [
     "-Drely-udev=true"
     "-Dbuild-tests=true"
diff --git a/pkgs/os-specific/linux/swapview/default.nix b/pkgs/os-specific/linux/swapview/default.nix
index c88c8757db3..8eb45550105 100644
--- a/pkgs/os-specific/linux/swapview/default.nix
+++ b/pkgs/os-specific/linux/swapview/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0339biydk997j5r72vzp7djwkscsz89xr3936nshv23fmxjh2rzj";
   };
 
-  cargoSha256 = "0z99pqd41y8cci3yvwsnm5zbq7pzli62z8qqqghmz1hcq5pb5q7g";
+  cargoSha256 = "03yi6bsjjnl8hznxr1nrnxx5lrqb574625j2lkxqbl9vrg9mswdz";
 
   meta = with lib; {
     description = "A simple program to view processes' swap usage on Linux";
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index b7beeb727c4..c13f97fcde7 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -514,8 +514,6 @@ stdenv.mkDerivation {
     rm -rf $out/share/doc
   '';
 
-  enableParallelBuilding = true;
-
   # The interface version prevents NixOS from switching to an
   # incompatible systemd at runtime.  (Switching across reboots is
   # fine, of course.)  It should be increased whenever systemd changes
diff --git a/pkgs/os-specific/linux/tuigreet/default.nix b/pkgs/os-specific/linux/tuigreet/default.nix
index b6db7cfbb7f..a904eb8b9b4 100644
--- a/pkgs/os-specific/linux/tuigreet/default.nix
+++ b/pkgs/os-specific/linux/tuigreet/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1fk8ppxr3a8vdp7g18pp3sgr8b8s11j30mcqpdap4ai14v19idh8";
   };
 
-  cargoSha256 = "0qpambizjy6z44spnjnh2kd8nay5953mf1ga2iff2mjlv97zpq22";
+  cargoSha256 = "1ds5rcxg7qn799zp0jdn9ifkdzh9h5ibsqh688dvrqyzrsfz6x7m";
 
   meta = with lib; {
     description = "Graphical console greter for greetd";
diff --git a/pkgs/os-specific/linux/wlgreet/default.nix b/pkgs/os-specific/linux/wlgreet/default.nix
index e48443b1b1e..2bbf01b01c5 100644
--- a/pkgs/os-specific/linux/wlgreet/default.nix
+++ b/pkgs/os-specific/linux/wlgreet/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0n0lzg3y1z5s9s6kfkdj5q8w67bqpw08hqfccc5kz0ninzy9j0cc";
   };
 
-  cargoSha256 = "01bfv2kzg2r9z75b8pq61n2ydc8l5zh69jdyjpj931l642f6kd5a";
+  cargoSha256 = "08m8r8wy7yg5lhmyfx4n0vaf99xv97vzrs774apyxxx2wkhbyjhg";
 
   meta = with lib; {
     description = "Raw wayland greeter for greetd, to be run under sway or similar";
diff --git a/pkgs/os-specific/windows/default.nix b/pkgs/os-specific/windows/default.nix
index 7c8041206ca..15e3d7f89ab 100644
--- a/pkgs/os-specific/windows/default.nix
+++ b/pkgs/os-specific/windows/default.nix
@@ -19,7 +19,7 @@ lib.makeScope newScope (self: with self; {
 
   crossThreadsStdenv = overrideCC crossLibcStdenv
     (if stdenv.hostPlatform.useLLVM or false
-     then buildPackages.llvmPackages_8.lldClangNoLibcxx
+     then buildPackages.llvmPackages_8.clangNoLibcxx
      else buildPackages.gccCrossStageStatic.override (old: {
        bintools = old.bintools.override {
          libc = libcCross;
diff --git a/pkgs/servers/clickhouse/default.nix b/pkgs/servers/clickhouse/default.nix
index 51d091f0ad3..8c71b37d526 100644
--- a/pkgs/servers/clickhouse/default.nix
+++ b/pkgs/servers/clickhouse/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, libtool, lldClang, ninja
+{ lib, stdenv, fetchFromGitHub, cmake, libtool, llvm-bintools, ninja
 , boost, brotli, capnproto, cctz, clang-unwrapped, double-conversion
 , icu, jemalloc, libcpuid, libxml2, lld, llvm, lz4, libmysqlclient, openssl, perl
 , poco, protobuf, python3, rapidjson, re2, rdkafka, readline, sparsehash, unixODBC
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-V62Z82p21qtvSOsoXM225/Wkc9F+dvVMz0xpVjhgZVo=";
   };
 
-  nativeBuildInputs = [ cmake libtool lldClang.bintools ninja ];
+  nativeBuildInputs = [ cmake libtool llvm-bintools ninja ];
   buildInputs = [
     boost brotli capnproto cctz clang-unwrapped double-conversion
     icu jemalloc libcpuid libxml2 lld llvm lz4 libmysqlclient openssl perl
diff --git a/pkgs/servers/dns/doh-proxy-rust/default.nix b/pkgs/servers/dns/doh-proxy-rust/default.nix
index 76f1397611a..ddde393c5f6 100644
--- a/pkgs/servers/dns/doh-proxy-rust/default.nix
+++ b/pkgs/servers/dns/doh-proxy-rust/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0jksdrji06ykk5cj6i8ydcjhagjwb2xz5bjs6qsw044p8a2hsq53";
   };
 
-  cargoSha256 = "1wilm7bzr8h9yjwzw97ihavaylkv6nrk8f0vmm7kia69vqdrz9in";
+  cargoSha256 = "0i7rga5w4jh7zia4v2zkbmbc683p69z5z05ksl40jcmzvp29p3fj";
   cargoPatches = [ ./cargo-lock.patch ];
 
   buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ];
diff --git a/pkgs/servers/fishnet/default.nix b/pkgs/servers/fishnet/default.nix
index b23a7d1c920..be503567c56 100644
--- a/pkgs/servers/fishnet/default.nix
+++ b/pkgs/servers/fishnet/default.nix
@@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0dmc58wzv758b82pjpfzcfi0hr14hqcr61cd9v5xlgk5w78cisjq";
   };
 
-  cargoSha256 = "08v969b0kvsg4dq3xsb159pr52a0vqr34g48j8nvq13979yq6d8p";
+  cargoSha256 = "1s37b0w1aav6gz399zncfp0zqh5sfy0zmabhl7n8p5cwlmlvnlsj";
 
   preBuild = ''
     rmdir ./assets
diff --git a/pkgs/servers/martin/default.nix b/pkgs/servers/martin/default.nix
index e2ba917e5ab..78eaeb7ce8b 100644
--- a/pkgs/servers/martin/default.nix
+++ b/pkgs/servers/martin/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1i9zhmjkgid4s90n52wqmrl3lwswcaxd6d47ssycgjl1nv0jla4k";
   };
 
-  cargoSha256 = "08rr783qvpm1q7s60k7mh3k5npf0lg5s1x74lnxcxdgrlgpn5gcf";
+  cargoSha256 = "1jgl8s6h4pqhn189swrhn896kw1rkmqpf7dq52ry2rdci80g02nq";
 
   buildInputs = with stdenv; lib.optional isDarwin Security;
 
diff --git a/pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state.nix b/pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state.nix
index f770da75fd0..c81058b47b0 100644
--- a/pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state.nix
+++ b/pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "15jvkpbq6pgdc91wnni8fj435yqlwqgx3bb0vqjgsdyxs5lzalfh";
   };
 
-  cargoSha256 = "1zdf091s0wyribsqp8l6arkablchqxmdyg2xdc57hh06p4fjiw48";
+  cargoSha256 = "173nylp9xj88cm42yggj41iqvgb25s3awhf1dqssy8f1zyw2cf3d";
 
   meta = with lib; {
     description = "A tool to compress some state in a Synapse instance's database";
diff --git a/pkgs/servers/microserver/default.nix b/pkgs/servers/microserver/default.nix
index 30557460077..4f3b167c2ca 100644
--- a/pkgs/servers/microserver/default.nix
+++ b/pkgs/servers/microserver/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1bbbdajh74wh2fbidasim2mzmzqjrgi02v8b0g7vbhpdnlim6ixz";
   };
 
-  cargoSha256 = "0cyxa200iz7knkma4zi3mzky3g0kibbxd5303psk2rl2rppir0f7";
+  cargoSha256 = "1wh5riw1fr87wbzbzjnwi5zsc5nflwnp6qcpa8a2js54ncd01n16";
 
   buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security ]);
 
diff --git a/pkgs/servers/monitoring/prometheus/unbound-exporter.nix b/pkgs/servers/monitoring/prometheus/unbound-exporter.nix
index 1c1997e43e4..c7c8f3e5963 100644
--- a/pkgs/servers/monitoring/prometheus/unbound-exporter.nix
+++ b/pkgs/servers/monitoring/prometheus/unbound-exporter.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "xCelL6WGaTRhDJkkUdpdwj1zcKKAU2dyUv3mHeI4oAw=";
   };
 
-  cargoSha256 = "P3nAtYOuwNSLMP7q1L5zKTsZ6rJA/qL1mhVHzP3szi4=";
+  cargoSha256 = "sha256-P3nAtYOuwNSLMP7q1L5zKTsZ6rJA/qL1mhVHzP3szi4=";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/servers/routinator/default.nix b/pkgs/servers/routinator/default.nix
index 4d326c0bd62..c874a9309af 100644
--- a/pkgs/servers/routinator/default.nix
+++ b/pkgs/servers/routinator/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
   };
 
   buildInputs = lib.optionals stdenv.isDarwin [ Security ];
-  cargoSha256 = "sha256-lhSSyJxxHc0t43xoDMtr/lSVL0xZl6poPYiyYXNvKKQ=";
+  cargoSha256 = "sha256-NtugqvaickcEowxGwotGuh6jb2NTK95csJxtjezy90s=";
 
   meta = with lib; {
     description = "An RPKI Validator written in Rust";
diff --git a/pkgs/servers/search/meilisearch/default.nix b/pkgs/servers/search/meilisearch/default.nix
index 6ee90aba299..4ad1d78eb50 100644
--- a/pkgs/servers/search/meilisearch/default.nix
+++ b/pkgs/servers/search/meilisearch/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "00i5vsbcyrbsvhr5n1b3pxa87v0kfw6pg931i2kzyf4wh021k6sw";
   };
 
-  cargoSha256 = "0axjygk8a7cykpa5skk4a6mkm8rndkr76l10h3z3gjdc88b17qcz";
+  cargoSha256 = "1icxpragn69c95i5gyx0b07gw4h82r8fsv0nvns0v8dxqisz877k";
 
   buildInputs = lib.optionals stdenv.isDarwin [ IOKit Security ];
 
diff --git a/pkgs/servers/sozu/default.nix b/pkgs/servers/sozu/default.nix
index 057bce2e4b0..07f85c889c2 100644
--- a/pkgs/servers/sozu/default.nix
+++ b/pkgs/servers/sozu/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-/XyBzhZCsX9sGk+iTFlDnblWfDCZdI4b9yfo4Z+Wp1U=";
   };
 
-  cargoSha256 = "sha256-F5EjBWHBNaQipxCi9Kiz5UTPMU0DuRf15NIVVvhiRxY=";
+  cargoSha256 = "sha256-xnps3/i6BpzdwUAQmb8aoOPc39L2P52y/ZDAeLoEIU8=";
 
   buildInputs =
     lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
diff --git a/pkgs/servers/tarssh/default.nix b/pkgs/servers/tarssh/default.nix
index ac7f2678260..446e187e467 100644
--- a/pkgs/servers/tarssh/default.nix
+++ b/pkgs/servers/tarssh/default.nix
@@ -13,7 +13,7 @@ buildRustPackage rec {
     sha256 = "sha256-AoKc8VF6rqYIsijIfgvevwu+6+suOO7XQCXXgAPNgLk=";
   };
 
-  cargoSha256 = "sha256-7X9klYVZ2yE8BPuLhzWkuT7VFpmdOZGSD0D1x3kBNEs=";
+  cargoSha256 = "sha256-w1MNsMSGONsAAjyvAHjio2K88j1sqyP1Aqmw3EMya+c=";
 
   meta = with lib; {
     description = "A simple SSH tarpit inspired by endlessh";
diff --git a/pkgs/servers/udpt/default.nix b/pkgs/servers/udpt/default.nix
index 3eb51b68b8c..b9d18f63eef 100644
--- a/pkgs/servers/udpt/default.nix
+++ b/pkgs/servers/udpt/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1g6l0y5x9pdra3i1npkm474glysicm4hf2m01700ack2rp43vldr";
   };
 
-  cargoSha256 = "1cmd80ndjxdmyfjpm1f04rwf64501nyi6wdsj7lxidgd1v92wy2c";
+  cargoSha256 = "0raym4zrapn3w0a98y9amyp2qh7swd73cjslsfgfzlr9w8vsb6zs";
 
   postInstall = ''
     install -D udpt.toml $out/share/udpt/udpt.toml
diff --git a/pkgs/servers/unpfs/default.nix b/pkgs/servers/unpfs/default.nix
index 07342c3edbe..f1d1e52b6c6 100644
--- a/pkgs/servers/unpfs/default.nix
+++ b/pkgs/servers/unpfs/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   sourceRoot = "source/example/unpfs";
 
-  cargoSha256 = "13mk86d8ql2196039qb7z0rx4svwffw1mzpiyxp35gg5fhcphriq";
+  cargoSha256 = "1vdk99qz23lkh5z03qjjs3d6p2vdmxrmd2km9im94gzgcyb2fvjs";
 
   RUSTC_BOOTSTRAP = 1;
 
diff --git a/pkgs/servers/webmetro/default.nix b/pkgs/servers/webmetro/default.nix
index 6bda15a93e0..2cae2887e9f 100644
--- a/pkgs/servers/webmetro/default.nix
+++ b/pkgs/servers/webmetro/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1n2c7ygs8qsd5zgii6fqqcwg427bsij082bg4ijnzkq5630dx651";
   };
 
-  cargoSha256 = "0xifc3jwj0c6ynx0gzm5zlnfcq023fjpjmdg9x0vs1fh3b42pdsy";
+  cargoSha256 = "1n4498byy2m2f928hamfn959abrrn693wcc323ifqqrvnbkckdz8";
 
   meta = with lib; {
     description = "Simple relay server for broadcasting a WebM stream";
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix
index ed2b291ca2a..18a6e2a4737 100644
--- a/pkgs/stdenv/cross/default.nix
+++ b/pkgs/stdenv/cross/default.nix
@@ -48,7 +48,9 @@ in lib.init bootStages ++ [
       # Prior overrides are surely not valid as packages built with this run on
       # a different platform, and so are disabled.
       overrides = _: _: {};
-      extraBuildInputs = [ ]; # Old ones run on wrong platform
+      extraBuildInputs = [ ] # Old ones run on wrong platform
+         ++ lib.optionals hostPlatform.isDarwin [ buildPackages.targetPackages.darwin.apple_sdk.frameworks.CoreFoundation ]
+         ;
       allowedRequisites = null;
 
       hasCC = !targetPlatform.isGhcjs;
@@ -66,7 +68,7 @@ in lib.init bootStages ++ [
            else if crossSystem.isDarwin
              then buildPackages.llvmPackages.clang
            else if crossSystem.useLLVM or false
-             then buildPackages.llvmPackages.lldClang
+             then buildPackages.llvmPackages.clangUseLLVM
            else buildPackages.gcc;
 
       extraNativeBuildInputs = old.extraNativeBuildInputs
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix
index c2db758bbea..efa19d2783e 100644
--- a/pkgs/stdenv/darwin/default.nix
+++ b/pkgs/stdenv/darwin/default.nix
@@ -1,18 +1,33 @@
 { lib
 , localSystem, crossSystem, config, overlays, crossOverlays ? []
 # Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools
-, bootstrapFiles ? let
-  fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> {
-    url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/5ab5783e4f46c373c6de84deac9ad59b608bb2e6/${file}";
-    inherit (localSystem) system;
-    inherit sha256 executable;
-  }; in {
-    sh      = fetch { file = "sh";    sha256 = "sha256-nbb4XEk3go7ttiWrQyKQMLzPr+qUnwnHkWMtVCZsMCs="; };
-    bzip2   = fetch { file = "bzip2"; sha256 = "sha256-ybnA+JWrKhXSfn20+GVKXkHFTp2Zt79hat8hAVmsUOc="; };
-    mkdir   = fetch { file = "mkdir"; sha256 = "sha256-nmvMxmfcY41/60Z/E8L9u0vgePW5l30Dqw1z+Nr02Hk="; };
-    cpio    = fetch { file = "cpio";  sha256 = "sha256-cB36rN3NLj19Tk37Kc5bodMFMO+mCpEQkKKo0AEMkaU="; };
-    tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "sha256-kh2vKmjCr/HvR06czZbxUxV5KDRxSF27M6nN3cyofRI="; executable = false; };
-  }
+, bootstrapFiles ?
+  if localSystem.isAarch64 then
+    let
+      fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> {
+        url = "http://tarballs.nixos.org/stdenv-darwin/aarch64/20acd4c4f14040485f40e55c0a76c186aa8ca4f3/${file}";
+        inherit (localSystem) system;
+        inherit sha256 executable;
+      }; in {
+        sh      = fetch { file = "sh";    sha256 = "17m3xrlbl99j3vm7rzz3ghb47094dyddrbvs2a6jalczvmx7spnj"; };
+        bzip2   = fetch { file = "bzip2"; sha256 = "1khs8s5klf76plhlvlc1ma838r8pc1qigk9f5bdycwgbn0nx240q"; };
+        mkdir   = fetch { file = "mkdir"; sha256 = "1m9nk90paazl93v43myv2ay68c1arz39pqr7lk5ddbgb177hgg8a"; };
+        cpio    = fetch { file = "cpio";  sha256 = "17pxq61yjjvyd738fy9f392hc9cfzkl612sdr9rxr3v0dgvm8y09"; };
+        tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "1v2332k33akm6mrm4bj749rxnnmc2pkbgcslmd0bbkf76bz2ildy"; executable = false; };
+      }
+  else
+    let
+      fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> {
+        url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/5ab5783e4f46c373c6de84deac9ad59b608bb2e6/${file}";
+        inherit (localSystem) system;
+        inherit sha256 executable;
+      }; in {
+        sh      = fetch { file = "sh";    sha256 = "sha256-nbb4XEk3go7ttiWrQyKQMLzPr+qUnwnHkWMtVCZsMCs="; };
+        bzip2   = fetch { file = "bzip2"; sha256 = "sha256-ybnA+JWrKhXSfn20+GVKXkHFTp2Zt79hat8hAVmsUOc="; };
+        mkdir   = fetch { file = "mkdir"; sha256 = "sha256-nmvMxmfcY41/60Z/E8L9u0vgePW5l30Dqw1z+Nr02Hk="; };
+        cpio    = fetch { file = "cpio";  sha256 = "sha256-cB36rN3NLj19Tk37Kc5bodMFMO+mCpEQkKKo0AEMkaU="; };
+        tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "sha256-kh2vKmjCr/HvR06czZbxUxV5KDRxSF27M6nN3cyofRI="; executable = false; };
+      }
 }:
 
 assert crossSystem == localSystem;
@@ -20,13 +35,22 @@ assert crossSystem == localSystem;
 let
   inherit (localSystem) system;
 
-  bootstrapClangVersion = "7.1.0";
+  # Bootstrap version needs to be known to reference headers included in the bootstrap tools
+  bootstrapLlvmVersion = if localSystem.isAarch64 then "11.1.0" else "7.1.0";
+
+  useAppleSDKLibs = localSystem.isAarch64;
+  haveKRB5 = localSystem.isx86_64;
+
+  # final toolchain is injected into llvmPackages_${finalLlvmVersion}
+  finalLlvmVersion = if localSystem.isAarch64 then "11" else "7";
+  finalLlvmPackages = "llvmPackages_${finalLlvmVersion}";
 
   commonImpureHostDeps = [
     "/bin/sh"
     "/usr/lib/libSystem.B.dylib"
     "/usr/lib/system/libunc.dylib" # This dependency is "hidden", so our scanning code doesn't pick it up
   ];
+
 in rec {
   commonPreHook = ''
     export NIX_ENFORCE_NO_NATIVE=''${NIX_ENFORCE_NO_NATIVE-1}
@@ -45,7 +69,7 @@ in rec {
 
     name    = "bootstrap-tools";
     builder = bootstrapFiles.sh; # Not a filename! Attribute 'sh' on bootstrapFiles
-    args    = [ ./unpack-bootstrap-tools.sh ];
+    args    = if localSystem.isAarch64 then [ ./unpack-bootstrap-tools-aarch64.sh ] else [ ./unpack-bootstrap-tools.sh ];
 
     inherit (bootstrapFiles) mkdir bzip2 cpio tarball;
 
@@ -70,11 +94,14 @@ in rec {
         inherit (last) stdenv;
       };
 
+      doSign = localSystem.isAarch64 && last != null;
+      doUpdateAutoTools = localSystem.isAarch64 && last != null;
+
       mkExtraBuildCommands = cc: ''
         rsrc="$out/resource-root"
         mkdir "$rsrc"
         ln -s "${cc.lib or cc}/lib/clang/${cc.version}/include" "$rsrc"
-        ln -s "${last.pkgs.llvmPackages_7.compiler-rt.out}/lib" "$rsrc/lib"
+        ln -s "${last.pkgs."${finalLlvmPackages}".compiler-rt.out}/lib" "$rsrc/lib"
         echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
       '';
 
@@ -90,13 +117,13 @@ in rec {
           bintools     = last.pkgs.darwin.binutils;
           libc         = last.pkgs.darwin.Libsystem;
           isClang      = true;
-          cc           = last.pkgs.llvmPackages_7.clang-unwrapped;
+          cc           = last.pkgs."${finalLlvmPackages}".clang-unwrapped;
         }; in args // (overrides args));
 
       cc = if last == null then "/dev/null" else mkCC ({ cc, ... }: {
         extraPackages = [
-          last.pkgs.llvmPackages_7.libcxxabi
-          last.pkgs.llvmPackages_7.compiler-rt
+          last.pkgs."${finalLlvmPackages}".libcxxabi
+          last.pkgs."${finalLlvmPackages}".compiler-rt
         ];
         extraBuildCommands = mkExtraBuildCommands cc;
       });
@@ -104,11 +131,11 @@ in rec {
       ccNoLibcxx = if last == null then "/dev/null" else mkCC ({ cc, ... }: {
         libcxx = null;
         extraPackages = [
-          last.pkgs.llvmPackages_7.compiler-rt
+          last.pkgs."${finalLlvmPackages}".compiler-rt
         ];
         extraBuildCommands = ''
           echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
-          echo "-B${last.pkgs.llvmPackages_7.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+          echo "-B${last.pkgs."${finalLlvmPackages}".compiler-rt}/lib" >> $out/nix-support/cc-cflags
           echo "-nostdlib++" >> $out/nix-support/cc-cflags
         '' + mkExtraBuildCommands cc;
       });
@@ -116,9 +143,20 @@ in rec {
       thisStdenv = import ../generic {
         name = "${name}-stdenv-darwin";
 
-        inherit config shell extraNativeBuildInputs extraBuildInputs;
+        inherit config shell extraBuildInputs;
+
+        extraNativeBuildInputs = extraNativeBuildInputs ++ lib.optionals doUpdateAutoTools [
+          last.pkgs.updateAutotoolsGnuConfigScriptsHook last.pkgs.gnu-config
+        ];
+
         allowedRequisites = if allowedRequisites == null then null else allowedRequisites ++ [
           cc.expand-response-params cc.bintools
+        ] ++ lib.optionals doUpdateAutoTools [
+          last.pkgs.updateAutotoolsGnuConfigScriptsHook last.pkgs.gnu-config
+        ] ++ lib.optionals doSign [
+          last.pkgs.darwin.postLinkSignHook
+          last.pkgs.darwin.sigtool
+          last.pkgs.darwin.signingUtils
         ];
 
         buildPlatform = localSystem;
@@ -176,7 +214,97 @@ in rec {
         '';
       };
 
+      pbzx = stdenv.mkDerivation {
+        name = "bootstrap-stage0-pbzx";
+        phases = [ "installPhase" ];
+        installPhase = ''
+          mkdir -p $out/bin
+          ln -s ${bootstrapTools}/bin/pbzx $out/bin
+        '';
+      };
+
+      cpio = stdenv.mkDerivation {
+        name = "bootstrap-stage0-cpio";
+        phases = [ "installPhase" ];
+        installPhase = ''
+          mkdir -p $out/bin
+          ln -s ${bootstrapFiles.cpio} $out/bin/cpio
+        '';
+      };
+
       darwin = super.darwin.overrideScope (selfDarwin: superDarwin: {
+        darwin-stubs = superDarwin.darwin-stubs.override { inherit (self) stdenvNoCC fetchurl; };
+
+        dyld = {
+          name = "bootstrap-stage0-dyld";
+          buildCommand = ''
+            mkdir -p $out
+            ln -s ${bootstrapTools}/lib     $out/lib
+            ln -s ${bootstrapTools}/include $out/include
+          '';
+        };
+
+        sigtool = stdenv.mkDerivation {
+          name = "bootstrap-stage0-sigtool";
+          phases = [ "installPhase" ];
+          installPhase = ''
+            mkdir -p $out/bin
+            ln -s ${bootstrapTools}/bin/sigtool $out/bin
+
+            # Rewrite nuked references
+            sed -e "s|[^( ]*\bsigtool\b|$out/bin/sigtool|g" \
+              ${bootstrapTools}/bin/codesign > $out/bin/codesign
+            chmod a+x $out/bin/codesign
+          '';
+        };
+
+        print-reexports = stdenv.mkDerivation {
+          name = "bootstrap-stage0-print-reexports";
+          phases = [ "installPhase" ];
+          installPhase = ''
+            mkdir -p $out/bin
+            ln -s ${bootstrapTools}/bin/print-reexports $out/bin
+          '';
+        };
+
+        rewrite-tbd = stdenv.mkDerivation {
+          name = "bootstrap-stage0-rewrite-tbd";
+          phases = [ "installPhase" ];
+          installPhase = ''
+            mkdir -p $out/bin
+            ln -s ${bootstrapTools}/bin/rewrite-tbd $out/bin
+          '';
+        };
+
+        binutils-unwrapped = { name = "bootstrap-stage0-binutils"; outPath = bootstrapTools; };
+
+        cctools = {
+          name = "bootstrap-stage0-cctools";
+          outPath = bootstrapTools;
+          targetPrefix = "";
+        };
+
+        binutils = lib.makeOverridable (import ../../build-support/bintools-wrapper) {
+          shell = "${bootstrapTools}/bin/bash";
+          inherit lib;
+          inherit (self) stdenvNoCC;
+
+          nativeTools  = false;
+          nativeLibc   = false;
+          inherit (self) buildPackages coreutils gnugrep;
+          libc         = selfDarwin.Libsystem;
+          bintools     = selfDarwin.binutils-unwrapped;
+          inherit (selfDarwin) postLinkSignHook signingUtils;
+        };
+      } // lib.optionalAttrs (! useAppleSDKLibs) {
+        CF = stdenv.mkDerivation {
+          name = "bootstrap-stage0-CF";
+          buildCommand = ''
+            mkdir -p $out/Library/Frameworks
+            ln -s ${bootstrapTools}/Library/Frameworks/CoreFoundation.framework $out/Library/Frameworks
+          '';
+        };
+
         Libsystem = stdenv.mkDerivation {
           name = "bootstrap-stage0-Libsystem";
           buildCommand = ''
@@ -200,35 +328,12 @@ in rec {
             ln -s ${bootstrapTools}/include-Libsystem $out/include
           '';
         };
-
-        darwin-stubs = superDarwin.darwin-stubs.override { inherit (self) stdenv fetchurl; };
-
-        dyld = {
-          name = "bootstrap-stage0-dyld";
-          buildCommand = ''
-            mkdir -p $out
-            ln -s ${bootstrapTools}/lib     $out/lib
-            ln -s ${bootstrapTools}/include $out/include
-          '';
-        };
-
-        binutils = lib.makeOverridable (import ../../build-support/bintools-wrapper) {
-          shell = "${bootstrapTools}/bin/bash";
-          inherit lib;
-          inherit (self) stdenvNoCC;
-
-          nativeTools  = false;
-          nativeLibc   = false;
-          inherit (self) buildPackages coreutils gnugrep;
-          libc         = selfDarwin.Libsystem;
-          bintools     = { name = "bootstrap-stage0-binutils"; outPath = bootstrapTools; };
-        };
       });
 
-      llvmPackages_7 = {
+      "${finalLlvmPackages}" = {
         clang-unwrapped = stdenv.mkDerivation {
           name = "bootstrap-stage0-clang";
-          version = bootstrapClangVersion;
+          version = bootstrapLlvmVersion;
           buildCommand = ''
             mkdir -p $out/lib
             ln -s ${bootstrapTools}/bin $out/bin
@@ -278,36 +383,46 @@ in rec {
     persistent = self: super: with prevStage; {
       cmake = super.cmakeMinimal;
 
+      inherit pbzx cpio;
+
       python3 = super.python3Minimal;
 
       ninja = super.ninja.override { buildDocs = false; };
 
-      llvmPackages_7 = super.llvmPackages_7 // (let
-        tools = super.llvmPackages_7.tools.extend (_: _: {
-          inherit (llvmPackages_7) clang-unwrapped;
+      "${finalLlvmPackages}" = super."${finalLlvmPackages}" // (let
+        tools = super."${finalLlvmPackages}".tools.extend (_: _: {
+          inherit (pkgs."${finalLlvmPackages}") clang-unwrapped;
         });
-        libraries = super.llvmPackages_7.libraries.extend (_: _: {
-          inherit (llvmPackages_7) compiler-rt libcxx libcxxabi;
+        libraries = super."${finalLlvmPackages}".libraries.extend (_: _: {
+          inherit (pkgs."${finalLlvmPackages}") compiler-rt libcxx libcxxabi;
         });
       in { inherit tools libraries; } // tools // libraries);
 
       darwin = super.darwin.overrideScope (selfDarwin: _: {
+        inherit (darwin) rewrite-tbd binutils-unwrapped;
+
+        signingUtils = darwin.signingUtils.override {
+          inherit (selfDarwin) sigtool;
+        };
+
         binutils = darwin.binutils.override {
           coreutils = self.coreutils;
           libc = selfDarwin.Libsystem;
+          inherit (selfDarwin) postLinkSignHook signingUtils;
         };
       });
     };
   in with prevStage; stageFun 1 prevStage {
     extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\"";
     extraNativeBuildInputs = [];
-    extraBuildInputs = [ ];
-    libcxx = pkgs.libcxx;
+    extraBuildInputs = [ pkgs.darwin.CF ];
+    libcxx = pkgs."${finalLlvmPackages}".libcxx;
 
     allowedRequisites =
       [ bootstrapTools ] ++
-      (with pkgs; [ coreutils gnugrep libcxx libcxxabi llvmPackages_7.clang-unwrapped llvmPackages_7.compiler-rt ]) ++
-      (with pkgs.darwin; [ darwin-stubs Libsystem ]);
+      (with pkgs; [ coreutils gnugrep ]) ++
+      (with pkgs."${finalLlvmPackages}"; [ libcxx libcxxabi compiler-rt clang-unwrapped ]) ++
+      (with pkgs.darwin; [ Libsystem CF ] ++ lib.optional useAppleSDKLibs objc4);
 
     overrides = persistent;
   };
@@ -321,26 +436,30 @@ in rec {
         findfreetype libssh curl cmake autoconf automake libtool ed cpio coreutils
         libssh2 nghttp2 libkrb5 ninja brotli;
 
-      llvmPackages_7 = super.llvmPackages_7 // (let
-        tools = super.llvmPackages_7.tools.extend (_: _: {
-          inherit (llvmPackages_7) clang-unwrapped;
+      "${finalLlvmPackages}" = super."${finalLlvmPackages}" // (let
+        tools = super."${finalLlvmPackages}".tools.extend (_: _: {
+          inherit (pkgs."${finalLlvmPackages}") clang-unwrapped;
         });
-        libraries = super.llvmPackages_7.libraries.extend (_: libSuper: {
-          inherit (llvmPackages_7) compiler-rt;
+        libraries = super."${finalLlvmPackages}".libraries.extend (_: libSuper: {
+          inherit (pkgs."${finalLlvmPackages}") compiler-rt;
           libcxx = libSuper.libcxx.override {
             stdenv = overrideCC self.stdenv self.ccNoLibcxx;
           };
-          libcxxabi = libSuper.libcxxabi.override {
+          libcxxabi = libSuper.libcxxabi.override ({
             stdenv = overrideCC self.stdenv self.ccNoLibcxx;
+          } // lib.optionalAttrs (finalLlvmVersion == "7") {
+            # TODO: the bootstrapping of llvm packages isn't consistent.
+            # `standalone` may be redundant if darwin behaves like useLLVM (or
+            # has useLLVM = true).
             standalone = true;
-          };
+          });
         });
       in { inherit tools libraries; } // tools // libraries);
 
       darwin = super.darwin.overrideScope (_: _: {
         inherit (darwin)
           binutils dyld Libsystem xnu configd ICU libdispatch libclosure
-          launchd CF darwin-stubs;
+          launchd CF objc4 darwin-stubs sigtool postLinkSignHook signingUtils;
       });
     };
   in with prevStage; stageFun 2 prevStage {
@@ -350,16 +469,18 @@ in rec {
 
     extraNativeBuildInputs = [ pkgs.xz ];
     extraBuildInputs = [ pkgs.darwin.CF ];
-    libcxx = pkgs.libcxx;
+    libcxx = pkgs."${finalLlvmPackages}".libcxx;
 
     allowedRequisites =
       [ bootstrapTools ] ++
       (with pkgs; [
-        xz.bin xz.out libcxx libcxxabi llvmPackages_7.compiler-rt
-        llvmPackages_7.clang-unwrapped zlib libxml2.out curl.out brotli.lib openssl.out
-        libssh2.out nghttp2.lib libkrb5 coreutils gnugrep pcre.out gmp libiconv
+        xz.bin xz.out zlib libxml2.out curl.out openssl.out libssh2.out
+        nghttp2.lib coreutils gnugrep pcre.out gmp libiconv brotli.lib
+      ] ++ lib.optional haveKRB5 libkrb5) ++
+      (with pkgs."${finalLlvmPackages}"; [
+       libcxx libcxxabi compiler-rt clang-unwrapped
       ]) ++
-      (with pkgs.darwin; [ dyld Libsystem CF ICU locale ]);
+      (with pkgs.darwin; [ dyld Libsystem CF ICU locale ] ++ lib.optional useAppleSDKLibs objc4);
 
     overrides = persistent;
   };
@@ -376,16 +497,16 @@ in rec {
       # Avoid pulling in a full python and its extra dependencies for the llvm/clang builds.
       libxml2 = super.libxml2.override { pythonSupport = false; };
 
-      llvmPackages_7 = super.llvmPackages_7 // (let
-        libraries = super.llvmPackages_7.libraries.extend (_: _: {
-          inherit (llvmPackages_7) libcxx libcxxabi;
+      "${finalLlvmPackages}" = super."${finalLlvmPackages}" // (let
+        libraries = super."${finalLlvmPackages}".libraries.extend (_: _: {
+          inherit (pkgs."${finalLlvmPackages}") libcxx libcxxabi;
         });
       in { inherit libraries; } // libraries);
 
       darwin = super.darwin.overrideScope (_: _: {
         inherit (darwin)
           dyld Libsystem xnu configd libdispatch libclosure launchd libiconv
-          locale darwin-stubs;
+          locale darwin-stubs sigtool;
       });
     };
   in with prevStage; stageFun 3 prevStage {
@@ -397,7 +518,7 @@ in rec {
     # patches our shebangs back to point at bootstrapTools. This makes sure bash comes first.
     extraNativeBuildInputs = with pkgs; [ xz ];
     extraBuildInputs = [ pkgs.darwin.CF pkgs.bash ];
-    libcxx = pkgs.libcxx;
+    libcxx = pkgs."${finalLlvmPackages}".libcxx;
 
     extraPreHook = ''
       export PATH=${pkgs.bash}/bin:$PATH
@@ -407,11 +528,13 @@ in rec {
     allowedRequisites =
       [ bootstrapTools ] ++
       (with pkgs; [
-        xz.bin xz.out bash libcxx libcxx.dev libcxxabi libcxxabi.dev llvmPackages_7.compiler-rt
-        llvmPackages_7.clang-unwrapped zlib libxml2.out curl.out brotli.lib openssl.out
-        libssh2.out nghttp2.lib libkrb5 coreutils gnugrep pcre.out gmp libiconv
+        xz.bin xz.out bash zlib libxml2.out curl.out openssl.out libssh2.out
+        nghttp2.lib coreutils gnugrep pcre.out gmp libiconv brotli.lib
+      ] ++ lib.optional haveKRB5 libkrb5) ++
+      (with pkgs."${finalLlvmPackages}"; [
+       libcxx libcxx.dev libcxxabi libcxxabi.dev compiler-rt clang-unwrapped
       ]) ++
-      (with pkgs.darwin; [ dyld ICU Libsystem locale ]);
+      (with pkgs.darwin; [ dyld ICU Libsystem locale ] ++ lib.optional useAppleSDKLibs objc4);
 
     overrides = persistent;
   };
@@ -432,20 +555,21 @@ in rec {
         ];
       });
 
-      llvmPackages_7 = super.llvmPackages_7 // (let
-        tools = super.llvmPackages_7.tools.extend (llvmSelf: _: {
-          clang-unwrapped-all-outputs = llvmPackages_7.clang-unwrapped-all-outputs.override { llvm = llvmSelf.llvm; };
-          libllvm = llvmPackages_7.libllvm.override { inherit libxml2; };
+      "${finalLlvmPackages}" = super."${finalLlvmPackages}" // (let
+        tools = super."${finalLlvmPackages}".tools.extend (llvmSelf: _: {
+          clang-unwrapped-all-outputs = pkgs."${finalLlvmPackages}".clang-unwrapped-all-outputs.override { llvm = llvmSelf.llvm; };
+          libllvm = pkgs."${finalLlvmPackages}".libllvm.override { inherit libxml2; };
         });
-        libraries = super.llvmPackages_7.libraries.extend (llvmSelf: _: {
-          inherit (llvmPackages_7) libcxx libcxxabi compiler-rt;
+        libraries = super."${finalLlvmPackages}".libraries.extend (llvmSelf: _: {
+          inherit (pkgs."${finalLlvmPackages}") libcxx libcxxabi compiler-rt;
         });
       in { inherit tools libraries; } // tools // libraries);
 
       darwin = super.darwin.overrideScope (_: superDarwin: {
         inherit (darwin) dyld Libsystem libiconv locale darwin-stubs;
 
-        CF = superDarwin.CF.override {
+        # See useAppleSDKLibs in darwin-packages.nix
+        CF = if useAppleSDKLibs then super.darwin.CF else superDarwin.CF.override {
           inherit libxml2;
           python3 = prevStage.python3;
         };
@@ -455,7 +579,7 @@ in rec {
     shell = "${pkgs.bash}/bin/bash";
     extraNativeBuildInputs = with pkgs; [ xz ];
     extraBuildInputs = [ pkgs.darwin.CF pkgs.bash ];
-    libcxx = pkgs.libcxx;
+    libcxx = pkgs."${finalLlvmPackages}".libcxx;
 
     extraPreHook = ''
       export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
@@ -464,29 +588,32 @@ in rec {
   };
 
   stdenvDarwin = prevStage: let
+    doSign = localSystem.isAarch64;
     pkgs = prevStage;
     persistent = self: super: with prevStage; {
       inherit
         gnumake gzip gnused bzip2 gawk ed xz patch bash
-        ncurses libffi zlib llvm gmp pcre gnugrep
-        coreutils findutils diffutils patchutils;
+        ncurses libffi zlib gmp pcre gnugrep
+        coreutils findutils diffutils patchutils pbzx;
 
-      llvmPackages_7 = super.llvmPackages_7 // (let
-        tools = super.llvmPackages_7.tools.extend (_: super: {
-          inherit (llvmPackages_7) llvm clang-unwrapped;
-        });
-        libraries = super.llvmPackages_7.libraries.extend (_: _: {
-          inherit (llvmPackages_7) compiler-rt libcxx libcxxabi;
-        });
-      in { inherit tools libraries; } // tools // libraries);
-
-      darwin = super.darwin.overrideScope (_: _: {
-        inherit (darwin) dyld ICU Libsystem libiconv;
+      darwin =  super.darwin.overrideScope (_: _: {
+        inherit (darwin) dyld ICU Libsystem Csu libiconv rewrite-tbd;
       } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
         inherit (darwin) binutils binutils-unwrapped cctools;
       });
     } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
+      inherit llvm;
+
       # Need to get rid of these when cross-compiling.
+      "${finalLlvmPackages}" = super."${finalLlvmPackages}" // (let
+        tools = super."${finalLlvmPackages}".tools.extend (_: super: {
+          inherit (pkgs."${finalLlvmPackages}") llvm clang-unwrapped;
+        });
+        libraries = super."${finalLlvmPackages}".libraries.extend (_: _: {
+          inherit (pkgs."${finalLlvmPackages}") compiler-rt libcxx libcxxabi;
+        });
+      in { inherit tools libraries; } // tools // libraries);
+
       inherit binutils binutils-unwrapped;
     };
   in import ../generic rec {
@@ -510,11 +637,12 @@ in rec {
     initialPath = import ../common-path.nix { inherit pkgs; };
     shell       = "${pkgs.bash}/bin/bash";
 
-    cc = pkgs.llvmPackages.libcxxClang.override {
-      cc = pkgs.llvmPackages.clang-unwrapped;
-    };
+    cc = pkgs."${finalLlvmPackages}".libcxxClang;
+
+    extraNativeBuildInputs = lib.optionals localSystem.isAarch64 [
+      pkgs.updateAutotoolsGnuConfigScriptsHook
+    ];
 
-    extraNativeBuildInputs = [];
     extraBuildInputs = [ pkgs.darwin.CF ];
 
     extraAttrs = {
@@ -524,19 +652,27 @@ in rec {
     };
 
     allowedRequisites = (with pkgs; [
-      xz.out xz.bin libcxx libcxx.dev libcxxabi libcxxabi.dev gmp.out gnumake findutils bzip2.out
-      bzip2.bin llvmPackages.llvm llvmPackages.llvm.lib llvmPackages.compiler-rt llvmPackages.compiler-rt.dev
+      xz.out xz.bin gmp.out gnumake findutils bzip2.out
+      bzip2.bin
       zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar
       gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk
-      gnugrep llvmPackages.clang-unwrapped
-      llvmPackages.libclang.dev llvmPackages.libclang.lib
-      patch pcre.out gettext
+      gnugrep patch pcre.out gettext
       binutils.bintools darwin.binutils darwin.binutils.bintools
-      curl.out brotli.lib openssl.out libssh2.out nghttp2.lib libkrb5
+      curl.out openssl.out libssh2.out nghttp2.lib brotli.lib
       cc.expand-response-params libxml2.out
-    ]) ++ (with pkgs.darwin; [
+    ] ++ lib.optional haveKRB5 libkrb5
+    ++ lib.optionals localSystem.isAarch64 [
+      pkgs.updateAutotoolsGnuConfigScriptsHook pkgs.gnu-config
+    ])
+    ++ (with pkgs."${finalLlvmPackages}"; [
+      libcxx libcxx.dev libcxxabi libcxxabi.dev
+      llvm llvm.lib compiler-rt compiler-rt.dev
+      clang-unwrapped libclang.dev libclang.lib
+    ])
+    ++ (with pkgs.darwin; [
       dyld Libsystem CF cctools ICU libiconv locale libtapi
-    ]);
+    ] ++ lib.optional useAppleSDKLibs objc4
+    ++ lib.optionals doSign [ postLinkSignHook sigtool signingUtils ]);
 
     overrides = lib.composeExtensions persistent (self: super: {
       darwin = super.darwin.overrideScope (_: superDarwin: {
diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix
index 4b6562a205a..a42499eebce 100644
--- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix
+++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix
@@ -1,9 +1,15 @@
-{ pkgspath ? ../../.., test-pkgspath ? pkgspath, system ? builtins.currentSystem }:
+{ pkgspath ? ../../.., test-pkgspath ? pkgspath, system ? builtins.currentSystem, crossSystem ? null }:
 
-with import pkgspath { inherit system; };
+let
+  pkgs = import pkgspath ({ inherit system; } // (if (crossSystem != null) then { inherit crossSystem; } else {}));
+in
+
+with pkgs;
 
 let
-  llvmPackages = llvmPackages_7;
+  llvmPackageSet = if stdenv.hostPlatform.isAarch64 then "llvmPackages_11" else "llvmPackages_7";
+  llvmPackages = pkgs."${llvmPackageSet}";
+  storePrefixLen = builtins.stringLength builtins.storeDir;
 in rec {
   coreutils_ = coreutils.override (args: {
     # We want coreutils without ACL support.
@@ -23,23 +29,26 @@ in rec {
   build = stdenv.mkDerivation {
     name = "stdenv-bootstrap-tools";
 
-    buildInputs = [nukeReferences cpio];
+    nativeBuildInputs = [ buildPackages.nukeReferences buildPackages.cpio ]
+      ++ lib.optionals targetPlatform.isAarch64 [ buildPackages.darwin.sigtool ];
 
     buildCommand = ''
-      mkdir -p $out/bin $out/lib $out/lib/system
+      mkdir -p $out/bin $out/lib $out/lib/system $out/lib/darwin
 
-      # Copy libSystem's .o files for various low-level boot stuff.
-      cp -d ${darwin.Libsystem}/lib/*.o $out/lib
+      ${lib.optionalString stdenv.targetPlatform.isx86_64 ''
+        # Copy libSystem's .o files for various low-level boot stuff.
+        cp -d ${darwin.Libsystem}/lib/*.o $out/lib
 
-      # Resolv is actually a link to another package, so let's copy it properly
-      cp -L ${darwin.Libsystem}/lib/libresolv.9.dylib $out/lib
+        # Resolv is actually a link to another package, so let's copy it properly
+        cp -L ${darwin.Libsystem}/lib/libresolv.9.dylib $out/lib
 
-      cp -rL ${darwin.Libsystem}/include $out
-      chmod -R u+w $out/include
-      cp -rL ${darwin.ICU}/include*             $out/include
-      cp -rL ${libiconv}/include/*       $out/include
-      cp -rL ${gnugrep.pcre.dev}/include/*   $out/include
-      mv $out/include $out/include-Libsystem
+        cp -rL ${darwin.Libsystem}/include $out
+        chmod -R u+w $out/include
+        cp -rL ${darwin.ICU}/include*             $out/include
+        cp -rL ${libiconv}/include/*       $out/include
+        cp -rL ${gnugrep.pcre.dev}/include/*   $out/include
+        mv $out/include $out/include-Libsystem
+      ''}
 
       # Copy coreutils, bash, etc.
       cp ${coreutils_}/bin/* $out/bin
@@ -76,39 +85,60 @@ in rec {
 
       # Copy what we need of clang
       cp -d ${llvmPackages.clang-unwrapped}/bin/clang* $out/bin
-
-      cp -rL ${llvmPackages.clang-unwrapped.lib}/lib/clang $out/lib
+      cp -rd ${llvmPackages.clang-unwrapped.lib}/lib/* $out/lib
 
       cp -d ${llvmPackages.libcxx}/lib/libc++*.dylib $out/lib
       cp -d ${llvmPackages.libcxxabi}/lib/libc++abi*.dylib $out/lib
+      cp -d ${llvmPackages.compiler-rt}/lib/darwin/libclang_rt* $out/lib/darwin
+      cp -d ${llvmPackages.compiler-rt}/lib/libclang_rt* $out/lib
       cp -d ${llvmPackages.llvm.lib}/lib/libLLVM.dylib $out/lib
       cp -d ${libffi}/lib/libffi*.dylib $out/lib
 
       mkdir $out/include
       cp -rd ${llvmPackages.libcxx.dev}/include/c++     $out/include
 
+      ${lib.optionalString targetPlatform.isAarch64 ''
+        # copy .tbd assembly utils
+        cp -d ${pkgs.darwin.rewrite-tbd}/bin/rewrite-tbd $out/bin
+        cp -d ${pkgs.libyaml}/lib/libyaml*.dylib $out/lib
+
+        # copy package extraction tools
+        cp -d ${pkgs.pbzx}/bin/pbzx $out/bin
+        cp -d ${pkgs.xar}/lib/libxar*.dylib $out/lib
+        cp -d ${pkgs.bzip2.out}/lib/libbz2*.dylib $out/lib
+
+        # copy sigtool
+        cp -d ${pkgs.darwin.sigtool}/bin/sigtool $out/bin
+        cp -d ${pkgs.darwin.sigtool}/bin/codesign $out/bin
+      ''}
+
       cp -d ${darwin.ICU}/lib/libicu*.dylib $out/lib
       cp -d ${zlib.out}/lib/libz.*       $out/lib
       cp -d ${gmpxx.out}/lib/libgmp*.*   $out/lib
       cp -d ${xz.out}/lib/liblzma*.*     $out/lib
 
       # Copy binutils.
-      for i in as ld ar ranlib nm strip otool install_name_tool lipo; do
+      for i in as ld ar ranlib nm strip otool install_name_tool lipo codesign_allocate; do
         cp ${cctools_}/bin/$i $out/bin
       done
 
       cp -d ${darwin.libtapi}/lib/libtapi* $out/lib
 
-      cp -rd ${pkgs.darwin.CF}/Library $out
+      ${lib.optionalString targetPlatform.isx86_64 ''
+        cp -rd ${pkgs.darwin.CF}/Library $out
+      ''}
 
       chmod -R u+w $out
 
       nuke-refs $out/bin/*
 
       rpathify() {
-        local libs=$(${cctools_}/bin/otool -L "$1" | tail -n +2 | grep -o "$NIX_STORE.*-\S*") || true
+        local libs=$(${stdenv.cc.targetPrefix}otool -L "$1" | tail -n +2 | grep -o "$NIX_STORE.*-\S*") || true
+        local newlib
         for lib in $libs; do
-          ${cctools_}/bin/install_name_tool -change $lib "@rpath/$(basename $lib)" "$1"
+          newlib=''${lib:${toString (storePrefixLen + 1)}}
+          newlib=''${newlib#*/}
+          ${stdenv.cc.targetPrefix}install_name_tool -change $lib "@rpath/$newlib" "$1"
         done
       }
 
@@ -116,20 +146,27 @@ in rec {
       for i in $out/bin/*; do
         if test -x $i -a ! -L $i; then
           chmod +w $i
-          strip $i || true
+          ${stdenv.cc.targetPrefix}strip $i || true
         fi
       done
 
-      for i in $out/bin/* $out/lib/*.dylib $out/lib/clang/*/lib/darwin/*.dylib $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation; do
+      for i in $out/bin/* $out/lib/*.dylib $out/lib/darwin/*.dylib $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation; do
         if test -x "$i" -a ! -L "$i"; then
           echo "Adding rpath to $i"
           rpathify $i
         fi
       done
 
+      for i in $out/bin/*; do
+        if test -x "$i" -a ! -L "$i" -a "$(basename $i)" != codesign; then
+          echo "Adding @executable_path to rpath in $i"
+          ${stdenv.cc.targetPrefix}install_name_tool -add_rpath '@executable_path/..' $i
+        fi
+      done
+
       nuke-refs $out/lib/*
       nuke-refs $out/lib/system/*
-      nuke-refs $out/lib/clang/*/lib/darwin/*
+      nuke-refs $out/lib/darwin/*
       nuke-refs $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
 
       mkdir $out/.pack
@@ -143,7 +180,7 @@ in rec {
       cp ${bzip2_.bin}/bin/bzip2 $out/on-server
 
       chmod u+w $out/on-server/*
-      strip $out/on-server/*
+      ${stdenv.cc.targetPrefix}strip $out/on-server/*
       nuke-refs $out/on-server/*
 
       (cd $out/pack && (find | cpio -o -H newc)) | bzip2 > $out/on-server/bootstrap-tools.cpio.bz2
@@ -318,7 +355,10 @@ in rec {
 
   # The ultimate test: bootstrap a whole stdenv from the tools specified above and get a package set out of it
   test-pkgs = import test-pkgspath {
-    inherit system;
+    # if the bootstrap tools are for another platform, we should be testing
+    # that platform.
+    system = if crossSystem != null then crossSystem else system;
+
     stdenvStages = args: let
         args' = args // { inherit bootstrapFiles; };
       in (import (test-pkgspath + "/pkgs/stdenv/darwin") args').stagesDarwin;
diff --git a/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh b/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh
new file mode 100644
index 00000000000..63b72972d71
--- /dev/null
+++ b/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh
@@ -0,0 +1,52 @@
+set -euo pipefail
+
+# Unpack the bootstrap tools tarball.
+echo Unpacking the bootstrap tools...
+$mkdir $out
+$bzip2 -d < $tarball | (cd $out && $cpio -i)
+
+export PATH=$out/bin
+
+# Fix codesign wrapper paths
+sed -i \
+  -e "1c\
+#!$out/bin/bash" \
+  -e "s|[^( ]*\bsigtool\b|$out/bin/sigtool|g" \
+  $out/bin/codesign
+
+updateInstallName() {
+  local path="$1"
+
+  cp "$path" "$path.new"
+  install_name_tool -id "$path" "$path.new"
+  codesign -f -i "$(basename "$path")" -s - "$path.new"
+  mv -f "$path.new" "$path"
+}
+
+find $out
+
+ln -s bash $out/bin/sh
+ln -s bzip2 $out/bin/bunzip2
+
+find $out/lib -type f -name '*.dylib' -print0 | while IFS= read -r -d $'\0' lib; do
+  updateInstallName "$lib"
+done
+
+# Provide a gunzip script.
+cat > $out/bin/gunzip <<EOF
+#!$out/bin/sh
+exec $out/bin/gzip -d "\$@"
+EOF
+chmod +x $out/bin/gunzip
+
+# Provide fgrep/egrep.
+echo "#! $out/bin/sh" > $out/bin/egrep
+echo "exec $out/bin/grep -E \"\$@\"" >> $out/bin/egrep
+echo "#! $out/bin/sh" > $out/bin/fgrep
+echo "exec $out/bin/grep -F \"\$@\"" >> $out/bin/fgrep
+
+cat >$out/bin/dsymutil << EOF
+#!$out/bin/sh
+EOF
+
+chmod +x $out/bin/egrep $out/bin/fgrep $out/bin/dsymutil
diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix
index d9eadf26804..d6c59573f2a 100644
--- a/pkgs/stdenv/default.nix
+++ b/pkgs/stdenv/default.nix
@@ -57,6 +57,7 @@ in
     powerpc64-linux = stagesLinux;
     powerpc64le-linux = stagesLinux;
     x86_64-darwin = stagesDarwin;
+    aarch64-darwin = stagesDarwin;
     x86_64-solaris = stagesNix;
     i686-cygwin = stagesNative;
     x86_64-cygwin = stagesNative;
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index 816f0865fa7..63a37d54547 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -159,7 +159,8 @@ in
       # create a dummy Glibc here, which will be used in the stdenv of
       # stage1.
       ${localSystem.libc} = self.stdenv.mkDerivation {
-        name = "bootstrap-stage0-${localSystem.libc}";
+        pname = "bootstrap-stage0-${localSystem.libc}";
+        version = "bootstrap";
         buildCommand = ''
           mkdir -p $out
           ln -s ${bootstrapTools}/lib $out/lib
diff --git a/pkgs/test/rust-sysroot/default.nix b/pkgs/test/rust-sysroot/default.nix
index 3a786ad6f00..a5a1596504f 100644
--- a/pkgs/test/rust-sysroot/default.nix
+++ b/pkgs/test/rust-sysroot/default.nix
@@ -11,7 +11,7 @@ let
         sha256 = "0k9ipm9ddm1bad7bs7368wzzp6xwrhyfzfpckdax54l4ffqwljcg";
     };
 
-    cargoSha256 = "1cbcplgz28yxshyrp2krp1jphbrcqdw6wxx3rry91p7hiqyibd30";
+    cargoSha256 = "1x8iwgy1irgfkv2yjkxm6479nwbrk82b0c80jm7y4kw0s32r01lg";
 
     inherit target;
 
diff --git a/pkgs/tools/X11/xidlehook/default.nix b/pkgs/tools/X11/xidlehook/default.nix
index 82aee8f818b..b7cb9c9d8ba 100644
--- a/pkgs/tools/X11/xidlehook/default.nix
+++ b/pkgs/tools/X11/xidlehook/default.nix
@@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec {
   };
 
   cargoBuildFlags = lib.optionals (!stdenv.isLinux) [ "--no-default-features" "--features" "pulse" ];
-  cargoSha256 = "1r2xir0x04056kq7j13cpk8984kjrgxbixlacp6vz79yq9c8pv7k";
+  cargoSha256 = "1y7m61j07gvqfqz97mda39nc602sv7a826c06m8l22i7z380xfms";
 
   buildInputs = [ xlibsWrapper xorg.libXScrnSaver libpulseaudio ] ++ lib.optional stdenv.isDarwin Security;
   nativeBuildInputs = [ pkg-config patchelf python3 ];
diff --git a/pkgs/tools/admin/intecture/agent.nix b/pkgs/tools/admin/intecture/agent.nix
index c9133b2bef6..33145e0e548 100644
--- a/pkgs/tools/admin/intecture/agent.nix
+++ b/pkgs/tools/admin/intecture/agent.nix
@@ -14,7 +14,7 @@ buildRustPackage rec {
     sha256 = "0j27qdgyxybaixggh7k57mpm6rifimn4z2vydk463msc8b3kgywj";
   };
 
-  cargoSha256 = "1is1cbbwxf00dc64h76h57s0wxsai0zm5vfrrss7598cim6a4yxb";
+  cargoSha256 = "0j7yv00ipaa60hpakfj60xrblcyzjwi0lp2hpzz41vq3p9bkigvm";
 
   buildInputs = [ openssl zeromq czmq zlib ];
 
diff --git a/pkgs/tools/admin/intecture/auth.nix b/pkgs/tools/admin/intecture/auth.nix
index 67d65f2a821..5fe81b78c9a 100644
--- a/pkgs/tools/admin/intecture/auth.nix
+++ b/pkgs/tools/admin/intecture/auth.nix
@@ -14,7 +14,7 @@ buildRustPackage rec {
     sha256 = "0c7ar3pc7n59lzfy74lwz51p09s2bglc870rfr4c0vmc91jl0pj2";
   };
 
-  cargoSha256 = "17k4a3jd7n2fkalx7vvgah62pj77n536jvm17d60sj0yz2fxx799";
+  cargoSha256 = "15f7lb0xxaxvhvj8g3kjmqy5jzy4pyzwk3zfdvykphpg18qgg6qj";
 
   buildInputs = [ openssl zeromq czmq zlib ];
 
diff --git a/pkgs/tools/admin/intecture/cli.nix b/pkgs/tools/admin/intecture/cli.nix
index 7aa1ec0ae44..9b543b40498 100644
--- a/pkgs/tools/admin/intecture/cli.nix
+++ b/pkgs/tools/admin/intecture/cli.nix
@@ -14,7 +14,7 @@ buildRustPackage rec {
     sha256 = "16a5fkpyqkf8w20k3ircc1d0qmif7nygkzxj6mzk9609dlb0dmxq";
   };
 
-  cargoSha256 = "11r551baz3hrkyf9nv68mdf09nqyvbcfjh2rgy8babmi7jljpzav";
+  cargoSha256 = "09phc0gxz1amrk1bbl5ajg0jmgxcqm4xzbvq3nj58qps991kvgf1";
 
   buildInputs = [ openssl zeromq czmq zlib ];
 
diff --git a/pkgs/tools/admin/procs/default.nix b/pkgs/tools/admin/procs/default.nix
index 1f86affa8c3..c8d11474d5b 100644
--- a/pkgs/tools/admin/procs/default.nix
+++ b/pkgs/tools/admin/procs/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-jqcI0ne6fZkgr4bWJ0ysVNvB7q9ErYbsmZoXI38XUng=";
   };
 
-  cargoSha256 = "sha256-0s5MeWX+rXTyftwg6sReNMRgBzhUMIdHu5buKwg1Yi4=";
+  cargoSha256 = "sha256-JTjkMXwLLh/kjqAFmi2c59F8POAqn5t/kTJfJkR2BL4=";
 
   nativeBuildInputs = [ installShellFiles ];
 
diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix
index 5f456f92217..fcc92e673a5 100644
--- a/pkgs/tools/archivers/gnutar/default.nix
+++ b/pkgs/tools/archivers/gnutar/default.nix
@@ -30,9 +30,8 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "info" ];
 
-  buildInputs = [ ]
-    ++ lib.optional stdenv.isLinux acl
-    ++ lib.optional stdenv.isDarwin autoreconfHook;
+  nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook;
+  buildInputs = lib.optional stdenv.isLinux acl;
 
   # May have some issues with root compilation because the bootstrap tool
   # cannot be used as a login shell for now.
diff --git a/pkgs/tools/backup/monolith/default.nix b/pkgs/tools/backup/monolith/default.nix
index ff27054164b..8c2be78af2a 100644
--- a/pkgs/tools/backup/monolith/default.nix
+++ b/pkgs/tools/backup/monolith/default.nix
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-n89rfZwR8B6SKeLtzmbeHRyw2G9NIQ1BY6JvJuZmC/w=";
   };
 
-  cargoSha256 = "sha256-RqtJLfBF9hfPh049uyc9K+uNBh+P3VMznuA2UtOwK3M=";
+  cargoSha256 = "sha256-+UGGsBU12PzkrZ8Po8fJBs1pygdOvoHp0tKmipjVMQ4=";
 
   nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
   buildInputs = lib.optionals stdenv.isLinux [ openssl ]
diff --git a/pkgs/tools/backup/rdedup/default.nix b/pkgs/tools/backup/rdedup/default.nix
index a0727286c40..482d1aec8da 100644
--- a/pkgs/tools/backup/rdedup/default.nix
+++ b/pkgs/tools/backup/rdedup/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0y34a3mpghdmcb2rx4z62q0s351bfmy1287d75mm07ryfgglgsd7";
   };
 
-  cargoSha256 = "0akwb7ak4h1i1zk4wcn27zyqjz6mrchs47014xbzw22rj8h8dx92";
+  cargoSha256 = "1k0pl9i7zf1ki5ch2zxc1fqsf94bxjlvjrkh0500cycwqcdys296";
 
   cargoPatches = [
     ./v3.1.1-fix-Cargo.lock.patch
diff --git a/pkgs/tools/compression/bzip2/1_1.nix b/pkgs/tools/compression/bzip2/1_1.nix
index 7557c5843cc..ca5670a2e51 100644
--- a/pkgs/tools/compression/bzip2/1_1.nix
+++ b/pkgs/tools/compression/bzip2/1_1.nix
@@ -34,8 +34,6 @@ stdenv.mkDerivation rec {
 
   strictDeps = true;
 
-  enableParallelBuilding = true;
-
   meta = with lib; {
     description = "High-quality data compression program";
     license = licenses.bsdOriginal;
diff --git a/pkgs/tools/compression/pbzx/default.nix b/pkgs/tools/compression/pbzx/default.nix
index 8a57d483ab2..03b984bb643 100644
--- a/pkgs/tools/compression/pbzx/default.nix
+++ b/pkgs/tools/compression/pbzx/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   };
   buildInputs = [ xz xar ];
   buildPhase = ''
-    cc pbzx.c -llzma -lxar -o pbzx
+    ${stdenv.cc.targetPrefix}cc pbzx.c -llzma -lxar -o pbzx
   '';
   installPhase = ''
     mkdir -p $out/bin
diff --git a/pkgs/tools/compression/xar/0001-Add-useless-descriptions-to-AC_DEFINE.patch b/pkgs/tools/compression/xar/0001-Add-useless-descriptions-to-AC_DEFINE.patch
new file mode 100644
index 00000000000..a605d2db170
--- /dev/null
+++ b/pkgs/tools/compression/xar/0001-Add-useless-descriptions-to-AC_DEFINE.patch
@@ -0,0 +1,95 @@
+From a14be07c0aae3bf6f732d1ca5f625ba375702121 Mon Sep 17 00:00:00 2001
+From: Andrew Childs <andrew.childs@bibo.com.ph>
+Date: Sun, 15 Nov 2020 19:12:33 +0900
+Subject: [PATCH 1/2] Add useless descriptions to AC_DEFINE
+
+Removes autoheader warnings.
+---
+ configure.ac | 42 +++++++++++++++++++++---------------------
+ 1 file changed, 21 insertions(+), 21 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 812b5ff..358ab89 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -210,48 +210,48 @@ AC_CHECK_MEMBERS([struct stat.st_flags])
+ 
+ AC_CHECK_SIZEOF(uid_t)
+ if test $ac_cv_sizeof_uid_t = "4"; then
+-AC_DEFINE(UID_STRING, RId32)
+-AC_DEFINE(UID_CAST, (uint32_t))
++AC_DEFINE([UID_STRING], RId32, [UID_STRING])
++AC_DEFINE([UID_CAST], (uint32_t), [UID_CAST])
+ elif test $ac_cv_sizeof_uid_t = "8"; then
+-AC_DEFINE(UID_STRING, PRId64)
+-AC_DEFINE(UID_CAST, (uint64_t))
++AC_DEFINE([UID_STRING], PRId64, [UID_STRING])
++AC_DEFINE([UID_CAST], (uint64_t), [UID_CAST])
+ else
+ AC_ERROR(can not detect the size of your system's uid_t type)
+ fi
+ 
+ AC_CHECK_SIZEOF(gid_t)
+ if test $ac_cv_sizeof_gid_t = "4"; then
+-AC_DEFINE(GID_STRING, PRId32)
+-AC_DEFINE(GID_CAST, (uint32_t))
++AC_DEFINE([GID_STRING], PRId32, [GID_STRING])
++AC_DEFINE([GID_CAST], (uint32_t), [GID_CAST])
+ elif test $ac_cv_sizeof_gid_t = "8"; then
+-AC_DEFINE(GID_STRING, PRId64)
+-AC_DEFINE(GID_CAST, (uint64_t))
++AC_DEFINE([GID_STRING], PRId64, [GID_STRING])
++AC_DEFINE([GID_CAST], (uint64_t), [GID_CAST])
+ else
+ AC_ERROR(can not detect the size of your system's gid_t type)
+ fi
+ 
+ AC_CHECK_SIZEOF(ino_t)
+ if test $ac_cv_sizeof_ino_t = "4"; then
+-AC_DEFINE(INO_STRING, PRId32)
+-AC_DEFINE(INO_HEXSTRING, PRIx32)
+-AC_DEFINE(INO_CAST, (uint32_t))
++AC_DEFINE([INO_STRING], PRId32, [INO_STRING])
++AC_DEFINE([INO_HEXSTRING], PRIx32, [INO_HEXSTRING])
++AC_DEFINE([INO_CAST], (uint32_t), [INO_CAST])
+ elif test $ac_cv_sizeof_ino_t = "8"; then
+-AC_DEFINE(INO_STRING, PRId64)
+-AC_DEFINE(INO_HEXSTRING, PRIx64)
+-AC_DEFINE(INO_CAST, (uint64_t))
++AC_DEFINE([INO_STRING], PRId64, [INO_STRING])
++AC_DEFINE([INO_HEXSTRING], PRIx64, [INO_HEXSTRING])
++AC_DEFINE([INO_CAST], (uint64_t), [INO_CAST])
+ else
+ AC_ERROR(can not detect the size of your system's ino_t type)
+ fi
+ 
+ AC_CHECK_SIZEOF(dev_t)
+ if test $ac_cv_sizeof_dev_t = "4"; then
+-AC_DEFINE(DEV_STRING, PRId32)
+-AC_DEFINE(DEV_HEXSTRING, PRIx32)
+-AC_DEFINE(DEV_CAST, (uint32_t))
++AC_DEFINE([DEV_STRING], PRId32, [DEV_STRING])
++AC_DEFINE([DEV_HEXSTRING], PRIx32, [DEV_HEXSTRING])
++AC_DEFINE([DEV_CAST], (uint32_t), [DEV_CAST])
+ elif test $ac_cv_sizeof_dev_t = "8"; then
+-AC_DEFINE(DEV_STRING, PRId64)
+-AC_DEFINE(DEV_HEXSTRING, PRIx64)
+-AC_DEFINE(DEV_CAST, (uint64_t))
++AC_DEFINE([DEV_STRING], PRId64, [DEV_STRING])
++AC_DEFINE([DEV_HEXSTRING], PRIx64, [DEV_HEXSTRING])
++AC_DEFINE([DEV_CAST], (uint64_t), [DEV_CAST])
+ else
+ AC_ERROR(can not detect the size of your system's dev_t type)
+ fi
+@@ -261,7 +261,7 @@ AC_CHECK_LIB(acl, acl_get_file)
+ dnl Check for paths
+ AC_PREFIX_DEFAULT(/usr/local)
+ 
+-AC_CHECK_FUNC([asprintf], AC_DEFINE([HAVE_ASPRINTF]))
++AC_CHECK_FUNC([asprintf], AC_DEFINE([HAVE_ASPRINTF], [], [HAVE_ASPRINTF]))
+ 
+ dnl 
+ dnl Configure libxml2.
+-- 
+2.28.0
+
diff --git a/pkgs/tools/compression/xar/0002-Use-pkg-config-for-libxml2.patch b/pkgs/tools/compression/xar/0002-Use-pkg-config-for-libxml2.patch
new file mode 100644
index 00000000000..d71ad4b753c
--- /dev/null
+++ b/pkgs/tools/compression/xar/0002-Use-pkg-config-for-libxml2.patch
@@ -0,0 +1,89 @@
+From 276833851657c85651c053ee16b8e1a8dc768a50 Mon Sep 17 00:00:00 2001
+From: Andrew Childs <andrew.childs@bibo.com.ph>
+Date: Sun, 15 Nov 2020 19:12:56 +0900
+Subject: [PATCH 2/2] Use pkg-config for libxml2
+
+---
+ configure.ac | 66 +++++++++-------------------------------------------
+ 1 file changed, 11 insertions(+), 55 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 358ab89..984a694 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -268,61 +268,17 @@ dnl Configure libxml2.
+ dnl 
+ LIBXML2_VERSION_MIN=2.6.11
+ 
+-have_libxml2="1"
+-
+-AC_ARG_WITH([xml2-config], [  --with-xml2-config      libxml2 config program],
+-if test "x${with_xml2_config}" = "xno" ; then
+-  XML2_CONFIG=
+-else
+-  XML2_CONFIG="${with_xml2_config}"
+-fi
+-,
+-  XML2_CONFIG=
+-)
+-if test "x${XML2_CONFIG}" != "x" ; then
+-   if test ! -x "${XML2_CONFIG}" ; then
+-     AC_MSG_ERROR([Unusable or missing xml2-config: ${XML2_CONFIG}])
+-   fi
+-else
+-  AC_PATH_PROG([XML2_CONFIG], [xml2-config], , [${PATH}])
+-  if test "x${XML2_CONFIG}" = "x" ; then
+-    AC_MSG_ERROR([Cannot configure without xml2-config])
+-  fi
+-fi
+-
+-dnl Make sure the version of libxml2 found is sufficient.
+-AC_MSG_CHECKING([for libxml >= ${LIBXML2_VERSION_MIN}])
+-LIBXML2_FOUND=`2>&1 ${XML2_CONFIG} --version`
+-LIBXML2_MAJOR=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $1}'`
+-LIBXML2_MINOR=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $2}' | tr a-z " " |awk '{print $1}'`
+-LIBXML2_BRANCH=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $3}' | tr a-z " " |awk '{print $1}'`
+-if test "x${LIBXML2_BRANCH}" = "x" ; then
+-  LIBXML2_BRANCH=0
+-fi
+-LIBXML2_MAJOR_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $1}'`
+-LIBXML2_MINOR_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $2}'`
+-LIBXML2_BRANCH_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $3}'`
+-if test ${LIBXML2_MAJOR} -gt ${LIBXML2_MAJOR_MIN} \
+-     -o ${LIBXML2_MAJOR} -eq ${LIBXML2_MAJOR_MIN} \
+-     -a ${LIBXML2_MINOR} -gt ${LIBXML2_MINOR_MIN} \
+-     -o ${LIBXML2_MAJOR} -eq ${LIBXML2_MAJOR_MIN} \
+-     -a ${LIBXML2_MINOR} -eq ${LIBXML2_MINOR_MIN} \
+-     -a ${LIBXML2_BRANCH} -ge $LIBXML2_BRANCH_MIN ; then
+-  AC_MSG_RESULT([${LIBXML2_MAJOR}.${LIBXML2_MINOR}.${LIBXML2_BRANCH}])
+-  have_libxml2="1"
+-  CPPFLAGS="${CPPFLAGS} `${XML2_CONFIG} --cflags`"
+-  LIBS="${LIBS} `${XML2_CONFIG} --libs`"
+-else
+-  AC_MSG_RESULT([no])
+-  have_libxml2="0"
+-fi
+-if test "x${have_libxml2}" = "x1" ; then
+-  dnl Final sanity check, to make sure that xmlwriter is present.
+-  AC_CHECK_HEADER([libxml/xmlwriter.h], , [have_libxml2="0"])
+-fi
+-if test "x${have_libxml2}" = "x0" ; then
+-  AC_MSG_ERROR([Cannot build without libxml2])
+-fi
++PKG_PROG_PKG_CONFIG
++
++PKG_CHECK_MODULES(LIBXML2_PKGCONFIG, [libxml-2.0 >= ${LIBXML2_VERSION_MIN}],
++  [
++    have_libxml2=1
++    CPPFLAGS="${CPPFLAGS} ${LIBXML2_PKGCONFIG_CFLAGS}"
++    LIBS="${LIBS} ${LIBXML2_PKGCONFIG_LIBS}"
++  ],
++  [
++    have_libxml2=0
++  ])
+ 
+ dnl 
+ dnl Configure libcrypto (part of OpenSSL).
+-- 
+2.28.0
+
diff --git a/pkgs/tools/compression/xar/default.nix b/pkgs/tools/compression/xar/default.nix
index 32b6c6d005c..d4baab17b91 100644
--- a/pkgs/tools/compression/xar/default.nix
+++ b/pkgs/tools/compression/xar/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, libxml2, xz, openssl, zlib, bzip2, fts, autoconf }:
+{ lib, stdenv, fetchurl, pkg-config, libxml2, xz, openssl, zlib, bzip2, fts, autoreconfHook }:
 
 stdenv.mkDerivation rec {
   version = "1.6.1";
@@ -9,16 +9,20 @@ stdenv.mkDerivation rec {
     sha256 = "0ghmsbs6xwg1092v7pjcibmk5wkyifwxw6ygp08gfz25d2chhipf";
   };
 
-  buildInputs = [ libxml2 xz openssl zlib bzip2 fts autoconf ];
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libxml2 xz openssl zlib bzip2 fts ];
 
-  prePatch = ''
+  patches = [
+    ./0001-Add-useless-descriptions-to-AC_DEFINE.patch
+    ./0002-Use-pkg-config-for-libxml2.patch
+  ];
+
+  postPatch = ''
     substituteInPlace configure.ac \
       --replace 'OpenSSL_add_all_ciphers' 'OPENSSL_init_crypto' \
       --replace 'openssl/evp.h' 'openssl/crypto.h'
   '';
 
-  preConfigure = "./autogen.sh";
-
   meta = {
     homepage    = "https://mackyle.github.io/xar/";
     description = "Extensible Archiver";
diff --git a/pkgs/tools/filesystems/sandboxfs/default.nix b/pkgs/tools/filesystems/sandboxfs/default.nix
index 32d186344dd..7d6d6119878 100644
--- a/pkgs/tools/filesystems/sandboxfs/default.nix
+++ b/pkgs/tools/filesystems/sandboxfs/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "Ia6rq6FN4abnvLXjlQh4Q+8ra5JThKnC86UXC7s9//U=";
   };
 
-  cargoSha256 = "sha256-k303TjWG+n+/ZMmko84KJtYb7swuQ1ZJOc4Vq6aOhX0=";
+  cargoSha256 = "sha256-fAPMAVvcI3pm3zTLATO7SUdZpG469fjlBZshFhgv6gY=";
 
   # Issue to add Cargo.lock upstream: https://github.com/bazelbuild/sandboxfs/pull/115
   cargoPatches = [ ./Cargo.lock.patch ];
diff --git a/pkgs/tools/filesystems/supertag/default.nix b/pkgs/tools/filesystems/supertag/default.nix
index 2e333b5b054..a9a16582c11 100644
--- a/pkgs/tools/filesystems/supertag/default.nix
+++ b/pkgs/tools/filesystems/supertag/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0jzm7pn38hlr96n0z8gqfsfdbw48y0nnbsgjdq7hpgwmcgvgqdam";
   };
 
-  cargoSha256 = "1mzmp1jcxgn2swp52r9y7k09fk0z67i1qafzkkzlfxxd10vfr70v";
+  cargoSha256 = "093vrpp4in8854hb0h1lxrp8v6i9vfja0l69dnnp7z15qkpbir4f";
 
   LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
 
diff --git a/pkgs/tools/graphics/gifski/default.nix b/pkgs/tools/graphics/gifski/default.nix
index 7449eedb3a7..da24627d7c4 100644
--- a/pkgs/tools/graphics/gifski/default.nix
+++ b/pkgs/tools/graphics/gifski/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-Cm/w0bwDMu5REsQpkwMBgnROxpI+nMQwC16dY/VdOFU=";
   };
 
-  cargoSha256 = "sha256-fy8apB1UbpBAnp8mFnL7rNj/GSSUkNz/trqsVrAfFfI=";
+  cargoSha256 = "sha256-oj6ZuhdKSj6OFSICG977qEY9QWP40FEXwiHXpirsILI=";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/tools/graphics/oxipng/default.nix b/pkgs/tools/graphics/oxipng/default.nix
index 6f91ee26007..edffad57963 100644
--- a/pkgs/tools/graphics/oxipng/default.nix
+++ b/pkgs/tools/graphics/oxipng/default.nix
@@ -9,7 +9,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-lvVgoAZMIqmbS6yMul9Hf9PtneEVy+jDs3kU1jSBL2w=";
   };
 
-  cargoSha256 = "sha256-v0A8/b/OPAtnaNlMX7QNXTGGH6kg67WBo/2ChOPDZdQ=";
+  cargoSha256 = "sha256-sxvOFxSZCANBa/448SpjoLqk/HjqtaFrOhjrQro446Q=";
 
   doCheck = !stdenv.isAarch64 && !stdenv.isDarwin;
 
diff --git a/pkgs/tools/graphics/resvg/default.nix b/pkgs/tools/graphics/resvg/default.nix
index e0968dd6271..a770d208b49 100644
--- a/pkgs/tools/graphics/resvg/default.nix
+++ b/pkgs/tools/graphics/resvg/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-fd97w6yd9ZX2k8Vq+Vh6jouufGdFE02ZV8mb+BtA3tk=";
   };
 
-  cargoSha256 = "sha256-LlEYfjUINQW/YrhNp/Z+fdLQPcvrTjNFtDAk1gyAuj0=";
+  cargoSha256 = "sha256-uP+YAJYZtMCUnLZWcwnoAw8E5cJeFxXx0qd2Li4byQM=";
 
   buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
 
diff --git a/pkgs/tools/graphics/shotgun/default.nix b/pkgs/tools/graphics/shotgun/default.nix
index 79ddd39ea79..d875b4d313d 100644
--- a/pkgs/tools/graphics/shotgun/default.nix
+++ b/pkgs/tools/graphics/shotgun/default.nix
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0fpc09yvxjcvjkai7afyig4gyc7inaqxxrwzs17mh8wdgzawb6dl";
   };
 
-  cargoSha256 = "0sbhij8qh9n05nzhp47dm46hbc59awar515f9nhd3wvahwz53zam";
+  cargoSha256 = "06zplpy480965lhgav984m6wkfijv7cqa49kpramp8b6ws62pikl";
 
   meta = with lib; {
     description = "Minimal X screenshot utility";
diff --git a/pkgs/tools/graphics/svgbob/default.nix b/pkgs/tools/graphics/svgbob/default.nix
index a8850609944..b9784a85b2d 100644
--- a/pkgs/tools/graphics/svgbob/default.nix
+++ b/pkgs/tools/graphics/svgbob/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
       --replace '#![deny(warnings)]' ""
   '';
 
-  cargoSha256 = "1y9jsnxmz51zychmmzp6mi29pb5ks2qww7lk5bshkhp56v51sm8d";
+  cargoSha256 = "1jyycr95gjginx6bzmay9b5dbpnbwdqbv13w1qy58znicsmh3v8a";
 
   # Test tries to build outdated examples
   doCheck = false;
diff --git a/pkgs/tools/graphics/svgcleaner/default.nix b/pkgs/tools/graphics/svgcleaner/default.nix
index 6c5e8569e85..4224bde7234 100644
--- a/pkgs/tools/graphics/svgcleaner/default.nix
+++ b/pkgs/tools/graphics/svgcleaner/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1jpnqsln37kkxz98vj7gly3c2170v6zamd876nc9nfl9vns41s0f";
   };
 
-  cargoSha256 = "1xhwlsq9b6cnafbapm5jf48zqdx5k2vxlr701lh5f8nqvd7nxi6g";
+  cargoSha256 = "172kdnd11xb2qkklqdkdcwi3g55k0d67p8g8qj7iq34bsnfb5bnr";
 
   meta = with lib; {
     description = "A tool for tidying and optimizing SVGs";
diff --git a/pkgs/tools/graphics/viu/default.nix b/pkgs/tools/graphics/viu/default.nix
index 39aa8fe06e0..8a02e0fefed 100644
--- a/pkgs/tools/graphics/viu/default.nix
+++ b/pkgs/tools/graphics/viu/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
   # tests need an interactive terminal
   doCheck = false;
 
-  cargoSha256 = "0bdjfcyx2cwz68gcx0393h4ysccarfp02pvvp0a5xgkq11bad0r0";
+  cargoSha256 = "0s6i42n4jivzj4ad62r7nc6ailydy686ivszcd6cj5f4dinsbgq3";
 
   meta = with lib; {
     description = "A command-line application to view images from the terminal written in Rust";
diff --git a/pkgs/tools/inputmethods/evscript/default.nix b/pkgs/tools/inputmethods/evscript/default.nix
index 456a57a1351..b8e91a74197 100644
--- a/pkgs/tools/inputmethods/evscript/default.nix
+++ b/pkgs/tools/inputmethods/evscript/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1xm8297k0d8d0aq7fxgmibr4qva4d02cb6gnnlzq77jcmnknxv14";
   };
 
-  cargoSha256 = "1dcyhxfyq0nrjl05g1s9pjkg7vqw63wbdhlskrdcvxncmci3s7rp";
+  cargoSha256 = "1z0xxbjnhhzn1fnc3zhvy727l88qyyfqdayj5yvf3nh23m7sr87l";
 
   meta = with lib; {
     homepage = "https://github.com/myfreeweb/${pname}";
diff --git a/pkgs/tools/misc/as-tree/default.nix b/pkgs/tools/misc/as-tree/default.nix
index 7cc97fd79e4..4b2ce65d3db 100644
--- a/pkgs/tools/misc/as-tree/default.nix
+++ b/pkgs/tools/misc/as-tree/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0c0g32pkyhyvqpgvzlw9244c80npq6s8mxy3may7q4qyd7hi3dz5";
   };
 
-  cargoSha256 = "0yhd9svdxg7akv61msn7rf3rfblb7kxnyn955dfdwyxbxq48qwpr";
+  cargoSha256 = "1m334shcja7kg134b7lnq1ksy67j5b5vblkzamrw06f6r1hkn1rc";
   # the upstream 0.12.0 release didn't update the Cargo.lock file properly
   # they have updated their release script, so this patch can be removed
   # when the next version is released.
diff --git a/pkgs/tools/misc/asciinema-scenario/default.nix b/pkgs/tools/misc/asciinema-scenario/default.nix
index f6991662114..a818c6114d8 100644
--- a/pkgs/tools/misc/asciinema-scenario/default.nix
+++ b/pkgs/tools/misc/asciinema-scenario/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-ubiVpKFU81Ot9V9oMexWSiUXHepoJ6nXtrWVAFhgcYw=";
   };
 
-  cargoSha256 = "109ij5h31bhn44l0wywgpnnlfjgyairxr5l19s6bz47sbka0xyxk";
+  cargoSha256 = "1yf63w2findgqipvgmlkw3pqfkai7mvqp86jg40lvr0mpnvly2ny";
 
   meta = with lib; {
     description = "Create asciinema videos from a text file";
diff --git a/pkgs/tools/misc/dijo/default.nix b/pkgs/tools/misc/dijo/default.nix
index 73705705993..9a6bd799921 100644
--- a/pkgs/tools/misc/dijo/default.nix
+++ b/pkgs/tools/misc/dijo/default.nix
@@ -10,7 +10,7 @@ rustPlatform.buildRustPackage {
     rev = "v${version}";
     sha256 = "sha256-g+A8BJxqoAvm9LTLrLnClVGtFJCQ2gT0mDGAov/6vXE=";
   };
-  cargoSha256 = "sha256-3V94bOixYMznkCQu90+E/68Sfl9GvHp9LNxwWwk4xZQ=";
+  cargoSha256 = "sha256-o3+KcE7ozu6eUgwsOSr9DOoIo+/BZ3bJZe+WYQLXHpY=";
 
   meta = with lib; {
     description = "Scriptable, curses-based, digital habit tracker";
diff --git a/pkgs/tools/misc/diskonaut/default.nix b/pkgs/tools/misc/diskonaut/default.nix
index 0fb31685170..058a0d1ad6f 100644
--- a/pkgs/tools/misc/diskonaut/default.nix
+++ b/pkgs/tools/misc/diskonaut/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1pmbag3r2ka30zmy2rs9jps2qxj2zh0gy4a774v9yhf0b6qjid54";
   };
 
-  cargoSha256 = "0y86ikf235lp5j85fgzawgp4vx66rmzqd6p5n8iy3mqwn3c1ggb8";
+  cargoSha256 = "10jrcy8m9ll4136ghq3fhmnphd9g3rw863x708vm17n44kgdxyab";
 
   meta = with lib; {
     description = "Terminal disk space navigator";
diff --git a/pkgs/tools/misc/diskus/default.nix b/pkgs/tools/misc/diskus/default.nix
index ff5ade2e67a..a645525da27 100644
--- a/pkgs/tools/misc/diskus/default.nix
+++ b/pkgs/tools/misc/diskus/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   buildInputs = lib.optionals stdenv.isDarwin [ Security ];
 
-  cargoSha256 = "0bivmjn7h4lfp5azbc6q0xiqq3fk68jdd4kwrwgbxiljg4xd2qy8";
+  cargoSha256 = "1irgj8kna4mwrp91s3ccbfwv2kdkjl89865y88s8v6zd9wzj3c8q";
 
   meta = with lib; {
     description = "A minimal, fast alternative to 'du -sh'";
diff --git a/pkgs/tools/misc/dust/default.nix b/pkgs/tools/misc/dust/default.nix
index 781ee30deba..b16f990cbef 100644
--- a/pkgs/tools/misc/dust/default.nix
+++ b/pkgs/tools/misc/dust/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
     '';
   };
 
-  cargoSha256 = "sha256-DVcjczH7i+R2xs9pEaek4zHYHO90G7fVF7yFUPCWLmU=";
+  cargoSha256 = "sha256-M/CGsjhErZe4sFs6D5ZW+TWOHVkFtXgidME/GYiM6qA=";
 
   doCheck = false;
 
diff --git a/pkgs/tools/misc/eva/default.nix b/pkgs/tools/misc/eva/default.nix
index 253e815008a..b16c046d203 100644
--- a/pkgs/tools/misc/eva/default.nix
+++ b/pkgs/tools/misc/eva/default.nix
@@ -4,7 +4,7 @@ rustPlatform.buildRustPackage rec {
   pname = "eva";
   version = "0.2.7";
 
-  cargoSha256 = "1lycjw5i169xx73qw8gknbakrxikdbr65fmqx7xq2mafc0hb1zyn";
+  cargoSha256 = "08wm34rd03m5kd2zar23yhvi66kalzdqkgd6cqa1nq0ra4agnan7";
 
   src = fetchFromGitHub {
     owner = "NerdyPepper";
diff --git a/pkgs/tools/misc/fd/default.nix b/pkgs/tools/misc/fd/default.nix
index ec5dda52a18..9b0c44c3bf5 100644
--- a/pkgs/tools/misc/fd/default.nix
+++ b/pkgs/tools/misc/fd/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "00vlifbri021z8nf7xvbaay8mqvnq58h19va9bqr5lhsqj1f82wq";
   };
 
-  cargoSha256 = "0jyqnl6rski1vv2ah21xmwai3rfb542mv14laws4kc2wh63k68i4";
+  cargoSha256 = "0n6xqd30b8aiqrvqrmy7q56nh62nx2j1a3yq2dlpc19i2mfw2qd8";
 
   nativeBuildInputs = [ installShellFiles ];
 
diff --git a/pkgs/tools/misc/fend/default.nix b/pkgs/tools/misc/fend/default.nix
index 6028140234e..683556fec6c 100644
--- a/pkgs/tools/misc/fend/default.nix
+++ b/pkgs/tools/misc/fend/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-zKjYUkkm15YRF0YFJKi2A6twvmHuEyxdWcNs37r2dJg=";
   };
 
-  cargoSha256 = "sha256-e95DRhD22zvizUJOM2It45Bx05iK3KtaMgFPkMbR7iI=";
+  cargoSha256 = "sha256-rCJn1dDSwKMmwF7m7n+Lf/7+sLd964r8EU7/VdeD9rI=";
 
   doInstallCheck = true;
 
diff --git a/pkgs/tools/misc/fontfor/default.nix b/pkgs/tools/misc/fontfor/default.nix
index c77809ece1e..73d1085450e 100644
--- a/pkgs/tools/misc/fontfor/default.nix
+++ b/pkgs/tools/misc/fontfor/default.nix
@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
     freetype
   ];
 
-  cargoSha256 = "194c4knjfb3pnpvw3zl1srwx3q1jp6z78vzln0q2mk5nf0a35yy0";
+  cargoSha256 = "1drfrq32lvmi1xlshynzh66gb1cah43pqcyxv3qxp487br9w1iyj";
 
   meta = with lib; {
     description = "Find fonts which can show a specified character and preview them in browser";
diff --git a/pkgs/tools/misc/g933-utils/default.nix b/pkgs/tools/misc/g933-utils/default.nix
index 7fbfadfac76..6116f15f729 100644
--- a/pkgs/tools/misc/g933-utils/default.nix
+++ b/pkgs/tools/misc/g933-utils/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "06napzpk3nayzixb4l4fzdiwpgmcrsbc5j9m4qip1yn6dfkin3p0";
   };
 
-  cargoSha256 = "16xgk4rc36d6lylh2dzv63ryq9s7fli3h2qva1m1p6f0gpasnk7w";
+  cargoSha256 = "00gzfbxr5qzb9w7xkqd9jgfagb4c7p657m21b467pygzvaabbb8d";
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ udev ];
diff --git a/pkgs/tools/misc/grex/default.nix b/pkgs/tools/misc/grex/default.nix
index bef1e59e65d..4d391b09943 100644
--- a/pkgs/tools/misc/grex/default.nix
+++ b/pkgs/tools/misc/grex/default.nix
@@ -10,7 +10,7 @@ rustPlatform.buildRustPackage rec {
   pname = "grex";
   version = "1.2.0";
 
-  cargoSha256 = "sha256-EZnuGoysTZMpk2pndOzfXyRnN696RpKze27utQWNFTY=";
+  cargoSha256 = "sha256-aEwMJ9f08SJhrL8kLaTp54yP1hYGb3Ob5KNzZ5r752s=";
 
   src = fetchFromGitHub {
     owner = "pemistahl";
diff --git a/pkgs/tools/misc/hacksaw/default.nix b/pkgs/tools/misc/hacksaw/default.nix
index 419cff20087..6eecee46a38 100644
--- a/pkgs/tools/misc/hacksaw/default.nix
+++ b/pkgs/tools/misc/hacksaw/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1l6i91xb81p1li1j2jm0r2rx8dbzl2yh468cl3dw0lqpqy4i65hx";
   };
 
-  cargoSha256 = "01draql3x71h7xl2xcc69dv7vpi3smnajhrvaihs5vij81pyfrzk";
+  cargoSha256 = "1rykc06lq3bkblsrj68rbil63yqdnvxkxlppq1w74wf0d6cwjc08";
 
   meta = with lib; {
     description = "Lightweight selection tool for usage in screenshot scripts etc";
diff --git a/pkgs/tools/misc/heatseeker/default.nix b/pkgs/tools/misc/heatseeker/default.nix
index 9d50530df47..fd89775afd6 100644
--- a/pkgs/tools/misc/heatseeker/default.nix
+++ b/pkgs/tools/misc/heatseeker/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1x7mdyf1m17s55f6yjdr1j510kb7a8f3zkd7lb2kzdc7nd3vgaxg";
   };
 
-  cargoSha256 = "0jnlcm7v29m4nc318qgf7r7jvs80s7n04fw83imm506vwr9rxbx9";
+  cargoSha256 = "0qs2s1bi93sdmmmfmkcnf55fm2blj9f095k95m210fyv5fpizdfm";
 
   # https://github.com/rschmitt/heatseeker/issues/42
   # I've suggested using `/usr/bin/env stty`, but doing that isn't quite as simple
diff --git a/pkgs/tools/misc/hexyl/default.nix b/pkgs/tools/misc/hexyl/default.nix
index d825368cb97..3f11490fcc4 100644
--- a/pkgs/tools/misc/hexyl/default.nix
+++ b/pkgs/tools/misc/hexyl/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0aj2sysl0spf5zlcd5kfzlw97w7dzf9x93pv0d1v9blnbd1rz7lm";
   };
 
-  cargoSha256 = "1am9vs7l2wzgwqakrsl27x1y7jpn9xaqa4kr48wwqzka401h6j4m";
+  cargoSha256 = "08hn0csw12xaag95gb5rj4q7k2zyy9j9bf4iw3b0r3ndh66qqra2";
 
   meta = with lib; {
     changelog = "https://github.com/sharkdp/hexyl/releases/tag/v${version}";
diff --git a/pkgs/tools/misc/hyperfine/default.nix b/pkgs/tools/misc/hyperfine/default.nix
index 39999677b11..747c1e56a81 100644
--- a/pkgs/tools/misc/hyperfine/default.nix
+++ b/pkgs/tools/misc/hyperfine/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0dla2jzwcxkdx3n4fqkkh6wirqs2f31lvqsw2pjf1jbnnif54mzh";
   };
 
-  cargoSha256 = "12qdllhydd29xh20l5gir6qpj4a1nkzp8ics344rcwj8wsj7g5zw";
+  cargoSha256 = "13dd5x0mr1pqcba48w9v5jjpddapd7gk34d4bysbjqsriwpbrdgp";
 
   nativeBuildInputs = [ installShellFiles ];
   buildInputs = lib.optional stdenv.isDarwin Security;
diff --git a/pkgs/tools/misc/i3nator/default.nix b/pkgs/tools/misc/i3nator/default.nix
index a6d78d3c4c9..99f0edeeafd 100644
--- a/pkgs/tools/misc/i3nator/default.nix
+++ b/pkgs/tools/misc/i3nator/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "10rxvxq48dhzlw5p9fsj6x0ci4pap85s9b192zakgvk4h97ifp2p";
   };
 
-  cargoSha256 = "1i58ix414klm72562scqhb0lmy4wgpiksriz5qs4ss7lzvqdsizy";
+  cargoSha256 = "04sx1dsznvh60s2yd9bzbvj6fgjvj37vv33qpww13fyph832i37g";
 
   meta = with lib; {
     description = "Tmuxinator for the i3 window manager";
diff --git a/pkgs/tools/misc/intermodal/default.nix b/pkgs/tools/misc/intermodal/default.nix
index 2b187b65760..c1f182d6966 100644
--- a/pkgs/tools/misc/intermodal/default.nix
+++ b/pkgs/tools/misc/intermodal/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0mn0wm3bihn7ffqk0p79mb1hik54dbhc9diq1wh9ylpld2iqmz68";
   };
 
-  cargoSha256 = "0kf5afarfwcl47b40pwnslfvxmxllmb995vc5ls2lpz4cx0jwahn";
+  cargoSha256 = "1bvs23rb25qdwbrygzq11p8cvck5lxjp9llvs1cjdh0qzr65jwla";
 
   # include_hidden test tries to use `chflags` on darwin
   checkFlagsArray = lib.optionals stdenv.isDarwin [ "--skip=subcommand::torrent::create::tests::include_hidden" ];
diff --git a/pkgs/tools/misc/journaldriver/default.nix b/pkgs/tools/misc/journaldriver/default.nix
index 70460d86fc9..5ce1bb5d158 100644
--- a/pkgs/tools/misc/journaldriver/default.nix
+++ b/pkgs/tools/misc/journaldriver/default.nix
@@ -3,7 +3,7 @@
 rustPlatform.buildRustPackage rec {
   pname = "journaldriver";
   version     = "1.1.0";
-  cargoSha256 = "1vyc9pglppfz5idahvcj01wpmmm6jw043zk896wdksywa5zcqn28";
+  cargoSha256 = "1gzfwkcm63fn41jls16c5sqxz28b0hrfpjhwsvvbwcfv40qxjhsg";
 
   src = fetchFromGitHub {
     owner  = "tazjin";
diff --git a/pkgs/tools/misc/kak-lsp/default.nix b/pkgs/tools/misc/kak-lsp/default.nix
index 51134e48c04..d57a48598e0 100644
--- a/pkgs/tools/misc/kak-lsp/default.nix
+++ b/pkgs/tools/misc/kak-lsp/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1wfv2fy5ga6kc51zka3pak0hq97csm2l11bz74w3n1hrf5q9nnf8";
   };
 
-  cargoSha256 = "0g67s6n45rxvv1q5s7x5ajh5n16p68bhlsrsjp46qamrraz63d68";
+  cargoSha256 = "1b6bcqbdkpxgxyfz89d8fhxfxvqc988pa9wxq5fsihnix8bm7jdk";
 
   buildInputs = lib.optional stdenv.isDarwin [ Security ];
 
diff --git a/pkgs/tools/misc/licensor/default.nix b/pkgs/tools/misc/licensor/default.nix
index ef708ab9afe..6cf31c7835c 100644
--- a/pkgs/tools/misc/licensor/default.nix
+++ b/pkgs/tools/misc/licensor/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0x0lkfrj7jka0p6nx6i9syz0bnzya5z9np9cw09zm1c9njv9mm32";
   };
 
-  cargoSha256 = "1yix40351yasg7mjmz7qwvwh1dq292dv47gy2a3bwkzhcn6whyjf";
+  cargoSha256 = "1h66d1brx441bg7vzbqdish4avgmc6h7rrkw2qf1siwmplwqqhw0";
 
   meta = with lib; {
     description = "Write licenses to stdout";
diff --git a/pkgs/tools/misc/loop/default.nix b/pkgs/tools/misc/loop/default.nix
index 0c3e206a9f2..17491b645d4 100644
--- a/pkgs/tools/misc/loop/default.nix
+++ b/pkgs/tools/misc/loop/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage {
     sha256 = "0v61kahwk1kdy8pb40rjnzcxby42nh02nyg9jqqpx3vgdrpxlnix";
   };
 
-  cargoSha256 = "0a3l580ca23vx8isd1qff870ci3p7wf4qrm53jl7nhfjh7rg5a4w";
+  cargoSha256 = "0pk6hwmzs58vgbkvmlpa4s4cd29izp6xq17zaix5v2didbzr5ixi";
 
   meta = with lib; {
     description = "UNIX's missing `loop` command";
diff --git a/pkgs/tools/misc/lsd/default.nix b/pkgs/tools/misc/lsd/default.nix
index 212cc997e76..54b3b443d0a 100644
--- a/pkgs/tools/misc/lsd/default.nix
+++ b/pkgs/tools/misc/lsd/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-r/Rllu+tgKqz+vkxA8BSN+3V0lUUd6dEATfickQp4+s=";
   };
 
-  cargoSha256 = "sha256-ZK4kKdW+TqT0NXzB1wtQwJA78cVRxvEoqImOIqLldvM=";
+  cargoSha256 = "sha256-O8P29eYlHgmmAADZ/DgTBmj0ZOa+4u/Oee+TMF+/4Ro=";
 
   nativeBuildInputs = [ installShellFiles ];
   postInstall = ''
diff --git a/pkgs/tools/misc/mc/default.nix b/pkgs/tools/misc/mc/default.nix
index 12aa477219b..6cbe693fb60 100644
--- a/pkgs/tools/misc/mc/default.nix
+++ b/pkgs/tools/misc/mc/default.nix
@@ -16,6 +16,7 @@
 , openssl
 , coreutils
 , autoreconfHook
+, autoSignDarwinBinariesHook
 }:
 
 stdenv.mkDerivation rec {
@@ -27,7 +28,12 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-xt6txQWV8tmiLcbCmanyizk+NYNG6/bKREqEadwWbCc=";
   };
 
-  nativeBuildInputs = [ pkg-config autoreconfHook unzip ];
+  nativeBuildInputs = [ pkg-config autoreconfHook unzip ]
+    # The preFixup hook rewrites the binary, which invaliates the code
+    # signature. Add the fixup hook to sign the output.
+    ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
+      autoSignDarwinBinariesHook
+    ];
 
   buildInputs = [
     file
diff --git a/pkgs/tools/misc/mcfly/default.nix b/pkgs/tools/misc/mcfly/default.nix
index 55e2b75684e..6412eaa1f80 100644
--- a/pkgs/tools/misc/mcfly/default.nix
+++ b/pkgs/tools/misc/mcfly/default.nix
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
     install -Dm644 -t $out/share/mcfly mcfly.fish
   '';
 
-  cargoSha256 = "sha256-JCV1cj+RncY/myVJTJ5fNkVqTITqGusA71tv7zGG9Uw=";
+  cargoSha256 = "sha256-7RKewz5jBS2HhHvXHBUWaQQ/wq9nryS9E+DqzBOVjPs=";
 
   meta = with lib; {
     homepage = "https://github.com/cantino/mcfly";
diff --git a/pkgs/tools/misc/onefetch/default.nix b/pkgs/tools/misc/onefetch/default.nix
index 5dab2044973..a80fdd56864 100644
--- a/pkgs/tools/misc/onefetch/default.nix
+++ b/pkgs/tools/misc/onefetch/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-owa+HmzMXpLR7H1FssW4gQiVAQGJRXhcitgJj6pxJRc=";
   };
 
-  cargoSha256 = "sha256-TqWe4eARQmmWcwnvb6BIZrzGeKMpiIObPv0cW1JvWj4=";
+  cargoSha256 = "sha256-Bn2FlRESuW83ouGPiBwvGkIB0uCDDG0hdhRfRBks/0Q=";
 
   buildInputs = lib.optionals stdenv.isDarwin [ CoreFoundation libiconv libresolv Security ];
 
diff --git a/pkgs/tools/misc/page/default.nix b/pkgs/tools/misc/page/default.nix
index b1042d3ae55..9d1d6d5abe6 100644
--- a/pkgs/tools/misc/page/default.nix
+++ b/pkgs/tools/misc/page/default.nix
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
     installShellCompletion --zsh $completions_dir/_page
   '';
 
-  cargoSha256 = "0s1iwli5h6qkibi24v80izr38z84zfx1dv71fv06lzq38b6s4nd5";
+  cargoSha256 = "19ff5h8z34z15wdnd3mj8bwlqcixwbimys77gfjmzb3w1g9ivlks";
 
   meta = with lib; {
     description = "Use neovim as pager";
diff --git a/pkgs/tools/misc/pazi/default.nix b/pkgs/tools/misc/pazi/default.nix
index 81590e1dd45..08adb3c199d 100644
--- a/pkgs/tools/misc/pazi/default.nix
+++ b/pkgs/tools/misc/pazi/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
 
-  cargoSha256 = "0sja0q9i0b1zb3a0a6z561yg9lqykylwr3iwin4r6cmi7j2sw5j6";
+  cargoSha256 = "1iamlp5519h8mmgd4964cvyp7mmnqdg2d3qj5v7yzilyp4nz15jc";
 
   meta = with lib; {
     description = "An autojump \"zap to directory\" helper";
diff --git a/pkgs/tools/misc/peep/default.nix b/pkgs/tools/misc/peep/default.nix
index 161ea3f75e6..6379f24649b 100644
--- a/pkgs/tools/misc/peep/default.nix
+++ b/pkgs/tools/misc/peep/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
   };
 
   cargoPatches = [ ./0001-Add-Cargo.lock-by-running-cargo-vendor.patch ];
-  cargoSha256 = "15qc9a4zpnq7lbcaji1mkik93qkx366misczbi1mipiq5w7sgn0l";
+  cargoSha256 = "12jqhvf8kdi17c442hl8sfpgxhni07x59khjwyyn54bnwc5h3zf9";
 
   meta = with lib; {
     description = "The CLI text viewer tool that works like less command on small pane within the terminal window";
diff --git a/pkgs/tools/misc/powerline-rs/default.nix b/pkgs/tools/misc/powerline-rs/default.nix
index 4e5a3476f53..a8f57bd78c4 100644
--- a/pkgs/tools/misc/powerline-rs/default.nix
+++ b/pkgs/tools/misc/powerline-rs/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0rqlxxl58dpfvm2idhi0vzinraf4bgiapmawiih9wxs599fnhm3y";
   };
 
-  cargoSha256 = "0a41a6kgwgz4040c2369jldvk6xy6s6fkgayca0qy7hdwc4bcxdp";
+  cargoSha256 = "1i29wps7wz6b0qarqqg8rplq7ak1zz83k6m182sjk17cni74n21l";
 
   nativeBuildInputs = [ pkg-config file perl cmake curl ];
   buildInputs = [ openssl libssh2 libgit2 libzip ] ++ lib.optional stdenv.isDarwin Security;
diff --git a/pkgs/tools/misc/psw/default.nix b/pkgs/tools/misc/psw/default.nix
index 09b9010bed6..c3d9b347ce1 100644
--- a/pkgs/tools/misc/psw/default.nix
+++ b/pkgs/tools/misc/psw/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1nwmps3zw99lrz6k1j14w4rcm7yj8vhf4cs9wjfc3c1zfjibz9iz";
   };
 
-  cargoSha256 = "0a6hhangbx62nsyrfzbxjv7cg5c9d8wh83f02ay72gkf48sqy75h";
+  cargoSha256 = "1y2am1bz68q7d9bn4264al13fv2j6a87bwrd60ycx0qak9fczlmv";
 
   meta = with lib; {
     description = "A command line tool to write random bytes to stdout";
diff --git a/pkgs/tools/misc/rargs/default.nix b/pkgs/tools/misc/rargs/default.nix
index dc07e3dd4f4..ed15e81709d 100644
--- a/pkgs/tools/misc/rargs/default.nix
+++ b/pkgs/tools/misc/rargs/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "188gj05rbivci1z4z29vwdwxlj2w01v5i4avwrxjnj1dd6mmlbxd";
   };
 
-  cargoSha256 = "0qzkhx0n28f5wy4fral3adn499q3f10q71cd544s4ghqwqn4khc9";
+  cargoSha256 = "18yd4dpzjyw6w1ms74pzxqyn5fkh8q4rsg6rqsp6bsz7300fxxvh";
 
   doCheck=false;  # `rargs`'s test depends on the deprecated `assert_cli` crate, which in turn is not in Nixpkgs
 
diff --git a/pkgs/tools/misc/shadowenv/default.nix b/pkgs/tools/misc/shadowenv/default.nix
index 88f4840e2f0..1f2d48b86ec 100644
--- a/pkgs/tools/misc/shadowenv/default.nix
+++ b/pkgs/tools/misc/shadowenv/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1h8hfyxxl4bpx8azzxj0snmzccn6xjd9vc2iyp8i2ar7aiyhf5yd";
   };
 
-  cargoSha256 = "1bjkwn57vm3in8lajhm7p9fjwyqhmkrb3fyq1k7lqjvrrh9jysb2";
+  cargoSha256 = "1ixjkb82863z160spylza2a5hk82x0c4wjjnzgakbzgrwv29pai3";
 
   nativeBuildInputs = [ installShellFiles ];
 
diff --git a/pkgs/tools/misc/shell-hist/default.nix b/pkgs/tools/misc/shell-hist/default.nix
index c4c496b978f..48e8667cc7e 100644
--- a/pkgs/tools/misc/shell-hist/default.nix
+++ b/pkgs/tools/misc/shell-hist/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage {
     sha256 = "0kc128xnnp1d56if70vfv0w3qnwhljhbnvzwwb7hfm3x2m0vqrqf";
   };
 
-  cargoSha256 = "0mfgax937na351qvi5n6s1ql9136djqiydzyfyax4684sp3kp613";
+  cargoSha256 = "1b2cfs03vlaz7jnr67ilgjfi7cm59izpcdi6pyvbzv8s46z2dysp";
 
   meta = with lib; {
     description = "Inspect your shell history";
diff --git a/pkgs/tools/misc/silicon/default.nix b/pkgs/tools/misc/silicon/default.nix
index 42b883b9f19..ae580545114 100644
--- a/pkgs/tools/misc/silicon/default.nix
+++ b/pkgs/tools/misc/silicon/default.nix
@@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-ci0gq4rOQHBmFPvhXZseIlwnqAWd06/qg/i/luhV79s=";
   };
 
-  cargoSha256 = "sha256-1sekLS+jhMeFJcW7pH/X8t28//xA+L54u81uKOo1kHE=";
+  cargoSha256 = "sha256-sUPOf9er+BOMqDJ8C6+Xjjqj6NQUV2JTzGA4yUWtDWM=";
 
   buildInputs = [ llvmPackages.libclang expat freetype fira-code ]
     ++ lib.optionals stdenv.isLinux [ libxcb ]
diff --git a/pkgs/tools/misc/skim/default.nix b/pkgs/tools/misc/skim/default.nix
index 7909aaa1a72..63931914e94 100644
--- a/pkgs/tools/misc/skim/default.nix
+++ b/pkgs/tools/misc/skim/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
 
   outputs = [ "out" "vim" ];
 
-  cargoSha256 = "0xh4f8c62kzj2fx7hyhdy13zhay13a6d2d7i9yz0n40dfgf70qx0";
+  cargoSha256 = "1jk2vcm2z6r1xd6md98jzpcy7kdwp5p2fzxvvaz9qscyfnx28x17";
 
   postPatch = ''
     sed -i -e "s|expand('<sfile>:h:h')|'$out'|" plugin/skim.vim
diff --git a/pkgs/tools/misc/tab-rs/default.nix b/pkgs/tools/misc/tab-rs/default.nix
index affea98ea55..1782e327f8a 100644
--- a/pkgs/tools/misc/tab-rs/default.nix
+++ b/pkgs/tools/misc/tab-rs/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1crj0caimin667f9kz34c0sm77892dmqaf1kxryqakqm75az5wfr";
   };
 
-  cargoSha256 = "0c2478c5gblvci0s68pv8386kxhs88dxzcpd2rq6l82bjn7yzymd";
+  cargoSha256 = "0v5vkxr2sncw4r4pwvk0jbk4as7zwwfvjk2cpj9872zp07s35a77";
 
   buildInputs = lib.optionals stdenv.isDarwin [ IOKit ];
 
diff --git a/pkgs/tools/misc/tagref/default.nix b/pkgs/tools/misc/tagref/default.nix
index ba63ec290d4..f47a5808d06 100644
--- a/pkgs/tools/misc/tagref/default.nix
+++ b/pkgs/tools/misc/tagref/default.nix
@@ -10,7 +10,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0y1c0v2zjpav1n72pgf3kpqdz6ixp2mjhcvvza4gzfp865c236nc";
   };
 
-  cargoSha256 = "06ljy213x9lhvqjysz9cjhrrg0ns07qkz27pxd8rih0mk6cck45g";
+  cargoSha256 = "0ca6maapn2337i78mq97199xjqk87ckw14k8kspc8kx5wnics2hl";
 
   meta = with lib; {
     description = "Tagref helps you refer to other locations in your codebase.";
diff --git a/pkgs/tools/misc/tealdeer/default.nix b/pkgs/tools/misc/tealdeer/default.nix
index 358c3229563..985f2dccd68 100644
--- a/pkgs/tools/misc/tealdeer/default.nix
+++ b/pkgs/tools/misc/tealdeer/default.nix
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1f37qlw4nxdhlqlqzzb4j11gsv26abk2nk2qhbzj77kp4v2b125x";
   };
 
-  cargoSha256 = "0g5fjj677qzhw3nw7f3n5gghsj2y811bdclxpy8aq2n58gbwvhvc";
+  cargoSha256 = "1rjnparpcn8rnqy43xl4gg151p1a0zj9sna600hz01r41g1hgccq";
 
   buildInputs = if stdenv.isDarwin then [ Security ] else [ openssl ];
 
diff --git a/pkgs/tools/misc/tensorman/default.nix b/pkgs/tools/misc/tensorman/default.nix
index 0e724059e99..307a472c73f 100644
--- a/pkgs/tools/misc/tensorman/default.nix
+++ b/pkgs/tools/misc/tensorman/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ openssl ];
-  cargoSha256 = "0vckay4jhg02xg68mvh7ys0yjj0p30m6wsjriqc8k24wjsrhiw9k";
+  cargoSha256 = "1lza3kc43581a09ss82bb5p0r74dy7si2x07cj4cb8dizl60b71v";
 
   meta = with lib; {
     description = "Utility for easy management of Tensorflow containers";
diff --git a/pkgs/tools/misc/termplay/default.nix b/pkgs/tools/misc/termplay/default.nix
index d60a65214b7..5db3998409e 100644
--- a/pkgs/tools/misc/termplay/default.nix
+++ b/pkgs/tools/misc/termplay/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
   };
 
   cargoBuildFlags = ["--features" "bin"];
-  cargoSha256 = "0nxm2k8dx6nxyghvpw44wqfd1n65947v2wqxxvy641hin4d7xzma";
+  cargoSha256 = "08ip6x4kink244majlk595yh551c2ap3ry58wly994mh8wf6ifwb";
 
   nativeBuildInputs = [ makeWrapper ];
   buildInputs = [
diff --git a/pkgs/tools/misc/tremor-rs/default.nix b/pkgs/tools/misc/tremor-rs/default.nix
index 472a7072199..9c0a68805a6 100644
--- a/pkgs/tools/misc/tremor-rs/default.nix
+++ b/pkgs/tools/misc/tremor-rs/default.nix
@@ -3,16 +3,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "tremor";
-  version = "0.11.1";
+  version = "0.11.2";
 
   src = fetchFromGitHub {
     owner = "tremor-rs";
     repo = "tremor-runtime";
     rev = "v${version}";
-    sha256 = "0aw6m5gklpgv1frrviv1v1ky898dwbcc1crd65d3gldcmnhvg6ap";
+    sha256 = "sha256-FedRwFVc+m25+Elj1Vp/fInbK6DVsUpniw29/dtecWo=";
   };
 
-  cargoSha256 = "1lks3xgnzcccv3hiqgxjpfm4v4g97an8yzfnb2kakw7jkfli6kvi";
+  cargoSha256 = "sha256-jxXoFOwoBSkn7pv10ctLpD7ko8bokc1ADkB7NQFRC7c=";
 
   nativeBuildInputs = [ cmake pkg-config installShellFiles ];
 
diff --git a/pkgs/tools/misc/tydra/default.nix b/pkgs/tools/misc/tydra/default.nix
index 00c8aa2a2c3..fd8e8e6ee5a 100644
--- a/pkgs/tools/misc/tydra/default.nix
+++ b/pkgs/tools/misc/tydra/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1kvyski3qy2lwlpipynq894i0g9x2j4a1iy2mgdwfibfyfkv2jnm";
   };
 
-  cargoSha256 = "11l3fvym16wrrpm9vy4asmqdh8qynwjy0w4gx2bbcnc6300ag43a";
+  cargoSha256 = "0handd5vxxvmlllzxhvwgadl4r7yc78f068r8jryprpap31azg3a";
 
   nativeBuildInputs = [ installShellFiles ];
 
diff --git a/pkgs/tools/misc/uwuify/default.nix b/pkgs/tools/misc/uwuify/default.nix
index 849703ffd76..b276abf3e5c 100644
--- a/pkgs/tools/misc/uwuify/default.nix
+++ b/pkgs/tools/misc/uwuify/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-MzXObbxccwEG7egmQMCdhUukGqZS+NgbYwZjTaqME7I=";
   };
 
-  cargoSha256 = "sha256-iyoGLFIfHToOwqEb5lQ1nXR0W1gLOVMfvw39LX6ib+U=";
+  cargoSha256 = "sha256-1BoB7K/dWy3AbogvHIDLrdPD7K54EISvn4RVU5RLTi4=";
   buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
 
   meta = with lib; {
diff --git a/pkgs/tools/misc/vivid/default.nix b/pkgs/tools/misc/vivid/default.nix
index e131d8bd4e7..ef7bd00f0e1 100644
--- a/pkgs/tools/misc/vivid/default.nix
+++ b/pkgs/tools/misc/vivid/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0m928hy2q8byfpm55nziiz86gcnhdnw3zpj78d8wx0pp318zjbla";
   };
 
-  cargoSha256 = "10xddr5cccc5cmhn4kwi27h3krmgapd7bqcp4rhjlbhdhsw7qxkx";
+  cargoSha256 = "1sn1cq3kaswnz2z9q5h84qipp64ha7jv5kix31lm7v6nam0f5awz";
 
   meta = with lib; {
     description = "A generator for LS_COLORS with support for multiple color themes";
diff --git a/pkgs/tools/misc/void/default.nix b/pkgs/tools/misc/void/default.nix
index 18699e5911d..7057fed8ca1 100644
--- a/pkgs/tools/misc/void/default.nix
+++ b/pkgs/tools/misc/void/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
   # The tests are long-running and not that useful
   doCheck = false;
 
-  cargoSha256 = "0fnkcjxcsiw9j0ibh4z7zy0m6r5d84q5hvr2darwpckbn9ryrh3k";
+  cargoSha256 = "1wh1yb02w5afghd19i2s0v8mq4lq20djsljrr44xciq68bqfdcp0";
 
   meta = with lib; {
     description = "Terminal-based personal organizer";
diff --git a/pkgs/tools/misc/wagyu/default.nix b/pkgs/tools/misc/wagyu/default.nix
index 981d59e3aaf..59748992dae 100644
--- a/pkgs/tools/misc/wagyu/default.nix
+++ b/pkgs/tools/misc/wagyu/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1646j0lgg3hhznifvbkvr672p3yqlcavswijawaxq7n33ll8vmcn";
   };
 
-  cargoSha256 = "16d1b3pamkg29nq80n6cbzc4zl9z3cgfvdxjkr2z4xrnzmkn1ysi";
+  cargoSha256 = "10al0j8ak95x4d85lzphgq8kmdnb809l6gahfp5miyvsfd4dxmpi";
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/tools/misc/xprite-editor/default.nix b/pkgs/tools/misc/xprite-editor/default.nix
index b130de94975..fadeec41031 100644
--- a/pkgs/tools/misc/xprite-editor/default.nix
+++ b/pkgs/tools/misc/xprite-editor/default.nix
@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
 
   nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config python3 ];
 
-  cargoSha256 = "1a0zy8gfc1gdk8nnv5qr4yspqy1jsip5nql3w74rl6h46cplpf5y";
+  cargoSha256 = "0z1ip667d1qwvm9md3zg8ib9jixpg7qj5ypwib7r2928h14yg7ck";
 
   cargoBuildFlags = [ "--bin" "xprite-native" ];
 
diff --git a/pkgs/tools/misc/xxv/default.nix b/pkgs/tools/misc/xxv/default.nix
index b22dfc7e4cd..99a8193c6ca 100644
--- a/pkgs/tools/misc/xxv/default.nix
+++ b/pkgs/tools/misc/xxv/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0ppfsgdigza2jppbkg4qanjhlkpnq7p115c4471vc6vpikpfrlk3";
   };
 
-  cargoSha256 = "1gnyig87a0yqgkng52fpn6hv629vym6k7ydljnxrhb5phmj2qbqx";
+  cargoSha256 = "0pmpvlmy4pw252is34r9af1ysrp78xs8pz8cw4rys9s4fh2hmhjb";
 
   buildInputs = lib.optionals useNcurses [ ncurses ]
   ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security ])
diff --git a/pkgs/tools/networking/bandwhich/default.nix b/pkgs/tools/networking/bandwhich/default.nix
index e3ef0f62ef0..233c57bc635 100644
--- a/pkgs/tools/networking/bandwhich/default.nix
+++ b/pkgs/tools/networking/bandwhich/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "014blvrv0kk4gzga86mbk7gd5dl1szajfi972da3lrfznck1w24n";
   };
 
-  cargoSha256 = "0b5pqsdggdjq9sl54rmh2gaq31va6b2crdv7ihh3198ixwasaf02";
+  cargoSha256 = "119szaighki565w28la6qg25s3cv8wviqin9f7f9w8x2rif3ipb3";
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/tools/networking/boringtun/default.nix b/pkgs/tools/networking/boringtun/default.nix
index 00b35dc4192..a071b5b4a3a 100644
--- a/pkgs/tools/networking/boringtun/default.nix
+++ b/pkgs/tools/networking/boringtun/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0b57c7z87xwrirmq9aa9jswqyj5bavkifmq7a9hgfphcmwcskmdb";
   };
 
-  cargoSha256 = "0bms93xg75b23ls2hb8dv26y4al4nr67pqcm57rp9d4rbsfafg8c";
+  cargoSha256 = "1xn6scc8nrb9xk89hsp9v67jvyww23rjaq5fcagpbqdwf5dvg4ja";
 
   buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
 
diff --git a/pkgs/tools/networking/bukubrow/default.nix b/pkgs/tools/networking/bukubrow/default.nix
index 157720651f4..f9747d4e0a0 100644
--- a/pkgs/tools/networking/bukubrow/default.nix
+++ b/pkgs/tools/networking/bukubrow/default.nix
@@ -18,7 +18,7 @@ in rustPlatform.buildRustPackage rec {
     sha256 = "1a3gqxj6d1shv3w0v9m8x2xr0bvcynchy778yqalxkc3x4vr0nbn";
   };
 
-  cargoSha256 = "1k6mffcs9g0z5lh8hpflyharx6653cs1f2rjpldab0fc5fjmjfza";
+  cargoSha256 = "0z6i9wzz5gy9rs8cxfmwg4mpfajv0xvj4nn6jfl7f1rw6k457jc9";
 
   buildInputs = [ sqlite ];
 
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index f73ab773876..05b91bfba05 100644
--- a/pkgs/tools/networking/curl/default.nix
+++ b/pkgs/tools/networking/curl/default.nix
@@ -7,8 +7,15 @@
 , gnutlsSupport ? false, gnutls ? null
 , wolfsslSupport ? false, wolfssl ? null
 , scpSupport ? zlibSupport && !stdenv.isSunOS && !stdenv.isCygwin, libssh2 ? null
-, # a very sad story re static: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=439039
-  gssSupport ? with stdenv.hostPlatform; !isWindows && !isStatic, libkrb5 ? null
+, gssSupport ? with stdenv.hostPlatform; !(
+    !isWindows &&
+    # a very sad story re static: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=439039
+    !isStatic &&
+    # the "mig" tool does not configure its compiler correctly. This could be
+    # fixed in mig, but losing gss support on cross compilation to darwin is
+    # not worth the effort.
+    !(isDarwin && (stdenv.buildPlatform != stdenv.hostPlatform))
+  ), libkrb5 ? null
 , c-aresSupport ? false, c-ares ? null
 , brotliSupport ? false, brotli ? null
 }:
diff --git a/pkgs/tools/networking/dogdns/default.nix b/pkgs/tools/networking/dogdns/default.nix
index 4fe57eb4990..1374e4473c0 100644
--- a/pkgs/tools/networking/dogdns/default.nix
+++ b/pkgs/tools/networking/dogdns/default.nix
@@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
   buildInputs = lib.optionals stdenv.isLinux [ openssl ]
     ++ lib.optionals stdenv.isDarwin [ Security ];
 
-  cargoSha256 = "08scc6vh703245rg3xkffhalrk5pisd0wg54fd49d7gdbyjivgi6";
+  cargoSha256 = "0zgzaq303zy8lymhldm6dpm5hwsxi2ph42zw5brvsdjmgm9ga0rb";
 
   postInstall = ''
     installShellCompletion completions/dog.{bash,fish,zsh}
diff --git a/pkgs/tools/networking/drill/default.nix b/pkgs/tools/networking/drill/default.nix
index 3be4707a529..f29a7ee705f 100644
--- a/pkgs/tools/networking/drill/default.nix
+++ b/pkgs/tools/networking/drill/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "07zz0dj0wjwrc1rmayz7s8kpcv03i0ygl4vfwsam72qd4nf6v538";
   };
 
-  cargoSha256 = "1nbfbmm9v1yp7380zdzz7qrc7x6krwlvgn5x5yzb8yn1rc99jzx4";
+  cargoSha256 = "04gj9gaysjcm2d81ds2raak847hr8w84jgfdwqd51wi8xm32w5jf";
 
   nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
   buildInputs = [ ]
diff --git a/pkgs/tools/networking/fastd/default.nix b/pkgs/tools/networking/fastd/default.nix
index af75641a5b9..493112b93ac 100644
--- a/pkgs/tools/networking/fastd/default.nix
+++ b/pkgs/tools/networking/fastd/default.nix
@@ -45,8 +45,6 @@ stdenv.mkDerivation rec {
     "-Dmac_ghash_pclmulqdq=disabled"
   ];
 
-  enableParallelBuilding = true;
-
   meta = with lib; {
     description = "Fast and Secure Tunneling Daemon";
     homepage = "https://projects.universe-factory.net/projects/fastd/wiki";
diff --git a/pkgs/tools/networking/gnirehtet/default.nix b/pkgs/tools/networking/gnirehtet/default.nix
index 193a0b9e0fb..123ab3d76ee 100644
--- a/pkgs/tools/networking/gnirehtet/default.nix
+++ b/pkgs/tools/networking/gnirehtet/default.nix
@@ -25,7 +25,7 @@ rustPlatform.buildRustPackage {
       sha256 = "0wk6n082gnj9xk46n542h1012h8gyhldca23bs7vl73g0534g878";
   };
   sourceRoot = "source/relay-rust";
-  cargoSha256 = "0i7f52r697gjw30m8k60hd3y6wsn5lpz419r083a1rhpbinzd26q";
+  cargoSha256 = "03r8ivsvmhi5f32gj4yacbyzanziymszya18dani53bq9zis9z31";
 
   nativeBuildInputs = [ makeWrapper ];
 
diff --git a/pkgs/tools/networking/gping/default.nix b/pkgs/tools/networking/gping/default.nix
index 6b7e0e0b4e2..a6ace183df6 100644
--- a/pkgs/tools/networking/gping/default.nix
+++ b/pkgs/tools/networking/gping/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-lApm1JLXNjDKLj6zj25OaZDVp7lLW3qyrDsvJrudl8I=";
   };
 
-  cargoSha256 = "sha256-2PxhtAqROgufVGGH7VtEJJU6Sa2OrGbbMVRUWYbAD0Q=";
+  cargoSha256 = "sha256-d1NjPwT3YDp1U9JWeUejpWDbJonFlt5lYbUf7p3jVT0=";
 
   buildInputs = lib.optional stdenv.isDarwin libiconv;
 
diff --git a/pkgs/tools/networking/httplz/default.nix b/pkgs/tools/networking/httplz/default.nix
index eacb598674d..2424018d885 100644
--- a/pkgs/tools/networking/httplz/default.nix
+++ b/pkgs/tools/networking/httplz/default.nix
@@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
 
   cargoBuildFlags = [ "--bin httplz" ];
   cargoPatches = [ ./cargo-lock.patch ];
-  cargoSha256 = "1rpwzrr9bvw375vn97y5fqhraqz35d3ani9kfflvn2758x3g8gwf";
+  cargoSha256 = "0r33vg9431jv32r03ryxb3rc4mp6h1kc00d3h1knssfvkwsh31yn";
 
   postInstall = ''
     wrapProgram $out/bin/httplz \
diff --git a/pkgs/tools/networking/mozwire/default.nix b/pkgs/tools/networking/mozwire/default.nix
index 360c3572139..afccd8376d8 100644
--- a/pkgs/tools/networking/mozwire/default.nix
+++ b/pkgs/tools/networking/mozwire/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   buildInputs = lib.optionals stdenv.isDarwin [ Security ];
 
-  cargoSha256 = "0yxnpnxwis46wz4j5rjzyyzrvh94hn8vzxmmrcmrdz3gkakg77hg";
+  cargoSha256 = "0q27p2hyw6c1fh5x8kwsrw8a1hk6z90z0z3w86ga8ryz53xg4vdi";
 
   meta = with lib; {
     description = "MozillaVPN configuration manager giving Linux, macOS users (among others), access to MozillaVPN";
diff --git a/pkgs/tools/networking/openssh/common.nix b/pkgs/tools/networking/openssh/common.nix
index 21ad012f3fb..40011a14c89 100644
--- a/pkgs/tools/networking/openssh/common.nix
+++ b/pkgs/tools/networking/openssh/common.nix
@@ -19,7 +19,7 @@
 , pkg-config
 , pam
 , etcDir ? null
-, withKerberos ? true
+, withKerberos ? !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
 , libkrb5
 , libfido2
 , nixosTests
diff --git a/pkgs/tools/networking/rshijack/default.nix b/pkgs/tools/networking/rshijack/default.nix
index e4bb7315a45..76a674dead0 100644
--- a/pkgs/tools/networking/rshijack/default.nix
+++ b/pkgs/tools/networking/rshijack/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0y01hi3jpfawqlqs8ka0vwfhjw5j5gkhk2nz5m13ns2h27bw20v7";
   };
 
-  cargoSha256 = "0l1kavacnjvi22l6pawgkqqxnjaizi3pddqkhwjshw4pzzixzvli";
+  cargoSha256 = "1rbp94wxr8kqjfg35hf44vn3qa0f0jcq8i50a8d0g5y2qf12h04d";
 
   meta = with lib; {
     description = "TCP connection hijacker";
diff --git a/pkgs/tools/networking/tdns-cli/default.nix b/pkgs/tools/networking/tdns-cli/default.nix
index 9d786d60b12..9f1ac89ce8e 100644
--- a/pkgs/tools/networking/tdns-cli/default.nix
+++ b/pkgs/tools/networking/tdns-cli/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0nn036in5j1h0vxkwif0lf7fn900zy4f4kxlzy6qdx3jakgmxvwh";
   };
 
-  cargoSha256 = "0v1hx6kjsmydx6ckjqj31y2gcpvax4mshwrniicplkka3q6hx9ra";
+  cargoSha256 = "14mmfj5my8gbsdhlhz17w8wjcc085c6dkj78kwr2hhsbcxp1vjgg";
 
   meta = with lib; {
     description = "DNS tool that aims to replace dig and nsupdate";
diff --git a/pkgs/tools/networking/tox-node/default.nix b/pkgs/tools/networking/tox-node/default.nix
index 0b682fa97c1..5ed6aa632d3 100644
--- a/pkgs/tools/networking/tox-node/default.nix
+++ b/pkgs/tools/networking/tox-node/default.nix
@@ -23,7 +23,7 @@ buildRustPackage rec {
 
   doCheck = false;
 
-  cargoSha256 = "sha256-kCT2ulB+c2OlsABkyXyzrHfD/G92EPCdTO34FR5oSws=";
+  cargoSha256 = "sha256-J/0KO33vZmOvm6V7qCXInuAJTbRqyy5/qj6p6dEmoas=";
 
   meta = with lib; {
     description = "A server application to run tox node written in pure Rust";
diff --git a/pkgs/tools/networking/tunnelto/default.nix b/pkgs/tools/networking/tunnelto/default.nix
index c1824334789..e750327e4ba 100644
--- a/pkgs/tools/networking/tunnelto/default.nix
+++ b/pkgs/tools/networking/tunnelto/default.nix
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1vvb619cq3n88y2s8lncwcyrhb5s4gpjfiyia91pilcpnfdb04y2";
   };
 
-  cargoSha256 = "0k0ig3dynj46kh8g7d6bljcaalmp40pvdbhbjmlxrmwnjq6bhzcq";
+  cargoSha256 = "1pjd62yz7pavcinc96g2x0f5giadl9aqvz1i5vhfanh6mj6mrbl1";
 
   nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
   buildInputs = [ ]
diff --git a/pkgs/tools/networking/vde2/default.nix b/pkgs/tools/networking/vde2/default.nix
index babbd88fd16..bc3be912265 100644
--- a/pkgs/tools/networking/vde2/default.nix
+++ b/pkgs/tools/networking/vde2/default.nix
@@ -22,6 +22,10 @@ stdenv.mkDerivation rec {
     })
   ];
 
+  preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '';
+
   configureFlags = lib.optional (!withPython) "--disable-python";
 
   buildInputs = [ openssl libpcap ]
diff --git a/pkgs/tools/nix/cached-nix-shell/default.nix b/pkgs/tools/nix/cached-nix-shell/default.nix
index 853bf87346f..acbb0be3b9c 100644
--- a/pkgs/tools/nix/cached-nix-shell/default.nix
+++ b/pkgs/tools/nix/cached-nix-shell/default.nix
@@ -19,7 +19,7 @@ in rustPlatform.buildRustPackage rec {
     sha256 = "0w6khry1ncyqy5h6996xw1f6viw4wdrfji5m8lz9gm487xlq5v0b";
   };
 
-  cargoSha256 = "0d4fz0rhqy1n30wfl2pmf76zpp21agr3h0hswp3r5bfnxqp6i54h";
+  cargoSha256 = "05lcm5fzsn3h6dl2n2yq52r2vagrgmab08kafinz2kdcvv05wpk5";
 
   # The BLAKE3 C library is intended to be built by the project depending on it
   # rather than as a standalone library.
diff --git a/pkgs/tools/nix/nix-query-tree-viewer/default.nix b/pkgs/tools/nix/nix-query-tree-viewer/default.nix
index 353aafa2a7e..b0fba9d047a 100644
--- a/pkgs/tools/nix/nix-query-tree-viewer/default.nix
+++ b/pkgs/tools/nix/nix-query-tree-viewer/default.nix
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
     gtk3
   ];
 
-  cargoSha256 = "1pbyi7knqmqxbpi3jhl492is9zkaxdpdnmbm11nqwc1nvvbjblzc";
+  cargoSha256 = "1i9sjs77v1c3lch93pzjgr1zl0k1mlwkdpf3zfp13hyjn6zpldnj";
 
   meta = with lib; {
     description = "GTK viewer for the output of `nix store --query --tree`";
diff --git a/pkgs/tools/nix/nixdoc/default.nix b/pkgs/tools/nix/nixdoc/default.nix
index d97a3d5bae3..ef5ddc528ab 100644
--- a/pkgs/tools/nix/nixdoc/default.nix
+++ b/pkgs/tools/nix/nixdoc/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   buildInputs =  lib.optional stdenv.isDarwin [ darwin.Security ];
 
-  cargoSha256 = "1vamwynkbnffs8ryr2zb1a41cymjvr8zzh1bifyh9hpkx2k11rs3";
+  cargoSha256 = "1nv6g8rmjjbwqmjkrpqncypqvx5c7xp2zlx5h6rw2j9d1wlys0v5";
 
   meta = with lib; {
     description = "Generate documentation for Nix functions";
diff --git a/pkgs/tools/nix/nixpkgs-fmt/default.nix b/pkgs/tools/nix/nixpkgs-fmt/default.nix
index f1ea25e3bfd..b203d2992fb 100644
--- a/pkgs/tools/nix/nixpkgs-fmt/default.nix
+++ b/pkgs/tools/nix/nixpkgs-fmt/default.nix
@@ -10,7 +10,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0dqirvn8pq6ssxjlf6rkqcsx6ndasws93lz2v9f9s01k9ny8x8mq";
   };
 
-  cargoSha256 = "138aq64rb08s96q3xqcmvl3ax78rhjkwfa6v9iz8ywl32066gahb";
+  cargoSha256 = "0mm79hfh8p1rs02pkpcv25p59b24q1rymwh11yxry4d4f12b6aw0";
 
   meta = with lib; {
     description = "Nix code formatter for nixpkgs";
diff --git a/pkgs/tools/nix/rnix-hashes/default.nix b/pkgs/tools/nix/rnix-hashes/default.nix
index acdf230749c..4aebb35bc93 100644
--- a/pkgs/tools/nix/rnix-hashes/default.nix
+++ b/pkgs/tools/nix/rnix-hashes/default.nix
@@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
     })
   ];
 
-  cargoSha256 = "vaG+0t+XAckV9F4iIgcTkbIUurxdQsTCfOnRnrOKoRc=";
+  cargoSha256 = "sha256-p6W9NtOKzVViyFq5SQvnIsik7S3mqUqxI/05OiC+P+Q=";
 
   meta = with lib; {
     description = "Nix Hash Converter";
diff --git a/pkgs/tools/package-management/cargo-about/default.nix b/pkgs/tools/package-management/cargo-about/default.nix
index 3632dc58f12..d2acffc2009 100644
--- a/pkgs/tools/package-management/cargo-about/default.nix
+++ b/pkgs/tools/package-management/cargo-about/default.nix
@@ -10,7 +10,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-MsXNneKj2xCci1guj1TKcIrX7XByJ5/lWUmjxAsgzPY=";
   };
 
-  cargoSha256 = "sha256-NdzgIB6uXMtGiLwOACEIeAb4iv7mYLnwRte3M/TkSMA=";
+  cargoSha256 = "sha256-ssAmY+o+/2+C9sol+PeFlpNwVuN5JNoofgkr3cUW+S4=";
 
   buildInputs = lib.optional stdenv.isDarwin libiconv;
 
diff --git a/pkgs/tools/package-management/cargo-deps/default.nix b/pkgs/tools/package-management/cargo-deps/default.nix
index 682cfde78fa..af0424c5bec 100644
--- a/pkgs/tools/package-management/cargo-deps/default.nix
+++ b/pkgs/tools/package-management/cargo-deps/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1cdmgdag9chjifsp2hxr9j15hb6l6anqq38y8srj1nk047a3kbcw";
   };
 
-  cargoSha256 = "1gjbvgpicy9n311qh9a5n0gdyd2rnc0b9zypnzk2ibn1pgaikafy";
+  cargoSha256 = "15pf4x2aw8sl65g63cz4yv9y78yc2wi25h9khpqx6i7gyd7dxbsc";
 
   meta = with lib; {
     description = "Cargo subcommand for building dependency graphs of Rust projects";
diff --git a/pkgs/tools/package-management/cargo-edit/default.nix b/pkgs/tools/package-management/cargo-edit/default.nix
index 78e428b5c7e..de5abca29be 100644
--- a/pkgs/tools/package-management/cargo-edit/default.nix
+++ b/pkgs/tools/package-management/cargo-edit/default.nix
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
     hash = "sha256:0fh1lq793k4ddpqsf2av447hcb74vcq53afkm3g4672k48mjjw1y";
   };
 
-  cargoSha256 = "1h1sy54p7zxijydnhzvkxli90d72biv1inni17licb0vb9dihmnf";
+  cargoSha256 = "0ah3zjx36ibax4gi66g13finh4m2k0aidxkg2nxx1c2aqj847mm1";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/tools/package-management/cargo-graph/default.nix b/pkgs/tools/package-management/cargo-graph/default.nix
index 5bca56d993d..37fd43a1bcf 100644
--- a/pkgs/tools/package-management/cargo-graph/default.nix
+++ b/pkgs/tools/package-management/cargo-graph/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0myg26cssmbakz53dl61lswsbaqnjqlbc30c2571pq8f7gvz2qv5";
   };
 
-  cargoSha256 = "0fzj88iy57c39yi8pf3agfmsf2dck06f0yqmlnsaxvvp4cknkw1n";
+  cargoSha256 = "0wyvly7aq4njlxnmgpfgbh08fxgqh85kw7d938pm6qxmj27zn4p2";
 
   meta = with lib; {
     description = "A cargo subcommand for creating GraphViz DOT files and dependency graphs";
diff --git a/pkgs/tools/package-management/cargo-kcov/default.nix b/pkgs/tools/package-management/cargo-kcov/default.nix
index 8b2dbe3e489..c37a7306368 100644
--- a/pkgs/tools/package-management/cargo-kcov/default.nix
+++ b/pkgs/tools/package-management/cargo-kcov/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0hqplgj3i8js42v2kj44khk543a93sk3n6wlfpv3c84pdqlm29br";
   };
 
-  cargoSha256 = "1dzm33cfriwgq4zvg6l6y76d5lp9hpcywdkwpl92qyjqg1hx8a1w";
+  cargoSha256 = "0m5gfyjzzwd8wkbb388vmd785dy334x0migq3ssi7dlah9zx62bj";
   doCheck = false;
 
   meta = with lib; {
diff --git a/pkgs/tools/package-management/cargo-license/default.nix b/pkgs/tools/package-management/cargo-license/default.nix
index ba461398e66..f5fcf37ac70 100644
--- a/pkgs/tools/package-management/cargo-license/default.nix
+++ b/pkgs/tools/package-management/cargo-license/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   cargoPatches = [ ./add-Cargo.lock.patch ];
 
-  cargoSha256 = "0bkaj54avvib1kipk8ky7gyxfs00qm80jd415zp53hhvinphzb5v";
+  cargoSha256 = "1gda6m5g545fgx8ash96w408mxi5rb8hrv73c0xs0gx7hfyx5zcj";
 
   meta = with lib; {
     description = "Cargo subcommand to see license of dependencies";
diff --git a/pkgs/tools/package-management/cargo-update/default.nix b/pkgs/tools/package-management/cargo-update/default.nix
index 892de0ade27..425cef9353d 100644
--- a/pkgs/tools/package-management/cargo-update/default.nix
+++ b/pkgs/tools/package-management/cargo-update/default.nix
@@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
   };
 
   cargoPatches = [ ./0001-Generate-lockfile-for-cargo-update-v4.1.2.patch ];
-  cargoSha256 = "150fpb7wyyxi40z4wai6c94mn84g700c2228316g6y8i07c8ix0d";
+  cargoSha256 = "1viqdl8zncxyyxsd8xhx1jxqh24g03nn6fyi0iwwba5vvmif1rak";
 
   nativeBuildInputs = [ cmake installShellFiles pkg-config ronn ];
 
diff --git a/pkgs/tools/package-management/emplace/default.nix b/pkgs/tools/package-management/emplace/default.nix
index 735c940f18b..6b7f51d3ab6 100644
--- a/pkgs/tools/package-management/emplace/default.nix
+++ b/pkgs/tools/package-management/emplace/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-lBCGSeEVxlXrn1RHqMEYSXLOehJw/DiL+33nx4+rV2Y=";
   };
 
-  cargoSha256 = "sha256-QL71pJ5RBWRRse5DXwctMvu+z818jEEQjaNBXHLy20Y=";
+  cargoSha256 = "sha256-7LpUaOeBTIpi6A3cTRQAc1QostRgJp6bOf+AXy3mjyE=";
 
   meta = with lib; {
     description = "Mirror installed software on multiple machines";
diff --git a/pkgs/tools/package-management/nix-doc/default.nix b/pkgs/tools/package-management/nix-doc/default.nix
index 695cd2976d8..ae01601dde4 100644
--- a/pkgs/tools/package-management/nix-doc/default.nix
+++ b/pkgs/tools/package-management/nix-doc/default.nix
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
 
   nativeBuildInputs = [ pkg-config ];
 
-  cargoSha256 = "1xz3qngs8p0s62dq4d46c01z3k1vvgg856767g56b13c38pzfh28";
+  cargoSha256 = "0xsy13yxm8vblab73gynb781ya168w66c32i1lyv0ns1lnz61dmh";
 
   meta = with lib; {
     description = "An interactive Nix documentation tool";
diff --git a/pkgs/tools/package-management/nix-index/default.nix b/pkgs/tools/package-management/nix-index/default.nix
index 07d0e9f3a9d..a8a2c2242fd 100644
--- a/pkgs/tools/package-management/nix-index/default.nix
+++ b/pkgs/tools/package-management/nix-index/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "05fqfwz34n4ijw7ydw2n6bh4bv64rhks85cn720sy5r7bmhfmfa8";
   };
 
-  cargoSha256 = "0apdr9z18p6m4lfjv8k9zv2mqc7vssd2d536zfv1pns0pdqsfw50";
+  cargoSha256 = "161lz96a52s53rhhkxxhcg41bsmh8w6rv6nl8gwqmg3biszy7hah";
 
   nativeBuildInputs = [ pkg-config makeWrapper ];
   buildInputs = [ openssl curl ]
diff --git a/pkgs/tools/package-management/nix-simple-deploy/default.nix b/pkgs/tools/package-management/nix-simple-deploy/default.nix
index 91f9a39514b..75f47d35ce2 100644
--- a/pkgs/tools/package-management/nix-simple-deploy/default.nix
+++ b/pkgs/tools/package-management/nix-simple-deploy/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "12g0sbgs2dfnk0agp1kagfi1yhk26ga98zygxxrjhjxrqb2n5w80";
   };
 
-  cargoSha256 = "0svnz9r0lrmz333qpbpdddjd46vh9i74qchws8aifa2qwnqy0kmn";
+  cargoSha256 = "1wp8wdv25j8ybq2j04z3nl4yc95wkj5h740lzpyps08yaxj8bncr";
 
   meta = with lib; {
     description = "Deploy software or an entire NixOS system configuration to another NixOS system";
diff --git a/pkgs/tools/package-management/nix-template/default.nix b/pkgs/tools/package-management/nix-template/default.nix
index 0ef3602c597..0345830fb9d 100644
--- a/pkgs/tools/package-management/nix-template/default.nix
+++ b/pkgs/tools/package-management/nix-template/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1h6xdvhzg7nb0s82b3r5bsh8bfdb1l5sm7fa24lfwd396xp9yyig";
   };
 
-  cargoSha256 = "13y3b60xnry71999kygvkr29gkyjss3ga3rzb43ajah4qp90rsqs";
+  cargoSha256 = "0hp31b5q4s6grkha2jz55945cbjkqdpvx1l8m49zv5prczhd7mz5";
 
   meta = with lib; {
     description = "Make creating nix expressions easy";
diff --git a/pkgs/tools/security/b3sum/default.nix b/pkgs/tools/security/b3sum/default.nix
index d36dfc8e18c..9cfc68146f9 100644
--- a/pkgs/tools/security/b3sum/default.nix
+++ b/pkgs/tools/security/b3sum/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   sourceRoot = "source/b3sum";
 
-  cargoSha256 = "0n8hp83hw7g260vmf4qcicpca75faam7k0zmb0k4cdzsar96gdrr";
+  cargoSha256 = "18l6j756s6qfmiy3z2cai7i62wskf04xi7y4dlcv4aiv4sv3nx9r";
 
   cargoPatches = [ ./cargo-lock.patch ];
 
diff --git a/pkgs/tools/security/bitwarden_rs/default.nix b/pkgs/tools/security/bitwarden_rs/default.nix
index e3d43374558..2790a643499 100644
--- a/pkgs/tools/security/bitwarden_rs/default.nix
+++ b/pkgs/tools/security/bitwarden_rs/default.nix
@@ -25,7 +25,7 @@ in rustPlatform.buildRustPackage rec {
 
   RUSTC_BOOTSTRAP = 1;
 
-  cargoSha256 = "139by5y2ma3v52nabzr5man1qy395rchs2dlivkj9xi829kg4mcr";
+  cargoSha256 = "0vdi792bzqxj8g215r9r5anzs4qhqsm6sjzwpj1l9861bn7j4xsz";
   cargoBuildFlags = [ featuresFlag ];
 
   checkPhase = ''
diff --git a/pkgs/tools/security/fido2luks/default.nix b/pkgs/tools/security/fido2luks/default.nix
index 26922c35f2d..1bc0d77878c 100644
--- a/pkgs/tools/security/fido2luks/default.nix
+++ b/pkgs/tools/security/fido2luks/default.nix
@@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
     export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
   '';
 
-  cargoSha256 = "sha256-4VuM1bPkl9XCI9XsZIJvw3kHSKgT4P7x6I83F2KCFD0=";
+  cargoSha256 = "sha256-d6t/bvHpnH4lKv78tp/8DC/VrQBnaiZhnf8GrlcYhJw=";
 
   meta = with lib; {
     description = "Decrypt your LUKS partition using a FIDO2 compatible authenticator";
diff --git a/pkgs/tools/security/genpass/default.nix b/pkgs/tools/security/genpass/default.nix
index b358507bbae..e726da34031 100644
--- a/pkgs/tools/security/genpass/default.nix
+++ b/pkgs/tools/security/genpass/default.nix
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "154kprbqc59f06ciz60il4ax299zapwa0hz8vjn25rl4gr5gzn4l";
   };
 
-  cargoSha256 = "1nc699n7f732lhzfhsfknay6z3igyiqy5jymm5x815mv9y1vwaj1";
+  cargoSha256 = "1b9jqkg11d0ih46km063inqqjwfy1nrwb2xb3dagg3hi8hahpqpb";
 
   buildInputs = lib.optionals stdenv.isDarwin [ CoreFoundation libiconv Security ];
 
diff --git a/pkgs/tools/security/jwt-cli/default.nix b/pkgs/tools/security/jwt-cli/default.nix
index 0b3a94d816b..e1cd9ec359f 100644
--- a/pkgs/tools/security/jwt-cli/default.nix
+++ b/pkgs/tools/security/jwt-cli/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-82Le0kdt/fnSQwsRRYHy4Jv9rsCPGf5dIWmoZE2cPxY=";
   };
 
-  cargoSha256 = "sha256-nk4nrsePiUirVPoOPehCOf5ZoGVj3jy7PnSZENnpcaM=";
+  cargoSha256 = "sha256-sCauVxc6JPJ4dBi5LOt+v9bdlRW+oF4cd/sfG5Xdv70=";
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/tools/security/ripasso/cursive.nix b/pkgs/tools/security/ripasso/cursive.nix
index 4cdc3f6d89e..cc2765bd707 100644
--- a/pkgs/tools/security/ripasso/cursive.nix
+++ b/pkgs/tools/security/ripasso/cursive.nix
@@ -14,7 +14,7 @@ buildRustPackage rec {
 
   patches = [ ./fix-tests.patch ];
 
-  cargoSha256 = "1wpn67v0xmxhn1dgzhh1pwz1yc3cizmfxhpb7qv9b27ynx4486ji";
+  cargoSha256 = "1sv5czhrafk15yj5xyd1x9jdqn1dz6aqpxxnyz49icx53qlg9f8g";
 
   cargoBuildFlags = [ "-p ripasso-cursive -p ripasso-man" ];
 
diff --git a/pkgs/tools/security/rustscan/default.nix b/pkgs/tools/security/rustscan/default.nix
index 80cc8c8cc1f..adf514006b1 100644
--- a/pkgs/tools/security/rustscan/default.nix
+++ b/pkgs/tools/security/rustscan/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0fdbsz1v7bb5dm3zqjs1qf73lb1m4qzkqyb3h3hbyrp9vklgxsgw";
   };
 
-  cargoSha256 = "039xarscwqndpyrr3sgzkhqna3c908zh06id8x2qaykm8l248zs9";
+  cargoSha256 = "0658jbx59qrsgpfczzlfrbp2qm7kh0c5561bsxzmgiri7fcz9w0n";
 
   postPatch = ''
     substituteInPlace src/main.rs \
diff --git a/pkgs/tools/security/sn0int/default.nix b/pkgs/tools/security/sn0int/default.nix
index 1577b476401..93b7eb0ecbe 100644
--- a/pkgs/tools/security/sn0int/default.nix
+++ b/pkgs/tools/security/sn0int/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-vnSpItch9RDUyYxERKRwYPmRLwRG9gAI7iIY+7iRs1w=";
   };
 
-  cargoSha256 = "sha256-1QqNI7rdH5wb1Zge8gkJtzg2Hgd/Vk9DAU9ULk/5wiw=";
+  cargoSha256 = "sha256-qgOZxuzAeDgT93TccfnVTj3OQzalHfude0ETTVMM2Pk=";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/tools/system/kmon/default.nix b/pkgs/tools/system/kmon/default.nix
index cb48a48ff49..4253ff3e7c9 100644
--- a/pkgs/tools/system/kmon/default.nix
+++ b/pkgs/tools/system/kmon/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-2cP3kZnjlMmN3nWRPh1M+hk+dyssGNpJjlluDsm702g=";
   };
 
-  cargoSha256 = "sha256-JFDtmi10iCK66/2ovg8tGAgGDW8Y4b5IYkSbDqu0PmQ=";
+  cargoSha256 = "sha256-xxYfaGhAtLESpy4gdE3IjE29W+DGnI1ed020mxjT3TI=";
 
   nativeBuildInputs = [ python3 ];
 
diff --git a/pkgs/tools/system/mq-cli/default.nix b/pkgs/tools/system/mq-cli/default.nix
index a29e1630116..2c1baa24f6f 100644
--- a/pkgs/tools/system/mq-cli/default.nix
+++ b/pkgs/tools/system/mq-cli/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "02z85waj5jc312biv2qhbgplsggxgjmfmyv9v8b1ky0iq1mpxjw7";
   };
 
-  cargoSha256 = "19ccylnmmlm2d8kc178cffpjwrjlia6b4v3nzvxcs81a396ymr7b";
+  cargoSha256 = "19mk0hl7cr5qb3r64zi0hcsn4yqbg8c3g2f9jywm0g2c13ak36li";
 
   meta = with lib; {
     description      = "CLI tool to manage POSIX message queues";
diff --git a/pkgs/tools/system/tre-command/default.nix b/pkgs/tools/system/tre-command/default.nix
index 01590db0fd0..85b4f9fe2ac 100644
--- a/pkgs/tools/system/tre-command/default.nix
+++ b/pkgs/tools/system/tre-command/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1r84xzv3p0ml3wac2j7j5fkm7i93v2xvadb8f8al5wi57q39irj7";
   };
 
-  cargoSha256 = "1nbfgz7njc10b0abs6zwi6wzhlwllps3wah6abc1mj5yhrzwccmh";
+  cargoSha256 = "1f7yhnbgccqmz8hpc1xdv97j53far6d5p5gqvq6xxaqq9irf9bgj";
 
   nativeBuildInputs = [ installShellFiles ];
 
diff --git a/pkgs/tools/system/zenith/default.nix b/pkgs/tools/system/zenith/default.nix
index 3a7f8a55a12..8fc9637bfb9 100644
--- a/pkgs/tools/system/zenith/default.nix
+++ b/pkgs/tools/system/zenith/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1bn364rmp0q86rd7vgv4n7x09cdf9m4njcaq92jnk85ni6h147ax";
   };
 
-  cargoSha256 = "16s7swv2sp15gry1j1pcyz29cspvafczaf4v02x4fd2jbn2y3f6r";
+  cargoSha256 = "0c2mk2bcz4qjyqmf11yqhnhy4pqxr77b3c1gvr5jfmjshx4ff7v2";
 
   buildInputs = lib.optionals stdenv.isDarwin [ IOKit ];
 
diff --git a/pkgs/tools/text/angle-grinder/default.nix b/pkgs/tools/text/angle-grinder/default.nix
index 66441d73713..f9f5736015b 100644
--- a/pkgs/tools/text/angle-grinder/default.nix
+++ b/pkgs/tools/text/angle-grinder/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-cGYhGcNalmc/Gr7mY1Fycs8cZYaIy622DFIL64LT+gE=";
   };
 
-  cargoSha256 = "sha256-NkghuZHNT3Rq2wqiyKzjP+u9ZpeHU5H6oBLS0oQ7LcU=";
+  cargoSha256 = "sha256-LJ7zudUeso28zJqLhqWGWqf+L4o75rJjtTx9BpWKRIE=";
 
   meta = with lib; {
     description = "Slice and dice logs on the command line";
diff --git a/pkgs/tools/text/chars/default.nix b/pkgs/tools/text/chars/default.nix
index e5a1bc9c2a0..c8d1b1064ac 100644
--- a/pkgs/tools/text/chars/default.nix
+++ b/pkgs/tools/text/chars/default.nix
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1pyda3b6svxzc98d7ggl7v9xd0xhilmpjrnajzh77zcwzq42s17l";
   };
 
-  cargoSha256 = "1ampmw0l2wk2xp4q13aj5shxncqfh4dc3rsmpk2scaivanrsikn5";
+  cargoSha256 = "0ywywbcnc9jm0cfd6kbq8vl6r5dl16sxn7pwi2k6l0sj75pm1i6h";
 
   buildInputs = lib.optionals stdenv.isDarwin [ Security ];
 
diff --git a/pkgs/tools/text/choose/default.nix b/pkgs/tools/text/choose/default.nix
index 7816f79649c..05b32512687 100644
--- a/pkgs/tools/text/choose/default.nix
+++ b/pkgs/tools/text/choose/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0j3861pxqw0lnamb201c7h5w7npzyiwwb6c1xzxjv72m2ccvz76j";
   };
 
-  cargoSha256 = "1p18926pfff1yayb2i28v0nz37j52hqqv7244yfrzgidi29kyvbc";
+  cargoSha256 = "1fdcz7vnmrw92y7bx49napi7j2jjc41liz5k63kbijfwqnaaiswy";
 
   meta = with lib; {
     description = "A human-friendly and fast alternative to cut and (sometimes) awk";
diff --git a/pkgs/tools/text/coloursum/default.nix b/pkgs/tools/text/coloursum/default.nix
index 5dcf6f3da47..8391b75a67b 100644
--- a/pkgs/tools/text/coloursum/default.nix
+++ b/pkgs/tools/text/coloursum/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1piz0l7qdcvjzfykm6rzqc8s1daxp3cj3923v9cmm41bc2v0p5q0";
   };
 
-  cargoSha256 = "1w0q5w0bf1682jvzcml8cgmr9mrgi4if0p63wzchyjav330dp6pk";
+  cargoSha256 = "08l01ivmln9gwabwa1p0gk454qyxlcpnlxx840vys476f4pw7vvf";
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/tools/text/diffr/default.nix b/pkgs/tools/text/diffr/default.nix
index 78baa32630b..a77a5dc081e 100644
--- a/pkgs/tools/text/diffr/default.nix
+++ b/pkgs/tools/text/diffr/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "18ks5g4bx6iz9hdjxmi6a41ncxpb1hnsscdlddp2gr40k3vgd0pa";
   };
 
-  cargoSha256 = "09yn02985yv40n9y0ipz0jmj7iqhz7l8hd3ry9ib3fyw9pyklnfa";
+  cargoSha256 = "05rfjangmyvmqm0bvl4bcvc7m4zhg66gknh85sxr3bzrlwzacwgw";
 
   buildInputs = (lib.optional stdenv.isDarwin Security);
 
diff --git a/pkgs/tools/text/each/default.nix b/pkgs/tools/text/each/default.nix
index a1d14ed2110..0218cf5dde2 100644
--- a/pkgs/tools/text/each/default.nix
+++ b/pkgs/tools/text/each/default.nix
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "04rx8jf871l4darfx6029dhpnbpmzwjgzazayp1qcaadsk8207z5";
   };
 
-  cargoSha256 = "1rcmymjff9sc0dv4zplklivfws14wqx6q4ky47arg6jkj3dyprp8";
+  cargoSha256 = "1r7nzfh7v2mlp0wdrcpqfj68h3zmip2m3d4z2nwxyikmw7c80car";
 
   meta = with lib; {
     description = " A better way of working with structured data on the command line";
diff --git a/pkgs/tools/text/fst/default.nix b/pkgs/tools/text/fst/default.nix
index 738fd69dc64..99c90400522 100644
--- a/pkgs/tools/text/fst/default.nix
+++ b/pkgs/tools/text/fst/default.nix
@@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec {
   ];
 
   cargoBuildFlags = [ "--workspace" ];
-  cargoSha256 = "0svn2gzipslz939396rcydqx3i1x07l7acas7fhql12n59n2yrxw";
+  cargoSha256 = "0440p0hb3nlq9wwk3zac9dldanslrddvqn4gib0vl7aikxkcvh4l";
 
   buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
 
diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix
index 892aeb463f8..5b158f2cbb0 100644
--- a/pkgs/tools/text/groff/default.nix
+++ b/pkgs/tools/text/groff/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, perl
+{ lib, stdenv, fetchurl, fetchpatch, perl
 , ghostscript #for postscript and html output
 , psutils, netpbm #for html output
 , buildPackages
@@ -22,6 +22,13 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./0001-Fix-cross-compilation-by-looking-for-ar.patch
+  ]
+  ++ lib.optionals (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "9") [
+    # https://trac.macports.org/ticket/59783
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/openembedded/openembedded-core/ce265cf467f1c3e5ba2edbfbef2170df1a727a52/meta/recipes-extended/groff/files/0001-Include-config.h.patch";
+      sha256 = "1b0mg31xkpxkzlx696nr08rcc7ndpaxdplvysy0hw5099c4n1wyf";
+    })
   ];
 
   postPatch = lib.optionalString (psutils != null) ''
diff --git a/pkgs/tools/text/mdbook/default.nix b/pkgs/tools/text/mdbook/default.nix
index 838cdf075bd..baa5f5988bf 100644
--- a/pkgs/tools/text/mdbook/default.nix
+++ b/pkgs/tools/text/mdbook/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-51S4I1YIbdgXkhuT7KnhJe71nGCQmr9JmuGtp7Bcxqo=";
   };
 
-  cargoSha256 = "sha256-2kBJcImytsSd7Q0kj1bsP/NXxyy2Pr8gHb8iNf6h3/4=";
+  cargoSha256 = "sha256-4bYLrmyI7cPUes6DYREiIB9gDze0KO2jMP/jPzvWbwQ=";
 
   buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
 
diff --git a/pkgs/tools/text/mdcat/default.nix b/pkgs/tools/text/mdcat/default.nix
index f6752938d46..6f6750b1b02 100644
--- a/pkgs/tools/text/mdcat/default.nix
+++ b/pkgs/tools/text/mdcat/default.nix
@@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
   nativeBuildInputs = [ pkg-config asciidoctor installShellFiles ];
   buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security;
 
-  cargoSha256 = "sha256-mnDUIJhEGNoh3eq2Vhww1T/tpZh9RP+RxbRsBNrpOzw=";
+  cargoSha256 = "sha256-y9yg4EQDL+RcD6NI7n6W/Hi6Tw4Wr1Kf6hbcIuidIf4=";
 
   checkInputs = [ ansi2html ];
   # Skip tests that use the network and that include files.
diff --git a/pkgs/tools/text/ripgrep-all/default.nix b/pkgs/tools/text/ripgrep-all/default.nix
index 0b324a0a772..0fc39b8da28 100644
--- a/pkgs/tools/text/ripgrep-all/default.nix
+++ b/pkgs/tools/text/ripgrep-all/default.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1wjpgi7m3lxybllkr3r60zaphp02ykq2syq72q9ail2760cjcir6";
   };
 
-  cargoSha256 = "0arwxqrpxdws4q1pnqzqkp1yv5aas08lkzh1vcgmf26j58sycniy";
+  cargoSha256 = "1l71xj5crfb51wfp2bdvdqp1l8kg182n5d6w23lq2wjszaqcj7cw";
   nativeBuildInputs = [ makeWrapper ];
   buildInputs = lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/tools/text/ripgrep/default.nix b/pkgs/tools/text/ripgrep/default.nix
index 61c24ae39e4..ca337deec93 100644
--- a/pkgs/tools/text/ripgrep/default.nix
+++ b/pkgs/tools/text/ripgrep/default.nix
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1hqps7l5qrjh9f914r5i6kmcz6f1yb951nv4lby0cjnp5l253kps";
   };
 
-  cargoSha256 = "03wf9r2csi6jpa7v5sw5lpxkrk4wfzwmzx7k3991q3bdjzcwnnwp";
+  cargoSha256 = "1nyfxma2vwfq6r614ng8qq8vanb540a5z0ibs85wz5sjm3hp1l4f";
 
   cargoBuildFlags = lib.optional withPCRE2 "--features pcre2";
 
diff --git a/pkgs/tools/text/ruplacer/default.nix b/pkgs/tools/text/ruplacer/default.nix
index 3af039ccdae..2f9249711ed 100644
--- a/pkgs/tools/text/ruplacer/default.nix
+++ b/pkgs/tools/text/ruplacer/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0yj753d9wsnp4s5a71ph241jym5rfz3161a1v3qxfc4w23v86j1q";
   };
 
-  cargoSha256 = "0wrv4k63pc1v0apmxmmci9qaykcv9ig3nfxy6id5caqrckp73cr4";
+  cargoSha256 = "0z1i1yfj1wdzbzapnvfr9ngn9z30xwlkrfhz52npbirysy1al5xk";
 
   buildInputs = (lib.optional stdenv.isDarwin Security);
 
diff --git a/pkgs/tools/text/sd/default.nix b/pkgs/tools/text/sd/default.nix
index a3290aff211..1536e72ad29 100644
--- a/pkgs/tools/text/sd/default.nix
+++ b/pkgs/tools/text/sd/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0c5bsqs6c55x4j640vhzlmbiylhp5agr7lx0jrwcjazfyvxihc01";
   };
 
-  cargoSha256 = "1mksmdp1wnsjd8gw1g3l16a24fk05xa9mxygc0qklr41bqf8kw8b";
+  cargoSha256 = "1iwgy9zzdxay6hb9pz47jchy03jrsy5csxijlq4i228qhqnvq1lr";
 
   buildInputs = lib.optionals stdenv.isDarwin [ Security ];
 
diff --git a/pkgs/tools/text/uwc/default.nix b/pkgs/tools/text/uwc/default.nix
index cf8e5658f76..14fe74723a3 100644
--- a/pkgs/tools/text/uwc/default.nix
+++ b/pkgs/tools/text/uwc/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "1ywqq9hrrm3frvd2sswknxygjlxi195kcy7g7phwq63j7hkyrn50";
   };
 
-  cargoSha256 = "0ra62cf75b1c4knxxpbdg8m0sy2k02r52j606fp5l9crp0fml8l0";
+  cargoSha256 = "04pslga3ff766cpb73n6ivzmqfa0hm19gcla8iyv6p59ddsajh3q";
 
   doCheck = true;
 
diff --git a/pkgs/tools/text/xsv/default.nix b/pkgs/tools/text/xsv/default.nix
index 026218b00e1..303b38d65c2 100644
--- a/pkgs/tools/text/xsv/default.nix
+++ b/pkgs/tools/text/xsv/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "17v1nw36mrarrd5yv4xd3mpc1d7lvhd5786mqkzyyraf78pjg045";
   };
 
-  cargoSha256 = "1q59nvklh5r2mrsz656z6js3j2l6rqyhfz6l0yq28df5kyahk91b";
+  cargoSha256 = "1bh60zgflaa5n914irkr4bpq3m4h2ngcj6bp5xx1qj112dwgvmyb";
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/tools/typesetting/tectonic/default.nix b/pkgs/tools/typesetting/tectonic/default.nix
index 1145fabf486..ba722837026 100644
--- a/pkgs/tools/typesetting/tectonic/default.nix
+++ b/pkgs/tools/typesetting/tectonic/default.nix
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "sha256-XQ3KRM12X80JPFMnQs//8ZJEv+AV1sr3BH0Nw/PH0HQ=";
   };
 
-  cargoSha256 = "sha256-YOg4W933qUBcvo2y3nmvEWqxTfqWKDi3GCoTJWLnXxk=";
+  cargoSha256 = "sha256-930tFAKMCmTFS9faIWLSVtWN/gAA9UAUMuRo61XISYA=";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/tools/typesetting/tex/tex-match/default.nix b/pkgs/tools/typesetting/tex/tex-match/default.nix
index 4d02e2e1acf..65bfcd02d78 100644
--- a/pkgs/tools/typesetting/tex/tex-match/default.nix
+++ b/pkgs/tools/typesetting/tex/tex-match/default.nix
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
 
   buildInputs = [ gtk3 ];
 
-  cargoSha256 = "1sm2fd3dhs59rvmfjzrfz0qwqzyc9dllb8ph0wc2x0r3px16c71x";
+  cargoSha256 = "13ihwrckpsb4j1ai923vh151frw0yriwg9yylj9lk0ycps51y1sn";
 
   meta = with lib; {
     description = "Search through over 1000 different LaTeX symbols by sketching. A desktop version of detexify";
diff --git a/pkgs/tools/video/rav1e/default.nix b/pkgs/tools/video/rav1e/default.nix
index b53938e36a3..17c1b39a92c 100644
--- a/pkgs/tools/video/rav1e/default.nix
+++ b/pkgs/tools/video/rav1e/default.nix
@@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec {
     '';
   };
 
-  cargoSha256 = "1j92prjyr86wyx58h10xq9c9z28ky86h291x65w7qrxpj658aiz1";
+  cargoSha256 = "0miq6iiywwbxm6k0alnqg6bnd14pwc8vl9d8fgg6c0vjlfy5zhlb";
   nativeBuildInputs = [ nasm cargo-c ];
   buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 378663e4b3f..d428aa67201 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -30,7 +30,18 @@ in
   # just the plain stdenv.
   stdenv_32bit = lowPrio (if stdenv.hostPlatform.is32bit then stdenv else multiStdenv);
 
-  stdenvNoCC = stdenv.override { cc = null; hasCC = false; };
+  stdenvNoCC = stdenv.override (
+    { cc = null; hasCC = false; }
+
+    // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && (stdenv.hostPlatform != stdenv.buildPlatform)) {
+      # TODO: This is a hack to use stdenvNoCC to produce a CF when cross
+      # compiling. It's not very sound. The cross stdenv has:
+      #   extraBuildInputs = [ targetPackages.darwin.apple_sdks.frameworks.CoreFoundation ]
+      # and uses stdenvNoCC. In order to make this not infinitely recursive, we need to exclude
+      # this extraBuildInput.
+      extraBuildInputs = [];
+    }
+  );
 
   mkStdenvNoLibs = stdenv: let
     bintools = stdenv.cc.bintools.override {
@@ -48,7 +59,22 @@ in
       lib.mapNullable (rs: rs ++ [ bintools ]) (stdenv.allowedRequisites or null);
   };
 
-  stdenvNoLibs = mkStdenvNoLibs stdenv;
+  stdenvNoLibs =
+    if stdenv.hostPlatform != stdenv.buildPlatform && (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isDarwin.useLLVM or false)
+    then
+      # We cannot touch binutils or cc themselves, because that will cause
+      # infinite recursion. So instead, we just choose a libc based on the
+      # current platform. That means we won't respect whatever compiler was
+      # passed in with the stdenv stage argument.
+      #
+      # TODO It would be much better to pass the `stdenvNoCC` and *unwrapped*
+      # cc, bintools, compiler-rt equivalent, etc. and create all final stdenvs
+      # as part of the stage. Then we would never be tempted to override a
+      # later thing to to create an earlier thing (leading to infinite
+      # recursion) and we also would still respect the stage arguments choices
+      # for these things.
+      overrideCC stdenv buildPackages.llvmPackages.clangNoCompilerRt
+    else mkStdenvNoLibs stdenv;
 
   gccStdenvNoLibs = mkStdenvNoLibs gccStdenv;
   clangStdenvNoLibs = mkStdenvNoLibs clangStdenv;
@@ -618,11 +644,15 @@ in
 
   replaceDependency = callPackage ../build-support/replace-dependency.nix { };
 
-  nukeReferences = callPackage ../build-support/nuke-references { };
+  nukeReferences = callPackage ../build-support/nuke-references {
+    inherit (darwin) signingUtils;
+  };
 
   referencesByPopularity = callPackage ../build-support/references-by-popularity { };
 
-  removeReferencesTo = callPackage ../build-support/remove-references-to { };
+  removeReferencesTo = callPackage ../build-support/remove-references-to {
+    inherit (darwin) signingUtils;
+  };
 
   vmTools = callPackage ../build-support/vm { };
 
@@ -632,7 +662,9 @@ in
 
   setJavaClassPath = makeSetupHook { } ../build-support/setup-hooks/set-java-classpath.sh;
 
-  fixDarwinDylibNames = makeSetupHook { } ../build-support/setup-hooks/fix-darwin-dylib-names.sh;
+  fixDarwinDylibNames = makeSetupHook {
+    substitutions = { inherit (binutils) targetPrefix; };
+  } ../build-support/setup-hooks/fix-darwin-dylib-names.sh;
 
   keepBuildTree = makeSetupHook { } ../build-support/setup-hooks/keep-build-tree.sh;
 
@@ -6703,7 +6735,9 @@ in
 
   mbutil = python3Packages.callPackage ../applications/misc/mbutil { };
 
-  mc = callPackage ../tools/misc/mc { };
+  mc = callPackage ../tools/misc/mc {
+    inherit (darwin) autoSignDarwinBinariesHook;
+  };
 
   mcabber = callPackage ../applications/networking/instant-messengers/mcabber { };
 
@@ -10029,15 +10063,21 @@ in
 
   any-nix-shell = callPackage ../shells/any-nix-shell { };
 
-  bash = lowPrio (callPackage ../shells/bash/4.4.nix { });
-  bash_5 = lowPrio (callPackage ../shells/bash/5.1.nix { });
+  bash = lowPrio (callPackage ../shells/bash/4.4.nix {
+    binutils = stdenv.cc.bintools;
+  });
+  bash_5 = lowPrio (callPackage ../shells/bash/5.1.nix {
+    binutils = stdenv.cc.bintools;
+  });
   bashInteractive_5 = lowPrio (callPackage ../shells/bash/5.1.nix {
+    binutils = stdenv.cc.bintools;
     interactive = true;
     withDocs = true;
   });
 
   # WARNING: this attribute is used by nix-shell so it shouldn't be removed/renamed
   bashInteractive = callPackage ../shells/bash/4.4.nix {
+    binutils = stdenv.cc.bintools;
     interactive = true;
     withDocs = true;
   };
@@ -10432,12 +10472,17 @@ in
   gerbil-support = callPackage ../development/compilers/gerbil/gerbil-support.nix { };
   gerbilPackages-unstable = gerbil-support.gerbilPackages-unstable; # NB: don't recurseIntoAttrs for (unstable!) libraries
 
-  gccFun = callPackage (if (with stdenv.targetPlatform; isVc4 || libc == "relibc")
-    then ../development/compilers/gcc/6
-    else ../development/compilers/gcc/10);
-  gcc = if (with stdenv.targetPlatform; isVc4 || libc == "relibc")
-    then gcc6 else
-      if stdenv.targetPlatform.isAarch64 then gcc9 else gcc10;
+  inherit (let
+      num =
+        if (with stdenv.targetPlatform; isVc4 || libc == "relibc") then 6
+        else if (stdenv.targetPlatform.isAarch64 && stdenv.isDarwin) then 11
+        else if stdenv.targetPlatform.isAarch64 then 9
+        else 10;
+      numS = toString num;
+    in {
+      gcc = pkgs.${"gcc${numS}"};
+      gccFun = callPackage (../development/compilers/gcc + "/${numS}");
+    }) gcc gccFun;
   gcc-unwrapped = gcc.cc;
 
   wrapNonDeterministicGcc = stdenv: ccWrapper:
@@ -10518,8 +10563,8 @@ in
   gccCrossLibcStdenv = overrideCC stdenv buildPackages.gccCrossStageStatic;
 
   crossLibcStdenv =
-    if stdenv.hostPlatform.useLLVM or false
-    then overrideCC stdenv buildPackages.llvmPackages_8.lldClangNoLibc
+    if stdenv.hostPlatform.useLLVM or false || stdenv.hostPlatform.isDarwin
+    then overrideCC stdenv buildPackages.llvmPackages.clangNoLibc
     else gccCrossLibcStdenv;
 
   # The GCC used to build libc for the target platform. Normal gccs will be
@@ -10669,7 +10714,8 @@ in
 
   gcc_latest = gcc11;
 
-  gfortran = gfortran9;
+  # aarch64-darwin doesn't support earlier gcc
+  gfortran = if (stdenv.isDarwin && stdenv.isAarch64) then gfortran11 else gfortran9;
 
   gfortran48 = wrapCC (gcc48.cc.override {
     name = "gfortran";
@@ -10757,7 +10803,8 @@ in
     inherit (gnome2) libart_lgpl;
   });
 
-  gnat = gnat9;
+  # aarch64-darwin doesn't support earlier gcc
+  gnat = if (stdenv.isDarwin && stdenv.isAarch64) then gnat11 else gnat9;
 
   gnat6 = wrapCC (gcc6.cc.override {
     name = "gnat";
@@ -11269,17 +11316,22 @@ in
   llvm_6  = llvmPackages_6.llvm;
   llvm_5  = llvmPackages_5.llvm;
 
-  llvmPackages = with targetPlatform;
-    if isDarwin then
-      llvmPackages_7
-    else if isFreeBSD then
-      llvmPackages_7
-    else if isLinux then
-      llvmPackages_7
-    else if isWasm then
-      llvmPackages_8
-    else
-      llvmPackages_latest;
+  llvmPackages = let
+    # This returns the minimum suported version for the platform. The
+    # assumption is that or any later version is good.
+    choose = platform:
+      /**/ if platform.isDarwin then (if platform.isAarch64 then 11 else 7)
+      else if platform.isFreeBSD then 7
+      else if platform.isAndroid then 12
+      else if platform.isLinux then 7
+      else if platform.isWasm then 8
+      else 11; # latest
+    # We take the "max of the mins". Why? Since those are lower bounds of the
+    # supported version set, this is like intersecting those sets and then
+    # taking the min bound of that.
+    minSupported = toString (lib.trivial.max (choose stdenv.hostPlatform) (choose
+      stdenv.targetPlatform));
+  in pkgs.${"llvmPackages_${minSupported}"};
 
   llvmPackages_5 = recurseIntoAttrs (callPackage ../development/compilers/llvm/5 {
     inherit (stdenvAdapters) overrideCC;
@@ -11543,19 +11595,19 @@ in
     inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
     llvm_10 = llvmPackages_10.libllvm;
   };
-  rust_1_51 = callPackage ../development/compilers/rust/1_51.nix {
+  rust_1_52 = callPackage ../development/compilers/rust/1_52.nix {
     inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
     llvm_11 = llvmPackages_11.libllvm;
   };
-  rust = rust_1_51;
+  rust = rust_1_52;
 
   mrustc = callPackage ../development/compilers/mrustc { };
   mrustc-minicargo = callPackage ../development/compilers/mrustc/minicargo.nix { };
   mrustc-bootstrap = callPackage ../development/compilers/mrustc/bootstrap.nix { };
 
   rustPackages_1_45 = rust_1_45.packages.stable;
-  rustPackages_1_51 = rust_1_51.packages.stable;
-  rustPackages = rustPackages_1_51;
+  rustPackages_1_52 = rust_1_52.packages.stable;
+  rustPackages = rustPackages_1_52;
 
   inherit (rustPackages) cargo clippy rustc rustPlatform;
 
@@ -11885,6 +11937,7 @@ in
     noLibc = (self.libc == null);
 
     inherit bintools libc;
+    inherit (darwin) postLinkSignHook signingUtils;
   } // extraArgs; in self);
 
   yaml-language-server = nodePackages.yaml-language-server;
@@ -12576,14 +12629,14 @@ in
 
   autobuild = callPackage ../development/tools/misc/autobuild { };
 
-  autoconf = autoconf270;
+  autoconf = autoconf271;
 
   autoconf-archive = callPackage ../development/tools/misc/autoconf-archive { };
 
   autoconf213 = callPackage ../development/tools/misc/autoconf/2.13.nix { };
   autoconf264 = callPackage ../development/tools/misc/autoconf/2.64.nix { };
   autoconf269 = callPackage ../development/tools/misc/autoconf/2.69.nix { };
-  autoconf270 = callPackage ../development/tools/misc/autoconf { };
+  autoconf271 = callPackage ../development/tools/misc/autoconf { };
 
   autocutsel = callPackage ../tools/X11/autocutsel{ };
 
@@ -12698,11 +12751,38 @@ in
   });
   binutilsNoLibc = wrapBintoolsWith {
     bintools = binutils-unwrapped;
-    libc =
-      /**/ if stdenv.targetPlatform.libc == "msvcrt" then targetPackages.windows.mingw_w64_headers
-      else if stdenv.targetPlatform.libc == "libSystem" then darwin.xcode
-      else if stdenv.targetPlatform.libc == "nblibc" then targetPackages.netbsdCross.headers
-      else null;
+    libc = preLibcCrossHeaders;
+  };
+
+  # Here we select the default bintools implementations to be used.  Note when
+  # cross compiling these are used not for this stage but the *next* stage.
+  # That is why we choose using this stage's target platform / next stage's
+  # host platform.
+  #
+  # Because this is the *next* stages choice, it's a bit non-modular to put
+  # here. In theory, bootstraping is supposed to not be a chain but at tree,
+  # where each stage supports many "successor" stages, like multiple possible
+  # futures. We don't have a better alternative, but with this downside in
+  # mind, please be judicious when using this attribute. E.g. for building
+  # things in *this* stage you should use probably `stdenv.cc.bintools` (from a
+  # default or alternate `stdenv`), at build time, and try not to "force" a
+  # specific bintools at runtime at all.
+  #
+  # In other words, try to only use this in wrappers, and only use those
+  # wrappers from the next stage.
+  bintools-unwrapped = let
+    inherit (stdenv.targetPlatform) linker;
+  in     if linker == "lld"     then llvmPackages.bintools-unwrapped
+    else if linker == "cctools" then darwin.binutils-unwrapped
+    else if linker == "bfd"     then binutils-unwrapped
+    else if linker == "gold"    then binutils-unwrapped
+    else null;
+  bintoolsNoLibc = wrapBintoolsWith {
+    bintools = bintools-unwrapped;
+    libc = preLibcCrossHeaders;
+  };
+  bintools = wrapBintoolsWith {
+    bintools = bintools-unwrapped;
   };
 
   bison = callPackage ../development/tools/parsing/bison { };
@@ -14158,8 +14238,10 @@ in
   bicgl = callPackage ../development/libraries/science/biology/bicgl { };
 
   # TODO(@Ericson2314): Build bionic libc from source
-  bionic = assert stdenv.hostPlatform.useAndroidPrebuilt;
-    pkgs."androidndkPkgs_${stdenv.hostPlatform.ndkVer}".libraries;
+  bionic = if stdenv.hostPlatform.useAndroidPrebuilt
+    then pkgs."androidndkPkgs_${stdenv.hostPlatform.ndkVer}".libraries
+    else callPackage ../os-specific/linux/bionic-prebuilt { };
+
 
   bobcat = callPackage ../development/libraries/bobcat { };
 
@@ -14849,6 +14931,14 @@ in
     stdenv = crossLibcStdenv;
   };
 
+  # These are used when buiding compiler-rt / libgcc, prior to building libc.
+  preLibcCrossHeaders = let
+    inherit (stdenv.targetPlatform) libc;
+  in     if libc == "msvcrt" then targetPackages.windows.mingw_w64_headers or windows.mingw_w64_headers
+    else if libc == "nblibc" then targetPackages.netbsdCross.headers or netbsdCross.headers
+    else if libc == "libSystem" && stdenv.targetPlatform.isAarch64 then targetPackages.darwin.LibsystemCross or darwin.LibsystemCross
+    else null;
+
   # We can choose:
   libcCrossChooser = name:
     # libc is hackily often used from the previous stage. This `or`
@@ -14863,8 +14953,10 @@ in
     else if name == "newlib" then targetPackages.newlibCross or newlibCross
     else if name == "musl" then targetPackages.muslCross or muslCross
     else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64
-    else if stdenv.targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries or darwin.iosSdkPkgs.libraries
-    else if name == "libSystem" then targetPackages.darwin.xcode
+    else if name == "libSystem" then
+      if stdenv.targetPlatform.useiOSPrebuilt
+      then targetPackages.darwin.iosSdkPkgs.libraries or darwin.iosSdkPkgs.libraries
+      else targetPackages.darwin.LibsystemCross or (throw "don't yet have a `targetPackages.darwin.LibsystemCross for ${stdenv.targetPlatform.config}`")
     else if name == "nblibc" then targetPackages.netbsdCross.libc or netbsdCross.libc
     else if name == "wasilibc" then targetPackages.wasilibc or wasilibc
     else if name == "relibc" then targetPackages.relibc or relibc
@@ -16176,9 +16268,9 @@ in
     else libiconvReal;
 
   glibcIconv = libc: let
-    inherit (builtins.parseDrvName libc.name) name version;
+    inherit (libc) pname version;
     libcDev = lib.getDev libc;
-  in runCommand "${name}-iconv-${version}" {} ''
+  in runCommand "${pname}-iconv-${version}" {} ''
     mkdir -p $out/include
     ln -sv ${libcDev}/include/iconv.h $out/include
   '';
@@ -18789,7 +18881,8 @@ in
 
   clickhouse = callPackage ../servers/clickhouse {
     # upstream requires llvm10 as of v20.11.4.13
-    inherit (llvmPackages_10) clang-unwrapped lld lldClang llvm;
+    inherit (llvmPackages_10) clang-unwrapped lld llvm;
+    llvm-bintools = llvmPackages_10.bintools;
   };
 
   clickhouse-cli = with python3Packages; toPythonApplication clickhouse-cli;
@@ -20185,7 +20278,7 @@ in
   lkl = callPackage ../applications/virtualization/lkl { };
 
   inherit (callPackages ../os-specific/linux/kernel-headers { })
-    linuxHeaders;
+    linuxHeaders makeLinuxHeaders;
 
   kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { };
 
@@ -25179,6 +25272,8 @@ in
 
   openshift = callPackage ../applications/networking/cluster/openshift { };
 
+  opsdroid = callPackage ../applications/networking/opsdroid { };
+
   oroborus = callPackage ../applications/window-managers/oroborus {};
 
   osm2pgsql = callPackage ../tools/misc/osm2pgsql { };
diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix
index 5275a6f3123..a7f29d67261 100644
--- a/pkgs/top-level/darwin-packages.nix
+++ b/pkgs/top-level/darwin-packages.nix
@@ -2,6 +2,7 @@
 , buildPackages, pkgs, targetPackages
 , pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget, pkgsHostHost, pkgsTargetTarget
 , stdenv, splicePackages, newScope
+, preLibcCrossHeaders
 }:
 
 let
@@ -13,6 +14,12 @@ let
     selfTargetTarget = pkgsTargetTarget.darwin or {}; # might be missing
   };
 
+  # Prefix for binaries. Customarily ends with a dash separator.
+  #
+  # TODO(@Ericson2314) Make unconditional, or optional but always true by
+  # default.
+  targetPrefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+                                        (stdenv.targetPlatform.config + "-");
 in
 
 lib.makeScopeWithSplicing splicePackages newScope otherSplices (_: {}) (spliced: spliced.apple_sdk.frameworks) (self: let
@@ -20,17 +27,48 @@ lib.makeScopeWithSplicing splicePackages newScope otherSplices (_: {}) (spliced:
 
   # Must use pkgs.callPackage to avoid infinite recursion.
 
-  apple-source-releases = pkgs.callPackage ../os-specific/darwin/apple-source-releases { } self;
+  # Open source packages that are built from source
+  appleSourcePackages = pkgs.callPackage ../os-specific/darwin/apple-source-releases { } self;
 
   impure-cmds = pkgs.callPackage ../os-specific/darwin/impure-cmds { };
 
-  apple_sdk = pkgs.callPackage ../os-specific/darwin/apple-sdk {
+  # macOS 10.12 SDK
+  apple_sdk_10_12 = pkgs.callPackage ../os-specific/darwin/apple-sdk {
     inherit (buildPackages.darwin) print-reexports;
     inherit (self) darwin-stubs;
   };
+
+  # macOS 11.0 SDK
+  apple_sdk_11_0 = pkgs.callPackage ../os-specific/darwin/apple-sdk-11.0 { };
+
+  # Pick an SDK
+  apple_sdk = if stdenv.hostPlatform.isAarch64 then apple_sdk_11_0 else apple_sdk_10_12;
+
+  # Pick the source of libraries: either Apple's open source releases, or the
+  # SDK.
+  useAppleSDKLibs = stdenv.hostPlatform.isAarch64;
+
+  selectAttrs = attrs: names:
+    lib.listToAttrs (lib.concatMap (n: if attrs ? "${n}" then [(lib.nameValuePair n attrs."${n}")] else []) names);
+
+  chooseLibs = (
+    # There are differences in which libraries are exported. Avoid evaluation
+    # errors when a package is not provided.
+    selectAttrs (
+      if useAppleSDKLibs
+        then apple_sdk
+        else appleSourcePackages
+    ) ["Libsystem" "LibsystemCross" "libcharset" "libunwind" "objc4" "configd" "IOKit"]
+  ) // {
+    inherit (
+      if useAppleSDKLibs
+        then apple_sdk.frameworks
+        else appleSourcePackages
+    ) Security;
+  };
 in
 
-impure-cmds // apple-source-releases // {
+impure-cmds // appleSourcePackages // chooseLibs // {
 
   inherit apple_sdk;
 
@@ -40,7 +78,7 @@ impure-cmds // apple-source-releases // {
 
   binutils-unwrapped = callPackage ../os-specific/darwin/binutils {
     inherit (pkgs) binutils-unwrapped;
-    inherit (pkgs.llvmPackages_7) llvm clang-unwrapped;
+    inherit (pkgs.llvmPackages) llvm clang-unwrapped;
   };
 
   binutils = pkgs.wrapBintoolsWith {
@@ -52,13 +90,12 @@ impure-cmds // apple-source-releases // {
   };
 
   binutilsNoLibc = pkgs.wrapBintoolsWith {
-    libc = null;
+    libc = preLibcCrossHeaders;
     bintools = self.binutils-unwrapped;
   };
 
   cctools = callPackage ../os-specific/darwin/cctools/port.nix {
     stdenv = if stdenv.isDarwin then stdenv else pkgs.libcxxStdenv;
-    libcxxabi = pkgs.libcxxabi;
   };
 
   # TODO: remove alias.
@@ -68,7 +105,31 @@ impure-cmds // apple-source-releases // {
 
   darwin-stubs = callPackage ../os-specific/darwin/darwin-stubs { };
 
-  print-reexports = callPackage ../os-specific/darwin/apple-sdk/print-reexports { };
+  print-reexports = callPackage ../os-specific/darwin/print-reexports { };
+
+  rewrite-tbd = callPackage ../os-specific/darwin/rewrite-tbd { };
+
+  checkReexportsHook = pkgs.makeSetupHook {
+    deps = [ pkgs.darwin.print-reexports ];
+  } ../os-specific/darwin/print-reexports/setup-hook.sh;
+
+  sigtool = callPackage ../os-specific/darwin/sigtool { };
+
+  postLinkSignHook = pkgs.writeTextFile {
+    name = "post-link-sign-hook";
+    executable = true;
+
+    text = ''
+      CODESIGN_ALLOCATE=${targetPrefix}codesign_allocate \
+        ${self.sigtool}/bin/codesign -f -s - "$linkerOutput"
+    '';
+  };
+
+  signingUtils = callPackage ../os-specific/darwin/signing-utils { };
+
+  autoSignDarwinBinariesHook = pkgs.makeSetupHook {
+    deps = [ self.signingUtils ];
+  } ../os-specific/darwin/signing-utils/auto-sign-hook.sh;
 
   maloader = callPackage ../os-specific/darwin/maloader {
   };
@@ -83,7 +144,7 @@ impure-cmds // apple-source-releases // {
 
   iproute2mac = callPackage ../os-specific/darwin/iproute2mac { };
 
-  libobjc = apple-source-releases.objc4;
+  libobjc = self.objc4;
 
   lsusb = callPackage ../os-specific/darwin/lsusb { };
 
@@ -104,7 +165,26 @@ impure-cmds // apple-source-releases // {
 
   CoreSymbolication = callPackage ../os-specific/darwin/CoreSymbolication { };
 
-  CF = callPackage ../os-specific/darwin/swift-corelibs/corefoundation.nix { };
+  # TODO: make swift-corefoundation build with apple_sdk_11_0.Libsystem
+  CF = if useAppleSDKLibs
+    then
+      # This attribute (CF) is included in extraBuildInputs in the stdenv. This
+      # is typically the open source project. When a project refers to
+      # "CoreFoundation" it has an extra setup hook to force impure system
+      # CoreFoundation into the link step.
+      #
+      # In this branch, we only have a single "CoreFoundation" to choose from.
+      # To be compatible with the existing convention, we define
+      # CoreFoundation with the setup hook, and CF as the same package but
+      # with the setup hook removed.
+      #
+      # This may seem unimportant, but without it packages (e.g., bacula) will
+      # fail with linker errors referring ___CFConstantStringClassReference.
+      # It's not clear to me why some packages need this extra setup.
+      lib.overrideDerivation apple_sdk.frameworks.CoreFoundation (drv: {
+        setupHook = null;
+      })
+    else callPackage ../os-specific/darwin/swift-corelibs/corefoundation.nix { };
 
   # As the name says, this is broken, but I don't want to lose it since it's a direction we want to go in
   # libdispatch-broken = callPackage ../os-specific/darwin/swift-corelibs/libdispatch.nix { };
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index e781391380e..2661bef8ed5 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -501,8 +501,6 @@ in {
 
   arrow = callPackage ../development/python-modules/arrow { };
 
-  arrow_1 = callPackage ../development/python-modules/arrow/1.nix { };
-
   arviz = callPackage ../development/python-modules/arviz { };
 
   arxiv2bib = callPackage ../development/python-modules/arxiv2bib { };
@@ -1614,7 +1612,9 @@ in {
 
   cryptacular = callPackage ../development/python-modules/cryptacular { };
 
-  cryptography = callPackage ../development/python-modules/cryptography { };
+  cryptography = callPackage ../development/python-modules/cryptography {
+    inherit (pkgs.darwin) libiconv;
+  };
 
   cryptography_vectors = callPackage ../development/python-modules/cryptography/vectors.nix { };
 
@@ -1801,6 +1801,8 @@ in {
 
   delegator-py = callPackage ../development/python-modules/delegator-py { };
 
+  delorean = callPackage ../development/python-modules/delorean { };
+
   deltachat = callPackage ../development/python-modules/deltachat { };
 
   deluge-client = callPackage ../development/python-modules/deluge-client { };
@@ -2718,6 +2720,8 @@ in {
 
   getkey = callPackage ../development/python-modules/getkey { };
 
+  get-video-properties = callPackage ../development/python-modules/get-video-properties { };
+
   gevent = callPackage ../development/python-modules/gevent { };
 
   geventhttpclient = callPackage ../development/python-modules/geventhttpclient { };
@@ -3250,6 +3254,10 @@ in {
 
   ibis-framework = callPackage ../development/python-modules/ibis-framework { };
 
+  ibm-cloud-sdk-core = callPackage ../development/python-modules/ibm-cloud-sdk-core { };
+
+  ibm-watson = callPackage ../development/python-modules/ibm-watson { };
+
   icalendar = callPackage ../development/python-modules/icalendar { };
 
   icecream = callPackage ../development/python-modules/icecream { };
@@ -4150,10 +4158,14 @@ in {
     inherit (pkgs.darwin.apple_sdk.frameworks) Cocoa;
   };
 
+  matrix-api-async = callPackage ../development/python-modules/matrix-api-async { };
+
   matrix-client = callPackage ../development/python-modules/matrix-client { };
 
   matrix-nio = callPackage ../development/python-modules/matrix-nio { };
 
+  mattermostdriver = callPackage ../development/python-modules/mattermostdriver { };
+
   mautrix = callPackage ../development/python-modules/mautrix { };
 
   mautrix-appservice = self.mautrix; # alias 2019-12-28
@@ -4294,6 +4306,8 @@ in {
 
   mock-services = callPackage ../development/python-modules/mock-services { };
 
+  mockupdb = callPackage ../development/python-modules/mockupdb { };
+
   modeled = callPackage ../development/python-modules/modeled { };
 
   moderngl = callPackage ../development/python-modules/moderngl { };
@@ -4331,6 +4345,8 @@ in {
 
   moto = callPackage ../development/python-modules/moto { };
 
+  motor = callPackage ../development/python-modules/motor { };
+
   moviepy = callPackage ../development/python-modules/moviepy { };
 
   mox3 = callPackage ../development/python-modules/mox3 { };
@@ -4763,6 +4779,8 @@ in {
 
   opt-einsum = callPackage ../development/python-modules/opt-einsum { };
 
+  opsdroid_get_image_size = callPackage ../development/python-modules/opsdroid_get_image_size { };
+
   optuna = callPackage ../development/python-modules/optuna { };
 
   opuslib = callPackage ../development/python-modules/opuslib { };
@@ -5342,6 +5360,8 @@ in {
 
   pure-python-adb-homeassistant = callPackage ../development/python-modules/pure-python-adb-homeassistant { };
 
+  puremagic = callPackage ../development/python-modules/puremagic { };
+
   purl = callPackage ../development/python-modules/purl { };
 
   pushbullet = callPackage ../development/python-modules/pushbullet { };
@@ -5524,6 +5544,8 @@ in {
 
   pycrc = callPackage ../development/python-modules/pycrc { };
 
+  pycron = callPackage ../development/python-modules/pycron { };
+
   pycrypto = callPackage ../development/python-modules/pycrypto { };
 
   pycryptodome = callPackage ../development/python-modules/pycryptodome { };
@@ -8461,6 +8483,8 @@ in {
 
   uc-micro-py = callPackage ../development/python-modules/uc-micro-py { };
 
+  udatetime = callPackage ../development/python-modules/udatetime { };
+
   ueberzug = callPackage ../development/python-modules/ueberzug {
     inherit (pkgs.xorg) libX11 libXext;
   };
@@ -8713,6 +8737,8 @@ in {
     inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices;
   };
 
+  watchgod = callPackage ../development/python-modules/watchgod { };
+
   waterfurnace = callPackage ../development/python-modules/waterfurnace { };
 
   WazeRouteCalculator = callPackage ../development/python-modules/WazeRouteCalculator { };
diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix
index f5e11a0db8b..7922750e959 100644
--- a/pkgs/top-level/qt5-packages.nix
+++ b/pkgs/top-level/qt5-packages.nix
@@ -35,17 +35,20 @@ let
     };
   in (lib.makeOverridable mkPlasma5 attrs);
 
-  kdeApplications = let
-    mkApplications = import ../applications/kde;
+  kdeGear = let
+    mkGear = import ../applications/kde;
     attrs = {
       inherit libsForQt5;
       inherit (pkgs) lib fetchurl;
     };
-  in (lib.makeOverridable mkApplications attrs);
+  in (lib.makeOverridable mkGear attrs);
 
-in (kdeFrameworks // plasma5 // plasma5.thirdParty // kdeApplications // qt5 // {
+in (kdeFrameworks // plasma5 // plasma5.thirdParty // kdeGear // qt5 // {
 
-  inherit kdeFrameworks plasma5 kdeApplications qt5;
+  inherit kdeFrameworks plasma5 kdeGear qt5;
+
+  # Alias for backwards compatibility. Added 2021-05-07.
+  kdeApplications = kdeGear;
 
   ### LIBRARIES
 
diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix
index 411093186a6..ceae00baec9 100644
--- a/pkgs/top-level/release-lib.nix
+++ b/pkgs/top-level/release-lib.nix
@@ -27,6 +27,7 @@ rec {
     pkgs_x86_64_linux = packageSet' { system = "x86_64-linux"; };
     pkgs_i686_linux = packageSet' { system = "i686-linux"; };
     pkgs_aarch64_linux = packageSet' { system = "aarch64-linux"; };
+    pkgs_aarch64_darwin = packageSet' { system = "aarch64-darwin"; };
     pkgs_armv6l_linux = packageSet' { system = "armv6l-linux"; };
     pkgs_armv7l_linux = packageSet' { system = "armv7l-linux"; };
     pkgs_x86_64_darwin = packageSet' { system = "x86_64-darwin"; };
@@ -39,6 +40,7 @@ rec {
       if system == "x86_64-linux" then pkgs_x86_64_linux
       else if system == "i686-linux" then pkgs_i686_linux
       else if system == "aarch64-linux" then pkgs_aarch64_linux
+      else if system == "aarch64-darwin" then pkgs_aarch64_darwin
       else if system == "armv6l-linux" then pkgs_armv6l_linux
       else if system == "armv7l-linux" then pkgs_armv7l_linux
       else if system == "x86_64-darwin" then pkgs_x86_64_darwin
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index 5fc6e91b311..0b18dd1ecf2 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -176,6 +176,15 @@ let
               # Test a full stdenv bootstrap from the bootstrap tools definition
               inherit (bootstrap.test-pkgs) stdenv;
             };
+
+          # Cross compiled bootstrap tools
+          aarch64-darwin =
+            let
+              bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { system = "x86_64-darwin"; crossSystem = "aarch64-darwin"; };
+            in {
+              # Distribution only for now
+              inherit (bootstrap) dist;
+            };
           };
 
     } // (mapTestOn ((packagePlatforms pkgs) // {
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix
index 77f3cc677f6..931ad1f01ae 100644
--- a/pkgs/top-level/stage.nix
+++ b/pkgs/top-level/stage.nix
@@ -158,6 +158,20 @@ let
                               nixpkgsFun { inherit crossSystem; })
                               lib.systems.examples;
 
+    pkgsLLVM = nixpkgsFun {
+      overlays = [
+        (self': super': {
+          pkgsLLVM = super';
+        })
+      ] ++ overlays;
+      # Bootstrap a cross stdenv using the LLVM toolchain.
+      # This is currently not possible when compiling natively,
+      # so we don't need to check hostPlatform != buildPlatform.
+      crossSystem = stdenv.hostPlatform // {
+        useLLVM = true;
+      };
+    };
+
     # All packages built with the Musl libc. This will override the
     # default GNU libc on Linux systems. Non-Linux systems are not
     # supported.