summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/audio/hivelytracker/default.nix2
-rw-r--r--pkgs/applications/audio/hqplayer-desktop/default.nix1
-rw-r--r--pkgs/applications/audio/libopenmpt/default.nix42
-rw-r--r--pkgs/applications/audio/losslessaudiochecker/default.nix2
-rw-r--r--pkgs/applications/audio/lyrebird/default.nix2
-rw-r--r--pkgs/applications/audio/puddletag/default.nix1
-rw-r--r--pkgs/applications/audio/pulseaudio-modules-bt/default.nix91
-rw-r--r--pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch11
-rwxr-xr-xpkgs/applications/audio/soundwireserver/default.nix1
-rw-r--r--pkgs/applications/blockchains/wasabibackend/default.nix2
-rw-r--r--pkgs/applications/editors/pinegrow/default.nix2
-rw-r--r--pkgs/applications/editors/vim/common.nix4
-rw-r--r--pkgs/applications/graphics/awesomebump/default.nix2
-rw-r--r--pkgs/applications/graphics/cq-editor/default.nix2
-rw-r--r--pkgs/applications/graphics/foxotron/default.nix2
-rw-r--r--pkgs/applications/graphics/pixeluvo/default.nix1
-rw-r--r--pkgs/applications/graphics/unigine-valley/default.nix2
-rw-r--r--pkgs/applications/misc/buku/default.nix3
-rw-r--r--pkgs/applications/misc/foxitreader/default.nix1
-rw-r--r--pkgs/applications/misc/multibootusb/default.nix2
-rw-r--r--pkgs/applications/misc/octoprint/default.nix4
-rw-r--r--pkgs/applications/misc/tvbrowser/bin.nix2
-rw-r--r--pkgs/applications/misc/upwork/default.nix1
-rw-r--r--pkgs/applications/misc/xteddy/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/firefox/common.nix5
-rw-r--r--pkgs/applications/networking/cluster/ssm-session-manager-plugin/default.nix7
-rw-r--r--pkgs/applications/networking/instant-messengers/ripcord/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/torchat/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/zoom-us/default.nix2
-rw-r--r--pkgs/applications/networking/mailreaders/mailspring/default.nix2
-rw-r--r--pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix4
-rw-r--r--pkgs/applications/networking/p2p/tribler/default.nix4
-rw-r--r--pkgs/applications/networking/remote/rustdesk/default.nix2
-rw-r--r--pkgs/applications/networking/seahub/default.nix17
-rw-r--r--pkgs/applications/networking/tetrd/default.nix2
-rw-r--r--pkgs/applications/office/fava/default.nix18
-rw-r--r--pkgs/applications/office/jameica/default.nix2
-rw-r--r--pkgs/applications/science/logic/tlaplus/toolbox.nix2
-rw-r--r--pkgs/applications/science/misc/netlogo/default.nix2
-rw-r--r--pkgs/applications/science/robotics/sumorobot-manager/default.nix2
-rw-r--r--pkgs/applications/terminal-emulators/syncterm/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/git/default.nix22
-rw-r--r--pkgs/applications/video/epgstation/default.nix2
-rw-r--r--pkgs/applications/video/mirakurun/default.nix4
-rw-r--r--pkgs/applications/window-managers/afterstep/default.nix14
-rw-r--r--pkgs/build-support/setup-hooks/make-wrapper.sh5
-rw-r--r--pkgs/build-support/setup-hooks/wrap-gapps-hook/wrap-gapps-hook.sh4
-rw-r--r--pkgs/build-support/trivial-builders.nix10
-rw-r--r--pkgs/data/misc/cacert/default.nix4
-rwxr-xr-xpkgs/data/misc/cacert/update.sh17
-rw-r--r--pkgs/data/misc/dns-root-data/default.nix3
-rw-r--r--pkgs/data/misc/freepats/default.nix5
-rw-r--r--pkgs/desktops/cdesktopenv/default.nix13
-rw-r--r--pkgs/desktops/gnome/core/mutter/3.38/default.nix4
-rw-r--r--pkgs/desktops/gnome/core/mutter/default.nix4
-rw-r--r--pkgs/development/compilers/dmd/binary.nix5
-rw-r--r--pkgs/development/compilers/go/1.16.nix3
-rw-r--r--pkgs/development/compilers/go/1.17.nix7
-rw-r--r--pkgs/development/compilers/go/1.18.nix3
-rw-r--r--pkgs/development/compilers/inklecate/default.nix2
-rw-r--r--pkgs/development/compilers/ldc/binary.nix5
-rw-r--r--pkgs/development/compilers/llvm/10/llvm/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/11/llvm/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/12/llvm/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/13/llvm/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/14/llvm/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/5/llvm/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/6/llvm/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/7/llvm/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/8/llvm/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/9/llvm/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/git/llvm/default.nix6
-rw-r--r--pkgs/development/compilers/rust/1_59.nix64
-rw-r--r--pkgs/development/compilers/rust/1_60.nix64
-rw-r--r--pkgs/development/compilers/zulu/8.nix12
-rw-r--r--pkgs/development/compilers/zulu/default.nix8
-rw-r--r--pkgs/development/go-modules/generic/default.nix3
-rw-r--r--pkgs/development/go-packages/generic/default.nix3
-rw-r--r--pkgs/development/interpreters/perl/default.nix23
-rw-r--r--pkgs/development/interpreters/python/cpython/default.nix2
-rw-r--r--pkgs/development/interpreters/python/default.nix8
-rw-r--r--pkgs/development/interpreters/ruby/default.nix56
-rw-r--r--pkgs/development/interpreters/ruby/patchsets.nix6
-rw-r--r--pkgs/development/interpreters/ruby/rbinstall-new-rubygems-compat.patch87
-rw-r--r--pkgs/development/libraries/SDL2/default.nix6
-rw-r--r--pkgs/development/libraries/audio/libopenmpt/default.nix66
-rwxr-xr-xpkgs/development/libraries/audio/libopenmpt/update.sh31
-rw-r--r--pkgs/development/libraries/audio/lilv/default.nix1
-rw-r--r--pkgs/development/libraries/audio/lv2/default.nix2
-rw-r--r--pkgs/development/libraries/audio/sratom/default.nix1
-rw-r--r--pkgs/development/libraries/aws-c-sdkutils/default.nix4
-rw-r--r--pkgs/development/libraries/cutelyst/default.nix17
-rw-r--r--pkgs/development/libraries/freetype/default.nix4
-rw-r--r--pkgs/development/libraries/glib/default.nix6
-rw-r--r--pkgs/development/libraries/glib/elementary-terminal-support.patch16
-rw-r--r--pkgs/development/libraries/glib/gnome-console-support.patch55
-rw-r--r--pkgs/development/libraries/glm/default.nix3
-rw-r--r--pkgs/development/libraries/glog/default.nix19
-rw-r--r--pkgs/development/libraries/grpc/default.nix4
-rw-r--r--pkgs/development/libraries/gsettings-desktop-schemas/default.nix12
-rw-r--r--pkgs/development/libraries/hwloc/default.nix4
-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/libarchive/default.nix93
-rw-r--r--pkgs/development/libraries/libargon2/default.nix4
-rw-r--r--pkgs/development/libraries/libavif/default.nix4
-rw-r--r--pkgs/development/libraries/libepoxy/default.nix5
-rw-r--r--pkgs/development/libraries/libevdev/default.nix4
-rw-r--r--pkgs/development/libraries/libgcrypt/default.nix4
-rw-r--r--pkgs/development/libraries/libmnl/default.nix4
-rw-r--r--pkgs/development/libraries/libnfnetlink/Use-stdlib-uint-instead-of-u_int.patch499
-rw-r--r--pkgs/development/libraries/libnfnetlink/default.nix8
-rw-r--r--pkgs/development/libraries/libotr/default.nix2
-rw-r--r--pkgs/development/libraries/libotr/fix-regtest-client.patch11
-rw-r--r--pkgs/development/libraries/libsoup/3.x.nix4
-rw-r--r--pkgs/development/libraries/libunistring/default.nix4
-rw-r--r--pkgs/development/libraries/libunwind/default.nix10
-rw-r--r--pkgs/development/libraries/libwacom/default.nix4
-rw-r--r--pkgs/development/libraries/mesa/default.nix6
-rw-r--r--pkgs/development/libraries/mpich/default.nix3
-rw-r--r--pkgs/development/libraries/mvapich/default.nix1
-rw-r--r--pkgs/development/libraries/netcdf-fortran/default.nix3
-rw-r--r--pkgs/development/libraries/nss/esr.nix4
-rw-r--r--pkgs/development/libraries/nss/generic.nix (renamed from pkgs/development/libraries/nss/default.nix)12
-rw-r--r--pkgs/development/libraries/nss/latest.nix10
-rw-r--r--pkgs/development/libraries/openvino/default.nix2
-rw-r--r--pkgs/development/libraries/pcre/default.nix2
-rw-r--r--pkgs/development/libraries/pcre2/default.nix4
-rw-r--r--pkgs/development/libraries/physics/qcdnum/default.nix4
-rw-r--r--pkgs/development/libraries/pmdk/default.nix6
-rw-r--r--pkgs/development/libraries/polkit-qt-1/default.nix4
-rw-r--r--pkgs/development/libraries/qrupdate/default.nix14
-rw-r--r--pkgs/development/libraries/qt-5/5.12/default.nix6
-rw-r--r--pkgs/development/libraries/qt-5/5.14/default.nix7
-rw-r--r--pkgs/development/libraries/qt-5/5.14/qtwayland-libdrm-build.patch56
-rw-r--r--pkgs/development/libraries/qt-5/5.15/default.nix6
-rw-r--r--pkgs/development/libraries/qt-5/5.15/srcs-generated.json126
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtbase.nix14
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwayland.nix6
-rw-r--r--pkgs/development/libraries/qt-5/qtModule.nix2
-rw-r--r--pkgs/development/libraries/re2/default.nix4
-rw-r--r--pkgs/development/libraries/rlottie/default.nix17
-rw-r--r--pkgs/development/libraries/talloc/default.nix3
-rw-r--r--pkgs/development/libraries/tpm2-tss/default.nix8
-rw-r--r--pkgs/development/libraries/zlib/CVE-2018-25032-1.patch346
-rw-r--r--pkgs/development/libraries/zlib/CVE-2018-25032-2.patch27
-rw-r--r--pkgs/development/lua-modules/overrides.nix3
-rw-r--r--pkgs/development/misc/msp430/mspds/binary.nix3
-rw-r--r--pkgs/development/mobile/androidenv/build-tools.nix4
-rw-r--r--pkgs/development/mobile/androidenv/platform-tools.nix3
-rw-r--r--pkgs/development/python-modules/Mako/default.nix35
-rw-r--r--pkgs/development/python-modules/aesara/default.nix6
-rw-r--r--pkgs/development/python-modules/afdko/default.nix12
-rw-r--r--pkgs/development/python-modules/aiobotocore/default.nix4
-rw-r--r--pkgs/development/python-modules/aioftp/default.nix4
-rw-r--r--pkgs/development/python-modules/alembic/default.nix8
-rw-r--r--pkgs/development/python-modules/amqp/default.nix4
-rw-r--r--pkgs/development/python-modules/ansible-lint/default.nix4
-rw-r--r--pkgs/development/python-modules/ansible-runner/default.nix5
-rw-r--r--pkgs/development/python-modules/apprise/default.nix4
-rw-r--r--pkgs/development/python-modules/approvaltests/default.nix42
-rw-r--r--pkgs/development/python-modules/asana/default.nix42
-rw-r--r--pkgs/development/python-modules/asgiref/default.nix18
-rw-r--r--pkgs/development/python-modules/asn1crypto/default.nix4
-rw-r--r--pkgs/development/python-modules/astroid/default.nix8
-rw-r--r--pkgs/development/python-modules/astropy/default.nix4
-rw-r--r--pkgs/development/python-modules/asttokens/default.nix7
-rw-r--r--pkgs/development/python-modules/async_generator/default.nix2
-rwxr-xr-xpkgs/development/python-modules/atlassian-python-api/default.nix4
-rw-r--r--pkgs/development/python-modules/atom/default.nix44
-rw-r--r--pkgs/development/python-modules/aurorapy/default.nix2
-rw-r--r--pkgs/development/python-modules/autobahn/default.nix4
-rw-r--r--pkgs/development/python-modules/azure-core/default.nix8
-rw-r--r--pkgs/development/python-modules/azure-mgmt-core/default.nix2
-rw-r--r--pkgs/development/python-modules/azure-mgmt-msi/default.nix4
-rw-r--r--pkgs/development/python-modules/bcrypt/default.nix41
-rw-r--r--pkgs/development/python-modules/beautifultable/default.nix7
-rw-r--r--pkgs/development/python-modules/behave/default.nix4
-rw-r--r--pkgs/development/python-modules/bitarray/default.nix4
-rw-r--r--pkgs/development/python-modules/bitstruct/default.nix4
-rw-r--r--pkgs/development/python-modules/black/default.nix4
-rw-r--r--pkgs/development/python-modules/blinker/default.nix11
-rw-r--r--pkgs/development/python-modules/boto3/default.nix4
-rw-r--r--pkgs/development/python-modules/botocore/default.nix4
-rw-r--r--pkgs/development/python-modules/boxx/default.nix4
-rw-r--r--pkgs/development/python-modules/build/default.nix2
-rw-r--r--pkgs/development/python-modules/buildbot/default.nix4
-rw-r--r--pkgs/development/python-modules/buildbot/pkg.nix2
-rw-r--r--pkgs/development/python-modules/buildbot/plugins.nix10
-rw-r--r--pkgs/development/python-modules/buildbot/worker.nix48
-rw-r--r--pkgs/development/python-modules/cattrs/default.nix3
-rw-r--r--pkgs/development/python-modules/cffi/default.nix9
-rw-r--r--pkgs/development/python-modules/chalice/default.nix2
-rw-r--r--pkgs/development/python-modules/cherrypy/default.nix4
-rw-r--r--pkgs/development/python-modules/ckcc-protocol/default.nix4
-rw-r--r--pkgs/development/python-modules/claripy/default.nix2
-rw-r--r--pkgs/development/python-modules/click-log/default.nix4
-rw-r--r--pkgs/development/python-modules/click/default.nix11
-rw-r--r--pkgs/development/python-modules/clickhouse-driver/default.nix2
-rw-r--r--pkgs/development/python-modules/clize/default.nix35
-rw-r--r--pkgs/development/python-modules/cppy/default.nix19
-rw-r--r--pkgs/development/python-modules/cryptography/default.nix50
-rw-r--r--pkgs/development/python-modules/cryptography/vectors.nix15
-rw-r--r--pkgs/development/python-modules/dask/default.nix2
-rw-r--r--pkgs/development/python-modules/datasette/default.nix24
-rw-r--r--pkgs/development/python-modules/datashader/default.nix1
-rw-r--r--pkgs/development/python-modules/dateparser/default.nix4
-rw-r--r--pkgs/development/python-modules/debtcollector/default.nix4
-rw-r--r--pkgs/development/python-modules/debugpy/default.nix1
-rw-r--r--pkgs/development/python-modules/dictpath/default.nix2
-rw-r--r--pkgs/development/python-modules/diskcache/default.nix4
-rw-r--r--pkgs/development/python-modules/django-allauth/default.nix36
-rw-r--r--pkgs/development/python-modules/django/3.nix4
-rw-r--r--pkgs/development/python-modules/django/4.nix4
-rw-r--r--pkgs/development/python-modules/django_modelcluster/default.nix36
-rw-r--r--pkgs/development/python-modules/dm-haiku/default.nix1
-rw-r--r--pkgs/development/python-modules/dnspython/default.nix4
-rw-r--r--pkgs/development/python-modules/docutils/default.nix4
-rw-r--r--pkgs/development/python-modules/dugong/default.nix5
-rw-r--r--pkgs/development/python-modules/entrypoint2/default.nix4
-rw-r--r--pkgs/development/python-modules/ephemeral-port-reserve/default.nix42
-rw-r--r--pkgs/development/python-modules/exchangelib/default.nix6
-rw-r--r--pkgs/development/python-modules/faker/default.nix4
-rw-r--r--pkgs/development/python-modules/fakeredis/default.nix5
-rw-r--r--pkgs/development/python-modules/falcon/default.nix79
-rw-r--r--pkgs/development/python-modules/fasteners/default.nix2
-rw-r--r--pkgs/development/python-modules/fastparquet/default.nix4
-rw-r--r--pkgs/development/python-modules/findpython/default.nix4
-rw-r--r--pkgs/development/python-modules/fitbit/default.nix40
-rw-r--r--pkgs/development/python-modules/flake8-blind-except/default.nix5
-rw-r--r--pkgs/development/python-modules/flake8/default.nix2
-rw-r--r--pkgs/development/python-modules/flask-login/default.nix4
-rw-r--r--pkgs/development/python-modules/flask-paranoid/default.nix4
-rw-r--r--pkgs/development/python-modules/flask-restful/default.nix4
-rw-r--r--pkgs/development/python-modules/flask-restful/werkzeug-2.1.0-compat.patch114
-rw-r--r--pkgs/development/python-modules/flask-restx/default.nix15
-rw-r--r--pkgs/development/python-modules/flask-security-too/default.nix114
-rw-r--r--pkgs/development/python-modules/flask-socketio/default.nix8
-rw-r--r--pkgs/development/python-modules/flask-talisman/default.nix4
-rw-r--r--pkgs/development/python-modules/flask/default.nix14
-rw-r--r--pkgs/development/python-modules/flax/default.nix1
-rw-r--r--pkgs/development/python-modules/flickrapi/default.nix69
-rw-r--r--pkgs/development/python-modules/flit-core/default.nix4
-rw-r--r--pkgs/development/python-modules/flit/default.nix21
-rw-r--r--pkgs/development/python-modules/fn/default.nix30
-rw-r--r--pkgs/development/python-modules/fontparts/default.nix8
-rw-r--r--pkgs/development/python-modules/fonttools/default.nix7
-rw-r--r--pkgs/development/python-modules/freezegun/default.nix31
-rw-r--r--pkgs/development/python-modules/funcparserlib/default.nix2
-rw-r--r--pkgs/development/python-modules/geoalchemy2/default.nix4
-rw-r--r--pkgs/development/python-modules/gipc/default.nix2
-rw-r--r--pkgs/development/python-modules/glean-parser/default.nix11
-rw-r--r--pkgs/development/python-modules/google-api-core/default.nix4
-rw-r--r--pkgs/development/python-modules/google-api-python-client/default.nix4
-rw-r--r--pkgs/development/python-modules/google-auth-oauthlib/default.nix16
-rw-r--r--pkgs/development/python-modules/google-cloud-bigquery/default.nix4
-rw-r--r--pkgs/development/python-modules/google-cloud-testutils/default.nix4
-rw-r--r--pkgs/development/python-modules/google-nest-sdm/default.nix4
-rw-r--r--pkgs/development/python-modules/grip/default.nix13
-rw-r--r--pkgs/development/python-modules/grpcio-status/default.nix4
-rw-r--r--pkgs/development/python-modules/grpcio-tools/default.nix4
-rw-r--r--pkgs/development/python-modules/h11/default.nix3
-rw-r--r--pkgs/development/python-modules/hidapi/default.nix4
-rw-r--r--pkgs/development/python-modules/homeconnect/default.nix15
-rw-r--r--pkgs/development/python-modules/hpack/default.nix25
-rw-r--r--pkgs/development/python-modules/httpbin/default.nix10
-rw-r--r--pkgs/development/python-modules/httplib2/default.nix6
-rw-r--r--pkgs/development/python-modules/hyperframe/default.nix5
-rw-r--r--pkgs/development/python-modules/hypothesis/default.nix4
-rw-r--r--pkgs/development/python-modules/hypothesmith/default.nix32
-rw-r--r--pkgs/development/python-modules/hypothesmith/remove-black.patch88
-rw-r--r--pkgs/development/python-modules/ibis-framework/default.nix1
-rw-r--r--pkgs/development/python-modules/img2pdf/default.nix14
-rw-r--r--pkgs/development/python-modules/importlib-metadata/default.nix4
-rw-r--r--pkgs/development/python-modules/importlib-resources/default.nix5
-rw-r--r--pkgs/development/python-modules/installer/default.nix4
-rw-r--r--pkgs/development/python-modules/intbitset/default.nix4
-rw-r--r--pkgs/development/python-modules/intensity-normalization/default.nix4
-rw-r--r--pkgs/development/python-modules/ipykernel/default.nix16
-rw-r--r--pkgs/development/python-modules/ipython/default.nix8
-rw-r--r--pkgs/development/python-modules/ipywidgets/default.nix4
-rw-r--r--pkgs/development/python-modules/islpy/default.nix4
-rw-r--r--pkgs/development/python-modules/iterm2/default.nix4
-rw-r--r--pkgs/development/python-modules/itsdangerous/default.nix4
-rw-r--r--pkgs/development/python-modules/jarowinkler/default.nix54
-rw-r--r--pkgs/development/python-modules/jax/default.nix18
-rw-r--r--pkgs/development/python-modules/jaxlib/default.nix2
-rw-r--r--pkgs/development/python-modules/jinja2/default.nix7
-rw-r--r--pkgs/development/python-modules/jira/default.nix31
-rw-r--r--pkgs/development/python-modules/jmespath/default.nix4
-rw-r--r--pkgs/development/python-modules/josepy/default.nix4
-rw-r--r--pkgs/development/python-modules/json-schema-for-humans/default.nix11
-rw-r--r--pkgs/development/python-modules/junos-eznc/default.nix64
-rw-r--r--pkgs/development/python-modules/jupyter-client/default.nix4
-rw-r--r--pkgs/development/python-modules/jupyter-packaging/default.nix4
-rw-r--r--pkgs/development/python-modules/jupyter_console/default.nix4
-rw-r--r--pkgs/development/python-modules/jupyterlab-git/default.nix4
-rw-r--r--pkgs/development/python-modules/jupyterlab_server/default.nix4
-rw-r--r--pkgs/development/python-modules/kivy-garden/default.nix20
-rw-r--r--pkgs/development/python-modules/kiwisolver/default.nix30
-rw-r--r--pkgs/development/python-modules/kubernetes/default.nix7
-rw-r--r--pkgs/development/python-modules/levenshtein/default.nix20
-rw-r--r--pkgs/development/python-modules/limits/default.nix4
-rw-r--r--pkgs/development/python-modules/lmnotify/default.nix23
-rw-r--r--pkgs/development/python-modules/mailchecker/default.nix4
-rw-r--r--pkgs/development/python-modules/markupsafe/default.nix8
-rw-r--r--pkgs/development/python-modules/marshmallow-sqlalchemy/default.nix4
-rw-r--r--pkgs/development/python-modules/matchpy/default.nix52
-rw-r--r--pkgs/development/python-modules/mccabe/default.nix20
-rw-r--r--pkgs/development/python-modules/metakernel/default.nix4
-rw-r--r--pkgs/development/python-modules/mezzanine/default.nix68
-rw-r--r--pkgs/development/python-modules/mitmproxy/default.nix1
-rw-r--r--pkgs/development/python-modules/mkdocs-material/default.nix4
-rw-r--r--pkgs/development/python-modules/mkdocs/default.nix13
-rw-r--r--pkgs/development/python-modules/mock/default.nix26
-rw-r--r--pkgs/development/python-modules/modeled/default.nix4
-rw-r--r--pkgs/development/python-modules/moretools/default.nix4
-rw-r--r--pkgs/development/python-modules/moto/default.nix22
-rw-r--r--pkgs/development/python-modules/msrest/default.nix69
-rw-r--r--pkgs/development/python-modules/mwclient/default.nix38
-rw-r--r--pkgs/development/python-modules/mwoauth/default.nix23
-rw-r--r--pkgs/development/python-modules/myfitnesspal/default.nix2
-rw-r--r--pkgs/development/python-modules/mypy-boto3-s3/default.nix4
-rw-r--r--pkgs/development/python-modules/nbclient/default.nix4
-rw-r--r--pkgs/development/python-modules/nbconvert/default.nix7
-rw-r--r--pkgs/development/python-modules/nbformat/default.nix4
-rw-r--r--pkgs/development/python-modules/ncclient/default.nix4
-rw-r--r--pkgs/development/python-modules/ndg-httpsclient/default.nix9
-rw-r--r--pkgs/development/python-modules/netmiko/default.nix4
-rw-r--r--pkgs/development/python-modules/networkx/default.nix4
-rw-r--r--pkgs/development/python-modules/nipype/neurdflib.nix4
-rw-r--r--pkgs/development/python-modules/nocasedict/default.nix13
-rw-r--r--pkgs/development/python-modules/notebook/default.nix4
-rw-r--r--pkgs/development/python-modules/numpydoc/default.nix45
-rw-r--r--pkgs/development/python-modules/nunavut/default.nix6
-rw-r--r--pkgs/development/python-modules/oci/default.nix4
-rw-r--r--pkgs/development/python-modules/ondilo/default.nix13
-rw-r--r--pkgs/development/python-modules/opentracing/default.nix19
-rw-r--r--pkgs/development/python-modules/optax/default.nix1
-rw-r--r--pkgs/development/python-modules/ovh/default.nix35
-rw-r--r--pkgs/development/python-modules/packaging/default.nix54
-rw-r--r--pkgs/development/python-modules/paho-mqtt/default.nix10
-rw-r--r--pkgs/development/python-modules/pandas/default.nix12
-rw-r--r--pkgs/development/python-modules/parsimonious/default.nix25
-rw-r--r--pkgs/development/python-modules/path.py/default.nix50
-rw-r--r--pkgs/development/python-modules/path/default.nix45
-rw-r--r--pkgs/development/python-modules/pdm-pep517/default.nix4
-rw-r--r--pkgs/development/python-modules/pep257/default.nix23
-rw-r--r--pkgs/development/python-modules/phik/default.nix4
-rw-r--r--pkgs/development/python-modules/phonemizer/default.nix4
-rw-r--r--pkgs/development/python-modules/pickleshare/default.nix4
-rw-r--r--pkgs/development/python-modules/pikepdf/default.nix4
-rw-r--r--pkgs/development/python-modules/pillow/default.nix18
-rw-r--r--pkgs/development/python-modules/pip/default.nix4
-rw-r--r--pkgs/development/python-modules/pleroma-bot/default.nix29
-rw-r--r--pkgs/development/python-modules/prettytable/default.nix4
-rw-r--r--pkgs/development/python-modules/prompt-toolkit/default.nix2
-rw-r--r--pkgs/development/python-modules/psautohint/default.nix16
-rw-r--r--pkgs/development/python-modules/purl/default.nix17
-rw-r--r--pkgs/development/python-modules/py-radix/default.nix3
-rw-r--r--pkgs/development/python-modules/py4j/default.nix4
-rw-r--r--pkgs/development/python-modules/pyasn1/default.nix10
-rw-r--r--pkgs/development/python-modules/pyatmo/default.nix4
-rw-r--r--pkgs/development/python-modules/pybids/default.nix4
-rw-r--r--pkgs/development/python-modules/pybotvac/default.nix14
-rw-r--r--pkgs/development/python-modules/pycountry/default.nix4
-rw-r--r--pkgs/development/python-modules/pycurl/default.nix10
-rw-r--r--pkgs/development/python-modules/pyfakefs/default.nix4
-rw-r--r--pkgs/development/python-modules/pygit2/default.nix4
-rw-r--r--pkgs/development/python-modules/pykerberos/default.nix4
-rw-r--r--pkgs/development/python-modules/pylint/default.nix28
-rw-r--r--pkgs/development/python-modules/pymc3/default.nix4
-rw-r--r--pkgs/development/python-modules/pymemcache/default.nix6
-rw-r--r--pkgs/development/python-modules/pymfy/default.nix13
-rw-r--r--pkgs/development/python-modules/pympler/default.nix13
-rw-r--r--pkgs/development/python-modules/pynello/default.nix10
-rw-r--r--pkgs/development/python-modules/pyopenssl/default.nix8
-rw-r--r--pkgs/development/python-modules/pyparsing/default.nix10
-rw-r--r--pkgs/development/python-modules/pyrad/default.nix47
-rw-r--r--pkgs/development/python-modules/pyramid_jinja2/default.nix4
-rw-r--r--pkgs/development/python-modules/pyro-ppl/default.nix4
-rw-r--r--pkgs/development/python-modules/pyslurm/default.nix19
-rw-r--r--pkgs/development/python-modules/pysmappee/default.nix16
-rw-r--r--pkgs/development/python-modules/pysnow/default.nix58
-rw-r--r--pkgs/development/python-modules/pyspark/default.nix2
-rw-r--r--pkgs/development/python-modules/pytest-asyncio/default.nix12
-rw-r--r--pkgs/development/python-modules/pytest-check/default.nix4
-rw-r--r--pkgs/development/python-modules/pytest-httpbin/default.nix6
-rw-r--r--pkgs/development/python-modules/pytest-metadata/default.nix15
-rw-r--r--pkgs/development/python-modules/pytest-mock/default.nix9
-rw-r--r--pkgs/development/python-modules/pytest-pep257/default.nix20
-rw-r--r--pkgs/development/python-modules/pytest-shutil/default.nix11
-rw-r--r--pkgs/development/python-modules/pytest-testmon/default.nix4
-rw-r--r--pkgs/development/python-modules/pytest-xdist/default.nix11
-rw-r--r--pkgs/development/python-modules/pytest-xdist/setup-hook.sh18
-rw-r--r--pkgs/development/python-modules/pytest/default.nix51
-rw-r--r--pkgs/development/python-modules/python-dotenv/default.nix4
-rw-r--r--pkgs/development/python-modules/python-google-nest/default.nix6
-rw-r--r--pkgs/development/python-modules/python-logstash/default.nix4
-rw-r--r--pkgs/development/python-modules/python-registry/default.nix2
-rw-r--r--pkgs/development/python-modules/python-twitter/default.nix39
-rw-r--r--pkgs/development/python-modules/python-vagrant/default.nix4
-rw-r--r--pkgs/development/python-modules/python3-saml/default.nix5
-rw-r--r--pkgs/development/python-modules/pytools/default.nix4
-rw-r--r--pkgs/development/python-modules/pytorch/bin.nix1
-rw-r--r--pkgs/development/python-modules/pytz/default.nix4
-rw-r--r--pkgs/development/python-modules/pyvicare/default.nix8
-rw-r--r--pkgs/development/python-modules/pywavelets/default.nix4
-rw-r--r--pkgs/development/python-modules/qtconsole/default.nix4
-rw-r--r--pkgs/development/python-modules/rapidfuzz-capi/default.nix28
-rw-r--r--pkgs/development/python-modules/rapidfuzz/default.nix34
-rw-r--r--pkgs/development/python-modules/readthedocs-sphinx-ext/default.nix4
-rw-r--r--pkgs/development/python-modules/redis/default.nix31
-rw-r--r--pkgs/development/python-modules/reedsolo/default.nix21
-rw-r--r--pkgs/development/python-modules/reportlab/default.nix10
-rw-r--r--pkgs/development/python-modules/requests/default.nix10
-rw-r--r--pkgs/development/python-modules/responses/default.nix12
-rw-r--r--pkgs/development/python-modules/rich/default.nix9
-rw-r--r--pkgs/development/python-modules/ring-doorbell/default.nix18
-rw-r--r--pkgs/development/python-modules/robotframework-tools/default.nix4
-rw-r--r--pkgs/development/python-modules/sagemaker/default.nix4
-rw-r--r--pkgs/development/python-modules/sanic/default.nix2
-rw-r--r--pkgs/development/python-modules/scikit-build/default.nix56
-rw-r--r--pkgs/development/python-modules/scikit-learn/default.nix2
-rw-r--r--pkgs/development/python-modules/service_identity/default.nix2
-rw-r--r--pkgs/development/python-modules/setuptools-rust/default.nix6
-rw-r--r--pkgs/development/python-modules/setuptools/default.nix4
-rw-r--r--pkgs/development/python-modules/setuptools/setuptools-distutils-C++.patch72
-rw-r--r--pkgs/development/python-modules/shapely/default.nix4
-rw-r--r--pkgs/development/python-modules/shapely/library-paths.patch72
-rw-r--r--pkgs/development/python-modules/social-auth-core/default.nix4
-rw-r--r--pkgs/development/python-modules/sortedcontainers/default.nix47
-rw-r--r--pkgs/development/python-modules/spacy-transformers/default.nix4
-rw-r--r--pkgs/development/python-modules/spacy/default.nix4
-rw-r--r--pkgs/development/python-modules/sparqlwrapper/default.nix17
-rw-r--r--pkgs/development/python-modules/sphinx-jinja/default.nix21
-rw-r--r--pkgs/development/python-modules/sphinx/default.nix13
-rw-r--r--pkgs/development/python-modules/sphinx_rtd_theme/default.nix2
-rw-r--r--pkgs/development/python-modules/spyder-kernels/default.nix4
-rw-r--r--pkgs/development/python-modules/spyder/default.nix4
-rw-r--r--pkgs/development/python-modules/sqlalchemy-imageattach/default.nix42
-rw-r--r--pkgs/development/python-modules/sqlalchemy/default.nix4
-rw-r--r--pkgs/development/python-modules/starlette/default.nix4
-rw-r--r--pkgs/development/python-modules/svg-path/default.nix24
-rw-r--r--pkgs/development/python-modules/sympy/default.nix4
-rw-r--r--pkgs/development/python-modules/tellduslive/default.nix13
-rw-r--r--pkgs/development/python-modules/tensorflow-datasets/default.nix1
-rw-r--r--pkgs/development/python-modules/terminado/default.nix4
-rw-r--r--pkgs/development/python-modules/tifffile/default.nix4
-rw-r--r--pkgs/development/python-modules/tomlkit/default.nix4
-rw-r--r--pkgs/development/python-modules/torchinfo/default.nix4
-rw-r--r--pkgs/development/python-modules/tornado/default.nix22
-rw-r--r--pkgs/development/python-modules/tpm2-pytss/default.nix4
-rw-r--r--pkgs/development/python-modules/tqdm/default.nix4
-rw-r--r--pkgs/development/python-modules/trytond/default.nix9
-rw-r--r--pkgs/development/python-modules/tweepy/default.nix12
-rw-r--r--pkgs/development/python-modules/twine/default.nix24
-rw-r--r--pkgs/development/python-modules/twisted/default.nix17
-rw-r--r--pkgs/development/python-modules/twitterapi/default.nix6
-rw-r--r--pkgs/development/python-modules/typer/default.nix19
-rw-r--r--pkgs/development/python-modules/tzdata/default.nix4
-rw-r--r--pkgs/development/python-modules/uamqp/default.nix4
-rw-r--r--pkgs/development/python-modules/ufo2ft/default.nix4
-rw-r--r--pkgs/development/python-modules/urllib3/default.nix4
-rw-r--r--pkgs/development/python-modules/ush/default.nix12
-rw-r--r--pkgs/development/python-modules/validators/default.nix2
-rw-r--r--pkgs/development/python-modules/validictory/default.nix3
-rw-r--r--pkgs/development/python-modules/variants/default.nix3
-rw-r--r--pkgs/development/python-modules/vdirsyncer/default.nix21
-rw-r--r--pkgs/development/python-modules/virtualenv/default.nix4
-rw-r--r--pkgs/development/python-modules/waitress/default.nix4
-rw-r--r--pkgs/development/python-modules/wasm/default.nix3
-rw-r--r--pkgs/development/python-modules/watchdog/default.nix4
-rw-r--r--pkgs/development/python-modules/watchgod/default.nix9
-rw-r--r--pkgs/development/python-modules/websocket-client/default.nix6
-rw-r--r--pkgs/development/python-modules/weconnect-mqtt/default.nix4
-rw-r--r--pkgs/development/python-modules/weconnect/default.nix4
-rw-r--r--pkgs/development/python-modules/werkzeug/default.nix13
-rw-r--r--pkgs/development/python-modules/widgetsnbextension/default.nix4
-rw-r--r--pkgs/development/python-modules/wsproto/default.nix19
-rw-r--r--pkgs/development/python-modules/wxPython/4.1.nix2
-rw-r--r--pkgs/development/python-modules/yamlfix/default.nix5
-rw-r--r--pkgs/development/python-modules/yanc/default.nix10
-rw-r--r--pkgs/development/python-modules/zarr/default.nix4
-rw-r--r--pkgs/development/python-modules/zetup/default.nix4
-rw-r--r--pkgs/development/python-modules/zodb/default.nix4
-rw-r--r--pkgs/development/python-modules/zope_testing/default.nix4
-rw-r--r--pkgs/development/python-modules/zopfli/default.nix11
-rw-r--r--pkgs/development/python2-modules/cryptography/default.nix15
-rw-r--r--pkgs/development/python2-modules/cryptography/vectors.nix (renamed from pkgs/development/python2-modules/cryptography-vectors/default.nix)5
-rw-r--r--pkgs/development/ruby-modules/bundler-app/default.nix2
-rw-r--r--pkgs/development/tools/analysis/codeql/default.nix1
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix3
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_1/default.nix3
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_3/default.nix3
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_4/default.nix3
-rw-r--r--pkgs/development/tools/build-managers/bloop/default.nix3
-rw-r--r--pkgs/development/tools/build-managers/wafHook/setup-hook.sh4
-rw-r--r--pkgs/development/tools/ccloud-cli/default.nix2
-rw-r--r--pkgs/development/tools/confluent-cli/default.nix2
-rw-r--r--pkgs/development/tools/database/litecli/default.nix4
-rw-r--r--pkgs/development/tools/database/sqldeveloper/default.nix2
-rw-r--r--pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch137
-rw-r--r--pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch47
-rw-r--r--pkgs/development/tools/misc/binutils/CVE-2020-35448.patch77
-rw-r--r--pkgs/development/tools/misc/binutils/CVE-2021-3487.patch73
-rw-r--r--pkgs/development/tools/misc/binutils/CVE-2021-45078.patch239
-rw-r--r--pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch26
-rw-r--r--pkgs/development/tools/misc/binutils/build-components-separately.patch67
-rw-r--r--pkgs/development/tools/misc/binutils/default.nix221
-rw-r--r--pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch23
-rw-r--r--pkgs/development/tools/misc/binutils/gold-Update-GNU_PROPERTY_X86_XXX-macros.patch292
-rw-r--r--pkgs/development/tools/misc/libtool/libtool2-macos11.patch32
-rw-r--r--pkgs/development/tools/misc/libtool/libtool2.nix26
-rw-r--r--pkgs/development/tools/mold/default.nix4
-rw-r--r--pkgs/development/tools/rust/cbindgen/default.nix6
-rw-r--r--pkgs/development/web/nodejs/nodejs.nix21
-rw-r--r--pkgs/games/airstrike/default.nix2
-rw-r--r--pkgs/games/assaultcube/default.nix4
-rw-r--r--pkgs/games/domination/default.nix4
-rw-r--r--pkgs/games/enigma/default.nix29
-rw-r--r--pkgs/games/flare/default.nix2
-rw-r--r--pkgs/games/frogatto/default.nix2
-rw-r--r--pkgs/games/iortcw/default.nix2
-rw-r--r--pkgs/games/iortcw/sp.nix2
-rw-r--r--pkgs/games/minecraft/default.nix2
-rw-r--r--pkgs/games/mudlet/default.nix2
-rw-r--r--pkgs/games/nanosaur/default.nix2
-rw-r--r--pkgs/games/openjk/default.nix8
-rw-r--r--pkgs/games/openmw/tes3mp.nix4
-rw-r--r--pkgs/games/openra/common.nix2
-rw-r--r--pkgs/games/otto-matic/default.nix2
-rw-r--r--pkgs/games/runelite/default.nix2
-rw-r--r--pkgs/games/sauerbraten/default.nix4
-rw-r--r--pkgs/games/starsector/default.nix3
-rw-r--r--pkgs/games/tome4/default.nix2
-rw-r--r--pkgs/games/ut2004/wrapper.nix2
-rw-r--r--pkgs/games/warsow/default.nix2
-rw-r--r--pkgs/games/zod/default.nix4
-rw-r--r--pkgs/misc/jackaudio/default.nix2
-rw-r--r--pkgs/misc/rich-cli/default.nix32
-rw-r--r--pkgs/os-specific/linux/bluez/default.nix4
-rw-r--r--pkgs/os-specific/linux/displaylink/default.nix2
-rw-r--r--pkgs/os-specific/linux/keyutils/default.nix14
-rw-r--r--pkgs/os-specific/linux/libcap/default.nix1
-rw-r--r--pkgs/os-specific/linux/lvm2/common.nix21
-rw-r--r--pkgs/os-specific/linux/lvm2/fix-blkdeactivate.patch51
-rw-r--r--pkgs/os-specific/linux/sgx/psw/default.nix2
-rw-r--r--pkgs/os-specific/linux/sgx/samples/default.nix4
-rw-r--r--pkgs/servers/home-assistant/cli.nix20
-rw-r--r--pkgs/servers/home-assistant/default.nix2
-rw-r--r--pkgs/servers/home-assistant/tests.nix4
-rw-r--r--pkgs/servers/hqplayerd/default.nix1
-rw-r--r--pkgs/servers/mail/mailman/default.nix8
-rw-r--r--pkgs/servers/ombi/default.nix5
-rw-r--r--pkgs/servers/plik/default.nix2
-rw-r--r--pkgs/servers/pulseaudio/add-option-for-installation-sysconfdir.patch36
-rw-r--r--pkgs/servers/pulseaudio/correct-ldflags.patch13
-rw-r--r--pkgs/servers/pulseaudio/default.nix95
-rw-r--r--pkgs/servers/pulseaudio/pali.nix219
-rw-r--r--pkgs/servers/roon-bridge/default.nix2
-rw-r--r--pkgs/servers/roon-server/default.nix4
-rw-r--r--pkgs/servers/search/elasticsearch/6.x.nix5
-rw-r--r--pkgs/servers/web-apps/discourse/default.nix2
-rw-r--r--pkgs/servers/web-apps/virtlyst/default.nix7
-rw-r--r--pkgs/servers/x11/xorg/default.nix22
-rwxr-xr-xpkgs/servers/x11/xorg/generate-expr-from-tarballs.pl6
-rw-r--r--pkgs/servers/x11/xorg/overrides.nix31
-rw-r--r--pkgs/servers/x11/xorg/tarballs.list6
-rw-r--r--pkgs/shells/powershell/default.nix3
-rw-r--r--pkgs/stdenv/generic/setup.sh26
-rw-r--r--pkgs/stdenv/linux/default.nix2
-rw-r--r--pkgs/stdenv/linux/make-bootstrap-tools.nix5
-rw-r--r--pkgs/tools/X11/nx-libs/default.nix6
-rw-r--r--pkgs/tools/admin/awscli/default.nix4
-rw-r--r--pkgs/tools/admin/oci-cli/default.nix12
-rw-r--r--pkgs/tools/admin/pgadmin/default.nix3
-rw-r--r--pkgs/tools/audio/beets/default.nix2
-rw-r--r--pkgs/tools/backup/borgbackup/default.nix3
-rw-r--r--pkgs/tools/backup/gphotos-sync/default.nix16
-rw-r--r--pkgs/tools/backup/grab-site/default.nix3
-rw-r--r--pkgs/tools/cd-dvd/ventoy-bin/default.nix4
-rw-r--r--pkgs/tools/filesystems/e2fsprogs/default.nix11
-rw-r--r--pkgs/tools/games/ajour/default.nix4
-rw-r--r--pkgs/tools/graphics/snapdragon-profiler/default.nix2
-rw-r--r--pkgs/tools/graphics/structure-synth/default.nix2
-rw-r--r--pkgs/tools/misc/archi/default.nix3
-rw-r--r--pkgs/tools/misc/coreutils/default.nix1
-rw-r--r--pkgs/tools/misc/findutils/default.nix19
-rw-r--r--pkgs/tools/misc/lookatme/default.nix12
-rw-r--r--pkgs/tools/misc/man-db/default.nix4
-rw-r--r--pkgs/tools/misc/pre-commit/default.nix1
-rw-r--r--pkgs/tools/package-management/pdm/default.nix5
-rw-r--r--pkgs/tools/virtualization/awsebcli/default.nix1
-rw-r--r--pkgs/top-level/aliases.nix3
-rw-r--r--pkgs/top-level/all-packages.nix64
-rw-r--r--pkgs/top-level/python-aliases.nix10
-rw-r--r--pkgs/top-level/python-packages.nix34
-rw-r--r--pkgs/top-level/python2-packages.nix2
599 files changed, 5366 insertions, 4451 deletions
diff --git a/pkgs/applications/audio/hivelytracker/default.nix b/pkgs/applications/audio/hivelytracker/default.nix
index 4cf20e3c898..8f9e3809fd2 100644
--- a/pkgs/applications/audio/hivelytracker/default.nix
+++ b/pkgs/applications/audio/hivelytracker/default.nix
@@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
     # files passed as arguments anyway, so this works well enough until the
     # issue is fixed.
     wrapProgram $out/bin/hivelytracker \
-      --run "cd $out/share/hivelytracker"
+      --chdir "$out/share/hivelytracker"
 
     # Also install the hvl2wav tool
     install -Dm755 hvl2wav/hvl2wav $out/bin/hvl2wav
diff --git a/pkgs/applications/audio/hqplayer-desktop/default.nix b/pkgs/applications/audio/hqplayer-desktop/default.nix
index 38b7e040603..5cfd9c7cbe8 100644
--- a/pkgs/applications/audio/hqplayer-desktop/default.nix
+++ b/pkgs/applications/audio/hqplayer-desktop/default.nix
@@ -86,6 +86,7 @@ mkDerivation rec {
     homepage = "https://www.signalyst.com/custom.html";
     description = "High-end upsampling multichannel software HD-audio player";
     license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
     maintainers = with maintainers; [ lovesegfault ];
   };
 }
diff --git a/pkgs/applications/audio/libopenmpt/default.nix b/pkgs/applications/audio/libopenmpt/default.nix
deleted file mode 100644
index b2b5ebecd7e..00000000000
--- a/pkgs/applications/audio/libopenmpt/default.nix
+++ /dev/null
@@ -1,42 +0,0 @@
-{ config, lib, stdenv, fetchurl, fetchpatch, zlib, pkg-config, mpg123, libogg, libvorbis, portaudio, libsndfile, flac
-, usePulseAudio ? config.pulseaudio or stdenv.isLinux, libpulseaudio }:
-
-stdenv.mkDerivation rec {
-  pname = "libopenmpt";
-  version = "0.5.11";
-
-  outputs = [ "out" "lib" "dev" ];
-
-  src = fetchurl {
-    url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz";
-    sha256 = "1c54lldr2imjzhlhq5lvwhj7d5794xm97cby9pznr5wdjjay0sa4";
-  };
-
-  patches = [
-    # Fix pending upstream inclusion for gcc-12 include headers:
-    #  https://github.com/OpenMPT/openmpt/pull/8
-    (fetchpatch {
-      name = "gcc-12.patch";
-      url = "https://github.com/OpenMPT/openmpt/commit/6e7a43190ef2f9ba0b3efc19b9527261b69ec8f7.patch";
-      sha256 = "081m1rf09bbrlg52aihaajmld5dcnwbp6y7zpyik92mm332r330h";
-    })
-  ];
-
-  enableParallelBuilding = true;
-
-  nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ zlib mpg123 libogg libvorbis portaudio libsndfile flac ]
-  ++ lib.optional usePulseAudio libpulseaudio;
-
-  configureFlags = lib.optional (!usePulseAudio) "--without-pulseaudio";
-
-  doCheck = true;
-
-  meta = with lib; {
-    description = "A cross-platform command-line based module file player";
-    homepage = "https://lib.openmpt.org/libopenmpt/";
-    license = licenses.bsd3;
-    maintainers = with maintainers; [ OPNA2608 ];
-    platforms = platforms.unix;
-  };
-}
diff --git a/pkgs/applications/audio/losslessaudiochecker/default.nix b/pkgs/applications/audio/losslessaudiochecker/default.nix
index 551f56a3ce1..9fecf7b9ba9 100644
--- a/pkgs/applications/audio/losslessaudiochecker/default.nix
+++ b/pkgs/applications/audio/losslessaudiochecker/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
     description = "Utility to check whether audio is truly lossless or not";
     homepage = "https://losslessaudiochecker.com";
     license = lib.licenses.unfree;
-    platforms = lib.platforms.x86_64;
+    platforms = [ "x86_64-linux" ];
     maintainers = with lib.maintainers; [ p-h ];
   };
 }
diff --git a/pkgs/applications/audio/lyrebird/default.nix b/pkgs/applications/audio/lyrebird/default.nix
index 81c792d95e2..055662ce743 100644
--- a/pkgs/applications/audio/lyrebird/default.nix
+++ b/pkgs/applications/audio/lyrebird/default.nix
@@ -42,7 +42,7 @@ python3Packages.buildPythonApplication rec {
   makeWrapperArgs = [
     "--prefix 'PATH' ':' '${lib.makeBinPath [ sox pulseaudio ]}'"
     "--prefix 'PYTHONPATH' ':' '${placeholder "out"}/share/lyrebird'"
-    "--run 'cd ${placeholder "out"}/share/lyrebird'"
+    "--chdir '${placeholder "out"}/share/lyrebird'"
     ''"''${gappsWrapperArgs[@]}"''
   ];
 
diff --git a/pkgs/applications/audio/puddletag/default.nix b/pkgs/applications/audio/puddletag/default.nix
index 701e6fffbbb..936fb2f54ec 100644
--- a/pkgs/applications/audio/puddletag/default.nix
+++ b/pkgs/applications/audio/puddletag/default.nix
@@ -17,6 +17,7 @@
 let
   # NOTE: check if we can drop any of these overrides when bumping the version
   overrideVersions = [
+    "lxml"
     "pyparsing"
     "pyqt5"
   ];
diff --git a/pkgs/applications/audio/pulseaudio-modules-bt/default.nix b/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
deleted file mode 100644
index 331bce3e8be..00000000000
--- a/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
+++ /dev/null
@@ -1,91 +0,0 @@
-{ stdenv
-, runCommand
-, fetchFromGitHub
-, pulseaudio
-, pkg-config
-, ffmpeg
-, patchelf
-, fdk_aac
-, libtool
-, ldacbt
-, cmake
-, bluez
-, dbus
-, sbc
-, lib
-}:
-
-let
-  pulseSources = runCommand "pulseaudio-sources" {} ''
-    mkdir $out
-    if [ -d ${pulseaudio.src} ]; then
-      ln -s ${pulseaudio.src}/* $out/
-    else
-      tar -xf ${pulseaudio.src}
-      mv pulseaudio*/* $out/
-    fi
-  '';
-
-in stdenv.mkDerivation rec {
-  pname = "pulseaudio-modules-bt";
-  version = "1.4";
-
-  src = fetchFromGitHub {
-    owner = "EHfive";
-    repo = "pulseaudio-modules-bt";
-    rev = "v${version}";
-    sha256 = "0bzg6x405j39axnkvc6n6vkl1hv1frk94y1i9sl170081bk23asd";
-  };
-
-  patches = [
-    ./fix-install-path.patch
-  ];
-
-  nativeBuildInputs = [
-    pkg-config
-    patchelf
-    cmake
-  ];
-
-  buildInputs = [
-    pulseaudio
-    ffmpeg
-    fdk_aac
-    libtool
-    ldacbt
-    bluez
-    dbus
-    sbc
-  ];
-
-  postPatch = ''
-    # Upstream bundles pulseaudio as a submodule
-    rm -r pa
-    ln -s ${pulseSources} pa
-
-    # Pulseaudio version is detected with a -rebootstrapped suffix which build system assumptions
-    substituteInPlace config.h.in --replace PulseAudio_VERSION ${pulseaudio.version}
-    substituteInPlace CMakeLists.txt --replace '${"\${PULSE_DIR}"}' ${pulseaudio.pulseDir}
-
-    # Fraunhofer recommends to enable afterburner but upstream has it set to false by default
-    substituteInPlace src/modules/bluetooth/a2dp/a2dp_aac.c \
-      --replace "info->aac_afterburner = false;" "info->aac_afterburner = true;"
-  '';
-
-  postFixup = ''
-    for so in $out/lib/pulse-${pulseaudio.version}/modules/*.so; do
-      orig_rpath=$(patchelf --print-rpath "$so")
-      patchelf \
-        --set-rpath "${ldacbt}/lib:${lib.getLib ffmpeg}/lib:$out/${pulseaudio.pulseDir}/modules:$orig_rpath" \
-        "$so"
-    done
-  '';
-
-  meta = with lib; {
-    homepage = "https://github.com/EHfive/pulseaudio-modules-bt";
-    description = "LDAC, aptX, aptX HD, AAC codecs (A2DP Audio) support for Linux PulseAudio";
-    platforms = platforms.linux;
-    license = licenses.mit;
-    maintainers = with maintainers; [ adisbladis ];
-  };
-}
diff --git a/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch b/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch
deleted file mode 100644
index 7cdb7de4dd1..00000000000
--- a/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8d20dbf..63fe7ba 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -213,5 +213,4 @@ INSTALL(TARGETS
-         module-bluez5-device
-         module-bluetooth-discover
-         module-bluetooth-policy
--        LIBRARY DESTINATION ${PulseAudio_modlibexecdir})
--
-+        LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${PULSE_DIR}/modules/)
diff --git a/pkgs/applications/audio/soundwireserver/default.nix b/pkgs/applications/audio/soundwireserver/default.nix
index 17660599b68..db8d28989b2 100755
--- a/pkgs/applications/audio/soundwireserver/default.nix
+++ b/pkgs/applications/audio/soundwireserver/default.nix
@@ -34,6 +34,7 @@ qt5.mkDerivation {
     description = "Turn your Android device into wireless headphones / wireless speaker";
     homepage = "https://georgielabs.net/";
     maintainers = with maintainers; [ mkg20001 ];
+    platforms = [ "x86_64-linux" ];
     license = licenses.unfree;
   };
 }
diff --git a/pkgs/applications/blockchains/wasabibackend/default.nix b/pkgs/applications/blockchains/wasabibackend/default.nix
index c7f594e31b4..784b01192f7 100644
--- a/pkgs/applications/blockchains/wasabibackend/default.nix
+++ b/pkgs/applications/blockchains/wasabibackend/default.nix
@@ -32,7 +32,7 @@ buildDotnetModule rec {
 
   preConfigure = ''
     makeWrapperArgs+=(
-      --run "cd $out/lib/${pname}"
+      --chdir "$out/lib/${pname}"
     )
   '';
 
diff --git a/pkgs/applications/editors/pinegrow/default.nix b/pkgs/applications/editors/pinegrow/default.nix
index dfcf8e4f787..65604926b8f 100644
--- a/pkgs/applications/editors/pinegrow/default.nix
+++ b/pkgs/applications/editors/pinegrow/default.nix
@@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://pinegrow.com";
     description = "UI Web Editor";
-    platforms = platforms.linux;
+    platforms = [ "x86_64-linux" ];
     license = with licenses; [ unfreeRedistributable ];
     maintainers = with maintainers; [ gador ];
   };
diff --git a/pkgs/applications/editors/vim/common.nix b/pkgs/applications/editors/vim/common.nix
index 13c5c49db48..fe5d5b85080 100644
--- a/pkgs/applications/editors/vim/common.nix
+++ b/pkgs/applications/editors/vim/common.nix
@@ -1,12 +1,12 @@
 { lib, fetchFromGitHub }:
 rec {
-  version = "8.2.4350";
+  version = "8.2.4609";
 
   src = fetchFromGitHub {
     owner = "vim";
     repo = "vim";
     rev = "v${version}";
-    sha256 = "sha256-+fCyLZi9+9r7tYoRQsVESkcoHHtM7vrVuOGdJi/9iF0=";
+    sha256 = "sha256-IiWZJ4zT+VbcxwKChl847pS9jU9AlxZ/yQUIL8I2MhQ=";
   };
 
   enableParallelBuilding = true;
diff --git a/pkgs/applications/graphics/awesomebump/default.nix b/pkgs/applications/graphics/awesomebump/default.nix
index 4d79f10a9e1..e7bc474e17d 100644
--- a/pkgs/applications/graphics/awesomebump/default.nix
+++ b/pkgs/applications/graphics/awesomebump/default.nix
@@ -46,7 +46,7 @@ in mkDerivation {
 
     # AwesomeBump expects to find Core and Configs in its current directory.
     makeQtWrapper $d/AwesomeBump $out/bin/AwesomeBump \
-        --run "cd $d"
+        --chdir "$d"
   '';
 
   # $ cd Sources; qmake; make ../workdir/linux-g++-dgb-gl4/obj/glwidget.o
diff --git a/pkgs/applications/graphics/cq-editor/default.nix b/pkgs/applications/graphics/cq-editor/default.nix
index 33bae268c8a..bb157ad18db 100644
--- a/pkgs/applications/graphics/cq-editor/default.nix
+++ b/pkgs/applications/graphics/cq-editor/default.nix
@@ -27,7 +27,7 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
     pyparsing
     pyqtgraph
     spyder
-    pathpy
+    path
     qtconsole
     requests
   ];
diff --git a/pkgs/applications/graphics/foxotron/default.nix b/pkgs/applications/graphics/foxotron/default.nix
index 39fb78b317f..f60ea4ea90c 100644
--- a/pkgs/applications/graphics/foxotron/default.nix
+++ b/pkgs/applications/graphics/foxotron/default.nix
@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
     cp -R ${lib.optionalString stdenv.hostPlatform.isDarwin "Foxotron.app/Contents/MacOS/"}Foxotron \
       ../{config.json,Shaders,Skyboxes} $out/lib/foxotron/
     wrapProgram $out/lib/foxotron/Foxotron \
-      --run "cd $out/lib/foxotron"
+      --chdir "$out/lib/foxotron"
     ln -s $out/{lib/foxotron,bin}/Foxotron
 
     runHook postInstall
diff --git a/pkgs/applications/graphics/pixeluvo/default.nix b/pkgs/applications/graphics/pixeluvo/default.nix
index d88be436984..0c90b786bac 100644
--- a/pkgs/applications/graphics/pixeluvo/default.nix
+++ b/pkgs/applications/graphics/pixeluvo/default.nix
@@ -50,6 +50,7 @@ stdenv.mkDerivation rec {
     description = "A Beautifully Designed Image and Photo Editor for Windows and Linux";
     homepage = "http://www.pixeluvo.com/";
     license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
     maintainers = with maintainers; [ wolfangaukang ];
   };
 }
diff --git a/pkgs/applications/graphics/unigine-valley/default.nix b/pkgs/applications/graphics/unigine-valley/default.nix
index 3187f573de7..81ed98f9ad4 100644
--- a/pkgs/applications/graphics/unigine-valley/default.nix
+++ b/pkgs/applications/graphics/unigine-valley/default.nix
@@ -97,7 +97,7 @@ in
       mkdir -p $out/bin
       install -m 0755 valley $out/bin/valley
       wrapProgram $out/bin/valley \
-        --run "cd $instdir" \
+        --chdir "$instdir" \
         --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:$instdir/bin:$libPath
 
       runHook postInstall
diff --git a/pkgs/applications/misc/buku/default.nix b/pkgs/applications/misc/buku/default.nix
index 5227f0e6f47..990c4eb73e7 100644
--- a/pkgs/applications/misc/buku/default.nix
+++ b/pkgs/applications/misc/buku/default.nix
@@ -7,8 +7,9 @@ let
         version = "1.3.24";
         src = oldAttrs.src.override {
           inherit version;
-          sha256 = "ebbb777cbf9312359b897bf81ba00dae0f5cb69fba2a18265dcc18a6f5ef7519";
+          hash = "sha256-67t3fL+TEjWbiXv4G6ANrg9ctp+6KhgmXcwYpvXvdRk=";
         };
+        doCheck = false;
       });
       sqlalchemy-utils = super.sqlalchemy-utils.overridePythonAttrs (oldAttrs: rec {
         version = "0.36.6";
diff --git a/pkgs/applications/misc/foxitreader/default.nix b/pkgs/applications/misc/foxitreader/default.nix
index e69361dbd93..b206d14323b 100644
--- a/pkgs/applications/misc/foxitreader/default.nix
+++ b/pkgs/applications/misc/foxitreader/default.nix
@@ -74,6 +74,7 @@ mkDerivation rec {
     description = "A viewer for PDF documents";
     homepage = "https://www.foxitsoftware.com/";
     license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
     maintainers = with maintainers; [ p-h rhoriguchi ];
   };
 }
diff --git a/pkgs/applications/misc/multibootusb/default.nix b/pkgs/applications/misc/multibootusb/default.nix
index 3890246a63d..403df853343 100644
--- a/pkgs/applications/misc/multibootusb/default.nix
+++ b/pkgs/applications/misc/multibootusb/default.nix
@@ -101,7 +101,7 @@ python3Packages.buildPythonApplication rec {
       --prefix "PATH" ":" "${lib.makeBinPath runTimeDeps}"
 
       # Finally, move to directory that contains data
-      --run "cd $out/share/${pname}"
+      --chdir "$out/share/${pname}"
     )
   '';
 
diff --git a/pkgs/applications/misc/octoprint/default.nix b/pkgs/applications/misc/octoprint/default.nix
index 4dc6f876318..b7b0f8ae46b 100644
--- a/pkgs/applications/misc/octoprint/default.nix
+++ b/pkgs/applications/misc/octoprint/default.nix
@@ -233,7 +233,7 @@ let
           self: super: {
             falcon = super.falcon.overridePythonAttrs (oldAttrs: rec {
               #pytestFlagsArray = [ "-W ignore::DeprecationWarning" ];
-              disabledTestPaths = oldAttrs.disabledTestPaths ++ [
+              disabledTestPaths = oldAttrs.disabledTestPaths or [] ++ [
                 "tests/asgi/test_asgi_servers.py"
               ];
             });
@@ -244,7 +244,7 @@ let
         (
           self: super: {
             sanic = super.sanic.overridePythonAttrs (oldAttrs: rec {
-              disabledTestPaths = oldAttrs.disabledTestPaths ++ [
+              disabledTestPaths = oldAttrs.disabledTestPaths or [] ++ [
                 "test_cli.py"
                 "test_cookies.py"
                 # requires network
diff --git a/pkgs/applications/misc/tvbrowser/bin.nix b/pkgs/applications/misc/tvbrowser/bin.nix
index bd8fdf5e48c..887a979219d 100644
--- a/pkgs/applications/misc/tvbrowser/bin.nix
+++ b/pkgs/applications/misc/tvbrowser/bin.nix
@@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
     mkdir -p $out/bin
     makeWrapper ${jre}/bin/java $out/bin/${pname} \
       --add-flags "-jar $out/share/java/${pname}/${pname}.jar" \
-      --run "cd $out/share/java/${pname}"
+      --chdir "$out/share/java/${pname}"
   '';
 
   meta = with lib; {
diff --git a/pkgs/applications/misc/upwork/default.nix b/pkgs/applications/misc/upwork/default.nix
index 9afd1a6930e..c6a79aa0e61 100644
--- a/pkgs/applications/misc/upwork/default.nix
+++ b/pkgs/applications/misc/upwork/default.nix
@@ -62,6 +62,7 @@ stdenv.mkDerivation rec {
     description = "Online freelancing platform desktop application for time tracking";
     homepage = "https://www.upwork.com/ab/downloads/";
     license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
     maintainers = with maintainers; [ zakkor wolfangaukang ];
   };
 }
diff --git a/pkgs/applications/misc/xteddy/default.nix b/pkgs/applications/misc/xteddy/default.nix
index 717ba66feb8..48125539347 100644
--- a/pkgs/applications/misc/xteddy/default.nix
+++ b/pkgs/applications/misc/xteddy/default.nix
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
   postFixup = ''
     # this is needed, because xteddy expects images to reside
     # in the current working directory
-    wrapProgram $out/bin/xteddy --run "cd $out/share/images/"
+    wrapProgram $out/bin/xteddy --chdir "$out/share/images/"
   '';
 
   meta = with lib; {
diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix
index a1e83615135..e43251be80c 100644
--- a/pkgs/applications/networking/browsers/firefox/common.nix
+++ b/pkgs/applications/networking/browsers/firefox/common.nix
@@ -61,7 +61,8 @@
 , libwebp
 , nasm
 , nspr
-, nss
+, nss_esr
+, nss_latest
 , pango
 , xorg
 , zip
@@ -356,7 +357,6 @@ buildStdenv.mkDerivation ({
     libwebp
     nasm
     nspr
-    nss
     pango
     perl
     xorg.libX11
@@ -373,6 +373,7 @@ buildStdenv.mkDerivation ({
     zip
     zlib
   ]
+  ++ [ (if (lib.versionAtLeast version "92") then nss_latest else nss_esr) ]
   ++ lib.optional  alsaSupport alsa-lib
   ++ lib.optional  pulseaudioSupport libpulseaudio # only headers are needed
   ++ lib.optional  gssSupport libkrb5
diff --git a/pkgs/applications/networking/cluster/ssm-session-manager-plugin/default.nix b/pkgs/applications/networking/cluster/ssm-session-manager-plugin/default.nix
index f7401d36b0e..2caa0dc2280 100644
--- a/pkgs/applications/networking/cluster/ssm-session-manager-plugin/default.nix
+++ b/pkgs/applications/networking/cluster/ssm-session-manager-plugin/default.nix
@@ -17,7 +17,12 @@ stdenv.mkDerivation rec {
 
   src = fetchurl source;
 
-  nativeBuildInputs = [ autoPatchelfHook ] ++ (if stdenv.isDarwin then [ unzip ] else [ dpkg ]);
+  nativeBuildInputs = lib.optionals stdenv.isLinux [
+    autoPatchelfHook
+    dpkg
+  ] ++ lib.optionals stdenv.isDarwin [
+    unzip
+  ];
 
   unpackPhase = if stdenv.isDarwin then "unzip $src" else "dpkg-deb -x $src .";
 
diff --git a/pkgs/applications/networking/instant-messengers/ripcord/default.nix b/pkgs/applications/networking/instant-messengers/ripcord/default.nix
index 76f93d9d217..7379d769288 100644
--- a/pkgs/applications/networking/instant-messengers/ripcord/default.nix
+++ b/pkgs/applications/networking/instant-messengers/ripcord/default.nix
@@ -48,7 +48,7 @@ mkDerivation rec {
     install -Dm755 ${src}/Ripcord $out/Ripcord
     patchelf --replace-needed libsodium.so.18 libsodium.so $out/Ripcord
     makeQtWrapper $out/Ripcord $out/bin/ripcord \
-      --run "cd $out" \
+      --chdir "$out" \
       --set FONTCONFIG_FILE "${fontsConf}" \
       --prefix LD_LIBRARY_PATH ":" "${xorg.libXcursor}/lib" \
       --prefix QT_XKB_CONFIG_ROOT ":" "${xorg.xkeyboardconfig}/share/X11/xkb" \
diff --git a/pkgs/applications/networking/instant-messengers/torchat/default.nix b/pkgs/applications/networking/instant-messengers/torchat/default.nix
index 3278d68cd0b..224a70ce9f7 100644
--- a/pkgs/applications/networking/instant-messengers/torchat/default.nix
+++ b/pkgs/applications/networking/instant-messengers/torchat/default.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     cp -rf * $out/lib/torchat
     makeWrapper ${python2}/bin/python $out/bin/torchat \
         --set PYTHONPATH $out/lib/torchat:$program_PYTHONPATH \
-        --run "cd $out/lib/torchat" \
+        --chdir "$out/lib/torchat" \
         --add-flags "-O $out/lib/torchat/torchat.py"
   '';
 
diff --git a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
index 4aa9dbc9b10..b55eb6e36ed 100644
--- a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
+++ b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
@@ -104,7 +104,7 @@ stdenv.mkDerivation rec {
     # Clear Qt paths to prevent tripping over "foreign" Qt resources.
     # Clear Qt screen scaling settings to prevent over-scaling.
     makeWrapper $out/opt/zoom/ZoomLauncher $out/bin/zoom \
-      --run "cd $out/opt/zoom" \
+      --chdir "$out/opt/zoom" \
       --unset QML2_IMPORT_PATH \
       --unset QT_PLUGIN_PATH \
       --unset QT_SCREEN_SCALE_FACTORS \
diff --git a/pkgs/applications/networking/mailreaders/mailspring/default.nix b/pkgs/applications/networking/mailreaders/mailspring/default.nix
index d30282f44c7..b522b519063 100644
--- a/pkgs/applications/networking/mailreaders/mailspring/default.nix
+++ b/pkgs/applications/networking/mailreaders/mailspring/default.nix
@@ -95,6 +95,6 @@ stdenv.mkDerivation rec {
     maintainers = with maintainers; [ toschmidt doronbehar ];
     homepage = "https://getmailspring.com";
     downloadPage = "https://github.com/Foundry376/Mailspring";
-    platforms = platforms.x86_64;
+    platforms = [ "x86_64-linux" ];
   };
 }
diff --git a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
index 98792527faf..e4e5332e07f 100644
--- a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
+++ b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
@@ -38,7 +38,7 @@
 , adwaita-icon-theme
 , libGLU, libGL
 , nspr
-, nss
+, nss_latest
 , pango
 , pipewire
 , pciutils
@@ -132,7 +132,7 @@ stdenv.mkDerivation {
       libnotify
       libGLU libGL
       nspr
-      nss
+      nss_latest
       pango
       pipewire
       pciutils
diff --git a/pkgs/applications/networking/p2p/tribler/default.nix b/pkgs/applications/networking/p2p/tribler/default.nix
index d1df2fea444..e74db03b533 100644
--- a/pkgs/applications/networking/p2p/tribler/default.nix
+++ b/pkgs/applications/networking/p2p/tribler/default.nix
@@ -74,10 +74,10 @@ stdenv.mkDerivation rec {
     makeWrapper ${python3.pkgs.python}/bin/python $out/bin/tribler \
         --set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \
         --set QT_PLUGIN_PATH "${qt5.qtsvg.bin}/${qt5.qtbase.qtPluginPrefix}" \
-        --set _TRIBLERPATH $out/src \
+        --set _TRIBLERPATH "$out/src" \
         --set PYTHONPATH $out/src/tribler-core:$out/src/tribler-common:$out/src/tribler-gui:$program_PYTHONPATH \
         --set NO_AT_BRIDGE 1 \
-        --run 'cd $_TRIBLERPATH' \
+        --chdir "$out/src" \
         --add-flags "-O $out/src/run_tribler.py"
 
     mkdir -p $out/share/applications $out/share/icons
diff --git a/pkgs/applications/networking/remote/rustdesk/default.nix b/pkgs/applications/networking/remote/rustdesk/default.nix
index 677629dbcfb..2850995bd13 100644
--- a/pkgs/applications/networking/remote/rustdesk/default.nix
+++ b/pkgs/applications/networking/remote/rustdesk/default.nix
@@ -86,7 +86,7 @@ rustPlatform.buildRustPackage rec {
     ln -s ${libsciter}/lib/libsciter-gtk.so $out/lib/rustdesk
 
     makeWrapper $out/lib/rustdesk/rustdesk $out/bin/rustdesk \
-      --run "cd $out/share"
+      --chdir "$out/share"
 
     cp -a $src/src/ui $out/share/src
 
diff --git a/pkgs/applications/networking/seahub/default.nix b/pkgs/applications/networking/seahub/default.nix
index 8c26b729083..1338f3e56f8 100644
--- a/pkgs/applications/networking/seahub/default.nix
+++ b/pkgs/applications/networking/seahub/default.nix
@@ -1,4 +1,8 @@
-{ lib, fetchFromGitHub, python3, makeWrapper }:
+{ lib
+, fetchFromGitHub
+, python3
+, makeWrapper
+}:
 let
   # Seahub 8.x.x does not support django-webpack-loader >=1.x.x
   python = python3.override {
@@ -25,9 +29,12 @@ python.pkgs.buildPythonApplication rec {
   };
 
   dontBuild = true;
+
   doCheck = false; # disabled because it requires a ccnet environment
 
-  nativeBuildInputs = [ makeWrapper ];
+  nativeBuildInputs = [
+    makeWrapper
+  ];
 
   propagatedBuildInputs = with python.pkgs; [
     django
@@ -44,7 +51,7 @@ python.pkgs.buildPythonApplication rec {
     djangorestframework
     openpyxl
     requests
-    requests_oauthlib
+    requests-oauthlib
     pyjwt
     pycryptodome
     qrcode
@@ -65,10 +72,10 @@ python.pkgs.buildPythonApplication rec {
   };
 
   meta = with lib; {
-    homepage = "https://github.com/haiwen/seahub";
     description = "The web end of seafile server";
+    homepage = "https://github.com/haiwen/seahub";
     license = licenses.asl20;
-    platforms = platforms.linux;
     maintainers = with maintainers; [ greizgh schmittlauch ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/networking/tetrd/default.nix b/pkgs/applications/networking/tetrd/default.nix
index 94e7950ecdb..937992a63d7 100644
--- a/pkgs/applications/networking/tetrd/default.nix
+++ b/pkgs/applications/networking/tetrd/default.nix
@@ -79,7 +79,7 @@ stdenv.mkDerivation rec {
     description = "Share your internet connection from your device to your PC and vice versa through a USB cable";
     homepage = "https://tetrd.app";
     license = licenses.unfree;
-    platforms = platforms.all;
+    platforms = [ "x86_64-linux" ];
     maintainers = with maintainers; [ Madouura ];
   };
 }
diff --git a/pkgs/applications/office/fava/default.nix b/pkgs/applications/office/fava/default.nix
index 92f48eb91b8..5833e5e4adf 100644
--- a/pkgs/applications/office/fava/default.nix
+++ b/pkgs/applications/office/fava/default.nix
@@ -1,14 +1,26 @@
-{ lib, python3 }:
+{ lib, python3, fetchpatch }:
 
 python3.pkgs.buildPythonApplication rec {
   pname = "fava";
-  version = "1.19";
+  version = "1.21";
+  format = "pyproject";
 
   src = python3.pkgs.fetchPypi {
     inherit pname version;
-    sha256 = "def7c0210bf0ce8dfffdb46ce21b3efcf71eba5a4e903565258419e4c53c2d43";
+    sha256 = "sha256-0aFCKEjmXn6yddgNMi9t4rzqHcN7VBLoz3LEg9apmNY=";
   };
 
+  patches = [
+    (fetchpatch {
+      # Update werkzeug compatibility
+      url = "https://github.com/beancount/fava/commit/5a99417a42e1d739b1e57fae2d01ff1d146dcbc2.patch";
+      hash = "sha256-Y6IcxZAcFJEYgT8/xBIABdkP+pUdQX1EgSS5uNdSJUE=";
+      excludes = [
+        ".pre-commit-config.yaml"
+      ];
+    })
+  ];
+
   nativeBuildInputs = with python3.pkgs; [ setuptools-scm ];
 
   propagatedBuildInputs = with python3.pkgs; [
diff --git a/pkgs/applications/office/jameica/default.nix b/pkgs/applications/office/jameica/default.nix
index d5c4dcb6501..6e7f0f3d517 100644
--- a/pkgs/applications/office/jameica/default.nix
+++ b/pkgs/applications/office/jameica/default.nix
@@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
         lib.optionalString stdenv.isDarwin ''-Xdock:name="Jameica" -XstartOnFirstThread''
       } de.willuhn.jameica.Main" \
       --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs} \
-      --run "cd $out/share/java/"
+      --chdir "$out/share/java/"
   '';
 
   meta = with lib; {
diff --git a/pkgs/applications/science/logic/tlaplus/toolbox.nix b/pkgs/applications/science/logic/tlaplus/toolbox.nix
index 7b1ee4384c9..e13fd578927 100644
--- a/pkgs/applications/science/logic/tlaplus/toolbox.nix
+++ b/pkgs/applications/science/logic/tlaplus/toolbox.nix
@@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
       "$(find "$out/toolbox" -name jspawnhelper)"
 
     makeWrapper $out/toolbox/toolbox $out/bin/tla-toolbox \
-      --run "set -x; cd $out/toolbox" \
+      --chdir "$out/toolbox" \
       --add-flags "-data ~/.tla-toolbox" \
       --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gtk3 libXtst glib zlib ]}"  \
       "''${gappsWrapperArgs[@]}"
diff --git a/pkgs/applications/science/misc/netlogo/default.nix b/pkgs/applications/science/misc/netlogo/default.nix
index ed92dfb90da..d32f4312047 100644
--- a/pkgs/applications/science/misc/netlogo/default.nix
+++ b/pkgs/applications/science/misc/netlogo/default.nix
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
 
     # launcher with `cd` is required b/c otherwise the model library isn't usable
     makeWrapper "${jre}/bin/java" "$out/bin/netlogo" \
-      --run "cd $out/share/netlogo/app" \
+      --chdir "$out/share/netlogo/app" \
       --add-flags "-jar netlogo-${version}.jar"
 
     cp $src1 $out/share/icons/hicolor/256x256/apps/netlogo.png
diff --git a/pkgs/applications/science/robotics/sumorobot-manager/default.nix b/pkgs/applications/science/robotics/sumorobot-manager/default.nix
index c0f619b9592..343f9fad105 100644
--- a/pkgs/applications/science/robotics/sumorobot-manager/default.nix
+++ b/pkgs/applications/science/robotics/sumorobot-manager/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
     mkdir $out/bin
     dos2unix $out/opt/sumorobot-manager/main.py
     makeQtWrapper $out/opt/sumorobot-manager/main.py $out/bin/sumorobot-manager \
-      --run "cd $out/opt/sumorobot-manager"
+      --chdir "$out/opt/sumorobot-manager"
   '';
 
   preFixup = ''
diff --git a/pkgs/applications/terminal-emulators/syncterm/default.nix b/pkgs/applications/terminal-emulators/syncterm/default.nix
index d1f0ab5e8cf..d56db734a88 100644
--- a/pkgs/applications/terminal-emulators/syncterm/default.nix
+++ b/pkgs/applications/terminal-emulators/syncterm/default.nix
@@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
     homepage = "https://syncterm.bbsdev.net/";
     description = "BBS terminal emulator";
     maintainers = with maintainers; [ embr ];
+    platforms = platforms.unix;
     license = licenses.gpl2Plus;
+    broken = stdenv.isDarwin; # error: unsupported option '-fsanitize=safe-stack' for target 'x86_64-apple-darwin'
   };
 }
diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix
index f2038e95d25..262cd332c66 100644
--- a/pkgs/applications/version-management/git-and-tools/git/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git/default.nix
@@ -18,6 +18,7 @@
 , withLibsecret ? false
 , pkg-config, glib, libsecret
 , gzip # needed at runtime by gitweb.cgi
+, withSsh ? false
 }:
 
 assert osxkeychainSupport -> stdenv.isDarwin;
@@ -25,9 +26,8 @@ assert sendEmailSupport -> perlSupport;
 assert svnSupport -> perlSupport;
 
 let
-  version = "2.35.1";
+  version = "2.35.3";
   svn = subversionClient.override { perlBindings = perlSupport; };
-
   gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ];
 in
 
@@ -39,37 +39,37 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
-    sha256 = "100h37cpw49pmlpf6lcpm1xi578gllf6y9in60h5mxj3cj754s6p";
+    sha256 = "sha256-FenbT5vy7Z//MMtioAxcfAkBAV9asEjNtOiwTd7gD6I=";
   };
 
   outputs = [ "out" ] ++ lib.optional withManual "doc";
+  separateDebugInfo = true;
 
   hardeningDisable = [ "format" ];
 
   enableParallelBuilding = true;
 
-  ## Patch
-
   patches = [
     ./docbook2texi.patch
     ./git-sh-i18n.patch
-    ./ssh-path.patch
     ./git-send-email-honor-PATH.patch
     ./installCheck-path.patch
+  ] ++ lib.optionals withSsh [
+    ./ssh-path.patch
   ];
 
   postPatch = ''
-    for x in connect.c git-gui/lib/remote_add.tcl ; do
-      substituteInPlace "$x" \
-        --subst-var-by ssh "${openssh}/bin/ssh"
-    done
-
     # Fix references to gettext introduced by ./git-sh-i18n.patch
     substituteInPlace git-sh-i18n.sh \
         --subst-var-by gettext ${gettext}
 
     # ensure we are using the correct shell when executing the test scripts
     patchShebangs t/*.sh
+  '' + lib.optionalString withSsh ''
+    for x in connect.c git-gui/lib/remote_add.tcl ; do
+      substituteInPlace "$x" \
+        --subst-var-by ssh "${openssh}/bin/ssh"
+    done
   '';
 
   nativeBuildInputs = [ gettext perlPackages.perl makeWrapper ]
diff --git a/pkgs/applications/video/epgstation/default.nix b/pkgs/applications/video/epgstation/default.nix
index 77510ae153d..a8ec353d788 100644
--- a/pkgs/applications/video/epgstation/default.nix
+++ b/pkgs/applications/video/epgstation/default.nix
@@ -115,7 +115,7 @@ let
       ln -sfT /var/lib/epgstation/thumbnail thumbnail
 
       makeWrapper ${nodejs}/bin/npm $out/bin/epgstation \
-       --run "cd $out/lib/node_modules/epgstation" \
+       --chdir "$out/lib/node_modules/epgstation" \
        --prefix PATH : ${lib.makeBinPath runtimeDeps} \
        --set APP_ROOT_PATH "$out/lib/node_modules/epgstation"
 
diff --git a/pkgs/applications/video/mirakurun/default.nix b/pkgs/applications/video/mirakurun/default.nix
index 3987e125284..53f1467ee8e 100644
--- a/pkgs/applications/video/mirakurun/default.nix
+++ b/pkgs/applications/video/mirakurun/default.nix
@@ -61,7 +61,7 @@ stdenvNoCC.mkDerivation rec {
       mkdir -p $out/bin
 
       makeWrapper ${mirakurun}/bin/mirakurun-epgdump $out/bin/mirakurun-epgdump \
-        --run "cd ${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \
+        --chdir "${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \
         --prefix PATH : ${lib.makeBinPath runtimeDeps}
 
       # XXX: The original mirakurun command uses PM2 to manage the Mirakurun
@@ -70,7 +70,7 @@ stdenvNoCC.mkDerivation rec {
       # unique to PM2 is currently being used.
       makeWrapper ${yarn}/bin/yarn $out/bin/mirakurun-start \
         --add-flags "start" \
-        --run "cd ${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \
+        --chdir "${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \
         --prefix PATH : ${lib.makeBinPath runtimeDeps}
     '';
 
diff --git a/pkgs/applications/window-managers/afterstep/default.nix b/pkgs/applications/window-managers/afterstep/default.nix
index a26f824cd18..4bc757f2721 100644
--- a/pkgs/applications/window-managers/afterstep/default.nix
+++ b/pkgs/applications/window-managers/afterstep/default.nix
@@ -45,7 +45,19 @@ stdenv.mkDerivation rec {
 
   # A strange type of bug: dbus is not immediately found by pkg-config
   preConfigure = ''
-     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config dbus-1 --cflags)"
+    # binutils 2.37 fix
+    # https://github.com/afterstep/afterstep/issues/2
+    fixupList=(
+      "autoconf/Makefile.defines.in"
+      "libAfterImage/aftershow/Makefile.in"
+      "libAfterImage/apps/Makefile.in"
+      "libAfterBase/Makefile.in"
+      "libAfterImage/Makefile.in"
+    )
+    for toFix in "''${fixupList[@]}"; do
+      substituteInPlace "$toFix" --replace "clq" "cq"
+    done
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config dbus-1 --cflags)"
   '';
 
   # Parallel build fails due to missing dependencies between private libaries:
diff --git a/pkgs/build-support/setup-hooks/make-wrapper.sh b/pkgs/build-support/setup-hooks/make-wrapper.sh
index fa606583289..7d598956168 100644
--- a/pkgs/build-support/setup-hooks/make-wrapper.sh
+++ b/pkgs/build-support/setup-hooks/make-wrapper.sh
@@ -18,6 +18,7 @@ assertExecutable() {
 # --set-default VAR VAL : like --set, but only adds VAR if not already set in
 #                         the environment
 # --unset       VAR     : remove VAR from the environment
+# --chdir       DIR     : change working directory (use instead of --run "cd DIR")
 # --run         COMMAND : run command before the executable
 # --add-flags   FLAGS   : add FLAGS to invocation of executable
 
@@ -126,6 +127,10 @@ makeWrapper() {
             varName="${params[$((n + 1))]}"
             n=$((n + 1))
             echo "unset $varName" >> "$wrapper"
+        elif [[ "$p" == "--chdir" ]]; then
+            dir="${params[$((n + 1))]}"
+            n=$((n + 1))
+            echo "cd ${dir@Q}" >> "$wrapper"
         elif [[ "$p" == "--run" ]]; then
             command="${params[$((n + 1))]}"
             n=$((n + 1))
diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook/wrap-gapps-hook.sh b/pkgs/build-support/setup-hooks/wrap-gapps-hook/wrap-gapps-hook.sh
index 1a46e075dbe..0acf4a8e6f8 100644
--- a/pkgs/build-support/setup-hooks/wrap-gapps-hook/wrap-gapps-hook.sh
+++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook/wrap-gapps-hook.sh
@@ -14,10 +14,6 @@ gappsWrapperArgsHook() {
         gappsWrapperArgs+=(--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE")
     fi
 
-    if [ -n "$XDG_ICON_DIRS" ]; then
-        gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS")
-    fi
-
     if [ -n "$GSETTINGS_SCHEMAS_PATH" ]; then
         gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH")
     fi
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix
index 4a3d3778881..124ade8cfa0 100644
--- a/pkgs/build-support/trivial-builders.nix
+++ b/pkgs/build-support/trivial-builders.nix
@@ -515,15 +515,19 @@ rec {
    * # setup hook that depends on the hello package and runs ./myscript.sh
    * myhellohook = makeSetupHook { deps = [ hello ]; } ./myscript.sh;
    *
-   * # wrotes a setup hook where @bash@ myscript.sh is substituted for the
+   * # writes a Linux-exclusive setup hook where @bash@ myscript.sh is substituted for the
    * # bash interpreter.
    * myhellohookSub = makeSetupHook {
    *                 deps = [ hello ];
    *                 substitutions = { bash = "${pkgs.bash}/bin/bash"; };
+   *                 meta.platforms = lib.platforms.linux;
    *               } ./myscript.sh;
    */
-  makeSetupHook = { name ? "hook", deps ? [], substitutions ? {} }: script:
-    runCommand name substitutions
+  makeSetupHook = { name ? "hook", deps ? [], substitutions ? {}, meta ? {} }: script:
+    runCommand name
+      (substitutions // {
+        inherit meta;
+      })
       (''
         mkdir -p $out/nix-support
         cp ${script} $out/nix-support/setup-hook
diff --git a/pkgs/data/misc/cacert/default.nix b/pkgs/data/misc/cacert/default.nix
index 4d79521c255..ecd8a1c3dfd 100644
--- a/pkgs/data/misc/cacert/default.nix
+++ b/pkgs/data/misc/cacert/default.nix
@@ -20,7 +20,7 @@ let
   blocklist = writeText "cacert-blocklist.txt" (lib.concatStringsSep "\n" blacklist);
   extraCertificatesBundle = writeText "cacert-extra-certificates-bundle.crt" (lib.concatStringsSep "\n\n" extraCertificateStrings);
 
-  srcVersion = "3.74";
+  srcVersion = "3.77";
   version = if nssOverride != null then nssOverride.version else srcVersion;
   meta = with lib; {
     homepage = "https://curl.haxx.se/docs/caextract.html";
@@ -35,7 +35,7 @@ let
 
     src = if nssOverride != null then nssOverride.src else fetchurl {
       url = "mirror://mozilla/security/nss/releases/NSS_${lib.replaceStrings ["."] ["_"] version}_RTM/src/nss-${version}.tar.gz";
-      sha256 = "0mnhdkm4galhpvfz4rv0918jwmjlwkvcvb1f5va8f3zlz48qi4l8";
+      sha256 = "1pfy33b51914sivqyaxdwfd930hzb77gm07z4f57hnyk5xddypl2";
     };
 
     dontBuild = true;
diff --git a/pkgs/data/misc/cacert/update.sh b/pkgs/data/misc/cacert/update.sh
index 72d581b9650..9ad5ede0f7e 100755
--- a/pkgs/data/misc/cacert/update.sh
+++ b/pkgs/data/misc/cacert/update.sh
@@ -13,14 +13,11 @@
 # As of this writing there are a few magnitudes more packages depending on
 # cacert than on nss.
 #
-# If the current nixpkgs revision contains the attribute `nss_latest` that will
-# be used instead of `nss`. This is done to help the stable branch maintenance
-# where (usually) after branch-off during the first Firefox upgrade that
-# requries a new NSS version that attribute is introduced.
-# By having this change in the unstable branch we can safely carry it from
-# release to release without requiring more backport churn on those doing the
-# stable maintenance.
-
+# We use `nss_latest` instead of `nss_esr`, because that is the newer version
+# and we want up-to-date certificates.
+# `nss_esr` is used for the ecosystem at large through the `nss` attribute,
+# because it is updated less frequently and maintained for longer, whereas `nss_latest`
+# is used for software that actually needs a new nss, e.g. Firefox.
 
 set -ex
 
@@ -28,7 +25,7 @@ BASEDIR="$(dirname "$0")/../../../.."
 
 
 CURRENT_PATH=$(nix-build --no-out-link -A cacert.out)
-PATCHED_PATH=$(nix-build --no-out-link -E "with import $BASEDIR {}; let nss_pkg = pkgs.nss_latest or pkgs.nss; in (cacert.override { nssOverride = nss_pkg; }).out")
+PATCHED_PATH=$(nix-build --no-out-link -E "with import $BASEDIR {}; (cacert.override { nssOverride = nss_latest; }).out")
 
 # Check the hash of the etc subfolder
 # We can't check the entire output as that contains the nix-support folder
@@ -37,6 +34,6 @@ CURRENT_HASH=$(nix-hash "$CURRENT_PATH/etc")
 PATCHED_HASH=$(nix-hash "$PATCHED_PATH/etc")
 
 if [[ "$CURRENT_HASH" !=  "$PATCHED_HASH" ]]; then
-    NSS_VERSION=$(nix-instantiate --json --eval -E "with import $BASEDIR {}; nss.version" | jq -r .)
+    NSS_VERSION=$(nix-instantiate --json --eval -E "with import $BASEDIR {}; nss_latest.version" | jq -r .)
     update-source-version --version-key=srcVersion cacert.src "$NSS_VERSION"
 fi
diff --git a/pkgs/data/misc/dns-root-data/default.nix b/pkgs/data/misc/dns-root-data/default.nix
index aad1fe61c4b..e09ff07a9e8 100644
--- a/pkgs/data/misc/dns-root-data/default.nix
+++ b/pkgs/data/misc/dns-root-data/default.nix
@@ -19,7 +19,8 @@ let
 in
 
 stdenv.mkDerivation {
-  name = "dns-root-data-2019-01-11";
+  pname = "dns-root-data";
+  version = "2019-01-11";
 
   buildCommand = ''
     mkdir $out
diff --git a/pkgs/data/misc/freepats/default.nix b/pkgs/data/misc/freepats/default.nix
index 4fe6a5c20fd..bb8dae0cf6a 100644
--- a/pkgs/data/misc/freepats/default.nix
+++ b/pkgs/data/misc/freepats/default.nix
@@ -1,10 +1,11 @@
 { lib, stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "freepats-20060219";
+  pname = "freepats";
+  version = "20060219";
 
   src = fetchurl {
-    url = "https://freepats.zenvoid.org/${name}.tar.bz2";
+    url = "https://freepats.zenvoid.org/freepats-${version}.tar.bz2";
     sha256 = "12iw36rd94zirll96cd5k0va7p5hxmf2shvjlhzihcmjaw8flq82";
   };
 
diff --git a/pkgs/desktops/cdesktopenv/default.nix b/pkgs/desktops/cdesktopenv/default.nix
index 77650e71ebe..b506ed3663b 100644
--- a/pkgs/desktops/cdesktopenv/default.nix
+++ b/pkgs/desktops/cdesktopenv/default.nix
@@ -56,6 +56,19 @@ in stdenv.mkDerivation rec {
     "LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive"
   ];
 
+  preConfigure = ''
+    # binutils 2.37 fix
+    fixupList=(
+      "config/cf/Imake.tmpl"
+      "config/util/crayar.sh"
+      "config/util/crayar.sh"
+      "programs/dtwm/Makefile.tmpl"
+    )
+    for toFix in "''${fixupList[@]}"; do
+      substituteInPlace "$toFix" --replace "clq" "cq"
+    done
+  '';
+
   preBuild = ''
     while IFS= read -r -d ''$'\0' i; do
       substituteInPlace "$i" --replace /usr/dt $out/opt/dt
diff --git a/pkgs/desktops/gnome/core/mutter/3.38/default.nix b/pkgs/desktops/gnome/core/mutter/3.38/default.nix
index 3c2d30b813b..799f8091726 100644
--- a/pkgs/desktops/gnome/core/mutter/3.38/default.nix
+++ b/pkgs/desktops/gnome/core/mutter/3.38/default.nix
@@ -32,6 +32,7 @@
 , mesa
 , meson
 , gnome-settings-daemon
+, libxcvt
 , xorgserver
 , python3
 , wrapGAppsHook
@@ -99,7 +100,8 @@ let self = stdenv.mkDerivation rec {
     pkg-config
     python3
     wrapGAppsHook
-    xorgserver # for cvt command
+    libxcvt
+    xorgserver
   ];
 
   buildInputs = [
diff --git a/pkgs/desktops/gnome/core/mutter/default.nix b/pkgs/desktops/gnome/core/mutter/default.nix
index 9f3925d0ce5..f92b162476a 100644
--- a/pkgs/desktops/gnome/core/mutter/default.nix
+++ b/pkgs/desktops/gnome/core/mutter/default.nix
@@ -33,6 +33,7 @@
 , mesa
 , meson
 , gnome-settings-daemon
+, libxcvt
 , xorgserver
 , python3
 , wrapGAppsHook
@@ -95,7 +96,8 @@ let self = stdenv.mkDerivation rec {
     pkg-config
     python3
     wrapGAppsHook
-    xorgserver # for cvt command
+    libxcvt
+    xorgserver
   ];
 
   buildInputs = [
diff --git a/pkgs/development/compilers/dmd/binary.nix b/pkgs/development/compilers/dmd/binary.nix
index f47e447334b..fdea39db94b 100644
--- a/pkgs/development/compilers/dmd/binary.nix
+++ b/pkgs/development/compilers/dmd/binary.nix
@@ -18,8 +18,9 @@ in stdenv.mkDerivation {
   dontConfigure = true;
   dontBuild = true;
 
-  nativeBuildInputs = [ autoPatchelfHook ]
-    ++ lib.optional hostPlatform.isDarwin fixDarwinDylibNames;
+  nativeBuildInputs = lib.optionals hostPlatform.isLinux [
+    autoPatchelfHook
+  ] ++ lib.optional hostPlatform.isDarwin fixDarwinDylibNames;
   propagatedBuildInputs = [ curl tzdata ] ++ lib.optional hostPlatform.isLinux glibc;
 
   installPhase = ''
diff --git a/pkgs/development/compilers/go/1.16.nix b/pkgs/development/compilers/go/1.16.nix
index add1e70bbe3..ffda9f49835 100644
--- a/pkgs/development/compilers/go/1.16.nix
+++ b/pkgs/development/compilers/go/1.16.nix
@@ -7,7 +7,6 @@
 , perl
 , which
 , pkg-config
-, patch
 , procps
 , pcre
 , cacert
@@ -63,7 +62,7 @@ stdenv.mkDerivation rec {
   };
 
   # perl is used for testing go vet
-  nativeBuildInputs = [ perl which pkg-config patch procps ];
+  nativeBuildInputs = [ perl which pkg-config procps ];
   buildInputs = [ cacert pcre ]
     ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ]
     ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
diff --git a/pkgs/development/compilers/go/1.17.nix b/pkgs/development/compilers/go/1.17.nix
index 28d5ffdc6df..d9180e9001d 100644
--- a/pkgs/development/compilers/go/1.17.nix
+++ b/pkgs/development/compilers/go/1.17.nix
@@ -7,7 +7,6 @@
 , perl
 , which
 , pkg-config
-, patch
 , procps
 , pcre
 , cacert
@@ -55,15 +54,15 @@ in
 
 stdenv.mkDerivation rec {
   pname = "go";
-  version = "1.17.8";
+  version = "1.17.9";
 
   src = fetchurl {
     url = "https://dl.google.com/go/go${version}.src.tar.gz";
-    sha256 = "sha256-Lv/NiYFA2nmgYfN4TKT42LE9gR+yq+na0kBEQtq733o=";
+    sha256 = "sha256-djrUuvuAqSBEWMX6K45zJ/qXGu5FQlLA42LBEjYVaBM=";
   };
 
   # perl is used for testing go vet
-  nativeBuildInputs = [ perl which pkg-config patch procps ];
+  nativeBuildInputs = [ perl which pkg-config procps ];
   buildInputs = [ cacert pcre ]
     ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ]
     ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
diff --git a/pkgs/development/compilers/go/1.18.nix b/pkgs/development/compilers/go/1.18.nix
index 94e5ac3eccf..5693fa74551 100644
--- a/pkgs/development/compilers/go/1.18.nix
+++ b/pkgs/development/compilers/go/1.18.nix
@@ -7,7 +7,6 @@
 , perl
 , which
 , pkg-config
-, patch
 , procps
 , pcre
 , cacert
@@ -63,7 +62,7 @@ stdenv.mkDerivation rec {
   };
 
   # perl is used for testing go vet
-  nativeBuildInputs = [ perl which pkg-config patch procps ];
+  nativeBuildInputs = [ perl which pkg-config procps ];
   buildInputs = [ cacert pcre ]
     ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ]
     ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
diff --git a/pkgs/development/compilers/inklecate/default.nix b/pkgs/development/compilers/inklecate/default.nix
index 32b91f5ddfe..ecf5ed50ab3 100644
--- a/pkgs/development/compilers/inklecate/default.nix
+++ b/pkgs/development/compilers/inklecate/default.nix
@@ -17,7 +17,7 @@ buildDotnetModule rec {
     sha256 = "00lagmwsbxap5mgnw4gndpavmv3xsgincdaq1zvw7fkc3vn3pxqc";
   };
 
-  nativeBuildInputs = [ autoPatchelfHook ];
+  nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
   buildInputs = [ stdenv.cc.cc.lib ];
 
   projectFile = "inklecate/inklecate.csproj";
diff --git a/pkgs/development/compilers/ldc/binary.nix b/pkgs/development/compilers/ldc/binary.nix
index 05928d396c8..dd4d51c81e3 100644
--- a/pkgs/development/compilers/ldc/binary.nix
+++ b/pkgs/development/compilers/ldc/binary.nix
@@ -18,8 +18,9 @@ in stdenv.mkDerivation {
   dontConfigure = true;
   dontBuild = true;
 
-  nativeBuildInputs = [ autoPatchelfHook ]
-    ++ lib.optional hostPlatform.isDarwin fixDarwinDylibNames;
+  nativeBuildInputs = lib.optionals hostPlatform.isLinux [
+    autoPatchelfHook
+  ] ++ lib.optional hostPlatform.isDarwin fixDarwinDylibNames;
 
   buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxml2 stdenv.cc.cc ];
 
diff --git a/pkgs/development/compilers/llvm/10/llvm/default.nix b/pkgs/development/compilers/llvm/10/llvm/default.nix
index bb1b90b36a9..128ac570935 100644
--- a/pkgs/development/compilers/llvm/10/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/10/llvm/default.nix
@@ -244,6 +244,12 @@ in stdenv.mkDerivation (rec {
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
   ''
+  + optionalString enableSharedLibraries ''
+    mkdir -p $dev/lib
+    mv $lib/lib/*.a $dev/lib
+    sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
+      "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
+  ''
   + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
   '';
diff --git a/pkgs/development/compilers/llvm/11/llvm/default.nix b/pkgs/development/compilers/llvm/11/llvm/default.nix
index e8cfd23faa7..955f9dbec7e 100644
--- a/pkgs/development/compilers/llvm/11/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/11/llvm/default.nix
@@ -255,6 +255,12 @@ in stdenv.mkDerivation (rec {
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
   ''
+  + optionalString enableSharedLibraries ''
+    mkdir -p $dev/lib
+    mv $lib/lib/*.a $dev/lib
+    sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
+      "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
+  ''
   + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
   '';
diff --git a/pkgs/development/compilers/llvm/12/llvm/default.nix b/pkgs/development/compilers/llvm/12/llvm/default.nix
index 2c035ee67a9..8acd4d2c1fd 100644
--- a/pkgs/development/compilers/llvm/12/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/12/llvm/default.nix
@@ -242,6 +242,12 @@ in stdenv.mkDerivation (rec {
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
   ''
+  + optionalString enableSharedLibraries ''
+    mkdir -p $dev/lib
+    mv $lib/lib/*.a $dev/lib
+    sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
+      "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
+  ''
   + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
   '';
diff --git a/pkgs/development/compilers/llvm/13/llvm/default.nix b/pkgs/development/compilers/llvm/13/llvm/default.nix
index abfb2b36d18..b760d75cf4e 100644
--- a/pkgs/development/compilers/llvm/13/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/13/llvm/default.nix
@@ -205,6 +205,12 @@ in stdenv.mkDerivation (rec {
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
   ''
+  + optionalString enableSharedLibraries ''
+    mkdir -p $dev/lib
+    mv $lib/lib/*.a $dev/lib
+    sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
+      "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
+  ''
   + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
   '';
diff --git a/pkgs/development/compilers/llvm/14/llvm/default.nix b/pkgs/development/compilers/llvm/14/llvm/default.nix
index 05aac728b45..ea147337831 100644
--- a/pkgs/development/compilers/llvm/14/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/14/llvm/default.nix
@@ -200,6 +200,12 @@ in stdenv.mkDerivation (rec {
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
   ''
+  + optionalString enableSharedLibraries ''
+    mkdir -p $dev/lib
+    mv $lib/lib/*.a $dev/lib
+    sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
+      "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
+  ''
   + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
   '';
diff --git a/pkgs/development/compilers/llvm/5/llvm/default.nix b/pkgs/development/compilers/llvm/5/llvm/default.nix
index cf668cd566a..253aaade693 100644
--- a/pkgs/development/compilers/llvm/5/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/5/llvm/default.nix
@@ -222,6 +222,12 @@ stdenv.mkDerivation (rec {
       ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
     '') versionSuffixes}
   ''
+  + optionalString enableSharedLibraries ''
+    mkdir -p $dev/lib
+    mv $lib/lib/*.a $dev/lib
+    sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
+      "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
+  ''
   + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
   '';
diff --git a/pkgs/development/compilers/llvm/6/llvm/default.nix b/pkgs/development/compilers/llvm/6/llvm/default.nix
index 61f9234274d..622b90e58e8 100644
--- a/pkgs/development/compilers/llvm/6/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/6/llvm/default.nix
@@ -215,6 +215,12 @@ stdenv.mkDerivation (rec {
       ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
     '') versionSuffixes}
   ''
+  + optionalString enableSharedLibraries ''
+    mkdir -p $dev/lib
+    mv $lib/lib/*.a $dev/lib
+    sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
+      "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
+  ''
   + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
   '';
diff --git a/pkgs/development/compilers/llvm/7/llvm/default.nix b/pkgs/development/compilers/llvm/7/llvm/default.nix
index b324e1a0e4d..01784baca8c 100644
--- a/pkgs/development/compilers/llvm/7/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/7/llvm/default.nix
@@ -234,6 +234,12 @@ in stdenv.mkDerivation (rec {
       ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
     '') versionSuffixes}
   ''
+  + optionalString enableSharedLibraries ''
+    mkdir -p $dev/lib
+    mv $lib/lib/*.a $dev/lib
+    sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
+      "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
+  ''
   + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
   '';
diff --git a/pkgs/development/compilers/llvm/8/llvm/default.nix b/pkgs/development/compilers/llvm/8/llvm/default.nix
index efd1707eb33..01a052d4042 100644
--- a/pkgs/development/compilers/llvm/8/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/8/llvm/default.nix
@@ -226,6 +226,12 @@ in stdenv.mkDerivation (rec {
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
   ''
+  + optionalString enableSharedLibraries ''
+    mkdir -p $dev/lib
+    mv $lib/lib/*.a $dev/lib
+    sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
+      "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
+  ''
   + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
   '';
diff --git a/pkgs/development/compilers/llvm/9/llvm/default.nix b/pkgs/development/compilers/llvm/9/llvm/default.nix
index 1dd1455ed6d..b197e9ab8ba 100644
--- a/pkgs/development/compilers/llvm/9/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/9/llvm/default.nix
@@ -241,6 +241,12 @@ in stdenv.mkDerivation (rec {
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
   ''
+  + optionalString enableSharedLibraries ''
+    mkdir -p $dev/lib
+    mv $lib/lib/*.a $dev/lib
+    sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
+      "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
+  ''
   + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
   '';
diff --git a/pkgs/development/compilers/llvm/git/llvm/default.nix b/pkgs/development/compilers/llvm/git/llvm/default.nix
index d2059cc66ba..02ec0f3ab11 100644
--- a/pkgs/development/compilers/llvm/git/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/git/llvm/default.nix
@@ -200,6 +200,12 @@ in stdenv.mkDerivation (rec {
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
   ''
+  + optionalString enableSharedLibraries ''
+    mkdir -p $dev/lib
+    mv $lib/lib/*.a $dev/lib
+    sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
+      "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
+  ''
   + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
   '';
diff --git a/pkgs/development/compilers/rust/1_59.nix b/pkgs/development/compilers/rust/1_59.nix
deleted file mode 100644
index 98125851655..00000000000
--- a/pkgs/development/compilers/rust/1_59.nix
+++ /dev/null
@@ -1,64 +0,0 @@
-# New rust versions should first go to staging.
-# Things to check after updating:
-# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
-#    i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
-#    This testing can be also done by other volunteers as part of the pull
-#    request review, in case platforms cannot be covered.
-# 2. The LLVM version used for building should match with rust upstream.
-#    Check the version number in the src/llvm-project git submodule in:
-#    https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules
-# 3. Firefox and Thunderbird should still build on x86_64-linux.
-
-{ stdenv, lib
-, buildPackages
-, newScope, callPackage
-, CoreFoundation, Security, SystemConfiguration
-, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost
-, makeRustPlatform
-, llvmPackages_11
-, llvmPackages_13, llvm_13
-} @ args:
-
-import ./default.nix {
-  rustcVersion = "1.59.0";
-  rustcSha256 = "sha256-p8juruhb/O+EyWsCsxcdHmVA0VF5/4Pd3Z6vuhhfhfk=";
-
-  llvmSharedForBuild = pkgsBuildBuild.llvmPackages_13.libllvm.override { enableSharedLibraries = true; };
-  llvmSharedForHost = pkgsBuildHost.llvmPackages_13.libllvm.override { enableSharedLibraries = true; };
-  llvmSharedForTarget = pkgsBuildTarget.llvmPackages_13.libllvm.override { enableSharedLibraries = true; };
-
-  llvmBootstrapForDarwin = llvmPackages_11;
-
-  # For use at runtime
-  llvmShared = llvm_13.override { enableSharedLibraries = true; };
-
-  # Expose llvmPackages used for rustc from rustc via passthru for LTO in Firefox
-  llvmPackagesForBuild = pkgsBuildBuild.llvmPackages_13;
-
-  # Note: the version MUST be one version prior to the version we're
-  # building
-  bootstrapVersion = "1.58.1";
-
-  # fetch hashes by running `print-hashes.sh ${bootstrapVersion}`
-  bootstrapHashes = {
-    i686-unknown-linux-gnu = "c3d282cd96cc9e5292e62db1ebb9fa6d5b738f4684d5ece9883f7472e2f76ad4";
-    x86_64-unknown-linux-gnu = "4fac6df9ea49447682c333e57945bebf4f9f45ec7b08849e507a64b2ccd5f8fb";
-    x86_64-unknown-linux-musl = "7036e34eadc8ce22d16b0625919d9f2244ca49a5441d6599f4822116c181d272";
-    arm-unknown-linux-gnueabihf = "739389d46c5862b0e67d01dece99aa3db2229e055a3d7f7624679c55b6c33e06";
-    armv7-unknown-linux-gnueabihf = "6cede2c7795e8126b0f17b1032d52500e594bac64c7d190bdc0ac1c832ef30bd";
-    aarch64-unknown-linux-gnu = "ce557516593e4526709b0f33c2e1d7c932b3ddf76af94c2417d8d667921ce90c";
-    aarch64-unknown-linux-musl = "b1533fdeeda483a3633617fd18a79d8fad7821331614b8dc13efd8b22acc30f5";
-    x86_64-apple-darwin = "d0044680fc132a721481b130a0a4282a444867f423efdb890fe13e447966412f";
-    aarch64-apple-darwin = "00b44985bc87e53c53d92622fb10226f09e9f25c79db48a77c0a769a36f83b1e";
-    powerpc64le-unknown-linux-gnu = "b15baef702cbd6f0ea2bef7bf98ca7ce5644f2beb219028e8a12e7053da4c849";
-    riscv64gc-unknown-linux-gnu = "d8ea2b11a4b24d1169fa3190127488b951b8bdef28293a4129ddd46c0ba9469b";
-    mips64el-unknown-linux-gnuabi64 = "4f03bc972ae784d4f66cfa77215b369723531e67f647de9f49ce9fc21e5691af";
-  };
-
-  selectRustPackage = pkgs: pkgs.rust_1_59;
-
-  rustcPatches = [
-  ];
-}
-
-(builtins.removeAttrs args [ "fetchpatch" "pkgsBuildHost" "llvmPackages_11" "llvmPackages_13" "llvm_13"])
diff --git a/pkgs/development/compilers/rust/1_60.nix b/pkgs/development/compilers/rust/1_60.nix
new file mode 100644
index 00000000000..0153b5d23a9
--- /dev/null
+++ b/pkgs/development/compilers/rust/1_60.nix
@@ -0,0 +1,64 @@
+# New rust versions should first go to staging.
+# Things to check after updating:
+# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
+#    i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
+#    This testing can be also done by other volunteers as part of the pull
+#    request review, in case platforms cannot be covered.
+# 2. The LLVM version used for building should match with rust upstream.
+#    Check the version number in the src/llvm-project git submodule in:
+#    https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules
+# 3. Firefox and Thunderbird should still build on x86_64-linux.
+
+{ stdenv, lib
+, buildPackages
+, newScope, callPackage
+, CoreFoundation, Security, SystemConfiguration
+, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost
+, makeRustPlatform
+, llvmPackages_11
+, llvmPackages_14, llvm_14
+} @ args:
+
+import ./default.nix {
+  rustcVersion = "1.60.0";
+  rustcSha256 = "1drqr0a26x1rb2w3kj0i6abhgbs3jx5qqkrcwbwdlx7n3inq5ji0";
+
+  llvmSharedForBuild = pkgsBuildBuild.llvmPackages_14.libllvm.override { enableSharedLibraries = true; };
+  llvmSharedForHost = pkgsBuildHost.llvmPackages_14.libllvm.override { enableSharedLibraries = true; };
+  llvmSharedForTarget = pkgsBuildTarget.llvmPackages_14.libllvm.override { enableSharedLibraries = true; };
+
+  llvmBootstrapForDarwin = llvmPackages_11;
+
+  # For use at runtime
+  llvmShared = llvm_14.override { enableSharedLibraries = true; };
+
+  # Expose llvmPackages used for rustc from rustc via passthru for LTO in Firefox
+  llvmPackagesForBuild = pkgsBuildBuild.llvmPackages_14;
+
+  # Note: the version MUST be one version prior to the version we're
+  # building
+  bootstrapVersion = "1.59.0";
+
+  # fetch hashes by running `print-hashes.sh ${bootstrapVersion}`
+  bootstrapHashes = {
+    i686-unknown-linux-gnu = "f57ebfafed1e857b2b1dc1a22cf1133766f68a0759dc2f717dec54a8d4385dec";
+    x86_64-unknown-linux-gnu = "0c1c2da3fa26372e5178123aa5bb0fdcd4933fbad9bfb268ffbd71807182ecae";
+    x86_64-unknown-linux-musl = "c0ae76fa4bb0f1c85b86b9f7637db0fddf5084ce4c8f86c4d4acc3c41813201f";
+    arm-unknown-linux-gnueabihf = "f934ddd8533d5df922e3397a5d30404930c5992c6c91c72d3e1475e2978e8793";
+    armv7-unknown-linux-gnueabihf = "acb0f793c517de927b17e1c85135f6d58ae7430a8bd094a92009bcf0d4bbb8eb";
+    aarch64-unknown-linux-gnu = "ab5da30a3de5433e26cbc74c56b9d97b569769fc2e456fc54378adc8baaee4f0";
+    aarch64-unknown-linux-musl = "a3f8afdf23c98e6d25bf3b4bfcf5e9a4712f4c425f3754500931232d946204a9";
+    x86_64-apple-darwin = "d82204f536af0c7bfd2ea2213dc46b99911860cfc5517f7321244412ae96f159";
+    aarch64-apple-darwin = "5449ae915982967bae97746ce8bea30844f9ab40b4ee4da392b9997e0e7b2926";
+    powerpc64le-unknown-linux-gnu = "6892a706ea8118344a4f4624b57a99460a784b5b30cccd9df430c33008d341f3";
+    riscv64gc-unknown-linux-gnu = "e0cb22c2383d73b3928c17a630ae8d37f6787ddcea7871c9b3e21fd4560226b2";
+    mips64el-unknown-linux-gnuabi64 = "2e2c404741b1dd02b5d73361f187568a91a8531997ade41bd855eca3972e2a5b";
+  };
+
+  selectRustPackage = pkgs: pkgs.rust_1_60;
+
+  rustcPatches = [
+  ];
+}
+
+(builtins.removeAttrs args [ "fetchpatch" "pkgsBuildHost" "llvmPackages_11" "llvmPackages_14" "llvm_14"])
diff --git a/pkgs/development/compilers/zulu/8.nix b/pkgs/development/compilers/zulu/8.nix
index 48573c67241..00f18f1238f 100644
--- a/pkgs/development/compilers/zulu/8.nix
+++ b/pkgs/development/compilers/zulu/8.nix
@@ -61,18 +61,22 @@ in stdenv.mkDerivation {
   ];
 
   nativeBuildInputs = [
-    autoPatchelfHook makeWrapper
+    makeWrapper
+  ] ++ lib.optionals stdenv.isLinux [
+    autoPatchelfHook
   ] ++ lib.optionals stdenv.isDarwin [
     unzip
   ];
 
   installPhase = ''
+    runHook preInstall
+
     mkdir -p $out
     cp -r ./* "$out/"
-
+  '' + lib.optionalString stdenv.isLinux ''
     # jni.h expects jni_md.h to be in the header search path.
     ln -s $out/include/linux/*_md.h $out/include/
-
+  '' + ''
     mkdir -p $out/nix-support
     printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
 
@@ -87,6 +91,8 @@ in stdenv.mkDerivation {
         wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
       fi
     done
+  '' + ''
+    runHook postInstall
   '';
 
   preFixup = ''
diff --git a/pkgs/development/compilers/zulu/default.nix b/pkgs/development/compilers/zulu/default.nix
index 662d997d882..1b961c3f9e4 100644
--- a/pkgs/development/compilers/zulu/default.nix
+++ b/pkgs/development/compilers/zulu/default.nix
@@ -63,12 +63,16 @@ in stdenv.mkDerivation {
   ];
 
   nativeBuildInputs = [
-    autoPatchelfHook makeWrapper
+    makeWrapper
+  ] ++ lib.optionals stdenv.isLinux [
+    autoPatchelfHook
   ] ++ lib.optionals stdenv.isDarwin [
     unzip
   ];
 
   installPhase = ''
+    runHook preInstall
+
     mkdir -p $out
     cp -r ./* "$out/"
   '' + lib.optionalString stdenv.isLinux ''
@@ -90,6 +94,8 @@ in stdenv.mkDerivation {
     for bin in $( find "$out" -executable -type f -not -name jspawnhelper ); do
       wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
     done
+  '' + ''
+    runHook postInstall
   '';
 
   preFixup = ''
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix
index e2428edbb26..502a981596e 100644
--- a/pkgs/development/go-modules/generic/default.nix
+++ b/pkgs/development/go-modules/generic/default.nix
@@ -204,7 +204,7 @@ let
         if [ -n "$subPackages" ]; then
           echo "$subPackages" | sed "s,\(^\| \),\1./,g"
         else
-          find . -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort --unique
+          find . -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort --unique | grep -v "$exclude"
         fi
       }
 
@@ -221,7 +221,6 @@ let
           export NIX_BUILD_CORES=1
       fi
       for pkg in $(getGoDirs ""); do
-        grep -q "$exclude" <<<$pkg && continue
         echo "Building subPackage $pkg"
         buildGoDir install "$pkg"
       done
diff --git a/pkgs/development/go-packages/generic/default.nix b/pkgs/development/go-packages/generic/default.nix
index 3d633324eef..0559f7f07a7 100644
--- a/pkgs/development/go-packages/generic/default.nix
+++ b/pkgs/development/go-packages/generic/default.nix
@@ -184,7 +184,7 @@ let
           echo "$subPackages" | sed "s,\(^\| \),\1$goPackagePath/,g"
         else
           pushd "$NIX_BUILD_TOP/go/src" >/dev/null
-          find "$goPackagePath" -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort | uniq
+          find "$goPackagePath" -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort | uniq | grep -v "$exclude"
           popd >/dev/null
         fi
       }
@@ -202,7 +202,6 @@ let
           export NIX_BUILD_CORES=1
       fi
       for pkg in $(getGoDirs ""); do
-        grep -q "$exclude" <<<$pkg && continue
         echo "Building subPackage $pkg"
         buildGoDir install "$pkg"
       done
diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix
index 81099b96745..9c3c34c73aa 100644
--- a/pkgs/development/interpreters/perl/default.nix
+++ b/pkgs/development/interpreters/perl/default.nix
@@ -1,4 +1,4 @@
-{ config, lib, stdenv, fetchurl, fetchpatch, fetchFromGitHub, pkgs, buildPackages
+{ config, lib, stdenv, fetchurl, fetchFromGitHub, pkgs, buildPackages
 , callPackage
 , enableThreading ? true, coreutils, makeWrapper
 , zlib
@@ -41,14 +41,7 @@ let
       ]
       ++ optional stdenv.isSunOS ./ld-shared.patch
       ++ optionals stdenv.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ]
-      ++ optionals crossCompiling [
-        ./MakeMaker-cross.patch
-        # https://github.com/arsv/perl-cross/pull/120
-        (fetchpatch {
-          url = "https://github.com/arsv/perl-cross/commit/3c318ae6572f8b36cb077c8b49c851e2f5fe181e.patch";
-          sha256 = "0cmcy8bams3c68f6xadl52z2w378wcpdjzi3qi4pcyvcfs011l6g";
-        })
-      ];
+      ++ optional crossCompiling ./MakeMaker-cross.patch;
 
     # This is not done for native builds because pwd may need to come from
     # bootstrap tools when building bootstrap perl.
@@ -204,14 +197,14 @@ let
       priority = 6; # in `buildEnv' (including the one inside `perl.withPackages') the library files will have priority over files in `perl`
     };
   } // optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) rec {
-    crossVersion = "393821c7cf53774233aaf130ff2c8ccec701b0a9"; # Sep 22, 2021
+    crossVersion = "1.3.7"; # Mar 15, 2022
 
     perl-cross-src = fetchFromGitHub {
       name = "perl-cross-${crossVersion}";
       owner = "arsv";
       repo = "perl-cross";
       rev = crossVersion;
-      sha256 = "1fn35b1773aibi2z54m0mar7114737mvfyp81wkdwhakrmzr5nv1";
+      sha256 = "sha256-F7Vi3RAgIE/3NPlbD5zQ3Q8Ex9ddXTC4zoCRaOxXK0A=";
     };
 
     depsBuildBuild = [ buildPackages.stdenv.cc makeWrapper ];
@@ -240,15 +233,15 @@ in {
   perl534 = common {
     perl = pkgs.perl534;
     buildPerl = buildPackages.perl534;
-    version = "5.34.0";
-    sha256 = "16mywn5afpv1mczv9dlc1w84rbgjgrr0pyr4c0hhb2wnif0zq7jm";
+    version = "5.34.1";
+    sha256 = "sha256-NXlRpJGwuhzjYRJjki/ux4zNWB3dwkpEawM+JazyQqE=";
   };
 
   # the latest Devel version
   perldevel = common {
     perl = pkgs.perldevel;
     buildPerl = buildPackages.perldevel;
-    version = "5.35.4";
-    sha256 = "1ss2r0qq5li6d2qghfv1iah5nl6nraymd7b7ib1iy1395rwyhl4q";
+    version = "5.35.9";
+    sha256 = "sha256-/nmSCIIXHXoC68DxFM9b5GM2AKU4WlLbfWLgduanL7U=";
   };
 }
diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix
index fd5f4091846..97db4a9fffa 100644
--- a/pkgs/development/interpreters/python/cpython/default.nix
+++ b/pkgs/development/interpreters/python/cpython/default.nix
@@ -284,7 +284,7 @@ in with passthru; stdenv.mkDerivation {
 
   CPPFLAGS = concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs);
   LDFLAGS = concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs);
-  LIBS = "${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}";
+  LIBS = "${optionalString (!stdenv.isDarwin) "-lcrypt"}";
   NIX_LDFLAGS = lib.optionalString stdenv.cc.isGNU ({
     "glibc" = "-lgcc_s";
     "musl" = "-lgcc_eh";
diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix
index 47871fff320..8198b25bd6a 100644
--- a/pkgs/development/interpreters/python/default.nix
+++ b/pkgs/development/interpreters/python/default.nix
@@ -124,19 +124,19 @@ with pkgs;
       sourceVersion = {
         major = "3";
         minor = "9";
-        patch = "11";
+        patch = "12";
         suffix = "";
       };
-      sha256 = "sha256-ZnZ6NTCdck83DfnlA8FytO5ET0nWK5i8TspyUSPibEk=";
+      sha256 = "sha256-LNlLIGcOQVnG2atX+R2/JVuX2MGhRR0cNfTsGWit+XE=";
     };
     python310 = {
       sourceVersion = {
         major = "3";
         minor = "10";
-        patch = "3";
+        patch = "4";
         suffix = "";
       };
-      sha256 = "sha256-WWxy3pmNw5IFvE9w7w2/ft7HQKMG0JtJqb0Kd4BnMNw=";
+      sha256 = "sha256-gL+SX1cdpDazUhCIbPefbrX6XWxXExa3NWg0NFH3ehk=";
     };
   };
 
diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix
index ea31f354d0d..d30a2d2073e 100644
--- a/pkgs/development/interpreters/ruby/default.nix
+++ b/pkgs/development/interpreters/ruby/default.nix
@@ -59,14 +59,9 @@ let
         pname = "ruby";
         inherit version;
 
-        src = if useRailsExpress then fetchFromGitHub {
-          owner  = "ruby";
-          repo   = "ruby";
-          rev    = tag;
-          sha256 = sha256.git;
-        } else fetchurl {
+        src = fetchurl {
           url = "https://cache.ruby-lang.org/pub/ruby/${ver.majMin}/ruby-${ver}.tar.gz";
-          sha256 = sha256.src;
+          inherit sha256;
         };
 
         # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
@@ -100,17 +95,22 @@ let
             patchLevel = ver.patchLevel;
           }).${ver.majMinTiny}
           ++ op (lib.versionOlder ver.majMin "3.1") ./do-not-regenerate-revision.h.patch
-          ++ op (atLeast30 && useRailsExpress) ./do-not-update-gems-baseruby.patch
-          # Ruby prior to 3.0 has a bug the installer (tools/rbinstall.rb) but
-          # the resulting error was swallowed. Newer rubygems no longer swallows
-          # this error. We upgrade rubygems when rubygemsSupport is enabled, so
-          # we have to fix this bug to prevent the install step from failing.
-          # See https://github.com/ruby/ruby/pull/2930
-          ++ op (!atLeast30 && rubygemsSupport)
+          ++ op (atLeast30 && useBaseRuby) ./do-not-update-gems-baseruby.patch
+          ++ ops (!atLeast30 && rubygemsSupport) [
+            # We upgrade rubygems to a version that isn't compatible with the
+            # ruby 2.7 installer. Backport the upstream fix.
+            ./rbinstall-new-rubygems-compat.patch
+
+            # Ruby prior to 3.0 has a bug the installer (tools/rbinstall.rb) but
+            # the resulting error was swallowed. Newer rubygems no longer swallows
+            # this error. We upgrade rubygems when rubygemsSupport is enabled, so
+            # we have to fix this bug to prevent the install step from failing.
+            # See https://github.com/ruby/ruby/pull/2930
             (fetchpatch {
               url = "https://github.com/ruby/ruby/commit/261d8dd20afd26feb05f00a560abd99227269c1c.patch";
               sha256 = "0wrii25cxcz2v8bgkrf7ibcanjlxwclzhayin578bf0qydxdm9qy";
-            });
+            })
+          ];
 
         postUnpack = opString rubygemsSupport ''
           rm -rf $sourceRoot/{lib,test}/rubygems*
@@ -182,6 +182,11 @@ let
               sed -i '/CC_VERSION_MESSAGE/d' $rbConfig
             ''
           }
+          # Remove unnecessary external intermediate files created by gems
+          extMakefiles=$(find $out/lib/ruby/gems -name Makefile)
+          for makefile in $extMakefiles; do
+            make -C "$(dirname "$makefile")" distclean
+          done
           # Bundler tries to create this directory
           mkdir -p $out/nix-support
           cat > $out/nix-support/setup-hook <<EOF
@@ -252,26 +257,17 @@ let
 
 in {
   ruby_2_7 = generic {
-    version = rubyVersion "2" "7" "5" "";
-    sha256 = {
-      src = "1wc1hwmz4m6iqlmqag8liyld917p6a8dvnhnpd1v8d8jl80bjm97";
-      git = "16565fyl7141hr6q6d74myhsz46lvgam8ifnacshi68vzibwjbbh";
-    };
+    version = rubyVersion "2" "7" "6" "";
+    sha256 = "042xrdk7hsv4072bayz3f8ffqh61i8zlhvck10nfshllq063n877";
   };
 
   ruby_3_0 = generic {
-    version = rubyVersion "3" "0" "3" "";
-    sha256 = {
-      src = "1b4j39zyyvdkf1ax2c6qfa40b4mxfkr87zghhw19fmnzn8f8d1im";
-      git = "1q19w5i1jkfxn7qq6f9v9ngax9h52gxwijk7hp312dx6amwrkaim";
-    };
+    version = rubyVersion "3" "0" "4" "";
+    sha256 = "0avj4g3s2839b2y4m6pk8kid74r8nj7k0qm2rsdcwjzhg8h7rd3h";
   };
 
   ruby_3_1 = generic {
-    version = rubyVersion "3" "1" "1" "";
-    sha256 = {
-      src = "sha256-/m5Hgt6XRDl43bqLpL440iKqJNw+PwKmqOdwHA7rYZ0=";
-      git = "sha256-76t/tGyK5nz7nvcRdHJTjjckU+Kv+/kbTMiNWJ93jU8=";
-    };
+    version = rubyVersion "3" "1" "2" "";
+    sha256 = "0gm84ipk6mrfw94852w5h7xxk2lqrxjbnlwb88svf0lz70933131";
   };
 }
diff --git a/pkgs/development/interpreters/ruby/patchsets.nix b/pkgs/development/interpreters/ruby/patchsets.nix
index b76dc1a23b1..a0e2b90b0f4 100644
--- a/pkgs/development/interpreters/ruby/patchsets.nix
+++ b/pkgs/development/interpreters/ruby/patchsets.nix
@@ -1,15 +1,15 @@
 { patchSet, useRailsExpress, ops, patchLevel, fetchpatch }:
 
 {
-  "2.7.5" = ops useRailsExpress [
+  "2.7.6" = ops useRailsExpress [
     "${patchSet}/patches/ruby/2.7/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch"
     "${patchSet}/patches/ruby/2.7/head/railsexpress/02-improve-gc-stats.patch"
     "${patchSet}/patches/ruby/2.7/head/railsexpress/03-more-detailed-stacktrace.patch"
   ];
-  "3.0.3" = ops useRailsExpress [
+  "3.0.4" = ops useRailsExpress [
     "${patchSet}/patches/ruby/3.0/head/railsexpress/01-improve-gc-stats.patch"
     "${patchSet}/patches/ruby/3.0/head/railsexpress/02-malloc-trim.patch"
   ];
-  "3.1.1" = ops useRailsExpress [ # no patches yet (2021-12-25)
+  "3.1.2" = ops useRailsExpress [ # no patches yet (2021-12-25)
   ];
 }
diff --git a/pkgs/development/interpreters/ruby/rbinstall-new-rubygems-compat.patch b/pkgs/development/interpreters/ruby/rbinstall-new-rubygems-compat.patch
new file mode 100644
index 00000000000..54ce8a357a8
--- /dev/null
+++ b/pkgs/development/interpreters/ruby/rbinstall-new-rubygems-compat.patch
@@ -0,0 +1,87 @@
+From 8e85d27f9ccfe152fc1b891c19f125915a907493 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
+Date: Tue, 1 Oct 2019 12:03:33 +0200
+Subject: [PATCH] Use `Gem::Package` like object instead of monkey patching.
+
+1. This is similar to what RubyGems does and it is less magic [[1]].
+2. It avoids deprecated code paths in RubyGems [[2]].
+
+[1]: https://github.com/rubygems/rubygems/blob/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L151
+[2]: https://github.com/rubygems/rubygems/blob/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L187
+
+(cherry picked from commit e960ef6f18a25c637c54f00c75bb6c24f8ab55d0)
+---
+ tool/rbinstall.rb | 47 +++++++++++++++++++++++++++--------------------
+ 1 file changed, 27 insertions(+), 20 deletions(-)
+
+diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
+index 060390626f..28ae8c409a 100755
+--- a/tool/rbinstall.rb
++++ b/tool/rbinstall.rb
+@@ -710,28 +710,34 @@ def remove_prefix(prefix, string)
+     end
+   end
+ 
+-  class UnpackedInstaller < Gem::Installer
+-    module DirPackage
+-      def extract_files(destination_dir, pattern = "*")
+-        path = File.dirname(@gem.path)
+-        return if path == destination_dir
+-        File.chmod(0700, destination_dir)
+-        mode = pattern == "bin/*" ? $script_mode : $data_mode
+-        spec.files.each do |f|
+-          src = File.join(path, f)
+-          dest = File.join(without_destdir(destination_dir), f)
+-          makedirs(dest[/.*(?=\/)/m])
+-          install src, dest, :mode => mode
+-        end
+-        File.chmod($dir_mode, destination_dir)
++  class DirPackage
++    attr_reader :spec
++
++    attr_accessor :dir_mode
++    attr_accessor :prog_mode
++    attr_accessor :data_mode
++
++    def initialize(spec)
++      @spec = spec
++      @src_dir = File.dirname(@spec.loaded_from)
++    end
++
++    def extract_files(destination_dir, pattern = "*")
++      path = @src_dir
++      return if path == destination_dir
++      File.chmod(0700, destination_dir)
++      mode = pattern == "bin/*" ? $script_mode : $data_mode
++      spec.files.each do |f|
++        src = File.join(path, f)
++        dest = File.join(without_destdir(destination_dir), f)
++        makedirs(dest[/.*(?=\/)/m])
++        install src, dest, :mode => mode
+       end
++      File.chmod($dir_mode, destination_dir)
+     end
++  end
+ 
+-    def initialize(spec, *options)
+-      super(spec.loaded_from, *options)
+-      @package.extend(DirPackage).spec = spec
+-    end
+-
++  class UnpackedInstaller < Gem::Installer
+     def write_cache_file
+     end
+ 
+@@ -890,7 +896,8 @@ def install_default_gem(dir, srcdir)
+     if File.directory?(ext = "#{gem_ext_dir}/#{spec.full_name}")
+       spec.extensions[0] ||= "-"
+     end
+-    ins = RbInstall::UnpackedInstaller.new(spec, options)
++    package = RbInstall::DirPackage.new spec
++    ins = RbInstall::UnpackedInstaller.new(package, options)
+     puts "#{INDENT}#{spec.name} #{spec.version}"
+     ins.install
+     File.chmod($data_mode, File.join(install_dir, "specifications", "#{spec.full_name}.gemspec"))
+-- 
+2.35.1
+
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index d8d81492f91..1ce2b1525f0 100644
--- a/pkgs/development/libraries/SDL2/default.nix
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -22,6 +22,9 @@
 , waylandSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
 , wayland
 , wayland-protocols
+, drmSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
+, libdrm
+, mesa
 , libxkbcommon
 , dbusSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
 , dbus
@@ -92,7 +95,8 @@ stdenv.mkDerivation rec {
     ++ optional pulseaudioSupport libpulseaudio
     ++ optional udevSupport udev
     ++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
-    ++ optionals x11Support [ libICE libXi libXScrnSaver libXcursor libXinerama libXext libXrandr libXxf86vm ];
+    ++ optionals x11Support [ libICE libXi libXScrnSaver libXcursor libXinerama libXext libXrandr libXxf86vm ]
+    ++ optionals drmSupport [ libdrm mesa ];
 
   buildInputs = [ libiconv ]
     ++ dlopenBuildInputs
diff --git a/pkgs/development/libraries/audio/libopenmpt/default.nix b/pkgs/development/libraries/audio/libopenmpt/default.nix
new file mode 100644
index 00000000000..35a79e3b358
--- /dev/null
+++ b/pkgs/development/libraries/audio/libopenmpt/default.nix
@@ -0,0 +1,66 @@
+{ config
+, lib
+, stdenv
+, fetchurl
+, zlib
+, pkg-config
+, mpg123
+, libogg
+, libvorbis
+, portaudio
+, libsndfile
+, flac
+, usePulseAudio ? config.pulseaudio or stdenv.isLinux
+, libpulseaudio
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libopenmpt";
+  version = "0.6.2";
+
+  outputs = [ "out" "dev" "bin" ];
+
+  src = fetchurl {
+    url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz";
+    sha256 = "1dp645gg6d3pzjh82srq1d7qvyxi5h22k7yfdjiyzbyry8pxdh2h";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    zlib
+    mpg123
+    libogg
+    libvorbis
+    portaudio
+    libsndfile
+    flac
+  ] ++ lib.optional usePulseAudio libpulseaudio;
+
+  configureFlags = lib.optional (!usePulseAudio) "--without-pulseaudio";
+
+  doCheck = true;
+
+  postFixup = ''
+    moveToOutput share/doc $dev
+  '';
+
+  passthru.updateScript = ./update.sh;
+
+  meta = with lib; {
+    description = "Cross-platform C++ and C library to decode tracked music files into a raw PCM audio stream";
+    longDescription = ''
+      libopenmpt is a cross-platform C++ and C library to decode tracked music files (modules) into a raw PCM audio stream.
+      openmpt123 is a cross-platform command-line or terminal based module file player.
+      libopenmpt is based on the player code of the OpenMPT project.
+    '';
+    homepage = "https://lib.openmpt.org/libopenmpt/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/libraries/audio/libopenmpt/update.sh b/pkgs/development/libraries/audio/libopenmpt/update.sh
new file mode 100755
index 00000000000..2d4e5afac0b
--- /dev/null
+++ b/pkgs/development/libraries/audio/libopenmpt/update.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p common-updater-scripts curl xmlstarlet
+
+attr=libopenmpt
+
+set -eu -o pipefail
+
+# Get update notifications, remove updates for libopenmpt-modplug, find latest eligible & extract versions
+versions="$(
+  curl -s 'https://lib.openmpt.org/libopenmpt/feed.xml' |
+  xmlstarlet sel -N atom="http://www.w3.org/2005/Atom" -t -m /atom:feed/atom:entry -v atom:title -n |
+  grep -v 'libopenmpt-modplug' | head -n1 |
+  grep -Eo '([0-9][^,\s]+)' | tr '\n' ' '
+)"
+echo "Latest $attr versions: $versions"
+
+# Find a version that is > current version and not a rc
+# rc's have different download path and a full release will usually follow shortly
+currentVersion="$(nix-instantiate --eval -E "with import ./. {}; $attr.version" | tr -d '"')"
+echo "Current $attr version: $currentVersion"
+for version in $versions; do
+  (echo "$version" | grep -q 'rc') && continue
+  [ "$version" = "$(printf '%s\n%s' "$version" "$currentVersion" | sort -V | head -n1)" ] && continue
+
+  echo "Updating to $version. Please check if other versions qualify for backport to stable!"
+  update-source-version "$attr" "$version"
+  exit 0
+done
+
+echo "No version eligible for bump."
+exit 0
diff --git a/pkgs/development/libraries/audio/lilv/default.nix b/pkgs/development/libraries/audio/lilv/default.nix
index a29fda0ec2b..14b0d4c5e46 100644
--- a/pkgs/development/libraries/audio/lilv/default.nix
+++ b/pkgs/development/libraries/audio/lilv/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkg-config python3 wafHook ];
   buildInputs = [ serd sord sratom ];
   propagatedBuildInputs = [ lv2 ];
+  dontAddWafCrossFlags = true;
 
   passthru.tests = {
     inherit pipewire;
diff --git a/pkgs/development/libraries/audio/lv2/default.nix b/pkgs/development/libraries/audio/lv2/default.nix
index d0ef2e65c59..6371a52b4df 100644
--- a/pkgs/development/libraries/audio/lv2/default.nix
+++ b/pkgs/development/libraries/audio/lv2/default.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [
     pkg-config
     wafHook
+    python3
   ];
 
   buildInputs = [
@@ -35,6 +36,7 @@ stdenv.mkDerivation rec {
   ] ++ lib.optionals stdenv.isDarwin [
     "--lv2dir=${placeholder "out"}/lib/lv2"
   ];
+  dontAddWafCrossFlags = true;
 
   passthru.tests = {
     inherit pipewire;
diff --git a/pkgs/development/libraries/audio/sratom/default.nix b/pkgs/development/libraries/audio/sratom/default.nix
index 1a40d249fd5..67a66dbfe5a 100644
--- a/pkgs/development/libraries/audio/sratom/default.nix
+++ b/pkgs/development/libraries/audio/sratom/default.nix
@@ -11,6 +11,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkg-config wafHook python3 ];
   buildInputs = [ lv2 serd sord ];
+  dontAddWafCrossFlags = true;
 
   meta = with lib; {
     homepage = "http://drobilla.net/software/sratom";
diff --git a/pkgs/development/libraries/aws-c-sdkutils/default.nix b/pkgs/development/libraries/aws-c-sdkutils/default.nix
index f5b5dfaeebc..6fb04fbb3a2 100644
--- a/pkgs/development/libraries/aws-c-sdkutils/default.nix
+++ b/pkgs/development/libraries/aws-c-sdkutils/default.nix
@@ -6,13 +6,13 @@
 
 stdenv.mkDerivation rec {
   pname = "aws-c-sdkutils";
-  version = "0.1.1";
+  version = "0.1.2";
 
   src = fetchFromGitHub {
     owner = "awslabs";
     repo = "aws-c-sdkutils";
     rev = "v${version}";
-    sha256 = "sha256-jYeyNEoJsF67XQAkmC7oegnIRBRD3FXKf5wF/NCVb4o=";
+    sha256 = "sha256-G+ykP39EmI8BCeulTsZ/OSFKRzXVbEK0+mtJ3tugl5M=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/cutelyst/default.nix b/pkgs/development/libraries/cutelyst/default.nix
index 9f7d020feaf..d7fe4e92802 100644
--- a/pkgs/development/libraries/cutelyst/default.nix
+++ b/pkgs/development/libraries/cutelyst/default.nix
@@ -14,20 +14,28 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
-  buildInputs = [ qtbase libuuid libcap uwsgi grantlee pcre ];
+  buildInputs = [
+    qtbase
+    grantlee
+  ] ++ lib.optionals stdenv.isLinux [
+    libuuid
+    libcap
+    uwsgi
+    pcre
+  ];
 
   cmakeFlags = [
-    "-DPLUGIN_UWSGI=ON"
+    "-DPLUGIN_UWSGI=${if stdenv.isLinux then "ON" else "OFF"}" # Missing uwsgi symbols on Darwin
     "-DPLUGIN_STATICCOMPRESSED=ON"
     "-DPLUGIN_CSRFPROTECTION=ON"
     "-DPLUGIN_VIEW_GRANTLEE=ON"
   ];
 
-  preBuild = ''
+  preBuild = lib.optionalString stdenv.isLinux ''
     export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}`pwd`/Cutelyst:`pwd`/EventLoopEPoll"
   '';
 
-  postBuild = ''
+  postBuild = lib.optionalString stdenv.isLinux ''
     unset LD_LIBRARY_PATH
   '';
 
@@ -35,6 +43,7 @@ stdenv.mkDerivation rec {
     description = "C++ Web Framework built on top of Qt";
     homepage = "https://cutelyst.org/";
     license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
     maintainers = with maintainers; [ fpletz ];
   };
 }
diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix
index 5dfd5637002..7f906e19224 100644
--- a/pkgs/development/libraries/freetype/default.nix
+++ b/pkgs/development/libraries/freetype/default.nix
@@ -12,11 +12,11 @@
 
 stdenv.mkDerivation rec {
   pname = "freetype";
-  version = "2.11.1";
+  version = "2.12.0";
 
   src = fetchurl {
     url = "mirror://savannah/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "sha256-MzOufP2ohCnJenrmO30BqzmAdsO2cYLpYOVoQFDyxcg=";
+    sha256 = "sha256-71wzaqzBoHn/kmLWMI1sKgZt1NKpBTAcSt2ps1Q5kDM=";
   };
 
   propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index 386130cc622..97da2a7c3be 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -69,6 +69,12 @@ stdenv.mkDerivation rec {
     ./glib-appinfo-watch.patch
     ./schema-override-variable.patch
 
+    # Add support for the GNOME’s default terminal emulator.
+    # https://gitlab.gnome.org/GNOME/glib/-/issues/2618
+    ./gnome-console-support.patch
+    # Do the same for Pantheon’s terminal emulator.
+    ./elementary-terminal-support.patch
+
     # GLib contains many binaries used for different purposes;
     # we will install them to different outputs:
     # 1. Tools for desktop environment ($bin)
diff --git a/pkgs/development/libraries/glib/elementary-terminal-support.patch b/pkgs/development/libraries/glib/elementary-terminal-support.patch
new file mode 100644
index 00000000000..0b8c8a70871
--- /dev/null
+++ b/pkgs/development/libraries/glib/elementary-terminal-support.patch
@@ -0,0 +1,16 @@
+diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
+index a441bfec9..6bcd3e690 100644
+--- a/gio/gdesktopappinfo.c
++++ b/gio/gdesktopappinfo.c
+@@ -2678,6 +2678,11 @@ prepend_terminal_to_vector (int    *argc,
+             if (check != NULL)
+               pass_cmd_as_single_arg = TRUE;
+           }
++          if (check == NULL) {
++            check = g_find_program_in_path ("io.elementary.terminal");
++            if (check != NULL)
++              pass_cmd_as_single_arg = TRUE;
++          }
+           if (check == NULL)
+             check = g_find_program_in_path ("tilix");
+           if (check == NULL)
diff --git a/pkgs/development/libraries/glib/gnome-console-support.patch b/pkgs/development/libraries/glib/gnome-console-support.patch
new file mode 100644
index 00000000000..7f6894a5cec
--- /dev/null
+++ b/pkgs/development/libraries/glib/gnome-console-support.patch
@@ -0,0 +1,55 @@
+diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
+index 60d6debb2..a441bfec9 100644
+--- a/gio/gdesktopappinfo.c
++++ b/gio/gdesktopappinfo.c
+@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
+   int i, j;
+   char **term_argv = NULL;
+   int term_argc = 0;
++  gboolean pass_cmd_as_single_arg = FALSE;
+   char *check;
+   char **the_argv;
+ 
+@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
+         }
+       else
+         {
++          if (check == NULL) {
++            check = g_find_program_in_path ("kgx");
++            if (check != NULL)
++              pass_cmd_as_single_arg = TRUE;
++          }
+           if (check == NULL)
+             check = g_find_program_in_path ("tilix");
+           if (check == NULL)
+@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
+         }
+     }
+ 
+-  real_argc = term_argc + *argc;
++  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
+   real_argv = g_new (char *, real_argc + 1);
+ 
+   for (i = 0; i < term_argc; i++)
+     real_argv[i] = term_argv[i];
+ 
+-  for (j = 0; j < *argc; j++, i++)
+-    real_argv[i] = (char *)the_argv[j];
++  if (pass_cmd_as_single_arg) {
++    char **quoted_argv = g_new (char *, *argc + 1);
++
++    for (j = 0; j < *argc; j++) {
++      quoted_argv[j] = g_shell_quote (the_argv[j]);
++      g_free (the_argv[j]);
++    }
++    quoted_argv[j] = NULL;
++
++    real_argv[i++] = g_strjoinv (" ", quoted_argv);
++    g_strfreev (quoted_argv);
++  } else {
++    for (j = 0; j < *argc; j++, i++)
++      real_argv[i] = (char *)the_argv[j];
++  }
+ 
+   real_argv[i] = NULL;
+ 
diff --git a/pkgs/development/libraries/glm/default.nix b/pkgs/development/libraries/glm/default.nix
index 81b0b47d5ba..9957df4cdd4 100644
--- a/pkgs/development/libraries/glm/default.nix
+++ b/pkgs/development/libraries/glm/default.nix
@@ -28,6 +28,9 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake ];
 
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823
+  NIX_CFLAGS_COMPILE = "-fno-ipa-modref";
+
   cmakeFlags = [
     "-DBUILD_SHARED_LIBS=OFF"
     "-DBUILD_STATIC_LIBS=OFF"
diff --git a/pkgs/development/libraries/glog/default.nix b/pkgs/development/libraries/glog/default.nix
index 72758a1b3e7..98ae294c480 100644
--- a/pkgs/development/libraries/glog/default.nix
+++ b/pkgs/development/libraries/glog/default.nix
@@ -1,27 +1,16 @@
-{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, gflags, perl }:
+{ stdenv, lib, fetchFromGitHub, cmake, gflags, perl }:
 
 stdenv.mkDerivation rec {
   pname = "glog";
-  version = "0.5.0";
+  version = "0.6.0";
 
   src = fetchFromGitHub {
     owner = "google";
     repo = "glog";
     rev = "v${version}";
-    sha256 = "17014q25c99qyis6l3fwxidw6222bb269fdlr74gn7pzmzg4lvg3";
+    sha256 = "sha256-xqRp9vaauBkKz2CXbh/Z4TWqhaUtqfbsSlbYZR/kW9s=";
   };
 
-  patches = [
-    # Fix duplicate-concatenated nix store path in cmake file, see:
-    # https://github.com/NixOS/nixpkgs/pull/144561#issuecomment-960296043
-    # TODO: Remove when https://github.com/google/glog/pull/733 is merged and available.
-    (fetchpatch {
-      name = "glog-cmake-Fix-incorrect-relative-path-concatenation.patch";
-      url = "https://github.com/google/glog/pull/733/commits/57c636c02784f909e4b5d3c2f0ecbdbb47097266.patch";
-      sha256 = "1py93gkzmcyi2ypcwyj3nri210z8fmlaif51yflzmrrv507zd7bi";
-    })
-  ];
-
   nativeBuildInputs = [ cmake ];
 
   propagatedBuildInputs = [ gflags ];
@@ -35,6 +24,8 @@ stdenv.mkDerivation rec {
 
   # TODO: Re-enable Darwin tests once we're on a release that has https://github.com/google/glog/issues/709#issuecomment-960381653 fixed
   doCheck = !stdenv.isDarwin;
+  # There are some non-thread safe tests that can fail
+  enableParallelChecking = false;
   checkInputs = [ perl ];
 
   meta = with lib; {
diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix
index 37c2a1a4413..f55e2c2f6e4 100644
--- a/pkgs/development/libraries/grpc/default.nix
+++ b/pkgs/development/libraries/grpc/default.nix
@@ -20,7 +20,7 @@
 
 stdenv.mkDerivation rec {
   pname = "grpc";
-  version = "1.44.0"; # N.B: if you change this, please update:
+  version = "1.45.2"; # N.B: if you change this, please update:
     # pythonPackages.grpcio-tools
     # pythonPackages.grpcio-status
 
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
     owner = "grpc";
     repo = "grpc";
     rev = "v${version}";
-    sha256 = "sha256-pG8RtAJJCLnxm+3hW1YsikyeNr9pjIRANeYhDJfTPbo=";
+    sha256 = "sha256-l2r1NdbfwViXfLcwbfUgLueqfAVnLzI+gdEarlkIqkI=";
     fetchSubmodules = true;
   };
 
diff --git a/pkgs/development/libraries/gsettings-desktop-schemas/default.nix b/pkgs/development/libraries/gsettings-desktop-schemas/default.nix
index 085544a3612..acc143cd556 100644
--- a/pkgs/development/libraries/gsettings-desktop-schemas/default.nix
+++ b/pkgs/development/libraries/gsettings-desktop-schemas/default.nix
@@ -39,14 +39,20 @@ stdenv.mkDerivation rec {
     patchShebangs build-aux/meson/post-install.py
   '';
 
-  # meson installs the schemas to share/glib-2.0/schemas
-  # We add the override file there too so it will be compiled and later moved by
-  # glib's setup hook.
   preInstall = ''
+    # Meson installs the schemas to share/glib-2.0/schemas
+    # We add the override file there too so it will be compiled and later moved by
+    # glib's setup hook.
     mkdir -p $out/share/glib-2.0/schemas
     cat - > $out/share/glib-2.0/schemas/remove-backgrounds.gschema.override <<- EOF
+      # These paths are supposed to refer to gnome-backgrounds
+      # but since we do not use FHS, they are broken.
+      # And we do not want to hardcode the correct paths
+      # since then every GTK app would pull in gnome-backgrounds.
+      # Let’s just override the broken paths so that people are not confused.
       [org.gnome.desktop.background]
       picture-uri='''
+      picture-uri-dark='''
 
       [org.gnome.desktop.screensaver]
       picture-uri='''
diff --git a/pkgs/development/libraries/hwloc/default.nix b/pkgs/development/libraries/hwloc/default.nix
index a1119f4be2c..1544bb946ea 100644
--- a/pkgs/development/libraries/hwloc/default.nix
+++ b/pkgs/development/libraries/hwloc/default.nix
@@ -8,11 +8,11 @@ with lib;
 
 stdenv.mkDerivation rec {
   pname = "hwloc";
-  version = "2.7.0";
+  version = "2.7.1";
 
   src = fetchurl {
     url = "https://www.open-mpi.org/software/hwloc/v${versions.majorMinor version}/downloads/hwloc-${version}.tar.bz2";
-    sha256 = "1q440fwvhnxz6j8k5bn3bxj86b3lzbr8fgib78l4iq6gxd9yx302";
+    sha256 = "sha256-DU4dNsOnLF1hkBv9R3M39aTH4Kl12lcWUjfQDjXvUo0=";
   };
 
   configureFlags = [
diff --git a/pkgs/development/libraries/kde-frameworks/fetch.sh b/pkgs/development/libraries/kde-frameworks/fetch.sh
index 1e2e36d6784..50a0489529e 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.92/ -A '*.tar.xz' )
+WGET_ARGS=( https://download.kde.org/stable/frameworks/5.93/ -A '*.tar.xz' )
diff --git a/pkgs/development/libraries/kde-frameworks/srcs.nix b/pkgs/development/libraries/kde-frameworks/srcs.nix
index 1cddd857dda..457ae06bb65 100644
--- a/pkgs/development/libraries/kde-frameworks/srcs.nix
+++ b/pkgs/development/libraries/kde-frameworks/srcs.nix
@@ -4,667 +4,667 @@
 
 {
   attica = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/attica-5.92.0.tar.xz";
-      sha256 = "0cy9dd8kazfkhas87bxjj5smmzay3gvkjwsmy6gvkfxc6rvpqr5z";
-      name = "attica-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/attica-5.93.0.tar.xz";
+      sha256 = "1qcj0n00ma6lyhbdk5dx2a1iwjqwzkbqvrwdhv8hgsqvj44q1hc1";
+      name = "attica-5.93.0.tar.xz";
     };
   };
   baloo = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/baloo-5.92.0.tar.xz";
-      sha256 = "0xd4a0p22gjm523ymlyd5nfgp8z3ayb0nq6a04h5py507mc70d98";
-      name = "baloo-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/baloo-5.93.0.tar.xz";
+      sha256 = "1kfmmsinpnsh169dw8ycl9cavw4n7pfwx4davgfx12nvzmlibl95";
+      name = "baloo-5.93.0.tar.xz";
     };
   };
   bluez-qt = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/bluez-qt-5.92.0.tar.xz";
-      sha256 = "1dlasb39kqrcql6hq0sl74ax3n5bdcy3pkhvc9vwpf9dxn1j93gm";
-      name = "bluez-qt-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/bluez-qt-5.93.0.tar.xz";
+      sha256 = "091n2bcvzczn28zkry5yxfrg0zpx78y2la3rhdybb4bplgm88pdb";
+      name = "bluez-qt-5.93.0.tar.xz";
     };
   };
   breeze-icons = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/breeze-icons-5.92.0.tar.xz";
-      sha256 = "0rj30r52ca6njx00gmmni4k70yn8873ihxfbc66lklwzk1irdq29";
-      name = "breeze-icons-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/breeze-icons-5.93.0.tar.xz";
+      sha256 = "1rh39pgyhz73lly7n9sp1z16z6isw2bbx284d2ilb9lanjkdyrs3";
+      name = "breeze-icons-5.93.0.tar.xz";
     };
   };
   extra-cmake-modules = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/extra-cmake-modules-5.92.0.tar.xz";
-      sha256 = "1vq3sd4qfr4hjcgqyfpykcz5wyagbfvrd4p24pdki1zjqn5j76pq";
-      name = "extra-cmake-modules-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/extra-cmake-modules-5.93.0.tar.xz";
+      sha256 = "088b93ahiw00msn20iibp8642p2vy5zd8wb99vvwayv425xylg89";
+      name = "extra-cmake-modules-5.93.0.tar.xz";
     };
   };
   frameworkintegration = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/frameworkintegration-5.92.0.tar.xz";
-      sha256 = "0pgcwfxxzvfvqyjfgqzsllzfy9il4y8xr8dzdyjmd5vccpvgd3mx";
-      name = "frameworkintegration-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/frameworkintegration-5.93.0.tar.xz";
+      sha256 = "19m2i09r7hzqj8dkmxdkj7lh5jilm332i7177aadm6v7xv4m8vhm";
+      name = "frameworkintegration-5.93.0.tar.xz";
     };
   };
   kactivities = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kactivities-5.92.0.tar.xz";
-      sha256 = "1kfvg23gdl4k6azs6700j8i8ncl8c7rrc70w1i2xhphz27ybc1pw";
-      name = "kactivities-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kactivities-5.93.0.tar.xz";
+      sha256 = "0hv8y6i03ib89ivmpfg4ifypnnia73la6ljp5frs3fykh91j0szb";
+      name = "kactivities-5.93.0.tar.xz";
     };
   };
   kactivities-stats = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kactivities-stats-5.92.0.tar.xz";
-      sha256 = "0lgp7zxgjmjm02x4mydlv6ivmlxqjkklav5vfwgjgf6v1qp161i2";
-      name = "kactivities-stats-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kactivities-stats-5.93.0.tar.xz";
+      sha256 = "1a03xznriszw12jd0a2c7snilzd23nbgglx096isw1cf49r9h1pi";
+      name = "kactivities-stats-5.93.0.tar.xz";
     };
   };
   kapidox = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kapidox-5.92.0.tar.xz";
-      sha256 = "0vd5k4wmmawbhyy3cxj0gjidf4haghwbsbly9yr3zg3qb3g02ljg";
-      name = "kapidox-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kapidox-5.93.0.tar.xz";
+      sha256 = "0nqxz2jg51kyis07k2jqk4ni1wly6zx8mv81lgqfhb9l6mm34a22";
+      name = "kapidox-5.93.0.tar.xz";
     };
   };
   karchive = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/karchive-5.92.0.tar.xz";
-      sha256 = "1blzm6vf8kpflam4671r1y4svrsb79bglln7aia7baqh7a6a4xjh";
-      name = "karchive-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/karchive-5.93.0.tar.xz";
+      sha256 = "1yy7jibbjpi67d6aihz5kcq4ynq8c9j9ds5rz2vp00l682l2dqv1";
+      name = "karchive-5.93.0.tar.xz";
     };
   };
   kauth = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kauth-5.92.0.tar.xz";
-      sha256 = "0a27z9xr5ccxfcxmx93vs4hgxc388nsd9ac906mdh475ivv4p0j4";
-      name = "kauth-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kauth-5.93.0.tar.xz";
+      sha256 = "0v6s79n9bd75dzncz9rmp449j82945gralmcycsihqyzpxw00n1l";
+      name = "kauth-5.93.0.tar.xz";
     };
   };
   kbookmarks = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kbookmarks-5.92.0.tar.xz";
-      sha256 = "0hym3558xnp3h7q8kf1ljcy65r3g37mcmqb1ll3nxd912rv4wl4r";
-      name = "kbookmarks-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kbookmarks-5.93.0.tar.xz";
+      sha256 = "0gw6zl87xhm3k2qdmd6993xyj8i0y2z5yvlwsnq91glrzyazgvry";
+      name = "kbookmarks-5.93.0.tar.xz";
     };
   };
   kcalendarcore = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kcalendarcore-5.92.0.tar.xz";
-      sha256 = "0fhbas8i7i08z4x32yq49admiz8vk4h9vwgkh7qy14lbzf6ydwkg";
-      name = "kcalendarcore-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kcalendarcore-5.93.0.tar.xz";
+      sha256 = "0gqxbj3i0w3kfyyd6n9n3dxgmx2nwfh578srxnmy1z1r2wabq28n";
+      name = "kcalendarcore-5.93.0.tar.xz";
     };
   };
   kcmutils = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kcmutils-5.92.0.tar.xz";
-      sha256 = "0fldpkhq4ysma4m6qylr7kqvxw0rb11x5abz5921bhl5zicfcjfx";
-      name = "kcmutils-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kcmutils-5.93.0.tar.xz";
+      sha256 = "0v8dsfrbba1pv8vrisr3pbyw8yanfl95i5jxqbbrzmpznxwgji8l";
+      name = "kcmutils-5.93.0.tar.xz";
     };
   };
   kcodecs = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kcodecs-5.92.0.tar.xz";
-      sha256 = "0xfjc0diljx081as3b500awybay9l3sfl59792h5z3clafjbgrfn";
-      name = "kcodecs-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kcodecs-5.93.0.tar.xz";
+      sha256 = "12r8n8sq5yav62viddhgm1bjlxv1a0jrndmr1a52y55kma5mrz0f";
+      name = "kcodecs-5.93.0.tar.xz";
     };
   };
   kcompletion = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kcompletion-5.92.0.tar.xz";
-      sha256 = "1svwvj9jxkgcddfdila10ggdmsabs22vnhf9k7isp2zfdif55w88";
-      name = "kcompletion-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kcompletion-5.93.0.tar.xz";
+      sha256 = "177vx3ck4yyc38b3kd4m5sm55hj15ybiwx2jm2f62nw7x1ar733z";
+      name = "kcompletion-5.93.0.tar.xz";
     };
   };
   kconfig = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kconfig-5.92.0.tar.xz";
-      sha256 = "08q57f3wxj22d485s0ph53p44yrkjb376817470a0s43p10vc0bq";
-      name = "kconfig-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kconfig-5.93.0.tar.xz";
+      sha256 = "0vn009nvg3s540avq88fjr267j22lvjnmm6n5p11g442shh7r1bi";
+      name = "kconfig-5.93.0.tar.xz";
     };
   };
   kconfigwidgets = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kconfigwidgets-5.92.0.tar.xz";
-      sha256 = "0ji799xd45lpnd70a9bizicfz2bsmlxq6r0fqgn0ghwsbp9ywna2";
-      name = "kconfigwidgets-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kconfigwidgets-5.93.0.tar.xz";
+      sha256 = "1fr4kwkvx5jz9xb3qvk84sh6ma2x5n852xc7ypb6vbby47rf066v";
+      name = "kconfigwidgets-5.93.0.tar.xz";
     };
   };
   kcontacts = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kcontacts-5.92.0.tar.xz";
-      sha256 = "1kik4pvy8snvj6rsc9pfbcpc8rrcn0k4pjj1h9m221zma1p00xhj";
-      name = "kcontacts-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kcontacts-5.93.0.tar.xz";
+      sha256 = "0xacc3yi169hdgf1x82rxb72nnzccmhspmz4v6493afgdin8qz2x";
+      name = "kcontacts-5.93.0.tar.xz";
     };
   };
   kcoreaddons = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kcoreaddons-5.92.0.tar.xz";
-      sha256 = "0rv63byrxwf9zdpx347rxybpk2j9yyjqm323j60vb8ja6a7p2pyz";
-      name = "kcoreaddons-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kcoreaddons-5.93.0.tar.xz";
+      sha256 = "0hzhvf2mf53pyhfbfg4pczb20k3l0hv6y2kp0vfkmskxz652f2lj";
+      name = "kcoreaddons-5.93.0.tar.xz";
     };
   };
   kcrash = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kcrash-5.92.0.tar.xz";
-      sha256 = "1ir64mlv49vh3vz81r22q3sx0fichiwjr8qw5jf5vx96a1dn1icv";
-      name = "kcrash-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kcrash-5.93.0.tar.xz";
+      sha256 = "1midk5b5bmlv4qkjjn2wllmcwmdv0q33jad9yhp7aasbjb3ddy1g";
+      name = "kcrash-5.93.0.tar.xz";
     };
   };
   kdav = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kdav-5.92.0.tar.xz";
-      sha256 = "1i5i6bkjairz1slk3fhrxd3s8wkcdaqg55jg2bv86kqh7d3nrcgk";
-      name = "kdav-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kdav-5.93.0.tar.xz";
+      sha256 = "0s5d6h4p496y6fhrcm1gb10y15bsa0sidsljhh7v58gh400x9lx7";
+      name = "kdav-5.93.0.tar.xz";
     };
   };
   kdbusaddons = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kdbusaddons-5.92.0.tar.xz";
-      sha256 = "0m5fd396xi3dhc45zwxjrrxr2bhlrc8g8m7n17jq1ylzqhyg60vw";
-      name = "kdbusaddons-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kdbusaddons-5.93.0.tar.xz";
+      sha256 = "1n9ah83a0hg7vr5qamf1amvs1wwk2gjm9x4zhkqpmfb53r878b6c";
+      name = "kdbusaddons-5.93.0.tar.xz";
     };
   };
   kdeclarative = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kdeclarative-5.92.0.tar.xz";
-      sha256 = "1cymh8clcajk9cl6r443cpqk6vmp4x12ngc6wgp08z53zrvlv5py";
-      name = "kdeclarative-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kdeclarative-5.93.0.tar.xz";
+      sha256 = "0rsh68nqjy5lk8v2irvaj53qrhp726f9rlj2gkc8k3dajg3lba88";
+      name = "kdeclarative-5.93.0.tar.xz";
     };
   };
   kded = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kded-5.92.0.tar.xz";
-      sha256 = "0v0fak84nw4lb4qc1irb9sn5nh5k7qrhnfav5smn3cvchldm6dc3";
-      name = "kded-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kded-5.93.0.tar.xz";
+      sha256 = "1psrh4vqa25k4lpmd7rx1bkc4nzci8rciax15kxgijnc444k34hr";
+      name = "kded-5.93.0.tar.xz";
     };
   };
   kdelibs4support = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/portingAids/kdelibs4support-5.92.0.tar.xz";
-      sha256 = "1q7d0i09klkhsiwq7i91ypxakdr5b841zdb60q7yjzcdmn25wbi9";
-      name = "kdelibs4support-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/portingAids/kdelibs4support-5.93.0.tar.xz";
+      sha256 = "0z1p0wmj2y318r5d8wgab2p4c2yi3vyrlkzj60lw3avbrj01sgka";
+      name = "kdelibs4support-5.93.0.tar.xz";
     };
   };
   kdesignerplugin = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/portingAids/kdesignerplugin-5.92.0.tar.xz";
-      sha256 = "0kial8k6qr39871v103952d0qcs0hm25y6k0vdg4y8ns8nrmjs06";
-      name = "kdesignerplugin-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/portingAids/kdesignerplugin-5.93.0.tar.xz";
+      sha256 = "1bwaca721dzydwrky64p7h4z0bigvajpb7wg5mj8k2ym3vyb96pi";
+      name = "kdesignerplugin-5.93.0.tar.xz";
     };
   };
   kdesu = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kdesu-5.92.0.tar.xz";
-      sha256 = "1yjyz4v0gn7ys7zy4ymn47zggxxmgd37big005c6g85dm63xr1s6";
-      name = "kdesu-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kdesu-5.93.0.tar.xz";
+      sha256 = "1gwd2gc98s0v8mlj7iqr1l7wljdx9rmzpcvaa75f5w2ri6d9s0kz";
+      name = "kdesu-5.93.0.tar.xz";
     };
   };
   kdewebkit = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/portingAids/kdewebkit-5.92.0.tar.xz";
-      sha256 = "1dni134qbs5yff7zgk4n3sfjwblzarblg16rj35l59l6mly7f2jd";
-      name = "kdewebkit-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/portingAids/kdewebkit-5.93.0.tar.xz";
+      sha256 = "0m9gzm8a4gl1ycz2l7x8g61461x4n7vhph248bblsgbnc1b9pzm2";
+      name = "kdewebkit-5.93.0.tar.xz";
     };
   };
   kdnssd = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kdnssd-5.92.0.tar.xz";
-      sha256 = "1m24v36pphy591z1xp90i0yxv70c62iinvy4gspdi15bz94sydjz";
-      name = "kdnssd-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kdnssd-5.93.0.tar.xz";
+      sha256 = "0fwh5wzx1bp9ndhd8l1gjp61maw47jnzd1i9pfjpx1mm2i7kd5yw";
+      name = "kdnssd-5.93.0.tar.xz";
     };
   };
   kdoctools = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kdoctools-5.92.0.tar.xz";
-      sha256 = "0w08fa8rl0dhp59lv6xcvypahl6pxda6cr0vv0f0xv0xp6wax8w6";
-      name = "kdoctools-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kdoctools-5.93.0.tar.xz";
+      sha256 = "0p2xnq83c7v5llh3i4a379l68qbrjccw99959swnfdn5a7qkzs15";
+      name = "kdoctools-5.93.0.tar.xz";
     };
   };
   kemoticons = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kemoticons-5.92.0.tar.xz";
-      sha256 = "01wzy3mwfz4sqpq8i1hfbbymajp55axryiaqkfr9r2n1844y7kzx";
-      name = "kemoticons-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kemoticons-5.93.0.tar.xz";
+      sha256 = "0474bb6h9s3ks3z8pankr7zxpjha1n88bapxm01z2p4kfkrkvjl3";
+      name = "kemoticons-5.93.0.tar.xz";
     };
   };
   kfilemetadata = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kfilemetadata-5.92.0.tar.xz";
-      sha256 = "1khmx9kd1jhd6j7rmfww3vmyjz2pg36mpsdn0bc77kwl21ax696n";
-      name = "kfilemetadata-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kfilemetadata-5.93.0.tar.xz";
+      sha256 = "05m8fvk6j0zdg6x64hy8bslqhdrx4jh8l8rnbpjgcs7hlmqw059h";
+      name = "kfilemetadata-5.93.0.tar.xz";
     };
   };
   kglobalaccel = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kglobalaccel-5.92.0.tar.xz";
-      sha256 = "0lhlb274pvv7rpkcsccqbv81bh8iklanp29g0k28wrv3kckiwyxy";
-      name = "kglobalaccel-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kglobalaccel-5.93.0.tar.xz";
+      sha256 = "04mpjzpfyrviyva3mrgxamsnkhglz48vfp65k4nn7ir9n3rbh1n8";
+      name = "kglobalaccel-5.93.0.tar.xz";
     };
   };
   kguiaddons = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kguiaddons-5.92.0.tar.xz";
-      sha256 = "0pyzgyrglvz2m11b82rycs9fbmzpfgzabnjkvsq00agjcnjparqg";
-      name = "kguiaddons-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kguiaddons-5.93.0.tar.xz";
+      sha256 = "02pl99a7dbxc3hmpp0l76x4v4l3yv1pzsm61hv5spl8b2j967wi7";
+      name = "kguiaddons-5.93.0.tar.xz";
     };
   };
   kholidays = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kholidays-5.92.0.tar.xz";
-      sha256 = "042bdg46hkpg66vdp9gk13wck5yhks8s6i9qz9xzh2mikz285lqf";
-      name = "kholidays-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kholidays-5.93.0.tar.xz";
+      sha256 = "0hdq0ikwr4dd1il3lszkh0ygkvddfy3ld02d5hxyf7jh4fw1yjhd";
+      name = "kholidays-5.93.0.tar.xz";
     };
   };
   khtml = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/portingAids/khtml-5.92.0.tar.xz";
-      sha256 = "06hpjcm5yrfj1056vvv9dklccd0a1y09zm8ch4a5d8l2lfgdg8ci";
-      name = "khtml-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/portingAids/khtml-5.93.0.tar.xz";
+      sha256 = "0jv1hqpidlfsvvcfvxvvkzyba48cw7l27ixxwac8n96p5rsvdgri";
+      name = "khtml-5.93.0.tar.xz";
     };
   };
   ki18n = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/ki18n-5.92.0.tar.xz";
-      sha256 = "0xsp77iaxf72i0ri3pb6x5rrdz3cv8rxcaqcrynisvsmx7l35005";
-      name = "ki18n-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/ki18n-5.93.0.tar.xz";
+      sha256 = "0fbk4gjwvzd7vw4m9mngywagdk2aq66v5bz1vw98dwbms4058w62";
+      name = "ki18n-5.93.0.tar.xz";
     };
   };
   kiconthemes = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kiconthemes-5.92.0.tar.xz";
-      sha256 = "08yb6f980p620dfklfiyp83lcsqw4dds9qwzd6xpn2mzz07p2a11";
-      name = "kiconthemes-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kiconthemes-5.93.0.tar.xz";
+      sha256 = "1d72k0ssnqwkkzk3jfnx1n0w1h7xvf2a50dx9j5j46jg9yrwbxvm";
+      name = "kiconthemes-5.93.0.tar.xz";
     };
   };
   kidletime = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kidletime-5.92.0.tar.xz";
-      sha256 = "1mw0jarqv2ypxwgf4qaxqlw0sijw0is36sasrfz8grbykwi18bz1";
-      name = "kidletime-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kidletime-5.93.0.tar.xz";
+      sha256 = "1ndpnyyfx3ym5gdbin96g0qmdpl36il0z9jvmqpbdbpsw7gib4sd";
+      name = "kidletime-5.93.0.tar.xz";
     };
   };
   kimageformats = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kimageformats-5.92.0.tar.xz";
-      sha256 = "0sd3xhqh3zgy4jq8fc1llqjrxizylbsz58njz2dxqjas2a4rj16f";
-      name = "kimageformats-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kimageformats-5.93.0.tar.xz";
+      sha256 = "1l67vlfqwiqj9pvda054wa0wshzjh2wrc174w1wmkybswnfyvc0m";
+      name = "kimageformats-5.93.0.tar.xz";
     };
   };
   kinit = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kinit-5.92.0.tar.xz";
-      sha256 = "1kpkqnq9krxlzhripwjhw3n55p5sxqsvj6nb2pqb9m0ppw97jlfb";
-      name = "kinit-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kinit-5.93.0.tar.xz";
+      sha256 = "16743hyyycld1mdpa1hkhjmsr1f5pq3skiyq9rx3n5ihbfys6dnv";
+      name = "kinit-5.93.0.tar.xz";
     };
   };
   kio = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kio-5.92.0.tar.xz";
-      sha256 = "1cscsjb2v0zygzazfhcflc3gb5ny1a79g3i6glyzw6ppj2c3yhyl";
-      name = "kio-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kio-5.93.0.tar.xz";
+      sha256 = "0i2cbngyy3malcl9sv5bj8di6cgq1m17qjn88y8fpjayzfya946j";
+      name = "kio-5.93.0.tar.xz";
     };
   };
   kirigami2 = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kirigami2-5.92.0.tar.xz";
-      sha256 = "0p1x40p38pr9rvzwil57asgsaa95qpjqi9npwv4pgibhxacgznha";
-      name = "kirigami2-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kirigami2-5.93.0.tar.xz";
+      sha256 = "13xb8zfnxcps64v74scn76n8hsccirc9hin9knp12q3pxcjaihm7";
+      name = "kirigami2-5.93.0.tar.xz";
     };
   };
   kitemmodels = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kitemmodels-5.92.0.tar.xz";
-      sha256 = "16z8m11cyrapf6m56gmpjmvcgan7s50si8rl1cbbid02src7yp76";
-      name = "kitemmodels-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kitemmodels-5.93.0.tar.xz";
+      sha256 = "0ns8y2lw74lydnnys081z8qlz9dyim7f1ay5aayg2dxcja5r3fav";
+      name = "kitemmodels-5.93.0.tar.xz";
     };
   };
   kitemviews = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kitemviews-5.92.0.tar.xz";
-      sha256 = "1ml6i1km22xsprldkzmngfh9xs5vdhlfvc6f7aq5hx9q5114v2q5";
-      name = "kitemviews-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kitemviews-5.93.0.tar.xz";
+      sha256 = "1gsswmqpv61byzwkzldgx829a6llpcz8fnb8dz62hnvr7gn1vw4k";
+      name = "kitemviews-5.93.0.tar.xz";
     };
   };
   kjobwidgets = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kjobwidgets-5.92.0.tar.xz";
-      sha256 = "09l5zgr5mn29v410ng5rccdg2bki9r6cb8y2lrijzgfxfxpvj96z";
-      name = "kjobwidgets-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kjobwidgets-5.93.0.tar.xz";
+      sha256 = "1yrrghkdqym0sq19pww57fz44bhp2jvb45xk3hmb79bggms9ni32";
+      name = "kjobwidgets-5.93.0.tar.xz";
     };
   };
   kjs = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/portingAids/kjs-5.92.0.tar.xz";
-      sha256 = "067ilsm78x03kf5fs2xmlasvy2712k0xrsa404g2zj81fm92s1q4";
-      name = "kjs-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/portingAids/kjs-5.93.0.tar.xz";
+      sha256 = "0hh9z6xjqx0nxxpif4gmhjddls6cp37zngjxi565cx97kkg03al5";
+      name = "kjs-5.93.0.tar.xz";
     };
   };
   kjsembed = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/portingAids/kjsembed-5.92.0.tar.xz";
-      sha256 = "0db0r8v0bhp3razwyvmvk9r4psl14vgn23c4cm2q1b5pl0w6bhnp";
-      name = "kjsembed-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/portingAids/kjsembed-5.93.0.tar.xz";
+      sha256 = "096lh47xr4xjkdg4dnpkj1qflfz5zfqhkj9wazmjd41z1fzx6mgs";
+      name = "kjsembed-5.93.0.tar.xz";
     };
   };
   kmediaplayer = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/portingAids/kmediaplayer-5.92.0.tar.xz";
-      sha256 = "19lpib2wj91w8shsf9056nwi46qja8nh96hj164ydqlkslpfnf7y";
-      name = "kmediaplayer-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/portingAids/kmediaplayer-5.93.0.tar.xz";
+      sha256 = "02l3fhg73hqzgr5pin74zl6q7lv2y3pr49w128hsz8zyn2ssza5d";
+      name = "kmediaplayer-5.93.0.tar.xz";
     };
   };
   knewstuff = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/knewstuff-5.92.0.tar.xz";
-      sha256 = "0gvclv1a6xyrqa24svb56kp9zf2wi98as3q30lnwf0bpbpjsw52b";
-      name = "knewstuff-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/knewstuff-5.93.0.tar.xz";
+      sha256 = "0nappdgg7lw8grhkb5bndnvkcc54gvvhf47zyrhmzh04dki4ip1a";
+      name = "knewstuff-5.93.0.tar.xz";
     };
   };
   knotifications = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/knotifications-5.92.0.tar.xz";
-      sha256 = "1dwlx8w810l0cvy72mj52saf4x7i9p3xpqpjx4chy54n7mg0jklc";
-      name = "knotifications-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/knotifications-5.93.0.tar.xz";
+      sha256 = "0jysjrkpjayqlkazaf1xg4r7rr2kiph0zdx32bidg0aqwlgin6gy";
+      name = "knotifications-5.93.0.tar.xz";
     };
   };
   knotifyconfig = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/knotifyconfig-5.92.0.tar.xz";
-      sha256 = "0fii74r0ap3n08lp9kj7pki0msqjsia2jnmavyps51kq37im5x7p";
-      name = "knotifyconfig-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/knotifyconfig-5.93.0.tar.xz";
+      sha256 = "1k8rcrcfxzjrdvi5khlvj1mrslmby217n06dclclam8mcdkf37fc";
+      name = "knotifyconfig-5.93.0.tar.xz";
     };
   };
   kpackage = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kpackage-5.92.0.tar.xz";
-      sha256 = "1av6v0629a8yi0wpl7xgyd0gsn5gi228abdlvbk4dzrx9vxpa7rn";
-      name = "kpackage-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kpackage-5.93.0.tar.xz";
+      sha256 = "1kf55v26fbqh4whd5chvnl8j54jhlqx2i4wxj6wldxqwxpbfrrld";
+      name = "kpackage-5.93.0.tar.xz";
     };
   };
   kparts = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kparts-5.92.0.tar.xz";
-      sha256 = "061kzss4b0bw67j3mc8h36mbaji077k3alk2ghcir7qix6r1hkh9";
-      name = "kparts-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kparts-5.93.0.tar.xz";
+      sha256 = "0x8nrnxrh34bipp0pvr0qx86r9ysrrmjv92gj192y6n79ikfk268";
+      name = "kparts-5.93.0.tar.xz";
     };
   };
   kpeople = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kpeople-5.92.0.tar.xz";
-      sha256 = "0wf555pqiannxb115mlbl43ds1365im95vadsbzv1gdz668p44xk";
-      name = "kpeople-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kpeople-5.93.0.tar.xz";
+      sha256 = "0wgk96xyhig8psh3byic5qqp2g58krb1il0nnbbvsapsh9ljdqfk";
+      name = "kpeople-5.93.0.tar.xz";
     };
   };
   kplotting = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kplotting-5.92.0.tar.xz";
-      sha256 = "1l8y0xlwjyv1l4g0mag4bgf906jc654ygky1bribzay4wki66pf9";
-      name = "kplotting-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kplotting-5.93.0.tar.xz";
+      sha256 = "0vd2nsb60kbk8iy8via5rvizdbwbch86madnzxcm5x8k89linvaq";
+      name = "kplotting-5.93.0.tar.xz";
     };
   };
   kpty = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kpty-5.92.0.tar.xz";
-      sha256 = "0lp0bqlg1i0a5vl6gvvkngbsha8ab38z6b3sjvpmk83vixgsq7fb";
-      name = "kpty-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kpty-5.93.0.tar.xz";
+      sha256 = "04pc94v4r8066dzic8a5q5clmcn36vf99d1k5zrq5c4ypx6ia19a";
+      name = "kpty-5.93.0.tar.xz";
     };
   };
   kquickcharts = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kquickcharts-5.92.0.tar.xz";
-      sha256 = "0y467vqx2r6dcyqwn6p7hbg4q7n0xdh4lcqwyin4cdxi14lhwhqs";
-      name = "kquickcharts-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kquickcharts-5.93.0.tar.xz";
+      sha256 = "0j580h8gysdqmsyzhx40arrkszbzkb9fa3byyazqbmyihk26ld14";
+      name = "kquickcharts-5.93.0.tar.xz";
     };
   };
   kross = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/portingAids/kross-5.92.0.tar.xz";
-      sha256 = "1gqy1h5mqsfgbpqkdrhs7xf77kw4yy19mryda1fwjcqzxd02i7hj";
-      name = "kross-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/portingAids/kross-5.93.0.tar.xz";
+      sha256 = "1hqsanjk8n786qbr47pxpwvfpwfd1l6152bqac21f6vk70jgv9ib";
+      name = "kross-5.93.0.tar.xz";
     };
   };
   krunner = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/krunner-5.92.0.tar.xz";
-      sha256 = "1vcgqjyx9i8k9q4j6q9p4f7sp76aap8gqn2v269lb7imcrfhrj1z";
-      name = "krunner-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/krunner-5.93.0.tar.xz";
+      sha256 = "14f993x6s2y6s3bcjqp9q6f5hhiz31ij4bnqwbsqfpa1klbbkiid";
+      name = "krunner-5.93.0.tar.xz";
     };
   };
   kservice = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kservice-5.92.0.tar.xz";
-      sha256 = "1y1fr1galhhi6yf9w9qcvkp1zb63ifvr4wb43jwpvpms9djxkqjj";
-      name = "kservice-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kservice-5.93.0.tar.xz";
+      sha256 = "0cblwvrjwis8w45a6wnjgns6c78xn2lamzss3hqhx2gv6zw95ks6";
+      name = "kservice-5.93.0.tar.xz";
     };
   };
   ktexteditor = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/ktexteditor-5.92.0.tar.xz";
-      sha256 = "137v8g7j8kkv9yh30ysmm5n6imyyd3jmd0f6w5ni00kxl0y1rl5w";
-      name = "ktexteditor-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/ktexteditor-5.93.0.tar.xz";
+      sha256 = "1hyn5gkbc246rbv5rxaz190c5fa2j87ndjw0jz7sjbfdhaw3gx3s";
+      name = "ktexteditor-5.93.0.tar.xz";
     };
   };
   ktextwidgets = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/ktextwidgets-5.92.0.tar.xz";
-      sha256 = "030bz67n6m3fkbldnr48mzicm9cgnr9gdpwipaghl5x5k3s7p1py";
-      name = "ktextwidgets-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/ktextwidgets-5.93.0.tar.xz";
+      sha256 = "05f2nzgqpprri8zh2da9hj36zif0bv2dwvdxxf2z8dfv564mhzz2";
+      name = "ktextwidgets-5.93.0.tar.xz";
     };
   };
   kunitconversion = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kunitconversion-5.92.0.tar.xz";
-      sha256 = "17ph75rg3y652ii0yxm9s8xrbpjs9pdfsrsajm220mi9ng2b9qj7";
-      name = "kunitconversion-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kunitconversion-5.93.0.tar.xz";
+      sha256 = "1j1gl1ahpqafdwlq4bcwc1xv3q59489jyjgr4wkv7lljxmmgpblv";
+      name = "kunitconversion-5.93.0.tar.xz";
     };
   };
   kwallet = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kwallet-5.92.0.tar.xz";
-      sha256 = "1ra0cxw70vb6pks8sqw5k895rnrfzwxhg6vh4yc5dgzdn1nagb3i";
-      name = "kwallet-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kwallet-5.93.0.tar.xz";
+      sha256 = "1syx1zi7q14lf1xn8wqkgi475aaydahn2y3v9x2hn9gvgr3zcmpd";
+      name = "kwallet-5.93.0.tar.xz";
     };
   };
   kwayland = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kwayland-5.92.0.tar.xz";
-      sha256 = "15fizsbdl6psmi24fvpfk9dvh61q07irzavpkl961qp4zg79gq4m";
-      name = "kwayland-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kwayland-5.93.0.tar.xz";
+      sha256 = "1gks1an0c9yp047jwdik6lg1w5gbjwz9mzzdl2aih30wmmrs4j0n";
+      name = "kwayland-5.93.0.tar.xz";
     };
   };
   kwidgetsaddons = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kwidgetsaddons-5.92.0.tar.xz";
-      sha256 = "0b0z24j162j39zfycl5al69xcqgdsr96p7ii3prm1mbyda6mbqyh";
-      name = "kwidgetsaddons-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kwidgetsaddons-5.93.0.tar.xz";
+      sha256 = "045489l353jz52rl346lwazyc4xqd3whn628zn5ybakgiiyy2dcw";
+      name = "kwidgetsaddons-5.93.0.tar.xz";
     };
   };
   kwindowsystem = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kwindowsystem-5.92.0.tar.xz";
-      sha256 = "103xvhzlggi05k16s9kssy7g5a74k9yildj1a4igqwi39wmvvnyw";
-      name = "kwindowsystem-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kwindowsystem-5.93.0.tar.xz";
+      sha256 = "18g4xccvq56i9sz4rcwf8nkhwclcbvzi0vj9xniqfx0s9lx25jwp";
+      name = "kwindowsystem-5.93.0.tar.xz";
     };
   };
   kxmlgui = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/kxmlgui-5.92.0.tar.xz";
-      sha256 = "0hxpjyjr77q2gyi3hg13119aza3634rvmllbj66pi7y37h6lr2z0";
-      name = "kxmlgui-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/kxmlgui-5.93.0.tar.xz";
+      sha256 = "16dhykbn9z0wyh95ihmfr6lf2ff7xycx253fnsfd035cbzcnbfkl";
+      name = "kxmlgui-5.93.0.tar.xz";
     };
   };
   kxmlrpcclient = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/portingAids/kxmlrpcclient-5.92.0.tar.xz";
-      sha256 = "1axy34g5ahd1c3qg7ab7h786jibpaj4dvj45x50x5czq06idqchf";
-      name = "kxmlrpcclient-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/portingAids/kxmlrpcclient-5.93.0.tar.xz";
+      sha256 = "0v1p94ngq6cvw42rf6qfkl45rdcj0v3zjsfnwrgdjq2nkzzimd0c";
+      name = "kxmlrpcclient-5.93.0.tar.xz";
     };
   };
   modemmanager-qt = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/modemmanager-qt-5.92.0.tar.xz";
-      sha256 = "162qzq1aqv2l3bi0r01xrfan20r1zhaaqih4dqbaj7vqibsb9l3y";
-      name = "modemmanager-qt-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/modemmanager-qt-5.93.0.tar.xz";
+      sha256 = "1a3718kkx288c8ysf3fc5kd51zzw8i7x7sh7x86rsjsj6rlxxv9s";
+      name = "modemmanager-qt-5.93.0.tar.xz";
     };
   };
   networkmanager-qt = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/networkmanager-qt-5.92.0.tar.xz";
-      sha256 = "0r7s3fw9fk3pkrzrl1bxsmkf1qbgv3p0jrsskp28f3561vncipai";
-      name = "networkmanager-qt-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/networkmanager-qt-5.93.0.tar.xz";
+      sha256 = "0q59xg00pxhva75rncwizjca7fjq7h7ib9hyyn14c28iv3i8qn5q";
+      name = "networkmanager-qt-5.93.0.tar.xz";
     };
   };
   oxygen-icons5 = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/oxygen-icons5-5.92.0.tar.xz";
-      sha256 = "1wcy8bv4d6jns7vaisbvjc8nxriw9vkiz7j4za5ry7wnvlzv126a";
-      name = "oxygen-icons5-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/oxygen-icons5-5.93.0.tar.xz";
+      sha256 = "019h6my69cq32rlmnxkpnzix6m5r78rpzpn518snbrivvi23ykkk";
+      name = "oxygen-icons5-5.93.0.tar.xz";
     };
   };
   plasma-framework = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/plasma-framework-5.92.0.tar.xz";
-      sha256 = "1xq66lyagjsgfashhqgqgqhda0rqfqf0l5yf1gc4ziv48mibrhn6";
-      name = "plasma-framework-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/plasma-framework-5.93.0.tar.xz";
+      sha256 = "08n3nnbds4smd0jdqidlshp10n643x25issnqbkxza1fxa3wd8nl";
+      name = "plasma-framework-5.93.0.tar.xz";
     };
   };
   prison = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/prison-5.92.0.tar.xz";
-      sha256 = "07p47q8sva82hglfzp145a1sajlal8b3qshhkicc9rkbsngywvvy";
-      name = "prison-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/prison-5.93.0.tar.xz";
+      sha256 = "0mpvhbxxsnanf41cclhdbadw14979qbh3a7rf5mkq9ng49kdwhqz";
+      name = "prison-5.93.0.tar.xz";
     };
   };
   purpose = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/purpose-5.92.0.tar.xz";
-      sha256 = "02j09zf18dwjk17mn841m7cm0qsn7gcz5lff8dad3yah0lc3wqcl";
-      name = "purpose-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/purpose-5.93.0.tar.xz";
+      sha256 = "1i1cx5s6mdrfvabvqkllycv5lmck73mwwck1hlhpxcnrqp3w02yw";
+      name = "purpose-5.93.0.tar.xz";
     };
   };
   qqc2-desktop-style = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/qqc2-desktop-style-5.92.0.tar.xz";
-      sha256 = "1b5xr71lan7ixvd1nfxy9wj21h4wwidsaxa192sha1d8p49hhlwp";
-      name = "qqc2-desktop-style-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/qqc2-desktop-style-5.93.0.tar.xz";
+      sha256 = "1a597chr7awbmg2d64gylg1v9rsih33j6xyvp8r3bqi9ln2w07hn";
+      name = "qqc2-desktop-style-5.93.0.tar.xz";
     };
   };
   solid = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/solid-5.92.0.tar.xz";
-      sha256 = "172sid8l1znzxxz0hi5m19yy4vg7l1nbghvzjvh18ssbmxcwh9l9";
-      name = "solid-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/solid-5.93.0.tar.xz";
+      sha256 = "1skb1lzib230crrhzbgzl0lch51a0bcrgq1jnpn3yy888vwz7vr2";
+      name = "solid-5.93.0.tar.xz";
     };
   };
   sonnet = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/sonnet-5.92.0.tar.xz";
-      sha256 = "08jps1hy0qvk62wnzn50qi8iaay7xav3hbcj55sk70mm7pd1vz1i";
-      name = "sonnet-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/sonnet-5.93.0.tar.xz";
+      sha256 = "170d460vhm42vi21prjg5792h34flcbb2j5wx3r3pr6ybsj6n51w";
+      name = "sonnet-5.93.0.tar.xz";
     };
   };
   syndication = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/syndication-5.92.0.tar.xz";
-      sha256 = "0ijxpnsygwzzybic5lp8gfq57y84vrp3bq7vdbjh3h0345vvk6hw";
-      name = "syndication-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/syndication-5.93.0.tar.xz";
+      sha256 = "08ysirymi5j6as8syvx3rxc7yh12ylwxz1a7yh6ifq370wv4xw9m";
+      name = "syndication-5.93.0.tar.xz";
     };
   };
   syntax-highlighting = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/syntax-highlighting-5.92.0.tar.xz";
-      sha256 = "03p5qzf13nbf54gzad3q1q6i33iggz3ik0ydr9szhj92kfppwd4r";
-      name = "syntax-highlighting-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/syntax-highlighting-5.93.0.tar.xz";
+      sha256 = "06vixhzmmqvbgmzsrhgx0ncfxm80crp3gpy7axscjardjbw53nzb";
+      name = "syntax-highlighting-5.93.0.tar.xz";
     };
   };
   threadweaver = {
-    version = "5.92.0";
+    version = "5.93.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.92/threadweaver-5.92.0.tar.xz";
-      sha256 = "008in2wbl6zr404m9hbqdvy3d4r06mmb3jrr13myldwljqywzc28";
-      name = "threadweaver-5.92.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.93/threadweaver-5.93.0.tar.xz";
+      sha256 = "11gi0rfd02zjnn8fizhwzgxbaz0jw8m7jhrba56vqbh5fv9bf3bc";
+      name = "threadweaver-5.93.0.tar.xz";
     };
   };
 }
diff --git a/pkgs/development/libraries/libarchive/default.nix b/pkgs/development/libraries/libarchive/default.nix
index a448748ff22..240371917f1 100644
--- a/pkgs/development/libraries/libarchive/default.nix
+++ b/pkgs/development/libraries/libarchive/default.nix
@@ -1,36 +1,58 @@
-{
-  fetchFromGitHub, lib, stdenv, pkg-config, autoreconfHook,
-  acl, attr, bzip2, e2fsprogs, libxml2, lzo, openssl, sharutils, xz, zlib, zstd,
+{ lib
+, stdenv
+, fetchFromGitHub
+, acl
+, attr
+, autoreconfHook
+, bzip2
+, e2fsprogs
+, lzo
+, openssl
+, pkg-config
+, sharutils
+, xz
+, zlib
+, zstd
+# Optional but increases closure only negligibly. Also, while libxml2 builds
+# fine on windows, libarchive has trouble linking windows things it depends on
+# for some reason.
+, xarSupport ? stdenv.hostPlatform.isUnix, libxml2
 
-  # Optional but increases closure only negligibly. Also, while libxml2
-  # builds fine on windows, but libarchive has trouble linking windows
-  # things it depends on for some reason.
-  xarSupport ? stdenv.hostPlatform.isUnix,
-
-  # for passthru.tests
-  cmake, nix, samba
+# for passthru.tests
+, cmake
+, nix
+, samba
 }:
 
 assert xarSupport -> libxml2 != null;
 
 stdenv.mkDerivation rec {
   pname = "libarchive";
-  version = "3.6.0";
+  version = "3.6.1";
 
   src = fetchFromGitHub {
     owner = "libarchive";
     repo = "libarchive";
     rev = "v${version}";
-    sha256 = "sha256-u6Zeu9yTjhx5U7KZVUkuuUsQPjWN71mE5egG4T+FGfY=";
+    hash = "sha256-G4wL5DDbX0FqaA4cnOlVLZ25ObN8dNsRtxyas29tpDA=";
   };
 
   outputs = [ "out" "lib" "dev" ];
 
-  nativeBuildInputs = [ pkg-config autoreconfHook ];
-  buildInputs =
-    lib.optional stdenv.hostPlatform.isUnix sharutils
-    ++ [ zlib bzip2 openssl xz lzo zstd ]
-    ++ lib.optionals stdenv.isLinux [ e2fsprogs attr acl ]
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs =  [
+    bzip2
+    lzo
+    openssl
+    xz
+    zlib
+    zstd
+  ] ++ lib.optional stdenv.hostPlatform.isUnix sharutils
+    ++ lib.optionals stdenv.isLinux [ acl attr e2fsprogs ]
     ++ lib.optional xarSupport libxml2;
 
   # Without this, pkg-config-based dependencies are unhappy
@@ -38,11 +60,17 @@ stdenv.mkDerivation rec {
 
   configureFlags = lib.optional (!xarSupport) "--without-xml2";
 
-  preBuild = if stdenv.isCygwin then ''
+  postPatch = ''
+     substituteInPlace Makefile.am --replace '/bin/pwd' 'pwd'
+  '';
+
+  preBuild = lib.optionalString stdenv.isCygwin ''
     echo "#include <windows.h>" >> config.h
-  '' else null;
+  '';
 
-  doCheck = false; # fails
+  # 484: test_write_disk_perms FAIL
+  # TODO: how to disable it? Should it be reported upstream?
+  doCheck = false;
 
   preFixup = ''
     sed -i $lib/lib/libarchive.la \
@@ -52,21 +80,22 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  passthru.tests = {
-    inherit cmake nix samba;
-  };
-
-  meta = {
+  meta = with lib; {
+    homepage = "http://libarchive.org";
     description = "Multi-format archive and compression library";
     longDescription = ''
-      This library has code for detecting and reading many archive formats and
-      compressions formats including (but not limited to) tar, shar, cpio, zip, and
-      compressed with gzip, bzip2, lzma, xz, ...
+      The libarchive project develops a portable, efficient C library that can
+      read and write streaming archives in a variety of formats. It also
+      includes implementations of the common tar, cpio, and zcat command-line
+      tools that use the libarchive library.
     '';
-    homepage = "http://libarchive.org";
     changelog = "https://github.com/libarchive/libarchive/releases/tag/v${version}";
-    license = lib.licenses.bsd3;
-    platforms = with lib.platforms; all;
-    maintainers = with lib.maintainers; [ jcumming ];
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ jcumming AndersonTorres ];
+    platforms = platforms.all;
+  };
+
+  passthru.tests = {
+    inherit cmake nix samba;
   };
 }
diff --git a/pkgs/development/libraries/libargon2/default.nix b/pkgs/development/libraries/libargon2/default.nix
index 2003c8957ff..eb8e6333d41 100644
--- a/pkgs/development/libraries/libargon2/default.nix
+++ b/pkgs/development/libraries/libargon2/default.nix
@@ -11,7 +11,9 @@ stdenv.mkDerivation rec {
     sha256 = "0p4ry9dn0mi9js0byijxdyiwx74p1nr8zj7wjpd1fjgqva4sk23i";
   };
 
-  nativeBuildInputs = [ fixDarwinDylibNames ];
+  nativeBuildInputs = lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ];
 
   patches = [
     # TODO: remove when https://github.com/P-H-C/phc-winner-argon2/pull/277 is merged + released
diff --git a/pkgs/development/libraries/libavif/default.nix b/pkgs/development/libraries/libavif/default.nix
index 03dd9a33628..d5a2a686b89 100644
--- a/pkgs/development/libraries/libavif/default.nix
+++ b/pkgs/development/libraries/libavif/default.nix
@@ -11,13 +11,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libavif";
-  version = "0.9.3";
+  version = "0.10.0";
 
   src = fetchFromGitHub {
     owner = "AOMediaCodec";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-ME/mkaHhFeHajTbc7zhg9vtf/8XgkgSRu9I/mlQXnds=";
+    sha256 = "sha256-EGu2avkqQXHFX4gKWsVfVdQN99f4J7Hm86C0sAhuP1Y=";
   };
 
   # reco: encode libaom slowest but best, decode dav1d fastest
diff --git a/pkgs/development/libraries/libepoxy/default.nix b/pkgs/development/libraries/libepoxy/default.nix
index c54c3c86d23..348fbfee7b8 100644
--- a/pkgs/development/libraries/libepoxy/default.nix
+++ b/pkgs/development/libraries/libepoxy/default.nix
@@ -19,13 +19,13 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "libepoxy";
-  version = "1.5.9";
+  version = "1.5.10";
 
   src = fetchFromGitHub {
     owner = "anholt";
     repo = pname;
     rev = version;
-    sha256 = "sha256-8rdmC8FZUkKkEvWPJIdfrBQHiwa81vl5tmVqRdU4UIY=";
+    sha256 = "sha256-gZiyPOW2PeTMILcPiUTqPUGRNlMM5mI1z9563v4SgEs=";
   };
 
   patches = [ ./libgl-path.patch ];
@@ -62,7 +62,6 @@ stdenv.mkDerivation rec {
       --replace "[ 'cgl_epoxy_api', [ 'cgl_epoxy_api.c' ] ]," ""
   '';
 
-  # tests are running from version 1.5.9
   doCheck = true;
 
   meta = with lib; {
diff --git a/pkgs/development/libraries/libevdev/default.nix b/pkgs/development/libraries/libevdev/default.nix
index cca5abef4fc..b757e516573 100644
--- a/pkgs/development/libraries/libevdev/default.nix
+++ b/pkgs/development/libraries/libevdev/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "libevdev";
-  version = "1.12.0";
+  version = "1.12.1";
 
   src = fetchurl {
     url = "https://www.freedesktop.org/software/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "sha256-L3KeNIBpV5H5SC6DiL1yNAK4nw6vEYBXu96jzs7psjc=";
+    sha256 = "sha256-HbukG8UW08p6vA2luGLv4+qKcBj6bpuXzp05QBsiQmw=";
   };
 
   nativeBuildInputs = [ python3 ];
diff --git a/pkgs/development/libraries/libgcrypt/default.nix b/pkgs/development/libraries/libgcrypt/default.nix
index eb4e8e94862..56594620963 100644
--- a/pkgs/development/libraries/libgcrypt/default.nix
+++ b/pkgs/development/libraries/libgcrypt/default.nix
@@ -15,11 +15,11 @@ assert enableCapabilities -> stdenv.isLinux;
 
 stdenv.mkDerivation rec {
   pname = "libgcrypt";
-  version = "1.9.4";
+  version = "1.10.1";
 
   src = fetchurl {
     url = "mirror://gnupg/libgcrypt/${pname}-${version}.tar.bz2";
-    sha256 = "1xxabjv45zlxyryiwhmbfblsx41kl267wsb78bny6m14ly1rr17a";
+    hash = "sha256-7xSuVGsAhM2EJZ9hpV4Ho4w7U6/A9Ua//O8vAbr/6d4=";
   };
 
   outputs = [ "out" "dev" "info" ];
diff --git a/pkgs/development/libraries/libmnl/default.nix b/pkgs/development/libraries/libmnl/default.nix
index a8ec4c5f3b9..9a6f6a1d14d 100644
--- a/pkgs/development/libraries/libmnl/default.nix
+++ b/pkgs/development/libraries/libmnl/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "libmnl";
-  version = "1.0.4";
+  version = "1.0.5";
 
   src = fetchurl {
     url = "https://netfilter.org/projects/libmnl/files/${pname}-${version}.tar.bz2";
-    sha256 = "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp";
+    sha256 = "09851ns07399rbz0y8slrlmnw3fn1nakr8d37pxjn5gkks8rnjr7";
   };
 
   meta = {
diff --git a/pkgs/development/libraries/libnfnetlink/Use-stdlib-uint-instead-of-u_int.patch b/pkgs/development/libraries/libnfnetlink/Use-stdlib-uint-instead-of-u_int.patch
deleted file mode 100644
index 074bef42b97..00000000000
--- a/pkgs/development/libraries/libnfnetlink/Use-stdlib-uint-instead-of-u_int.patch
+++ /dev/null
@@ -1,499 +0,0 @@
-From patchwork Fri Apr  3 22:04:46 2015
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: Use stdlib uint* instead of u_int*
-From: Nathan McSween <nwmcsween@gmail.com>
-X-Patchwork-Id: 458131
-X-Patchwork-Delegate: pablo@netfilter.org
-Message-Id: <1428098686-17843-1-git-send-email-nwmcsween@gmail.com>
-To: netfilter-devel@vger.kernel.org
-Cc: Nathan McSween <nwmcsween@gmail.com>
-Date: Fri,  3 Apr 2015 22:04:46 +0000
-
-Signed-off-by: Nathan McSween <nwmcsween@gmail.com>
----
- include/libnfnetlink/libnfnetlink.h           | 25 +++++-----
- include/libnfnetlink/linux_nfnetlink.h        | 11 +++--
- include/libnfnetlink/linux_nfnetlink_compat.h |  6 ++-
- src/iftable.c                                 |  9 ++--
- src/iftable.h                                 |  6 ++-
- src/libnfnetlink.c                            | 71 ++++++++++++++-------------
- src/rtnl.c                                    |  5 +-
- src/rtnl.h                                    |  3 +-
- 8 files changed, 73 insertions(+), 63 deletions(-)
-
-diff --git a/include/libnfnetlink/libnfnetlink.h b/include/libnfnetlink/libnfnetlink.h
-index 1d8c49d..cd0be3d 100644
---- a/include/libnfnetlink/libnfnetlink.h
-+++ b/include/libnfnetlink/libnfnetlink.h
-@@ -15,6 +15,7 @@
- #define aligned_u64 unsigned long long __attribute__((aligned(8)))
- #endif
- 
-+#include <stdint.h>
- #include <sys/socket.h>	/* for sa_family_t */
- #include <linux/netlink.h>
- #include <libnfnetlink/linux_nfnetlink.h>
-@@ -55,7 +56,7 @@ struct nfnlhdr {
- struct nfnl_callback {
- 	int (*call)(struct nlmsghdr *nlh, struct nfattr *nfa[], void *data);
- 	void *data;
--	u_int16_t attr_count;
-+	uint16_t attr_count;
- };
- 
- struct nfnl_handle;
-@@ -69,7 +70,7 @@ extern struct nfnl_handle *nfnl_open(void);
- extern int nfnl_close(struct nfnl_handle *);
- 
- extern struct nfnl_subsys_handle *nfnl_subsys_open(struct nfnl_handle *, 
--						   u_int8_t, u_int8_t, 
-+						   uint8_t, uint8_t,
- 						   unsigned int);
- extern void nfnl_subsys_close(struct nfnl_subsys_handle *);
- 
-@@ -88,8 +89,8 @@ extern int nfnl_sendiov(const struct nfnl_handle *nfnlh,
- 			const struct iovec *iov, unsigned int num,
- 			unsigned int flags);
- extern void nfnl_fill_hdr(struct nfnl_subsys_handle *, struct nlmsghdr *,
--			  unsigned int, u_int8_t, u_int16_t, u_int16_t,
--			  u_int16_t);
-+			  unsigned int, uint8_t, uint16_t, uint16_t,
-+			  uint16_t);
- extern __attribute__((deprecated)) int
- nfnl_talk(struct nfnl_handle *, struct nlmsghdr *, pid_t,
-           unsigned, struct nlmsghdr *,
-@@ -103,8 +104,8 @@ nfnl_listen(struct nfnl_handle *,
- /* receiving */
- extern ssize_t nfnl_recv(const struct nfnl_handle *h, unsigned char *buf, size_t len);
- extern int nfnl_callback_register(struct nfnl_subsys_handle *,
--				  u_int8_t type, struct nfnl_callback *cb);
--extern int nfnl_callback_unregister(struct nfnl_subsys_handle *, u_int8_t type);
-+				  uint8_t type, struct nfnl_callback *cb);
-+extern int nfnl_callback_unregister(struct nfnl_subsys_handle *, uint8_t type);
- extern int nfnl_handle_packet(struct nfnl_handle *, char *buf, int len);
- 
- /* parsing */
-@@ -180,12 +181,12 @@ extern int nfnl_query(struct nfnl_handle *h, struct nlmsghdr *nlh);
- 
- /* nfnl attribute handling functions */
- extern int nfnl_addattr_l(struct nlmsghdr *, int, int, const void *, int);
--extern int nfnl_addattr8(struct nlmsghdr *, int, int, u_int8_t);
--extern int nfnl_addattr16(struct nlmsghdr *, int, int, u_int16_t);
--extern int nfnl_addattr32(struct nlmsghdr *, int, int, u_int32_t);
-+extern int nfnl_addattr8(struct nlmsghdr *, int, int, uint8_t);
-+extern int nfnl_addattr16(struct nlmsghdr *, int, int, uint16_t);
-+extern int nfnl_addattr32(struct nlmsghdr *, int, int, uint32_t);
- extern int nfnl_nfa_addattr_l(struct nfattr *, int, int, const void *, int);
--extern int nfnl_nfa_addattr16(struct nfattr *, int, int, u_int16_t);
--extern int nfnl_nfa_addattr32(struct nfattr *, int, int, u_int32_t);
-+extern int nfnl_nfa_addattr16(struct nfattr *, int, int, uint16_t);
-+extern int nfnl_nfa_addattr32(struct nfattr *, int, int, uint32_t);
- extern int nfnl_parse_attr(struct nfattr **, int, struct nfattr *, int);
- #define nfnl_parse_nested(tb, max, nfa) \
- 	nfnl_parse_attr((tb), (max), NFA_DATA((nfa)), NFA_PAYLOAD((nfa)))
-@@ -197,7 +198,7 @@ extern int nfnl_parse_attr(struct nfattr **, int, struct nfattr *, int);
- ({	(tail)->nfa_len = (void *) NLMSG_TAIL(nlh) - (void *) tail; })
- 
- extern void nfnl_build_nfa_iovec(struct iovec *iov, struct nfattr *nfa, 
--				 u_int16_t type, u_int32_t len,
-+				 uint16_t type, uint32_t len,
- 				 unsigned char *val);
- extern unsigned int nfnl_rcvbufsiz(const struct nfnl_handle *h, 
- 				   unsigned int size);
-diff --git a/include/libnfnetlink/linux_nfnetlink.h b/include/libnfnetlink/linux_nfnetlink.h
-index 76a8550..7b843c6 100644
---- a/include/libnfnetlink/linux_nfnetlink.h
-+++ b/include/libnfnetlink/linux_nfnetlink.h
-@@ -1,5 +1,6 @@
- #ifndef _NFNETLINK_H
- #define _NFNETLINK_H
-+#include <stdint.h>
- #include <linux/types.h>
- #include <libnfnetlink/linux_nfnetlink_compat.h>
- 
-@@ -25,9 +26,9 @@ enum nfnetlink_groups {
- /* General form of address family dependent message.
-  */
- struct nfgenmsg {
--	u_int8_t  nfgen_family;		/* AF_xxx */
--	u_int8_t  version;		/* nfnetlink version */
--	u_int16_t    res_id;		/* resource id */
-+	uint8_t  nfgen_family;		/* AF_xxx */
-+	uint8_t  version;		/* nfnetlink version */
-+	uint16_t    res_id;		/* resource id */
- };
- 
- #define NFNETLINK_V0	0
-@@ -59,7 +60,7 @@ struct nfnl_callback
- 	int (*call)(struct sock *nl, struct sk_buff *skb, 
- 		struct nlmsghdr *nlh, struct nlattr *cda[]);
- 	const struct nla_policy *policy;	/* netlink attribute policy */
--	const u_int16_t attr_count;		/* number of nlattr's */
-+	const uint16_t attr_count;		/* number of nlattr's */
- };
- 
- struct nfnetlink_subsystem
-@@ -76,7 +77,7 @@ extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
- extern int nfnetlink_has_listeners(unsigned int group);
- extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, 
- 			  int echo);
--extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
-+extern int nfnetlink_unicast(struct sk_buff *skb, uint32_t pid, int flags);
- 
- #define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
- 	MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
-diff --git a/include/libnfnetlink/linux_nfnetlink_compat.h b/include/libnfnetlink/linux_nfnetlink_compat.h
-index e145176..cd094fc 100644
---- a/include/libnfnetlink/linux_nfnetlink_compat.h
-+++ b/include/libnfnetlink/linux_nfnetlink_compat.h
-@@ -3,6 +3,8 @@
- #ifndef __KERNEL__
- /* Old nfnetlink macros for userspace */
- 
-+#include <stdint.h>
-+
- /* nfnetlink groups: Up to 32 maximum */
- #define NF_NETLINK_CONNTRACK_NEW 		0x00000001
- #define NF_NETLINK_CONNTRACK_UPDATE		0x00000002
-@@ -20,8 +22,8 @@
- 
- struct nfattr
- {
--	u_int16_t nfa_len;
--	u_int16_t nfa_type;	/* we use 15 bits for the type, and the highest
-+	uint16_t nfa_len;
-+	uint16_t nfa_type;	/* we use 15 bits for the type, and the highest
- 				 * bit to indicate whether the payload is nested */
- };
- 
-diff --git a/src/iftable.c b/src/iftable.c
-index 5976ed8..3411c4c 100644
---- a/src/iftable.c
-+++ b/src/iftable.c
-@@ -9,6 +9,7 @@
- /* IFINDEX handling */
- 
- #include <unistd.h>
-+#include <stdint.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
-@@ -27,10 +28,10 @@
- struct ifindex_node {
- 	struct list_head head;
- 
--	u_int32_t	index;
--	u_int32_t	type;
--	u_int32_t	alen;
--	u_int32_t	flags;
-+	uint32_t	index;
-+	uint32_t	type;
-+	uint32_t	alen;
-+	uint32_t	flags;
- 	char		addr[8];
- 	char		name[16];
- };
-diff --git a/src/iftable.h b/src/iftable.h
-index 8df7f24..0cc5335 100644
---- a/src/iftable.h
-+++ b/src/iftable.h
-@@ -1,8 +1,10 @@
- #ifndef _IFTABLE_H
- #define _IFTABLE_H
- 
--int iftable_delete(u_int32_t dst, u_int32_t mask, u_int32_t gw, u_int32_t oif);
--int iftable_insert(u_int32_t dst, u_int32_t mask, u_int32_t gw, u_int32_t oif);
-+#include <stdint.h>
-+
-+int iftable_delete(uint32_t dst, uint32_t mask, uint32_t gw, uint32_t oif);
-+int iftable_insert(uint32_t dst, uint32_t mask, uint32_t gw, uint32_t oif);
- 
- int iftable_init(void);
- void iftable_fini(void);
-diff --git a/src/libnfnetlink.c b/src/libnfnetlink.c
-index 398b7d7..b8958dc 100644
---- a/src/libnfnetlink.c
-+++ b/src/libnfnetlink.c
-@@ -36,6 +36,7 @@
-  * 	minor cleanups
-  */
- 
-+#include <stdint.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <unistd.h>
-@@ -72,9 +73,9 @@
- 
- struct nfnl_subsys_handle {
- 	struct nfnl_handle 	*nfnlh;
--	u_int32_t		subscriptions;
--	u_int8_t		subsys_id;
--	u_int8_t		cb_count;
-+	uint32_t		subscriptions;
-+	uint8_t		subsys_id;
-+	uint8_t		cb_count;
- 	struct nfnl_callback 	*cb;	/* array of callbacks */
- };
- 
-@@ -86,11 +87,11 @@ struct nfnl_handle {
- 	int			fd;
- 	struct sockaddr_nl	local;
- 	struct sockaddr_nl	peer;
--	u_int32_t		subscriptions;
--	u_int32_t		seq;
--	u_int32_t		dump;
--	u_int32_t		rcv_buffer_size;	/* for nfnl_catch */
--	u_int32_t		flags;
-+	uint32_t		subscriptions;
-+	uint32_t		seq;
-+	uint32_t		dump;
-+	uint32_t		rcv_buffer_size;	/* for nfnl_catch */
-+	uint32_t		flags;
- 	struct nlmsghdr 	*last_nlhdr;
- 	struct nfnl_subsys_handle subsys[NFNL_MAX_SUBSYS+1];
- };
-@@ -145,7 +146,7 @@ unsigned int nfnl_portid(const struct nfnl_handle *h)
- static int recalc_rebind_subscriptions(struct nfnl_handle *nfnlh)
- {
- 	int i, err;
--	u_int32_t new_subscriptions = nfnlh->subscriptions;
-+	uint32_t new_subscriptions = nfnlh->subscriptions;
- 
- 	for (i = 0; i < NFNL_MAX_SUBSYS; i++)
- 		new_subscriptions |= nfnlh->subsys[i].subscriptions;
-@@ -273,8 +274,8 @@ void nfnl_set_rcv_buffer_size(struct nfnl_handle *h, unsigned int size)
-  * a valid address that points to a nfnl_subsys_handle structure is returned.
-  */
- struct nfnl_subsys_handle *
--nfnl_subsys_open(struct nfnl_handle *nfnlh, u_int8_t subsys_id,
--		 u_int8_t cb_count, u_int32_t subscriptions)
-+nfnl_subsys_open(struct nfnl_handle *nfnlh, uint8_t subsys_id,
-+		 uint8_t cb_count, uint32_t subscriptions)
- {
- 	struct nfnl_subsys_handle *ssh;
- 
-@@ -435,10 +436,10 @@ int nfnl_sendiov(const struct nfnl_handle *nfnlh, const struct iovec *iov,
-  */
- void nfnl_fill_hdr(struct nfnl_subsys_handle *ssh,
- 		    struct nlmsghdr *nlh, unsigned int len, 
--		    u_int8_t family,
--		    u_int16_t res_id,
--		    u_int16_t msg_type,
--		    u_int16_t msg_flags)
-+		    uint8_t family,
-+		    uint16_t res_id,
-+		    uint16_t msg_type,
-+		    uint16_t msg_flags)
- {
- 	assert(ssh);
- 	assert(nlh);
-@@ -849,14 +850,14 @@ int nfnl_nfa_addattr_l(struct nfattr *nfa, int maxlen, int type,
- }
- 
- /**
-- * nfnl_addattr8 - Add u_int8_t attribute to nlmsghdr
-+ * nfnl_addattr8 - Add uint8_t attribute to nlmsghdr
-  *
-  * @n: netlink message header to which attribute is to be added
-  * @maxlen: maximum length of netlink message header
-  * @type: type of new attribute
-  * @data: content of new attribute
-  */
--int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, u_int8_t data)
-+int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, uint8_t data)
- {
- 	assert(n);
- 	assert(maxlen > 0);
-@@ -866,7 +867,7 @@ int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, u_int8_t data)
- }
- 
- /**
-- * nfnl_nfa_addattr16 - Add u_int16_t attribute to struct nfattr 
-+ * nfnl_nfa_addattr16 - Add uint16_t attribute to struct nfattr
-  *
-  * @nfa: struct nfattr
-  * @maxlen: maximal length of nfattr buffer
-@@ -875,7 +876,7 @@ int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, u_int8_t data)
-  *
-  */
- int nfnl_nfa_addattr16(struct nfattr *nfa, int maxlen, int type, 
--		       u_int16_t data)
-+		       uint16_t data)
- {
- 	assert(nfa);
- 	assert(maxlen > 0);
-@@ -885,7 +886,7 @@ int nfnl_nfa_addattr16(struct nfattr *nfa, int maxlen, int type,
- }
- 
- /**
-- * nfnl_addattr16 - Add u_int16_t attribute to nlmsghdr
-+ * nfnl_addattr16 - Add uint16_t attribute to nlmsghdr
-  *
-  * @n: netlink message header to which attribute is to be added
-  * @maxlen: maximum length of netlink message header
-@@ -894,7 +895,7 @@ int nfnl_nfa_addattr16(struct nfattr *nfa, int maxlen, int type,
-  *
-  */
- int nfnl_addattr16(struct nlmsghdr *n, int maxlen, int type,
--		   u_int16_t data)
-+		   uint16_t data)
- {
- 	assert(n);
- 	assert(maxlen > 0);
-@@ -904,7 +905,7 @@ int nfnl_addattr16(struct nlmsghdr *n, int maxlen, int type,
- }
- 
- /**
-- * nfnl_nfa_addattr32 - Add u_int32_t attribute to struct nfattr 
-+ * nfnl_nfa_addattr32 - Add uint32_t attribute to struct nfattr
-  *
-  * @nfa: struct nfattr
-  * @maxlen: maximal length of nfattr buffer
-@@ -913,7 +914,7 @@ int nfnl_addattr16(struct nlmsghdr *n, int maxlen, int type,
-  *
-  */
- int nfnl_nfa_addattr32(struct nfattr *nfa, int maxlen, int type, 
--		       u_int32_t data)
-+		       uint32_t data)
- {
- 	assert(nfa);
- 	assert(maxlen > 0);
-@@ -923,7 +924,7 @@ int nfnl_nfa_addattr32(struct nfattr *nfa, int maxlen, int type,
- }
- 
- /**
-- * nfnl_addattr32 - Add u_int32_t attribute to nlmsghdr
-+ * nfnl_addattr32 - Add uint32_t attribute to nlmsghdr
-  *
-  * @n: netlink message header to which attribute is to be added
-  * @maxlen: maximum length of netlink message header
-@@ -932,7 +933,7 @@ int nfnl_nfa_addattr32(struct nfattr *nfa, int maxlen, int type,
-  *
-  */
- int nfnl_addattr32(struct nlmsghdr *n, int maxlen, int type,
--		   u_int32_t data)
-+		   uint32_t data)
- {
- 	assert(n);
- 	assert(maxlen > 0);
-@@ -980,7 +981,7 @@ int nfnl_parse_attr(struct nfattr *tb[], int max, struct nfattr *nfa, int len)
-  *
-  */ 
- void nfnl_build_nfa_iovec(struct iovec *iov, struct nfattr *nfa, 
--			  u_int16_t type, u_int32_t len, unsigned char *val)
-+			  uint16_t type, uint32_t len, unsigned char *val)
- {
- 	assert(iov);
- 	assert(nfa);
-@@ -1115,7 +1116,7 @@ struct nlmsghdr *nfnl_get_msg_next(struct nfnl_handle *h,
-  * appropiately.
-  */
- int nfnl_callback_register(struct nfnl_subsys_handle *ssh,
--			   u_int8_t type, struct nfnl_callback *cb)
-+			   uint8_t type, struct nfnl_callback *cb)
- {
- 	assert(ssh);
- 	assert(cb);
-@@ -1138,7 +1139,7 @@ int nfnl_callback_register(struct nfnl_subsys_handle *ssh,
-  * On sucess, 0 is returned. On error, -1 is returned and errno is
-  * set appropiately.
-  */
--int nfnl_callback_unregister(struct nfnl_subsys_handle *ssh, u_int8_t type)
-+int nfnl_callback_unregister(struct nfnl_subsys_handle *ssh, uint8_t type)
- {
- 	assert(ssh);
- 
-@@ -1161,8 +1162,8 @@ int nfnl_check_attributes(const struct nfnl_handle *h,
- 	assert(nfa);
- 
- 	int min_len;
--	u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
--	u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
-+	uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
-+	uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
- 	const struct nfnl_subsys_handle *ssh;
- 	struct nfnl_callback *cb;
- 
-@@ -1212,8 +1213,8 @@ static int __nfnl_handle_msg(struct nfnl_handle *h, struct nlmsghdr *nlh,
- 			     int len)
- {
- 	struct nfnl_subsys_handle *ssh;
--	u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
--	u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
-+	uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
-+	uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
- 	int err = 0;
- 
- 	if (subsys_id > NFNL_MAX_SUBSYS)
-@@ -1243,7 +1244,7 @@ int nfnl_handle_packet(struct nfnl_handle *h, char *buf, int len)
- {
- 
- 	while (len >= NLMSG_SPACE(0)) {
--		u_int32_t rlen;
-+		uint32_t rlen;
- 		struct nlmsghdr *nlh = (struct nlmsghdr *)buf;
- 
- 		if (nlh->nlmsg_len < sizeof(struct nlmsghdr)
-@@ -1285,8 +1286,8 @@ static int nfnl_is_error(struct nfnl_handle *h, struct nlmsghdr *nlh)
- static int nfnl_step(struct nfnl_handle *h, struct nlmsghdr *nlh)
- {
- 	struct nfnl_subsys_handle *ssh;
--	u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
--	u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
-+	uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
-+	uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
- 
- 	/* Is this an error message? */
- 	if (nfnl_is_error(h, nlh)) {
-diff --git a/src/rtnl.c b/src/rtnl.c
-index 7b4ac7d..34802fe 100644
---- a/src/rtnl.c
-+++ b/src/rtnl.c
-@@ -11,6 +11,7 @@
- /* rtnetlink - routing table netlink interface */
- 
- #include <unistd.h>
-+#include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
- #include <errno.h>
-@@ -30,7 +31,7 @@
- #define rtnl_log(x, ...)
- 
- static inline struct rtnl_handler *
--find_handler(struct rtnl_handle *rtnl_handle, u_int16_t type)
-+find_handler(struct rtnl_handle *rtnl_handle, uint16_t type)
- {
- 	struct rtnl_handler *h;
- 	for (h = rtnl_handle->handlers; h; h = h->next) {
-@@ -41,7 +42,7 @@ find_handler(struct rtnl_handle *rtnl_handle, u_int16_t type)
- }
- 
- static int call_handler(struct rtnl_handle *rtnl_handle,
--			u_int16_t type,
-+			uint16_t type,
- 			struct nlmsghdr *hdr)
- {
- 	struct rtnl_handler *h = find_handler(rtnl_handle, type);
-diff --git a/src/rtnl.h b/src/rtnl.h
-index 0c403dc..9858ae5 100644
---- a/src/rtnl.h
-+++ b/src/rtnl.h
-@@ -1,13 +1,14 @@
- #ifndef _RTNL_H
- #define _RTNL_H
- 
-+#include <stdint.h>
- #include <linux/types.h>
- #include <linux/rtnetlink.h>
- 
- struct rtnl_handler {
- 	struct rtnl_handler *next;
- 
--	u_int16_t	nlmsg_type;
-+	uint16_t	nlmsg_type;
- 	int		(*handlefn)(struct nlmsghdr *h, void *arg);
- 	void		*arg;
- };
diff --git a/pkgs/development/libraries/libnfnetlink/default.nix b/pkgs/development/libraries/libnfnetlink/default.nix
index b22722d3439..3b6b804a8dc 100644
--- a/pkgs/development/libraries/libnfnetlink/default.nix
+++ b/pkgs/development/libraries/libnfnetlink/default.nix
@@ -2,17 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libnfnetlink";
-  version = "1.0.1";
+  version = "1.0.2";
 
   src = fetchurl {
     url = "https://www.netfilter.org/projects/libnfnetlink/files/libnfnetlink-${version}.tar.bz2";
-    sha256 = "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j";
+    sha256 = "0xn3rcrzxr6g82kfxzs9bqn2zvl2kf2yda30drwb9vr6sk1wfr5h";
   };
 
-  patches = [
-    ./Use-stdlib-uint-instead-of-u_int.patch
-  ];
-
   meta = {
     description = "Low-level library for netfilter related kernel/userspace communication";
     longDescription = ''
diff --git a/pkgs/development/libraries/libotr/default.nix b/pkgs/development/libraries/libotr/default.nix
index bd8a521544c..a9c1d2008af 100644
--- a/pkgs/development/libraries/libotr/default.nix
+++ b/pkgs/development/libraries/libotr/default.nix
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
     sha256 = "1x8rliydhbibmzwdbyr7pd7n87m2jmxnqkpvaalnf4154hj1hfwb";
   };
 
+  patches = [ ./fix-regtest-client.patch ];
+
   outputs = [ "bin" "out" "dev" ];
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/development/libraries/libotr/fix-regtest-client.patch b/pkgs/development/libraries/libotr/fix-regtest-client.patch
new file mode 100644
index 00000000000..bfd0007b961
--- /dev/null
+++ b/pkgs/development/libraries/libotr/fix-regtest-client.patch
@@ -0,0 +1,11 @@
+diff -Nur a/tests/regression/client/client.c b/tests/regression/client/client.c
+--- a/tests/regression/client/client.c	2015-12-25 17:39:45.000000000 +0000
++++ b/tests/regression/client/client.c	2022-03-29 19:33:18.646398117 +0100
+@@ -27,6 +27,7 @@
+ #include <syscall.h>
+ #include <sys/epoll.h>
+ #include <sys/types.h>
++#include <sys/socket.h>
+ #include <sys/un.h>
+ #include <unistd.h>
+ 
diff --git a/pkgs/development/libraries/libsoup/3.x.nix b/pkgs/development/libraries/libsoup/3.x.nix
index 4791e49ae3f..c4ab1094cce 100644
--- a/pkgs/development/libraries/libsoup/3.x.nix
+++ b/pkgs/development/libraries/libsoup/3.x.nix
@@ -21,13 +21,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libsoup";
-  version = "3.0.5";
+  version = "3.0.6";
 
   outputs = [ "out" "dev" ];
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "sha256-9dFD22gws4Je3CocREnWOSc7C/oBeklwhxli2byiIUU=";
+    sha256 = "sha256-tF1Z+EC5rPm7Rf1FhU4+9nL1fjq5V0AcOtjXUCrCPaY=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/libunistring/default.nix b/pkgs/development/libraries/libunistring/default.nix
index f7a77832c18..01b302abd68 100644
--- a/pkgs/development/libraries/libunistring/default.nix
+++ b/pkgs/development/libraries/libunistring/default.nix
@@ -7,11 +7,11 @@
 
 stdenv.mkDerivation rec {
   pname = "libunistring";
-  version = "0.9.10";
+  version = "1.0";
 
   src = fetchurl {
     url = "mirror://gnu/libunistring/${pname}-${version}.tar.gz";
-    sha256 = "02v17za10mxnj095x4pvm80jxyqwk93kailfc2j8xa1r6crmnbm8";
+    sha256 = "sha256-PAGEwOSS18IIzjHSXdHSxY8MPtbLvgMsWySM3a0xhUQ=";
   };
 
   outputs = [ "out" "dev" "info" "doc" ];
diff --git a/pkgs/development/libraries/libunwind/default.nix b/pkgs/development/libraries/libunwind/default.nix
index 4bce1341c7d..bda9001f913 100644
--- a/pkgs/development/libraries/libunwind/default.nix
+++ b/pkgs/development/libraries/libunwind/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, autoreconfHook, xz, buildPackages }:
+{ stdenv, lib, fetchurl, fetchpatch, autoreconfHook, xz, buildPackages }:
 
 stdenv.mkDerivation rec {
   pname = "libunwind";
@@ -9,6 +9,14 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-SmrsZmmR+0XQiJxErt6K1usQgHHDVU/N/2cfnJR5SXY=";
   };
 
+  patches = [
+    # Fix for aarch64 and non-4K pages. Remove once upgraded past 1.6.2.
+    (fetchpatch {
+      url = "https://github.com/libunwind/libunwind/commit/e85b65cec757ef589f28957d0c6c21c498a03bdf.patch";
+      sha256 = "1lnlygvhqrdrjgw303pg2k2k4ms4gaghpjsgmhk47q83vy1yjwfg";
+    })
+  ];
+
   postPatch = if stdenv.cc.isClang then ''
     substituteInPlace configure.ac --replace "-lgcc_s" ""
   '' else lib.optionalString stdenv.hostPlatform.isMusl ''
diff --git a/pkgs/development/libraries/libwacom/default.nix b/pkgs/development/libraries/libwacom/default.nix
index 7ccc0d2a199..a46ccdf7850 100644
--- a/pkgs/development/libraries/libwacom/default.nix
+++ b/pkgs/development/libraries/libwacom/default.nix
@@ -12,7 +12,7 @@
 
 stdenv.mkDerivation rec {
   pname = "libwacom";
-  version = "2.1.0";
+  version = "2.2.0";
 
   outputs = [ "out" "dev" ];
 
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
     owner = "linuxwacom";
     repo = "libwacom";
     rev = "libwacom-${version}";
-    sha256 = "sha256-yqOhlbOgDIAsxgQWoLKj7WpwJXvxeuW8yCvuKTtE7h0=";
+    sha256 = "sha256-SqKXxmyP31kb6ikMQRqPaKNIpeLcMLLEGInCGIx5jWM=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index a8711a3eff5..f5dbb30d65f 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -6,7 +6,6 @@
 , libelf, libvdpau
 , libglvnd, libunwind
 , galliumDrivers ? ["auto"]
-, driDrivers ? ["auto"]
 , vulkanDrivers ? ["auto"]
 , eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ]
 , OpenGL, Xplugin
@@ -34,7 +33,7 @@ with lib;
 let
   # Release calendar: https://www.mesa3d.org/release-calendar.html
   # Release frequency: https://www.mesa3d.org/releasing.html#schedule
-  version = "21.3.8";
+  version = "22.0.1";
   branch  = versions.major version;
 
 self = stdenv.mkDerivation {
@@ -48,7 +47,7 @@ self = stdenv.mkDerivation {
       "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
       "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
     ];
-    sha256 = "19wx5plk6z0hhi0zdzxjx8ynl3lhlc5mbd8vhwqyk92kvhxjf3g7";
+    sha256 = "0vs20kyq9sxh52hd242yf7nz2wzw6di8jw7s19pb6q25qn19cpy0";
   };
 
   # TODO:
@@ -114,7 +113,6 @@ self = stdenv.mkDerivation {
     "-Ddri-search-path=${libglvnd.driverLink}/lib/dri"
 
     "-Dplatforms=${concatStringsSep "," eglPlatforms}"
-    "-Ddri-drivers=${concatStringsSep "," driDrivers}"
     "-Dgallium-drivers=${concatStringsSep "," galliumDrivers}"
     "-Dvulkan-drivers=${concatStringsSep "," vulkanDrivers}"
 
diff --git a/pkgs/development/libraries/mpich/default.nix b/pkgs/development/libraries/mpich/default.nix
index ae73a7991eb..60e543c4629 100644
--- a/pkgs/development/libraries/mpich/default.nix
+++ b/pkgs/development/libraries/mpich/default.nix
@@ -22,6 +22,9 @@ stdenv.mkDerivation  rec {
     "--enable-shared"
     "--enable-sharedlib"
     "--with-pm=${withPm}"
+  ] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [
+    "FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
+    "FCFLAGS=-fallow-argument-mismatch"
   ];
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/mvapich/default.nix b/pkgs/development/libraries/mvapich/default.nix
index c496927ebca..0f358c27962 100644
--- a/pkgs/development/libraries/mvapich/default.nix
+++ b/pkgs/development/libraries/mvapich/default.nix
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
     "--enable-threads=multiple"
     "--enable-hybrid"
     "--enable-shared"
+    "FFLAGS=-fallow-argument-mismatch" # fix build with gfortran 10
   ] ++ optional useSlurm "--with-pm=slurm"
     ++ optional (network == "ethernet") "--with-device=ch3:sock"
     ++ optionals (network == "infiniband") [ "--with-device=ch3:mrail" "--with-rdma=gen2" ]
diff --git a/pkgs/development/libraries/netcdf-fortran/default.nix b/pkgs/development/libraries/netcdf-fortran/default.nix
index 40f22b0cabe..d64d631f94c 100644
--- a/pkgs/development/libraries/netcdf-fortran/default.nix
+++ b/pkgs/development/libraries/netcdf-fortran/default.nix
@@ -15,6 +15,9 @@ stdenv.mkDerivation rec {
     ++ lib.optional stdenv.isDarwin CoreFoundation;
   doCheck = true;
 
+  FFLAGS = [ "-std=legacy" ];
+  FCFLAGS = [ "-std=legacy" ];
+
   meta = with lib; {
     description = "Fortran API to manipulate netcdf files";
     homepage = "https://www.unidata.ucar.edu/software/netcdf/";
diff --git a/pkgs/development/libraries/nss/esr.nix b/pkgs/development/libraries/nss/esr.nix
new file mode 100644
index 00000000000..a958fa059d6
--- /dev/null
+++ b/pkgs/development/libraries/nss/esr.nix
@@ -0,0 +1,4 @@
+import ./generic.nix {
+  version = "3.68.3";
+  sha256 = "sha256-5NDZsLVhfLM0gSZC7YAfjlH1mVyN2FwN78jMra/Lwzc=";
+}
diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/generic.nix
index 454c09e1b02..3d109b96790 100644
--- a/pkgs/development/libraries/nss/default.nix
+++ b/pkgs/development/libraries/nss/generic.nix
@@ -1,3 +1,4 @@
+{ version, sha256 }:
 { lib
 , stdenv
 , fetchurl
@@ -22,14 +23,7 @@ let
     sha256 = "10ibz6y0hknac15zr6dw4gv9nb5r5z9ym6gq18j3xqx7v7n3vpdw";
   };
 
-  # NOTE: Whenever you updated this version check if the `cacert` package also
-  #       needs an update. You can run the regular updater script for cacerts.
-  #       It will rebuild itself using the version of this package (NSS) and if
-  #       an update is required do the required changes to the expression.
-  #       Example: nix-shell ./maintainers/scripts/update.nix --argstr package cacert
-  version = "3.76";
   underscoreVersion = lib.replaceStrings [ "." ] [ "_" ] version;
-
 in
 stdenv.mkDerivation rec {
   pname = "nss";
@@ -37,7 +31,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://mozilla/security/nss/releases/NSS_${underscoreVersion}_RTM/src/${pname}-${version}.tar.gz";
-    sha256 = "0c0nmajcvnm8gqz2v6wrlq04yzy3y7hcs806wjnx4r6kml8073hv";
+    inherit sha256;
   };
 
   depsBuildBuild = [ buildPackages.stdenv.cc ];
@@ -192,7 +186,7 @@ stdenv.mkDerivation rec {
     homepage = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS";
     description = "A set of libraries for development of security-enabled client and server applications";
     changelog = "https://github.com/nss-dev/nss/blob/master/doc/rst/releases/nss_${underscoreVersion}.rst";
-    maintainers = with maintainers; [ ];
+    maintainers = with maintainers; [ hexa ajs124 ];
     license = licenses.mpl20;
     platforms = platforms.all;
   };
diff --git a/pkgs/development/libraries/nss/latest.nix b/pkgs/development/libraries/nss/latest.nix
new file mode 100644
index 00000000000..db8d0179add
--- /dev/null
+++ b/pkgs/development/libraries/nss/latest.nix
@@ -0,0 +1,10 @@
+# NOTE: Whenever you updated this version check if the `cacert` package also
+#       needs an update. You can run the regular updater script for cacerts.
+#       It will rebuild itself using the version of this package (NSS) and if
+#       an update is required do the required changes to the expression.
+#       Example: nix-shell ./maintainers/scripts/update.nix --argstr package cacert
+
+import ./generic.nix {
+  version = "3.76.1";
+  sha256 = "0ai37ncg50n4s5243bfvsip8isqq1y6w2swg1n4xgqg2fk1h8cg1";
+}
diff --git a/pkgs/development/libraries/openvino/default.nix b/pkgs/development/libraries/openvino/default.nix
index 6e253b97318..0b870bf9e40 100644
--- a/pkgs/development/libraries/openvino/default.nix
+++ b/pkgs/development/libraries/openvino/default.nix
@@ -129,6 +129,8 @@ stdenv.mkDerivation rec {
     '';
     homepage = "https://docs.openvinotoolkit.org/";
     license = with licenses; [ asl20 ];
+    platforms = platforms.all;
+    broken = stdenv.isDarwin; # Cannot find macos sdk
     maintainers = with maintainers; [ tfmoraes ];
   };
 }
diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix
index 5fc8d496ba9..9d4e52acb4d 100644
--- a/pkgs/development/libraries/pcre/default.nix
+++ b/pkgs/development/libraries/pcre/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
   outputs = [ "bin" "dev" "out" "doc" "man" ];
 
   # 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" ++ [
+  configureFlags = optional (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit=auto" ++ [
     "--enable-unicode-properties"
     "--disable-cpp"
   ]
diff --git a/pkgs/development/libraries/pcre2/default.nix b/pkgs/development/libraries/pcre2/default.nix
index 8393cb8c591..0c57b4cd5cf 100644
--- a/pkgs/development/libraries/pcre2/default.nix
+++ b/pkgs/development/libraries/pcre2/default.nix
@@ -15,9 +15,7 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--enable-pcre2-16"
     "--enable-pcre2-32"
-  ] ++ lib.optional (!stdenv.hostPlatform.isRiscV &&
-                     !(stdenv.hostPlatform.isDarwin &&
-                       stdenv.hostPlatform.isAarch64)) "--enable-jit";
+  ] ++ lib.optional (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit=auto";
 
   outputs = [ "bin" "dev" "out" "doc" "man" "devdoc" ];
 
diff --git a/pkgs/development/libraries/physics/qcdnum/default.nix b/pkgs/development/libraries/physics/qcdnum/default.nix
index 834e3fcbba8..f09a1a0e19b 100644
--- a/pkgs/development/libraries/physics/qcdnum/default.nix
+++ b/pkgs/development/libraries/physics/qcdnum/default.nix
@@ -12,6 +12,10 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ gfortran ];
   buildInputs = [ zlib ];
 
+  FFLAGS = [
+    "-std=legacy" # fix build with gfortran 10
+  ];
+
   enableParallelBuilding = true;
 
   meta = {
diff --git a/pkgs/development/libraries/pmdk/default.nix b/pkgs/development/libraries/pmdk/default.nix
index 6e0b6ab6722..1f02bfa0dab 100644
--- a/pkgs/development/libraries/pmdk/default.nix
+++ b/pkgs/development/libraries/pmdk/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   pname = "pmdk";
-  version = "1.9.2";
+  version = "1.11.1";
 
   src = fetchFromGitHub {
     owner  = "pmem";
     repo   = "pmdk";
     rev    = "refs/tags/${version}";
-    sha256 = "0awmkj6j9y2pbqqmp9ql00s7qa3mnpppa82dfy5324lindq0z8a1";
+    hash = "sha256-8bnyLtgkKfgIjJkfY/ZS1I9aCYcrz0nrdY7m/TUVWAk=";
   };
 
   nativeBuildInputs = [ autoconf pkg-config gnum4 pandoc ];
@@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
 
   patchPhase = "patchShebangs utils";
 
+  NIX_CFLAGS_COMPILE = "-Wno-error";
+
   installPhase = ''
     make install prefix=$out
 
diff --git a/pkgs/development/libraries/polkit-qt-1/default.nix b/pkgs/development/libraries/polkit-qt-1/default.nix
index 86ef2af96e7..e6cb90994d9 100644
--- a/pkgs/development/libraries/polkit-qt-1/default.nix
+++ b/pkgs/development/libraries/polkit-qt-1/default.nix
@@ -14,11 +14,11 @@
 
 mkDerivation rec {
   pname = "polkit-qt-1";
-  version = "0.113.0";
+  version = "0.114.0";
 
   src = fetchurl {
     url = "mirror://kde/stable/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "sha256-W4ZqKVTvEP+2YVbi/orQMhtVKKjfLkqRsC9QQc5VY6c=";
+    sha256 = "sha256-LrDyJEWIgpX/or+8DDaThHoPlzu2sMPkzOAhi+fjkH4=";
   };
 
   nativeBuildInputs = [ cmake pkg-config ];
diff --git a/pkgs/development/libraries/qrupdate/default.nix b/pkgs/development/libraries/qrupdate/default.nix
index 2f119311c1f..d3d821ba1db 100644
--- a/pkgs/development/libraries/qrupdate/default.nix
+++ b/pkgs/development/libraries/qrupdate/default.nix
@@ -25,12 +25,14 @@ stdenv.mkDerivation rec {
       "LAPACK=-L${lapack}/lib -llapack"
       "BLAS=-L${blas}/lib -lblas"
       "PREFIX=${placeholder "out"}"
-      ${lib.optionalString blas.isILP64
-      # If another application intends to use qrupdate compiled with blas with
-      # 64 bit support, it should add this to it's FFLAGS as well. See (e.g):
-      # https://savannah.gnu.org/bugs/?50339
-      "FFLAGS=-fdefault-integer-8"
-      }
+      "FFLAGS=${toString ([
+        "-std=legacy"
+      ] ++ lib.optionals blas.isILP64 [
+        # If another application intends to use qrupdate compiled with blas with
+        # 64 bit support, it should add this to it's FFLAGS as well. See (e.g):
+        # https://savannah.gnu.org/bugs/?50339
+        "-fdefault-integer-8"
+      ])}"
     )
   '';
 
diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix
index a3664ae9e05..01b65eb3e43 100644
--- a/pkgs/development/libraries/qt-5/5.12/default.nix
+++ b/pkgs/development/libraries/qt-5/5.12/default.nix
@@ -84,12 +84,6 @@ let
     qtlocation = [ ./qtlocation-gcc-9.patch ];
     qtscript = [ ./qtscript.patch ];
     qtserialport = [ ./qtserialport.patch ];
-    qtwayland = [
-      # NixOS-specific, ensure that app_id is correctly determined for
-      # wrapped executables from `wrapQtAppsHook` (see comment in patch for further
-      # context).  Beware: shared among different Qt5 versions.
-      ../modules/qtwayland-app_id.patch
-    ];
     qtwebengine = [
       # glibc 2.34 compat
       (fetchpatch {
diff --git a/pkgs/development/libraries/qt-5/5.14/default.nix b/pkgs/development/libraries/qt-5/5.14/default.nix
index 2bb0695c8d0..8afff5f0a4b 100644
--- a/pkgs/development/libraries/qt-5/5.14/default.nix
+++ b/pkgs/development/libraries/qt-5/5.14/default.nix
@@ -126,13 +126,6 @@ let
       ./qtwebkit-darwin-no-qos-classes.patch
     ];
     qttools = [ ./qttools.patch ];
-    qtwayland = [
-      ./qtwayland-libdrm-build.patch
-      # NixOS-specific, ensure that app_id is correctly determined for
-      # wrapped executables from `wrapQtAppsHook` (see comment in patch for further
-      # context).  Beware: shared among different Qt5 versions.
-      ../modules/qtwayland-app_id.patch
-    ];
   };
 
   addPackages = self: with self;
diff --git a/pkgs/development/libraries/qt-5/5.14/qtwayland-libdrm-build.patch b/pkgs/development/libraries/qt-5/5.14/qtwayland-libdrm-build.patch
deleted file mode 100644
index fb3d6327e45..00000000000
--- a/pkgs/development/libraries/qt-5/5.14/qtwayland-libdrm-build.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-commit 7217ea9cf297e664be876eb82b66a1b4f157ca80
-Author: Peter Seiderer <ps.report@gmx.net>
-Date:   Fri Apr 3 21:52:30 2020 +0200
-
-    fix libdrm related configure test failure
-    
-    Fixes:
-    
-      Project ERROR: Test config.qtwayland_client.tests.dmabuf-server-buffer tries to use undeclared library 'drm'
-      Project ERROR: Test config.qtwayland_compositor.tests.dmabuf-server-buffer tries to use undeclared library 'drm'
-      Project ERROR: Test config.qtwayland_compositor.tests.dmabuf-client-buffer tries to use undeclared library 'drm'
-    
-    Task-number: QTBUG-83303
-    Change-Id: I3970f4e3855fcfa760493631a14adb6a16950aa9
-    Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
-    Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
-    Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-    (cherry picked from commit ca63fe81df8ac910f43539719566ed6745700c2b)
-    (cherry picked from commit 1344ca6b5a8fbc1b28727feea6d856af8bf3bc93)
-
-diff --git a/src/client/configure.json b/src/client/configure.json
-index 06213968..27c73f89 100644
---- a/src/client/configure.json
-+++ b/src/client/configure.json
-@@ -74,7 +74,8 @@
-             "label": "Linux dma-buf Buffer Sharing",
-             "type": "compile",
-             "test": "dmabuf_server_buffer",
--            "use": "egl drm"
-+            "libs": "-ldrm",
-+            "use": "egl"
-         },
-         "vulkan-server-buffer": {
-             "label": "Vulkan Buffer Sharing",
-diff --git a/src/compositor/configure.json b/src/compositor/configure.json
-index 0dbb3364..73e4c1a8 100644
---- a/src/compositor/configure.json
-+++ b/src/compositor/configure.json
-@@ -80,13 +80,15 @@
-             "label": "Linux dma-buf Buffer Sharing",
-             "type": "compile",
-             "test": "dmabuf_server_buffer",
--            "use": "egl drm"
-+            "libs": "-ldrm",
-+            "use": "egl"
-         },
-         "dmabuf-client-buffer": {
-             "label": "Linux Client dma-buf Buffer Sharing",
-             "type": "compile",
-             "test": "dmabuf_client_buffer",
--            "use": "egl drm"
-+            "libs": "-ldrm",
-+            "use": "egl"
-         },
-         "vulkan-server-buffer": {
-             "label": "Vulkan Buffer Sharing",
diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix
index 946c196f4a2..5943a80a701 100644
--- a/pkgs/development/libraries/qt-5/5.15/default.nix
+++ b/pkgs/development/libraries/qt-5/5.15/default.nix
@@ -60,12 +60,6 @@ let
       ./qtwebengine-darwin-no-platform-check.patch
       ./qtwebengine-mac-dont-set-dsymutil-path.patch
     ];
-    qtwayland = [
-      # NixOS-specific, ensure that app_id is correctly determined for
-      # wrapped executables from `wrapQtAppsHook` (see comment in patch for further
-      # context).  Beware: shared among different Qt5 versions.
-      ../modules/qtwayland-app_id.patch
-    ];
     qtwebkit = [
       (fetchpatch {
         name = "qtwebkit-bison-3.7-build.patch";
diff --git a/pkgs/development/libraries/qt-5/5.15/srcs-generated.json b/pkgs/development/libraries/qt-5/5.15/srcs-generated.json
index 8bf6386c4c6..b772331fc3d 100644
--- a/pkgs/development/libraries/qt-5/5.15/srcs-generated.json
+++ b/pkgs/development/libraries/qt-5/5.15/srcs-generated.json
@@ -1,117 +1,117 @@
 {
   "qt3d": {
     "url": "https://invent.kde.org/qt/qt/qt3d.git",
-    "rev": "dba14d48611b9e9d59576172658779ab4a39b416",
+    "rev": "6d926ec2739f2289c6b0bbfbc325700046e1ceee",
     "sha256": "1w2m1rm6mhj9qbanak36rqvc30x495zvj7mh2syy1yd29by0g5i8"
   },
   "qtactiveqt": {
     "url": "https://invent.kde.org/qt/qt/qtactiveqt.git",
-    "rev": "f0d03da0e37a84029a4eae1733813521482ac1fb",
+    "rev": "2c53a16f431bbb950bfca8ac32ddabf217a0bf04",
     "sha256": "0llk76lf0mh4mzj7pwd8cs55wpmfq8v1bsdzvizb1sx0vfbjh8g6"
   },
   "qtandroidextras": {
     "url": "https://invent.kde.org/qt/qt/qtandroidextras.git",
-    "rev": "8cce1098c59534352aa0f343ea73861f603ac04a",
+    "rev": "1939eada1cdf00052bba32657d9d975c1e255128",
     "sha256": "130a1yda2m7pa10as3rccz84m3617422n6s51pdn4kp8p8rk7cs6"
   },
   "qtbase": {
     "url": "https://invent.kde.org/qt/qt/qtbase.git",
-    "rev": "d16bf02a11953dcac01dca73e6f3778f293adefe",
-    "sha256": "0rpyd5r60707lzfmfi3y501c7is1gzhh30bframsy8bwglck2hjj"
+    "rev": "ee7a89b2c4750bc3cabe4aeb466645d6ac2a872b",
+    "sha256": "10aj4nxfpx34k0if2kl5sxfjpk3sb1r9z7p6haypjpw60cssjbsl"
   },
   "qtcharts": {
     "url": "https://invent.kde.org/qt/qt/qtcharts.git",
-    "rev": "130463160b4923069eb98da49edaf7d93180f4f8",
-    "sha256": "19g35cddbfh307mk76wac1ps03warynlsj7xi8i596bxiaf7i4pw"
+    "rev": "f13988aa1ad9de5d92e7b0ba4d0d947dd019d759",
+    "sha256": "1l7zmdkakc7bc9c10nzijg86ps9f3jpi1nblkfxr6521g0xjrmb8"
   },
   "qtconnectivity": {
     "url": "https://invent.kde.org/qt/qt/qtconnectivity.git",
-    "rev": "5e9ca5d36d65dadb98ef90013a1dcf15fbd7ae26",
-    "sha256": "1lpiq3svlnj8f8apd12if11sng7k0l8y6vhr317srzz4dd77cfry"
+    "rev": "aa2def2bdb76f8fd2454dc4515883fd7b5ddb521",
+    "sha256": "1fy4anhj432fz05kinb67v8ckdp9h7150fhy4dm6hgbjq6y7j16g"
   },
   "qtdatavis3d": {
     "url": "https://invent.kde.org/qt/qt/qtdatavis3d.git",
-    "rev": "c085311c02dd216e5a041b90c164d55b3cf3ce92",
+    "rev": "19af9584f7b80928ee49950c573c770af68c9519",
     "sha256": "0xya1m2csb42yisl90s9822p9q92n7ags909nlbapfsb49qwsqnj"
   },
   "qtdeclarative": {
     "url": "https://invent.kde.org/qt/qt/qtdeclarative.git",
-    "rev": "1d49a5b678957adde7e2db23a485a3f48157bc8f",
-    "sha256": "1wdpgh23mdn0nny9c837iyg9kszc3m4cdmaanf8glymkzn0rkd8w"
+    "rev": "02105099301450c890e1caba977ef44efdc43da7",
+    "sha256": "0wk8a9fbjwrqwb4gj5s78ipg1svdrhz80cykjd6qgkd26dh1p4kn"
   },
   "qtdoc": {
     "url": "https://invent.kde.org/qt/qt/qtdoc.git",
-    "rev": "897e90fe304d844beaf694b82a93a50237fa8b9e",
-    "sha256": "1c4m9vlgg6bfw7hwzanl5s4vslg0r7xiz50lanhqrlcrr9i36xs1"
+    "rev": "ed002122ce74b3505ba55262ddbc842a810e8159",
+    "sha256": "03hb1jgx49rh5gldxq7d85s1ny0yl64nylw7d61dvsgbs422fqn9"
   },
   "qtgamepad": {
     "url": "https://invent.kde.org/qt/qt/qtgamepad.git",
-    "rev": "64afa18a0a1e9588060e2e6d917bb01ccdd48a81",
+    "rev": "6b7a6303439f83147680723f4d8142d676cdb928",
     "sha256": "1h9yb0asprynnb2qyjbmyglrkk9f9v19g6zzpk0gmixrp0h8gk46"
   },
   "qtgraphicaleffects": {
     "url": "https://invent.kde.org/qt/qt/qtgraphicaleffects.git",
-    "rev": "c36998dc1581167b12cc3de8e4ac68c2a5d9f76e",
+    "rev": "379577925766385991f413a2b0d0d46831381ffa",
     "sha256": "0x11n2fym765z3gyb4xnfl7v6zrip1wjkkl6nx1bxaya173fvdw8"
   },
   "qtimageformats": {
     "url": "https://invent.kde.org/qt/qt/qtimageformats.git",
-    "rev": "cb82c74310837fe4e832c8ab72176a5d63e4355f",
-    "sha256": "0j4cv5sa6mm3adcjw8cv6kbzrslmhjc1rgxqgc130l8vm3vmgbkr"
+    "rev": "90038c936763645610fe1e5f05cfc025e4d98631",
+    "sha256": "1yqfz58p7s92jr8d4lk4n0dv6ij8fslh4sxdz0azd0p6077rim77"
   },
   "qtlocation": {
     "url": "https://invent.kde.org/qt/qt/qtlocation.git",
-    "rev": "861e372b6ad81570d4f496e42fb25a6699b72f2f",
-    "sha256": "1g24pg9v6sv5zf80r48innp3h4g0hss69hnr7ygfzfvfnmmn6g52"
+    "rev": "e07f35879536640ad784e71e5261c5a597d504f5",
+    "sha256": "1yhwaz2wyq2hx9bqrcimabj9jbv2kr9h0czxxryh5b9b6aim6ncw"
   },
   "qtlottie": {
     "url": "https://invent.kde.org/qt/qt/qtlottie.git",
-    "rev": "fa8c8bfc6742ab98b61d1351e054e0e73e9a42f4",
+    "rev": "fca3f80f0ce389271e5bd9af864ce56a313d359a",
     "sha256": "1xgykaw8qjnaip6h9jx0nfadc9amb6aclk758vm5pp43dvs5j96r"
   },
   "qtmacextras": {
     "url": "https://invent.kde.org/qt/qt/qtmacextras.git",
-    "rev": "e72896968697e2a8af16a312e1560948e4c40f30",
-    "sha256": "1hndpbr1nnybn7frg76q99bk1c8fhvra6wjm0q78p4a8pinrvcms"
+    "rev": "80bc8d86508579c7a57110c09a44e33f9d8bc0e5",
+    "sha256": "1n9qixhgz66frsp56cr7zzaxcns3ijip46pa9zcz3m0f438n08z7"
   },
   "qtmultimedia": {
     "url": "https://invent.kde.org/qt/qt/qtmultimedia.git",
-    "rev": "bd29c87027637a013f2c5e3b549fcda84e4d7545",
-    "sha256": "11pz9zzrhsr3n78ga7l3kp3gi20rpxsa4iz3wclhcbcm2xr3nd94"
+    "rev": "fa6c3d653682f9fd331d859c7196a291a8a4d8d5",
+    "sha256": "0x4112b93dryfgy6w49z3jqd8xi8pvc3xqfn2j0n0qhdp4vvz5sl"
   },
   "qtnetworkauth": {
     "url": "https://invent.kde.org/qt/qt/qtnetworkauth.git",
-    "rev": "53870ee9bb9117702cd1f11cb1c5d1cfc2d5394a",
+    "rev": "958db00a2064f77b354b573102ca2c2b2e07529c",
     "sha256": "0idaysqpwrghih7ijrm9hagj9jw3fy9nw539fr4d9rmcggnkkzn2"
   },
   "qtpurchasing": {
     "url": "https://invent.kde.org/qt/qt/qtpurchasing.git",
-    "rev": "cbf444fb570ca4f4ca21d963d2ae4010f10d473e",
+    "rev": "255b9e16f286003bbfaff9d48e4548fb0cb3b398",
     "sha256": "1cki7n62wqm3xxn36mka0y67ngn7jvjkrvr08vsassbjb7kfsmxp"
   },
   "qtquick3d": {
     "url": "https://invent.kde.org/qt/qt/qtquick3d.git",
-    "rev": "3e3e53c834b25dc2959dd30f319d12d6f84ee1e3",
-    "sha256": "1b1khfg26zl3p28yvhwjfldqy3flh10pb5hm5z0av03rz7jy7l8s"
+    "rev": "1ede2ac20170357b3e8d7d9810e5474e08170827",
+    "sha256": "1sxlyv1y6aanln7cv1m8fgjkp72lgx2k4q8a23m79g7xryl0xx2a"
   },
   "qtquickcontrols": {
     "url": "https://invent.kde.org/qt/qt/qtquickcontrols.git",
-    "rev": "cf3f6d7fec824cdf01f9b329ab3b92b1c0e0a420",
-    "sha256": "1vxp0kwigwhqyyfm0xg8llyd1l1f4l18hmk6xqkm57xpi15x55bc"
+    "rev": "d054de15b3c9ead0f96655ddfb1a6381ed7a0e2b",
+    "sha256": "0inym59pnr6pk9y4im2fsq1hzs8b4rwqs3x6cgc61z3kqyv74cb6"
   },
   "qtquickcontrols2": {
     "url": "https://invent.kde.org/qt/qt/qtquickcontrols2.git",
-    "rev": "d8d6b14b9907adbc6ce307d52be34aaa761a58fa",
-    "sha256": "15c7nrvvn7qc3l7kdbl5wdpazqwv8zvg1aij2jvcrhbymn0zl3mc"
+    "rev": "26bd7f5414dc592ab5277e2bb4ad0199faa889de",
+    "sha256": "0d53d1fqcc7ccd9ljr3q1qxd7k7kkn6msqa81592pg6b4ridzdsq"
   },
   "qtquicktimeline": {
     "url": "https://invent.kde.org/qt/qt/qtquicktimeline.git",
-    "rev": "67503cdadea43b95ddad0de1a04951aff0ce1a07",
-    "sha256": "0h4b3ibcf6rsmqmcfbwbk9pbvw3b9cac8nx2538aqvnpyyp1vhid"
+    "rev": "98b1ff53458887061b4bcc183efcce899f432394",
+    "sha256": "1q4d88cym0c5vmw40qjp968x5sp7dx4mq6cr1r6px9i0ifvimdrg"
   },
   "qtremoteobjects": {
     "url": "https://invent.kde.org/qt/qt/qtremoteobjects.git",
-    "rev": "4d6d1e35fb8e0cb900b5e5e9266edea51dc4f735",
+    "rev": "581475dfeb44c8b51c0be86e0f2f57df7d117a80",
     "sha256": "1zbxl5jk7x8qklrnbbaikymyviigqdq7vf0wc8gzls4126vcx146"
   },
   "qtscript": {
@@ -121,87 +121,87 @@
   },
   "qtscxml": {
     "url": "https://invent.kde.org/qt/qt/qtscxml.git",
-    "rev": "7a15000f42c7a3171719727cd056f82a78244ed7",
-    "sha256": "1i2ajsj9pb1s4lk4djj1h1ay9mkz1z3m75a747cspyc1p1iymipq"
+    "rev": "50d2da3965ed8e85f3f5f5760393c42b12d34a9f",
+    "sha256": "148qdyw084agpp4n31cfcgk39ppwf9ndifnvihd94c6ksf1ax3ks"
   },
   "qtsensors": {
     "url": "https://invent.kde.org/qt/qt/qtsensors.git",
-    "rev": "921a31375f29e429e95352b08b2b9dbfea663cb1",
-    "sha256": "1ijayk6lf34nwv7s3ib3cfqx9sjrmr1c6jnziwmxa1l6fy3ik4g8"
+    "rev": "975ba788d3d0ee87aa08bb5301cd33dcbf00521b",
+    "sha256": "13x0d0ky5dybp1lq39yy82xg7hxdvmksam8r85gqargsi0zr5s8x"
   },
   "qtserialbus": {
     "url": "https://invent.kde.org/qt/qt/qtserialbus.git",
-    "rev": "8884c5e43df846deac5a0c7c290eeb633d6bfe32",
-    "sha256": "1ydb5x21j26pl58mr6klnwixkqx8h119nvnzvyawz83gji3ay3a5"
+    "rev": "22b3cad193232ab379a0c9e16989a7db1fdc9234",
+    "sha256": "1j084szvdmfxbc9n37phxsd7k4vxd073vwy1hcnjhmpyg9hwrw81"
   },
   "qtserialport": {
     "url": "https://invent.kde.org/qt/qt/qtserialport.git",
-    "rev": "941d1d8560d1f3e40077c251fbde6fd6a5b0f0d4",
+    "rev": "f95e2411d7c978def87846ea7cedf3dc5fd7c8b8",
     "sha256": "0x7ly67gddmz0hqls9109bk4rgaa97ksyv24qk4brrhzkpr7q9cx"
   },
   "qtspeech": {
     "url": "https://invent.kde.org/qt/qt/qtspeech.git",
-    "rev": "a0efc38377e5bf7eed2d354d1cb4d7a0d5dc7e1b",
-    "sha256": "1ljf45f65pfp8x367qnzl0ssz7n17cxhk29qvqpz9z7rh65zqix5"
+    "rev": "08b27c29aadc0cc0303cca97c9a3baa2a690dfe4",
+    "sha256": "0lm6i85d7zav43lsrxnhdqcq68np32s3widla8z6c208q1pf3qs6"
   },
   "qtsvg": {
     "url": "https://invent.kde.org/qt/qt/qtsvg.git",
-    "rev": "728012f7762ecd5762d493f8796907c6456f31e7",
+    "rev": "2f42157cabbd1db6249ccb1d14e6eede80451e0c",
     "sha256": "1ldizgybl4fp95xlzf103hqmsqdmr3jbx048jyxcb5gjd3pbwh7p"
   },
   "qttools": {
     "url": "https://invent.kde.org/qt/qt/qttools.git",
-    "rev": "33693a928986006d79c1ee743733cde5966ac402",
-    "sha256": "02n0lppsp6g4s9bdvnfxpf7ndkbs9bzm0clcwvirwf2cd8q95a4n"
+    "rev": "a3e5b2eb8ef5982bc1fffb390ebcd141be1deee4",
+    "sha256": "1x7vzqvc80k0fanvahibmglcv4za07hfiamp26wkhmk0g634ms2q"
   },
   "qttranslations": {
     "url": "https://invent.kde.org/qt/qt/qttranslations.git",
-    "rev": "8fbbdf21f127197f97b58c7d80d2fa2a59135638",
+    "rev": "a6d5e7f84a57394db4c8b069f81c56cfeb802e19",
     "sha256": "06r2jb2fsdr5fvxs748war0lr4mm3l3d3b37xc4n73y294vwrmn7"
   },
   "qtvirtualkeyboard": {
     "url": "https://invent.kde.org/qt/qt/qtvirtualkeyboard.git",
-    "rev": "98d1fd864cbb6c7c012c4139118808af110fb8f0",
-    "sha256": "07xjmhca7z5bva03zk73d948qz0a3wnn4kvyy6j4cnp3w5giz5kc"
+    "rev": "bb40dee811333929dd467a480dce24ab7af84ef9",
+    "sha256": "0w6li1qwm2x4plzixd1dv6s1jvcmyrbaw328sri2cmiswajhywdw"
   },
   "qtwayland": {
     "url": "https://invent.kde.org/qt/qt/qtwayland.git",
-    "rev": "214f7ab9d3384a4123f14d9f6cd0205cf0aaa794",
-    "sha256": "1qd64w5c16gmpgi936dfjc0pn1a1rbs752k8lfqv2xwysx7qkqwi"
+    "rev": "118674630cdb5933e66a8b4415afe7c716ad4662",
+    "sha256": "1zvx11z0cfv2avj211zsh79806m6mdkk3kczwhcd98k1qs9r9d3p"
   },
   "qtwebchannel": {
     "url": "https://invent.kde.org/qt/qt/qtwebchannel.git",
-    "rev": "fa8b07105b5e274daaa8adcc129fa4aa0447f9f7",
+    "rev": "611016a49f3a9ba7b58bef29bc295323e06373ae",
     "sha256": "0mggqa8kixknbm1p5i5lkrmkj1na3b2xflj011dkjbj8wb78i42n"
   },
   "qtwebglplugin": {
     "url": "https://invent.kde.org/qt/qt/qtwebglplugin.git",
-    "rev": "550a8cee241bbf8c11863dec9587d579dcb1108b",
+    "rev": "4318ad91c2a8bea3a0aaaa64aaf49d3b997e50a1",
     "sha256": "0p1y0b8zsm7rrkhhylndp282ghgki2cjrgc4n5zhjn732ahxg515"
   },
   "qtwebsockets": {
     "url": "https://invent.kde.org/qt/qt/qtwebsockets.git",
-    "rev": "b13b56904b76e96ea52d0efe56395acc94b17d96",
-    "sha256": "047asrq7c44v7cn2d7c5zba47qzpsb6nidba77i2xn7gqlfv6z3b"
+    "rev": "7196d2cc34adf9f45b50a9488f4ff95b36092993",
+    "sha256": "1a7n5i4s6nsb19z4r3m3w7gadjpp0irm77ysk61axqjda4ypi7fw"
   },
   "qtwebview": {
     "url": "https://invent.kde.org/qt/qt/qtwebview.git",
-    "rev": "920de5f1cd9f9001cfef1bfd2c19e6720793362f",
-    "sha256": "04hnqalabhypkd2hgl45jxf9p1p6dgjwlc5b7gs4f6588lafgd3f"
+    "rev": "ec4de0cec2299f4ae0228ea2c71011e0520ca40e",
+    "sha256": "1na9xv2q4wwy10bcr7684i59d9a20n6s91m12n49yjgrhpn4f4jv"
   },
   "qtwinextras": {
     "url": "https://invent.kde.org/qt/qt/qtwinextras.git",
-    "rev": "3df03dab21f3e84d5a7274c64dd879854ca1bfe7",
-    "sha256": "12dkw982xcm7hxw3lxhg34wny4srbickxm9s3nz7bdyp9dmqnygx"
+    "rev": "051202df9c553d7c0a384f07bd67fde98f3b02c4",
+    "sha256": "0d8y4x41slqjr3nflb14ah1wl2hrlir7331ch9k1qfrk3798a760"
   },
   "qtx11extras": {
     "url": "https://invent.kde.org/qt/qt/qtx11extras.git",
-    "rev": "3898f5484fd4864b047729bfeda9a1222f32364f",
+    "rev": "f628d7a60e45d90a439cb0a393a6229ac6892be5",
     "sha256": "04rp8arml19b03iybd7sa78dsdv7386m9ymmgqciwl13dhwjssra"
   },
   "qtxmlpatterns": {
     "url": "https://invent.kde.org/qt/qt/qtxmlpatterns.git",
-    "rev": "189e28d0aff1f3d7960228ba318b83e3cadac98c",
+    "rev": "af4958af9d628d6124e64abd9743abce42f15a6f",
     "sha256": "0vs9j2i1dnlivcrzz175zz66ql1m8mrdqkglvyqjqv6cb7mpskrq"
   }
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix
index 0222a708bb8..c3da951ca52 100644
--- a/pkgs/development/libraries/qt-5/modules/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix
@@ -7,11 +7,10 @@
 , libiconv, libobjc, xcbuild, AGL, AppKit, ApplicationServices, Carbon, Cocoa, CoreAudio, CoreBluetooth
 , CoreLocation, CoreServices, DiskArbitration, Foundation, OpenGL, MetalKit, IOKit
 
-, dbus, fontconfig, freetype, glib, harfbuzz, icu, libX11, libXcomposite
-, libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng
-, libxcb, libxkbcommon, libxml2, libxslt, openssl, pcre16, pcre2, sqlite, udev
-, xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm
-, zlib, at-spi2-core
+, dbus, fontconfig, freetype, glib, harfbuzz, icu, libdrm, libX11, libXcomposite
+, libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng , libxcb
+, libxkbcommon, libxml2, libxslt, openssl, pcre16, pcre2, sqlite, udev, xcbutil
+, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm , zlib, at-spi2-core
 
   # optional dependencies
 , cups ? null, libmysqlclient ? null, postgresql ? null
@@ -62,6 +61,8 @@ stdenv.mkDerivation {
       # Text rendering
       fontconfig freetype
 
+      libdrm
+
       # X11 libs
       libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil
       xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm
@@ -151,6 +152,9 @@ stdenv.mkDerivation {
     ''}
 
     NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\""
+
+    # paralellize compilation of qtmake, which happens within ./configure
+    export MAKEFLAGS+=" -j$NIX_BUILD_CORES"
   '' + lib.optionalString (compareVersion "5.15.0" >= 0) ''
     ./bin/syncqt.pl -version $version
   '';
diff --git a/pkgs/development/libraries/qt-5/modules/qtwayland.nix b/pkgs/development/libraries/qt-5/modules/qtwayland.nix
index 1bd1adedaf0..851e4ad6966 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwayland.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwayland.nix
@@ -6,4 +6,10 @@ qtModule {
   buildInputs = [ wayland ];
   nativeBuildInputs = [ pkg-config ];
   outputs = [ "out" "dev" "bin" ];
+  patches = [
+    # NixOS-specific, ensure that app_id is correctly determined for
+    # wrapped executables from `wrapQtAppsHook` (see comment in patch for further
+    # context).  Beware: shared among different Qt5 versions.
+    ./qtwayland-app_id.patch
+  ];
 }
diff --git a/pkgs/development/libraries/qt-5/qtModule.nix b/pkgs/development/libraries/qt-5/qtModule.nix
index 3323e3fb4cc..b74d5e08680 100644
--- a/pkgs/development/libraries/qt-5/qtModule.nix
+++ b/pkgs/development/libraries/qt-5/qtModule.nix
@@ -14,7 +14,7 @@ in
 
 mkDerivation (args // {
   inherit pname version src;
-  patches = args.patches or patches.${pname} or [];
+  patches = (args.patches or []) ++ (patches.${pname} or []);
 
   nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake ];
   propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
diff --git a/pkgs/development/libraries/re2/default.nix b/pkgs/development/libraries/re2/default.nix
index 2cdad981fbd..4c8249abe87 100644
--- a/pkgs/development/libraries/re2/default.nix
+++ b/pkgs/development/libraries/re2/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "re2";
-  version = "2022-02-01";
+  version = "2022-04-01";
 
   src = fetchFromGitHub {
     owner = "google";
     repo = "re2";
     rev = version;
-    sha256 = "sha256-3RspCfJD2jV7GYuzeBUcxkZsdHyL14kaz8lSoIrH7b8=";
+    sha256 = "sha256-ywmXIAyVWYMKBOsAndcq7dFYpn9ZgNz5YWTPjylXxsk=";
   };
 
   preConfigure = ''
diff --git a/pkgs/development/libraries/rlottie/default.nix b/pkgs/development/libraries/rlottie/default.nix
index f1d3ffd0212..6f641bd6a60 100644
--- a/pkgs/development/libraries/rlottie/default.nix
+++ b/pkgs/development/libraries/rlottie/default.nix
@@ -1,4 +1,11 @@
-{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, meson
+, ninja
+, pkg-config
+}:
 
 stdenv.mkDerivation rec {
   pname = "rlottie";
@@ -11,6 +18,14 @@ stdenv.mkDerivation rec {
     sha256 = "10bxr1zf9wxl55d4cw2j02r6sgqln7mbxplhhfvhw0z92fi40kr3";
   };
 
+  patches = [
+    # Fixed build with GCC 11
+    (fetchpatch {
+       url = "https://github.com/Samsung/rlottie/commit/2d7b1fa2b005bba3d4b45e8ebfa632060e8a157a.patch";
+       hash = "sha256-2JPsj0WiBMMu0N3NUYDrHumvPN2YS8nPq5Zwagx6UWE=";
+    })
+  ];
+
   nativeBuildInputs = [ meson ninja pkg-config ];
 
   meta = with lib; {
diff --git a/pkgs/development/libraries/talloc/default.nix b/pkgs/development/libraries/talloc/default.nix
index 07d830f00ce..cb7af61a63e 100644
--- a/pkgs/development/libraries/talloc/default.nix
+++ b/pkgs/development/libraries/talloc/default.nix
@@ -21,11 +21,12 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [
     pkg-config
-    fixDarwinDylibNames
     python3
     wafHook
     docbook-xsl-nons
     docbook_xml_dtd_42
+  ] ++ lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
   ];
 
   buildInputs = [
diff --git a/pkgs/development/libraries/tpm2-tss/default.nix b/pkgs/development/libraries/tpm2-tss/default.nix
index 5ab4ff3b413..caf00dcca77 100644
--- a/pkgs/development/libraries/tpm2-tss/default.nix
+++ b/pkgs/development/libraries/tpm2-tss/default.nix
@@ -2,6 +2,7 @@
 , autoreconfHook, autoconf-archive, pkg-config, doxygen, perl
 , openssl, json_c, curl, libgcrypt
 , cmocka, uthash, ibm-sw-tpm2, iproute2, procps, which
+, shadow
 }:
 let
   # Avoid a circular dependency on Linux systems (systemd depends on tpm2-tss,
@@ -14,17 +15,18 @@ in
 
 stdenv.mkDerivation rec {
   pname = "tpm2-tss";
-  version = "3.0.3";
+  version = "3.2.0";
 
   src = fetchFromGitHub {
     owner = "tpm2-software";
     repo = pname;
     rev = version;
-    sha256 = "106yhsjwjadxsl9dqxywg287mdwsksman02hdalhav18vcnvnlpj";
+    sha256 = "1jijxnvjcsgz5yw4i9fj7ycdnnz90r3l0zicpwinswrw47ac3yy5";
   };
 
   nativeBuildInputs = [
     autoreconfHook autoconf-archive pkg-config doxygen perl
+    shadow
   ];
 
   # cmocka is checked / used(?) in the configure script
@@ -85,6 +87,6 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/tpm2-software/tpm2-tss";
     license = licenses.bsd2;
     platforms = platforms.linux;
-    maintainers = with maintainers; [ delroth ];
+    maintainers = with maintainers; [ ];
   };
 }
diff --git a/pkgs/development/libraries/zlib/CVE-2018-25032-1.patch b/pkgs/development/libraries/zlib/CVE-2018-25032-1.patch
new file mode 100644
index 00000000000..1ade02654e5
--- /dev/null
+++ b/pkgs/development/libraries/zlib/CVE-2018-25032-1.patch
@@ -0,0 +1,346 @@
+From 5c44459c3b28a9bd3283aaceab7c615f8020c531 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Tue, 17 Apr 2018 22:09:22 -0700
+Subject: [PATCH 1/2] Fix a bug that can crash deflate on some input when using
+ Z_FIXED.
+
+This bug was reported by Danilo Ramos of Eideticom, Inc. It has
+lain in wait 13 years before being found! The bug was introduced
+in zlib 1.2.2.2, with the addition of the Z_FIXED option. That
+option forces the use of fixed Huffman codes. For rare inputs with
+a large number of distant matches, the pending buffer into which
+the compressed data is written can overwrite the distance symbol
+table which it overlays. That results in corrupted output due to
+invalid distances, and can result in out-of-bound accesses,
+crashing the application.
+
+The fix here combines the distance buffer and literal/length
+buffers into a single symbol buffer. Now three bytes of pending
+buffer space are opened up for each literal or length/distance
+pair consumed, instead of the previous two bytes. This assures
+that the pending buffer cannot overwrite the symbol table, since
+the maximum fixed code compressed length/distance is 31 bits, and
+since there are four bytes of pending space for every three bytes
+of symbol space.
+---
+ deflate.c | 74 ++++++++++++++++++++++++++++++++++++++++---------------
+ deflate.h | 25 +++++++++----------
+ trees.c   | 50 +++++++++++--------------------------
+ 3 files changed, 79 insertions(+), 70 deletions(-)
+
+diff --git a/deflate.c b/deflate.c
+index 425babc..19cba87 100644
+--- a/deflate.c
++++ b/deflate.c
+@@ -255,11 +255,6 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
+     int wrap = 1;
+     static const char my_version[] = ZLIB_VERSION;
+ 
+-    ushf *overlay;
+-    /* We overlay pending_buf and d_buf+l_buf. This works since the average
+-     * output size for (length,distance) codes is <= 24 bits.
+-     */
+-
+     if (version == Z_NULL || version[0] != my_version[0] ||
+         stream_size != sizeof(z_stream)) {
+         return Z_VERSION_ERROR;
+@@ -329,9 +324,47 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
+ 
+     s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
+ 
+-    overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
+-    s->pending_buf = (uchf *) overlay;
+-    s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
++    /* We overlay pending_buf and sym_buf. This works since the average size
++     * for length/distance pairs over any compressed block is assured to be 31
++     * bits or less.
++     *
++     * Analysis: The longest fixed codes are a length code of 8 bits plus 5
++     * extra bits, for lengths 131 to 257. The longest fixed distance codes are
++     * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest
++     * possible fixed-codes length/distance pair is then 31 bits total.
++     *
++     * sym_buf starts one-fourth of the way into pending_buf. So there are
++     * three bytes in sym_buf for every four bytes in pending_buf. Each symbol
++     * in sym_buf is three bytes -- two for the distance and one for the
++     * literal/length. As each symbol is consumed, the pointer to the next
++     * sym_buf value to read moves forward three bytes. From that symbol, up to
++     * 31 bits are written to pending_buf. The closest the written pending_buf
++     * bits gets to the next sym_buf symbol to read is just before the last
++     * code is written. At that time, 31*(n-2) bits have been written, just
++     * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at
++     * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1
++     * symbols are written.) The closest the writing gets to what is unread is
++     * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and
++     * can range from 128 to 32768.
++     *
++     * Therefore, at a minimum, there are 142 bits of space between what is
++     * written and what is read in the overlain buffers, so the symbols cannot
++     * be overwritten by the compressed data. That space is actually 139 bits,
++     * due to the three-bit fixed-code block header.
++     *
++     * That covers the case where either Z_FIXED is specified, forcing fixed
++     * codes, or when the use of fixed codes is chosen, because that choice
++     * results in a smaller compressed block than dynamic codes. That latter
++     * condition then assures that the above analysis also covers all dynamic
++     * blocks. A dynamic-code block will only be chosen to be emitted if it has
++     * fewer bits than a fixed-code block would for the same set of symbols.
++     * Therefore its average symbol length is assured to be less than 31. So
++     * the compressed data for a dynamic block also cannot overwrite the
++     * symbols from which it is being constructed.
++     */
++
++    s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 4);
++    s->pending_buf_size = (ulg)s->lit_bufsize * 4;
+ 
+     if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
+         s->pending_buf == Z_NULL) {
+@@ -340,8 +373,12 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
+         deflateEnd (strm);
+         return Z_MEM_ERROR;
+     }
+-    s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
+-    s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
++    s->sym_buf = s->pending_buf + s->lit_bufsize;
++    s->sym_end = (s->lit_bufsize - 1) * 3;
++    /* We avoid equality with lit_bufsize*3 because of wraparound at 64K
++     * on 16 bit machines and because stored blocks are restricted to
++     * 64K-1 bytes.
++     */
+ 
+     s->level = level;
+     s->strategy = strategy;
+@@ -552,7 +589,7 @@ int ZEXPORT deflatePrime (strm, bits, value)
+ 
+     if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
+     s = strm->state;
+-    if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
++    if (s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
+         return Z_BUF_ERROR;
+     do {
+         put = Buf_size - s->bi_valid;
+@@ -1113,7 +1150,6 @@ int ZEXPORT deflateCopy (dest, source)
+ #else
+     deflate_state *ds;
+     deflate_state *ss;
+-    ushf *overlay;
+ 
+ 
+     if (deflateStateCheck(source) || dest == Z_NULL) {
+@@ -1133,8 +1169,7 @@ int ZEXPORT deflateCopy (dest, source)
+     ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
+     ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));
+     ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));
+-    overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
+-    ds->pending_buf = (uchf *) overlay;
++    ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, 4);
+ 
+     if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
+         ds->pending_buf == Z_NULL) {
+@@ -1148,8 +1183,7 @@ int ZEXPORT deflateCopy (dest, source)
+     zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
+ 
+     ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
+-    ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
+-    ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
++    ds->sym_buf = ds->pending_buf + ds->lit_bufsize;
+ 
+     ds->l_desc.dyn_tree = ds->dyn_ltree;
+     ds->d_desc.dyn_tree = ds->dyn_dtree;
+@@ -1925,7 +1959,7 @@ local block_state deflate_fast(s, flush)
+         FLUSH_BLOCK(s, 1);
+         return finish_done;
+     }
+-    if (s->last_lit)
++    if (s->sym_next)
+         FLUSH_BLOCK(s, 0);
+     return block_done;
+ }
+@@ -2056,7 +2090,7 @@ local block_state deflate_slow(s, flush)
+         FLUSH_BLOCK(s, 1);
+         return finish_done;
+     }
+-    if (s->last_lit)
++    if (s->sym_next)
+         FLUSH_BLOCK(s, 0);
+     return block_done;
+ }
+@@ -2131,7 +2165,7 @@ local block_state deflate_rle(s, flush)
+         FLUSH_BLOCK(s, 1);
+         return finish_done;
+     }
+-    if (s->last_lit)
++    if (s->sym_next)
+         FLUSH_BLOCK(s, 0);
+     return block_done;
+ }
+@@ -2170,7 +2204,7 @@ local block_state deflate_huff(s, flush)
+         FLUSH_BLOCK(s, 1);
+         return finish_done;
+     }
+-    if (s->last_lit)
++    if (s->sym_next)
+         FLUSH_BLOCK(s, 0);
+     return block_done;
+ }
+diff --git a/deflate.h b/deflate.h
+index 23ecdd3..d4cf1a9 100644
+--- a/deflate.h
++++ b/deflate.h
+@@ -217,7 +217,7 @@ typedef struct internal_state {
+     /* Depth of each subtree used as tie breaker for trees of equal frequency
+      */
+ 
+-    uchf *l_buf;          /* buffer for literals or lengths */
++    uchf *sym_buf;        /* buffer for distances and literals/lengths */
+ 
+     uInt  lit_bufsize;
+     /* Size of match buffer for literals/lengths.  There are 4 reasons for
+@@ -239,13 +239,8 @@ typedef struct internal_state {
+      *   - I can't count above 4
+      */
+ 
+-    uInt last_lit;      /* running index in l_buf */
+-
+-    ushf *d_buf;
+-    /* Buffer for distances. To simplify the code, d_buf and l_buf have
+-     * the same number of elements. To use different lengths, an extra flag
+-     * array would be necessary.
+-     */
++    uInt sym_next;      /* running index in sym_buf */
++    uInt sym_end;       /* symbol table full when sym_next reaches this */
+ 
+     ulg opt_len;        /* bit length of current block with optimal trees */
+     ulg static_len;     /* bit length of current block with static trees */
+@@ -325,20 +320,22 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
+ 
+ # define _tr_tally_lit(s, c, flush) \
+   { uch cc = (c); \
+-    s->d_buf[s->last_lit] = 0; \
+-    s->l_buf[s->last_lit++] = cc; \
++    s->sym_buf[s->sym_next++] = 0; \
++    s->sym_buf[s->sym_next++] = 0; \
++    s->sym_buf[s->sym_next++] = cc; \
+     s->dyn_ltree[cc].Freq++; \
+-    flush = (s->last_lit == s->lit_bufsize-1); \
++    flush = (s->sym_next == s->sym_end); \
+    }
+ # define _tr_tally_dist(s, distance, length, flush) \
+   { uch len = (uch)(length); \
+     ush dist = (ush)(distance); \
+-    s->d_buf[s->last_lit] = dist; \
+-    s->l_buf[s->last_lit++] = len; \
++    s->sym_buf[s->sym_next++] = dist; \
++    s->sym_buf[s->sym_next++] = dist >> 8; \
++    s->sym_buf[s->sym_next++] = len; \
+     dist--; \
+     s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
+     s->dyn_dtree[d_code(dist)].Freq++; \
+-    flush = (s->last_lit == s->lit_bufsize-1); \
++    flush = (s->sym_next == s->sym_end); \
+   }
+ #else
+ # define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
+diff --git a/trees.c b/trees.c
+index 4f4a650..decaeb7 100644
+--- a/trees.c
++++ b/trees.c
+@@ -416,7 +416,7 @@ local void init_block(s)
+ 
+     s->dyn_ltree[END_BLOCK].Freq = 1;
+     s->opt_len = s->static_len = 0L;
+-    s->last_lit = s->matches = 0;
++    s->sym_next = s->matches = 0;
+ }
+ 
+ #define SMALLEST 1
+@@ -948,7 +948,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
+ 
+         Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
+                 opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
+-                s->last_lit));
++                s->sym_next / 3));
+ 
+         if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
+ 
+@@ -1017,8 +1017,9 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
+     unsigned dist;  /* distance of matched string */
+     unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
+ {
+-    s->d_buf[s->last_lit] = (ush)dist;
+-    s->l_buf[s->last_lit++] = (uch)lc;
++    s->sym_buf[s->sym_next++] = dist;
++    s->sym_buf[s->sym_next++] = dist >> 8;
++    s->sym_buf[s->sym_next++] = lc;
+     if (dist == 0) {
+         /* lc is the unmatched char */
+         s->dyn_ltree[lc].Freq++;
+@@ -1033,30 +1034,7 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
+         s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
+         s->dyn_dtree[d_code(dist)].Freq++;
+     }
+-
+-#ifdef TRUNCATE_BLOCK
+-    /* Try to guess if it is profitable to stop the current block here */
+-    if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
+-        /* Compute an upper bound for the compressed length */
+-        ulg out_length = (ulg)s->last_lit*8L;
+-        ulg in_length = (ulg)((long)s->strstart - s->block_start);
+-        int dcode;
+-        for (dcode = 0; dcode < D_CODES; dcode++) {
+-            out_length += (ulg)s->dyn_dtree[dcode].Freq *
+-                (5L+extra_dbits[dcode]);
+-        }
+-        out_length >>= 3;
+-        Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
+-               s->last_lit, in_length, out_length,
+-               100L - out_length*100L/in_length));
+-        if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
+-    }
+-#endif
+-    return (s->last_lit == s->lit_bufsize-1);
+-    /* We avoid equality with lit_bufsize because of wraparound at 64K
+-     * on 16 bit machines and because stored blocks are restricted to
+-     * 64K-1 bytes.
+-     */
++    return (s->sym_next == s->sym_end);
+ }
+ 
+ /* ===========================================================================
+@@ -1069,13 +1047,14 @@ local void compress_block(s, ltree, dtree)
+ {
+     unsigned dist;      /* distance of matched string */
+     int lc;             /* match length or unmatched char (if dist == 0) */
+-    unsigned lx = 0;    /* running index in l_buf */
++    unsigned sx = 0;    /* running index in sym_buf */
+     unsigned code;      /* the code to send */
+     int extra;          /* number of extra bits to send */
+ 
+-    if (s->last_lit != 0) do {
+-        dist = s->d_buf[lx];
+-        lc = s->l_buf[lx++];
++    if (s->sym_next != 0) do {
++        dist = s->sym_buf[sx++] & 0xff;
++        dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
++        lc = s->sym_buf[sx++];
+         if (dist == 0) {
+             send_code(s, lc, ltree); /* send a literal byte */
+             Tracecv(isgraph(lc), (stderr," '%c' ", lc));
+@@ -1100,11 +1079,10 @@ local void compress_block(s, ltree, dtree)
+             }
+         } /* literal or match pair ? */
+ 
+-        /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
+-        Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
+-               "pendingBuf overflow");
++        /* Check that the overlay between pending_buf and sym_buf is ok: */
++        Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow");
+ 
+-    } while (lx < s->last_lit);
++    } while (sx < s->sym_next);
+ 
+     send_code(s, END_BLOCK, ltree);
+ }
+-- 
+2.33.1
+
diff --git a/pkgs/development/libraries/zlib/CVE-2018-25032-2.patch b/pkgs/development/libraries/zlib/CVE-2018-25032-2.patch
new file mode 100644
index 00000000000..dadc904a07f
--- /dev/null
+++ b/pkgs/development/libraries/zlib/CVE-2018-25032-2.patch
@@ -0,0 +1,27 @@
+From 4346a16853e19b45787ce933666026903fb8f3f8 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Tue, 17 Apr 2018 22:44:41 -0700
+Subject: [PATCH 2/2] Assure that the number of bits for deflatePrime() is
+ valid.
+
+---
+ deflate.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/deflate.c b/deflate.c
+index 19cba87..23aef18 100644
+--- a/deflate.c
++++ b/deflate.c
+@@ -589,7 +589,8 @@ int ZEXPORT deflatePrime (strm, bits, value)
+ 
+     if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
+     s = strm->state;
+-    if (s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
++    if (bits < 0 || bits > 16 ||
++        s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
+         return Z_BUF_ERROR;
+     do {
+         put = Buf_size - s->bi_valid;
+-- 
+2.33.1
+
diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix
index 656695d6910..b659bd9382a 100644
--- a/pkgs/development/lua-modules/overrides.nix
+++ b/pkgs/development/lua-modules/overrides.nix
@@ -295,7 +295,8 @@ with prev;
 
       buildInputs = [ pkgs.libuv ];
 
-      nativeBuildInputs = [ pkgs.pkg-config pkgs.fixDarwinDylibNames pkgs.cmake ];
+      nativeBuildInputs = [ pkgs.pkg-config pkgs.cmake ]
+        ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [ pkgs.fixDarwinDylibNames ];
   };
 
   luv = prev.lib.overrideLuarocks prev.luv (drv: {
diff --git a/pkgs/development/misc/msp430/mspds/binary.nix b/pkgs/development/misc/msp430/mspds/binary.nix
index 2fc306f8e5f..967562580c6 100644
--- a/pkgs/development/misc/msp430/mspds/binary.nix
+++ b/pkgs/development/misc/msp430/mspds/binary.nix
@@ -17,7 +17,8 @@ in stdenv.mkDerivation rec {
     if stdenv.hostPlatform.isWindows then "MSP430${archPostfix}.dll"
     else "libmsp430${archPostfix}${stdenv.hostPlatform.extensions.sharedLibrary}";
 
-  nativeBuildInputs = [ unzip autoPatchelfHook ];
+  nativeBuildInputs = [ unzip ]
+    ++ lib.optional stdenv.isLinux autoPatchelfHook;
   buildInputs = [ stdenv.cc.cc ];
 
   installPhase = ''
diff --git a/pkgs/development/mobile/androidenv/build-tools.nix b/pkgs/development/mobile/androidenv/build-tools.nix
index 536a025d15b..641560f1992 100644
--- a/pkgs/development/mobile/androidenv/build-tools.nix
+++ b/pkgs/development/mobile/androidenv/build-tools.nix
@@ -2,8 +2,8 @@
 
 deployAndroidPackage {
   inherit package os;
-  buildInputs = [ autoPatchelfHook makeWrapper ] ++
-    lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgs_i686.glibc pkgs_i686.zlib pkgs_i686.ncurses5 pkgs.libcxx ];
+  buildInputs = [ makeWrapper ] ++
+    lib.optionals (os == "linux") [ autoPatchelfHook pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgs_i686.glibc pkgs_i686.zlib pkgs_i686.ncurses5 pkgs.libcxx ];
   patchInstructions = ''
     ${lib.optionalString (os == "linux") ''
       addAutoPatchelfSearchPath $packageBaseDir/lib
diff --git a/pkgs/development/mobile/androidenv/platform-tools.nix b/pkgs/development/mobile/androidenv/platform-tools.nix
index c39d966959a..52443486bbb 100644
--- a/pkgs/development/mobile/androidenv/platform-tools.nix
+++ b/pkgs/development/mobile/androidenv/platform-tools.nix
@@ -2,8 +2,7 @@
 
 deployAndroidPackage {
   inherit package os;
-  buildInputs = [ autoPatchelfHook ]
-    ++ lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 ];
+  buildInputs = lib.optionals (os == "linux") [ autoPatchelfHook pkgs.glibc pkgs.zlib pkgs.ncurses5 ];
   patchInstructions = lib.optionalString (os == "linux") ''
     addAutoPatchelfSearchPath $packageBaseDir/lib64
     autoPatchelf --no-recurse $packageBaseDir/lib64
diff --git a/pkgs/development/python-modules/Mako/default.nix b/pkgs/development/python-modules/Mako/default.nix
index 4c16861823f..d7b350b9f96 100644
--- a/pkgs/development/python-modules/Mako/default.nix
+++ b/pkgs/development/python-modules/Mako/default.nix
@@ -1,23 +1,45 @@
 { lib
 , buildPythonPackage
+, pythonOlder
 , fetchPypi
 , isPyPy
+
+# propagates
 , markupsafe
+
+# extras: Babel
+, Babel
+
+# tests
 , mock
 , pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "Mako";
-  version = "1.1.6";
+  version = "1.2.0";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "4e9e345a41924a954251b95b4b28e14a301145b544901332e658907a7464b6b2";
+    sha256 = "sha256-mnx+kiuH2zaGIQz0nV12cDOkHUAQsoTnR2gskr3dizk=";
+  };
+
+  propagatedBuildInputs = [
+    markupsafe
+  ];
+
+  passthru.extras-require = {
+    babel = [
+      Babel
+    ];
   };
 
-  propagatedBuildInputs = [ markupsafe ];
-  checkInputs = [ pytestCheckHook markupsafe mock ];
+  checkInputs = [
+    pytestCheckHook
+    mock
+  ] ++ passthru.extras-require.babel;
 
   disabledTests = lib.optionals isPyPy [
     # https://github.com/sqlalchemy/mako/issues/315
@@ -29,6 +51,11 @@ buildPythonPackage rec {
     "test_bytestring_passthru"
   ];
 
+  disabledTestPaths = [
+    # lingua dependency is not packaged
+    "test/ext/test_linguaplugin.py"
+  ];
+
   meta = with lib; {
     description = "Super-fast templating language";
     homepage = "https://www.makotemplates.org/";
diff --git a/pkgs/development/python-modules/aesara/default.nix b/pkgs/development/python-modules/aesara/default.nix
index 3e2e9cb2cf3..58a39422a3a 100644
--- a/pkgs/development/python-modules/aesara/default.nix
+++ b/pkgs/development/python-modules/aesara/default.nix
@@ -18,13 +18,13 @@
 
 buildPythonPackage rec {
   pname = "aesara";
-  version = "2.4.0";
+  version = "2.5.3";
 
   src = fetchFromGitHub {
     owner = "aesara-devs";
     repo = "aesara";
-    rev = "38d7a813646c1e350170c46bafade0e7d0e2427c";
-    sha256 = "sha256-933bM15BZi4sTjnIOGAg5dc5tXVWQ9lFzktOtzj5DNQ=";
+    rev = "refs/tags/rel-${version}";
+    sha256 = "sha256-20nc70gNdcGjtGxv2WxmYxmswNH8v7yGLkToP2iazjc=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/afdko/default.nix b/pkgs/development/python-modules/afdko/default.nix
index 3fc547ddf96..bbf8d555b5e 100644
--- a/pkgs/development/python-modules/afdko/default.nix
+++ b/pkgs/development/python-modules/afdko/default.nix
@@ -13,13 +13,13 @@
 
 buildPythonPackage rec {
   pname = "afdko";
-  version = "3.7.1";
+  version = "3.8.1";
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "05hj2mw3ppfjaig5zdk5db9vfrbbq5gmv5rzggmvvrj0yyfpr0pd";
+    sha256 = "sha256-BaSpw7TiBymCvoP0/z1zynWKQJH/PjbbGf85ZI9LOZw=";
   };
 
   format = "pyproject";
@@ -40,12 +40,6 @@ buildPythonPackage rec {
 
     # Use antlr4 runtime from nixpkgs and link it dynamically
     ./use-dynamic-system-antlr4-runtime.patch
-
-    # Fix compatibility with latest fonttools.
-    (fetchpatch {
-      url = "https://github.com/adobe-type-tools/afdko/commit/120752c50a562e4f6c12ff4be1e3bd96ed664e82.patch";
-      sha256 = "RDGIpNAuCmK+zqZOeOK7ddCjr9BuqPpcnbnxdtoE48M=";
-    })
   ];
 
   # setup.py will always (re-)execute cmake in buildPhase
diff --git a/pkgs/development/python-modules/aiobotocore/default.nix b/pkgs/development/python-modules/aiobotocore/default.nix
index 01066c127be..df800eb4755 100644
--- a/pkgs/development/python-modules/aiobotocore/default.nix
+++ b/pkgs/development/python-modules/aiobotocore/default.nix
@@ -10,12 +10,12 @@
 
 buildPythonPackage rec {
   pname = "aiobotocore";
-  version = "2.1.2";
+  version = "2.2.0";
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-AP1/Q8wEhNjtJ0/QvkkqoWp/6medvqlqYCu3IspMLSI=";
+    sha256 = "sha256-cTV5OcMCJnDXu5SDMZQUekTr/OJLFkPk5E/twe5zSbo=";
   };
 
   # relax version constraints: aiobotocore works with newer botocore versions
diff --git a/pkgs/development/python-modules/aioftp/default.nix b/pkgs/development/python-modules/aioftp/default.nix
index 83c5e986f09..56ac63bfc5f 100644
--- a/pkgs/development/python-modules/aioftp/default.nix
+++ b/pkgs/development/python-modules/aioftp/default.nix
@@ -11,14 +11,14 @@
 
 buildPythonPackage rec {
   pname = "aioftp";
-  version = "0.20.1";
+  version = "0.21.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-6p3n5tNNQrbwHqGRXYNL4+cf31Blx2e9elxX6/wxj/4=";
+    sha256 = "sha256-TwORfChymaB4k5Q3CAPjsPaTXiQdjyi7s2fCN5qTT5I=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/alembic/default.nix b/pkgs/development/python-modules/alembic/default.nix
index a82cd5e258a..ea8f4d4d131 100644
--- a/pkgs/development/python-modules/alembic/default.nix
+++ b/pkgs/development/python-modules/alembic/default.nix
@@ -13,14 +13,14 @@
 
 buildPythonPackage rec {
   pname = "alembic";
-  version = "1.7.6";
+  version = "1.7.7";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-bAwF6XaKiW2AQ4fiCymYgP4BvFZIQkaw3/6AddbT2Ec=";
+    sha256 = "sha256-SWEkgXPq186KIe+z3jePE7g5jmYw+rDrJY3HSoryTFg=";
   };
 
   propagatedBuildInputs = [
@@ -42,10 +42,6 @@ buildPythonPackage rec {
     pytest-xdist
   ];
 
-  pytestFlagsArray = [
-    "--numprocesses" "$NIX_BUILD_CORES"
-  ];
-
   meta = with lib; {
     homepage = "https://bitbucket.org/zzzeek/alembic";
     description = "A database migration tool for SQLAlchemy";
diff --git a/pkgs/development/python-modules/amqp/default.nix b/pkgs/development/python-modules/amqp/default.nix
index c23c1d012da..d226192164d 100644
--- a/pkgs/development/python-modules/amqp/default.nix
+++ b/pkgs/development/python-modules/amqp/default.nix
@@ -9,14 +9,14 @@
 
 buildPythonPackage rec {
   pname = "amqp";
-  version = "5.0.9";
+  version = "5.1.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-Hl9wdCTlRAeMoZbnKuahSIfOdOAr0Sa+VLfAPJcb7xg=";
+    hash = "sha256-RGs+io68LOr9Qk/8qrHDU4MNSBYSVleO16ZUSOYB6+0=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/ansible-lint/default.nix b/pkgs/development/python-modules/ansible-lint/default.nix
index 503247580fb..37538088b22 100644
--- a/pkgs/development/python-modules/ansible-lint/default.nix
+++ b/pkgs/development/python-modules/ansible-lint/default.nix
@@ -57,10 +57,6 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
-  pytestFlagsArray = [
-    "--numprocesses" "$NIX_BUILD_CORES"
-  ];
-
   preCheck = ''
     # ansible wants to write to $HOME and crashes if it can't
     export HOME=$(mktemp -d)
diff --git a/pkgs/development/python-modules/ansible-runner/default.nix b/pkgs/development/python-modules/ansible-runner/default.nix
index 0083362c753..706cde06b8b 100644
--- a/pkgs/development/python-modules/ansible-runner/default.nix
+++ b/pkgs/development/python-modules/ansible-runner/default.nix
@@ -5,6 +5,7 @@
 , fetchPypi
 , mock
 , openssh
+, pbr
 , pexpect
 , psutil
 , pytest-mock
@@ -26,6 +27,10 @@ buildPythonPackage rec {
     hash = "sha256-2m5dD+gGDL5LnY7QbDYiGdu4GYu0C49WU29GZY2bnBo=";
   };
 
+  nativeBuildInputs = [
+    pbr
+  ];
+
   propagatedBuildInputs = [
     ansible
     psutil
diff --git a/pkgs/development/python-modules/apprise/default.nix b/pkgs/development/python-modules/apprise/default.nix
index 11990e7d399..e0b5c696e31 100644
--- a/pkgs/development/python-modules/apprise/default.nix
+++ b/pkgs/development/python-modules/apprise/default.nix
@@ -13,7 +13,7 @@
 , pythonOlder
 , pyyaml
 , requests
-, requests_oauthlib
+, requests-oauthlib
 , six
 , slixmpp
 }:
@@ -41,7 +41,7 @@ buildPythonPackage rec {
     markdown
     pyyaml
     requests
-    requests_oauthlib
+    requests-oauthlib
     six
   ];
 
diff --git a/pkgs/development/python-modules/approvaltests/default.nix b/pkgs/development/python-modules/approvaltests/default.nix
index ece87d1894e..a6c94f24442 100644
--- a/pkgs/development/python-modules/approvaltests/default.nix
+++ b/pkgs/development/python-modules/approvaltests/default.nix
@@ -1,36 +1,58 @@
-{ lib, buildPythonPackage, fetchFromGitHub
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+
+# propagates
+, allpairspy
 , beautifulsoup4
 , empty-files
-, numpy
 , pyperclip
 , pytest
+
+# tests
+, numpy
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
-  version = "4.0.0";
+  version = "5.0.0";
   pname = "approvaltests";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6.1";
 
   # no tests included in PyPI tarball
   src = fetchFromGitHub {
     owner = "approvals";
     repo = "ApprovalTests.Python";
     rev = "v${version}";
-    sha256 = "sha256-4dg5xTswqLFRBaZagKrkilCvsAnky9donb03MT/PiWM=";
+    sha256 = "sha256-ku8J1ccX6LZZitlAOgc3eNCdsFx/FP1nqtdgPJF/jRg=";
   };
 
   propagatedBuildInputs = [
+    allpairspy
     beautifulsoup4
     empty-files
-    numpy
     pyperclip
     pytest
   ];
 
-  postPatch = ''
-    substituteInPlace setup.py \
-      --replace bs4 beautifulsoup4 \
-      --replace "pyperclip==1.5.27" "pyperclip>=1.5.27"
-  '';
+  checkInputs = [
+    numpy
+    pytestCheckHook
+  ];
+
+  disabledTests = [
+    # tests expects paths below ApprovalTests.Python directory
+    "test_received_filename"
+    "test_pytest_namer"
+  ];
+
+  pythonImportsCheck = [
+    "approvaltests.approvals"
+    "approvaltests.reporters.generic_diff_reporter_factory"
+  ];
 
   meta = with lib; {
     description = "Assertion/verification library to aid testing";
diff --git a/pkgs/development/python-modules/asana/default.nix b/pkgs/development/python-modules/asana/default.nix
index c7839f05147..d179f3f9490 100644
--- a/pkgs/development/python-modules/asana/default.nix
+++ b/pkgs/development/python-modules/asana/default.nix
@@ -1,37 +1,47 @@
-{ buildPythonPackage, pythonAtLeast, pytest, requests, requests_oauthlib, six
-, fetchFromGitHub, responses, lib
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, pythonOlder
+, requests
+, requests-oauthlib
+, responses
+, six
 }:
 
 buildPythonPackage rec {
   pname = "asana";
-  version = "0.10.3";
+  version = "0.10.9";
+  format = "setuptools";
 
-  # upstream reportedly doesn't support 3.7 yet, blocked on
-  # https://bugs.python.org/issue34226
-  disabled = pythonAtLeast "3.7";
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "asana";
     repo = "python-asana";
     rev = "v${version}";
-    sha256 = "11nsfygcfpc2qb2gy4npi9w00cqfh88g7k3rsfq7xambz1zjdz1n";
+    sha256 = "sha256-9gOkCMY15ChdhiFdzS0TjvWpVTKKEGt7XIcK6EhkSK8=";
   };
 
-  checkInputs = [ pytest responses ];
-  propagatedBuildInputs = [ requests requests_oauthlib six ];
+  propagatedBuildInputs = [
+    requests
+    requests-oauthlib
+    six
+  ];
 
-  postPatch = ''
-    substituteInPlace setup.py \
-      --replace "requests_oauthlib >= 0.8.0, == 0.8.*" "requests_oauthlib>=0.8.0<2.0"
-  '';
+  checkInputs = [
+    pytestCheckHook
+    responses
+  ];
 
-  checkPhase = ''
-    py.test tests
-  '';
+  pythonImportsCheck = [
+    "asana"
+  ];
 
   meta = with lib; {
     description = "Python client library for Asana";
     homepage = "https://github.com/asana/python-asana";
     license = licenses.mit;
+    maintainers = with maintainers; [ ];
   };
 }
diff --git a/pkgs/development/python-modules/asgiref/default.nix b/pkgs/development/python-modules/asgiref/default.nix
index 5eea9a5579a..2ea9f4130f9 100644
--- a/pkgs/development/python-modules/asgiref/default.nix
+++ b/pkgs/development/python-modules/asgiref/default.nix
@@ -6,21 +6,31 @@
 , pytest-asyncio
 , pytestCheckHook
 , pythonOlder
+, fetchpatch
 }:
 
 buildPythonPackage rec {
-  version = "3.4.1";
+  version = "3.5.0";
   pname = "asgiref";
+  format = "setuptools";
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "django";
     repo = pname;
     rev = version;
-    sha256 = "sha256-aXD46qH5sTTmp0rlzQGLAN+MfIz1u6obCwtfqoIYgBA=";
+    sha256 = "sha256-eWDsd8iWK1C/X3t/fKAM1i4hyTM/daGTd8CDSgDTL/U=";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "remove-sock-nonblock-in-tests.patch";
+      url = "https://github.com/django/asgiref/commit/d451a724c93043b623e83e7f86743bbcd9a05c45.patch";
+      sha256 = "0whdsn5isln4dqbqqngvsy4yxgaqgpnziz0cndj1zdxim8cdicj7";
+    })
+  ];
+
   propagatedBuildInputs = [
     async-timeout
   ];
@@ -40,6 +50,6 @@ buildPythonPackage rec {
     description = "Reference ASGI adapters and channel layers";
     homepage = "https://github.com/django/asgiref";
     license = licenses.bsd3;
-    maintainers = with maintainers; [ ];
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/asn1crypto/default.nix b/pkgs/development/python-modules/asn1crypto/default.nix
index 989b974c64a..3c59c4b7cd2 100644
--- a/pkgs/development/python-modules/asn1crypto/default.nix
+++ b/pkgs/development/python-modules/asn1crypto/default.nix
@@ -5,11 +5,11 @@
 
 buildPythonPackage rec {
   pname = "asn1crypto";
-  version = "1.4.0";
+  version = "1.5.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "f4f6e119474e58e04a2b1af817eb585b4fd72bdd89b998624712b5c99be7641c";
+    sha256 = "sha256-E644UCvmMhFav4oky+X02lLjtSMZkK/zESPIBTBsy5w=";
   };
 
   # No tests included
diff --git a/pkgs/development/python-modules/astroid/default.nix b/pkgs/development/python-modules/astroid/default.nix
index ab62a565ce6..539787403c6 100644
--- a/pkgs/development/python-modules/astroid/default.nix
+++ b/pkgs/development/python-modules/astroid/default.nix
@@ -1,6 +1,7 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
+, pythonAtLeast
 , pythonOlder
 , isPyPy
 , lazy-object-proxy
@@ -14,7 +15,7 @@
 
 buildPythonPackage rec {
   pname = "astroid";
-  version = "2.9.3"; # Check whether the version is compatible with pylint
+  version = "2.11.2"; # Check whether the version is compatible with pylint
 
   disabled = pythonOlder "3.6.2";
 
@@ -22,7 +23,7 @@ buildPythonPackage rec {
     owner = "PyCQA";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1x77faggk1dgxy48ng31xj9h6p51w312kvk5zqgvd5f19nvznxyi";
+    sha256 = "sha256-adnvJCchsMWQxsIlenndUb6Mw1MgCNAanZcTmssmsEc=";
   };
 
   SETUPTOOLS_SCM_PRETEND_VERSION = version;
@@ -45,6 +46,9 @@ buildPythonPackage rec {
   disabledTests = [
     # assert (1, 1) == (1, 16)
     "test_end_lineno_string"
+  ] ++ lib.optionals (pythonAtLeast "3.10") [
+    # AssertionError: Lists differ: ['ABC[16 chars]yBase', 'Final', 'Generic', 'MyProtocol', 'Protocol', 'object'] != ['ABC[16 chars]yBase', 'Final', 'Generic', 'MyProtocol', 'object']
+    "test_mro_typing_extensions"
   ];
 
   passthru.tests = {
diff --git a/pkgs/development/python-modules/astropy/default.nix b/pkgs/development/python-modules/astropy/default.nix
index 6a61dd1009c..56d0cc766ad 100644
--- a/pkgs/development/python-modules/astropy/default.nix
+++ b/pkgs/development/python-modules/astropy/default.nix
@@ -19,7 +19,7 @@
 
 let
   pname = "astropy";
-  version = "5.0.1";
+  version = "5.0.3";
 in
 buildPythonPackage {
   inherit pname version;
@@ -29,7 +29,7 @@ buildPythonPackage {
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-Y4LN5qIFqgsWoNXmHAwBMevU8BdNbHPilk9L7hMqkCc=";
+    sha256 = "sha256-GxZOxV63HH8Pil8zVDOcWkLWEpg1ayFOT7n/JWqGgUc=";
   };
 
   SETUPTOOLS_SCM_PRETEND_VERSION = version;
diff --git a/pkgs/development/python-modules/asttokens/default.nix b/pkgs/development/python-modules/asttokens/default.nix
index 1e44ee8fa0e..3d78ae7690b 100644
--- a/pkgs/development/python-modules/asttokens/default.nix
+++ b/pkgs/development/python-modules/asttokens/default.nix
@@ -22,10 +22,10 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [
     six
-    astroid
   ];
 
   checkInputs = [
+    astroid
     pytestCheckHook
   ];
 
@@ -34,6 +34,11 @@ buildPythonPackage rec {
     "test_slices"
   ];
 
+  disabledTestPaths = [
+    # incompatible with astroid 2.11.0, pins <= 2.5.3
+    "tests/test_astroid.py"
+  ];
+
   pythonImportsCheck = [ "asttokens" ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/async_generator/default.nix b/pkgs/development/python-modules/async_generator/default.nix
index 6f6da10a87f..277616849e1 100644
--- a/pkgs/development/python-modules/async_generator/default.nix
+++ b/pkgs/development/python-modules/async_generator/default.nix
@@ -2,7 +2,6 @@
 , buildPythonPackage
 , fetchPypi
 , pythonOlder
-, pytest-asyncio
 , pytestCheckHook
 }:
 
@@ -19,7 +18,6 @@ buildPythonPackage rec {
   };
 
   checkInputs = [
-    pytest-asyncio
     pytestCheckHook
   ];
 
diff --git a/pkgs/development/python-modules/atlassian-python-api/default.nix b/pkgs/development/python-modules/atlassian-python-api/default.nix
index 468dac55661..4ecf893c1b9 100755
--- a/pkgs/development/python-modules/atlassian-python-api/default.nix
+++ b/pkgs/development/python-modules/atlassian-python-api/default.nix
@@ -4,7 +4,7 @@
 , deprecated
 , oauthlib
 , requests
-, requests_oauthlib
+, requests-oauthlib
 , six
 , pytestCheckHook
 , pythonOlder
@@ -28,7 +28,7 @@ buildPythonPackage rec {
     deprecated
     oauthlib
     requests
-    requests_oauthlib
+    requests-oauthlib
     six
   ];
 
diff --git a/pkgs/development/python-modules/atom/default.nix b/pkgs/development/python-modules/atom/default.nix
index 80e29932ee2..88cfc818e3b 100644
--- a/pkgs/development/python-modules/atom/default.nix
+++ b/pkgs/development/python-modules/atom/default.nix
@@ -1,19 +1,45 @@
-{ lib, buildPythonPackage, fetchPypi, future, cppy }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, setuptools-scm
+, future
+, cppy
+, pytestCheckHook
+}:
 
 buildPythonPackage rec {
   pname = "atom";
-  version = "0.7.0";
+  version = "0.8.0";
+  format = "pyproject";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "4055fbdeeb692d3d52c6e3c628d7513fc71f147920cac7d0da05b6dbb5ec8c8d";
+  src = fetchFromGitHub {
+    owner = "nucleic";
+    repo = pname;
+    rev = version;
+    hash = "sha256-Xby3QopKw7teShMi80RMG8YdhOOvfQb5vwOuFEUTxHQ=";
   };
 
-  buildInputs = [ cppy ];
-  propagatedBuildInputs = [ future ];
+  SETUPTOOLS_SCM_PRETEND_VERSION = version;
 
-  # Tests not released to pypi
-  doCheck = true;
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
+
+  buildInputs = [
+    cppy
+  ];
+
+  preCheck = ''
+    rm -rf atom
+  '';
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "atom.api"
+  ];
 
   meta = with lib; {
     description = "Memory efficient Python objects";
diff --git a/pkgs/development/python-modules/aurorapy/default.nix b/pkgs/development/python-modules/aurorapy/default.nix
index 17abcf0e9c4..7e59d9c8bc9 100644
--- a/pkgs/development/python-modules/aurorapy/default.nix
+++ b/pkgs/development/python-modules/aurorapy/default.nix
@@ -5,6 +5,7 @@
 , pyserial
 , pytestCheckHook
 , pythonOlder
+, six
 }:
 
 buildPythonPackage rec {
@@ -28,6 +29,7 @@ buildPythonPackage rec {
 
   checkInputs = [
     pytestCheckHook
+    six
   ];
 
   pythonImportsCheck = [
diff --git a/pkgs/development/python-modules/autobahn/default.nix b/pkgs/development/python-modules/autobahn/default.nix
index 285630db32e..49f18ebca49 100644
--- a/pkgs/development/python-modules/autobahn/default.nix
+++ b/pkgs/development/python-modules/autobahn/default.nix
@@ -23,14 +23,14 @@
 
 buildPythonPackage rec {
   pname = "autobahn";
-  version = "22.2.2";
+  version = "22.3.2";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-YOH0xgKqzQUv/j1GrkC2t1+ChrPEaSLCE7UjFi5YwX4=";
+    sha256 = "sha256-WKiHx6GWuwjYtmJMs2lfSTqeXJ8A/TUNjW+Cm0f/kDY=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/azure-core/default.nix b/pkgs/development/python-modules/azure-core/default.nix
index fbff37fad37..260a40e9de8 100644
--- a/pkgs/development/python-modules/azure-core/default.nix
+++ b/pkgs/development/python-modules/azure-core/default.nix
@@ -15,19 +15,20 @@
 }:
 
 buildPythonPackage rec {
-  version = "1.22.1";
+  version = "1.23.1";
   pname = "azure-core";
   disabled = isPy27;
 
   src = fetchPypi {
     inherit pname version;
     extension = "zip";
-    sha256 = "sha256-S25AUmijO4cxB3lklc7D8vGx/+k1Ykzg+93/NtONOk0=";
+    sha256 = "sha256-KKAd+68KaBLE4qgtFkLqMJVqlznyW8d8myO5H06mjw8=";
   };
 
   propagatedBuildInputs = [
     requests
     six
+    typing-extensions
   ];
 
   checkInputs = [
@@ -41,7 +42,6 @@ buildPythonPackage rec {
     pytest-asyncio
     pytestCheckHook
     trio
-    typing-extensions
   ];
 
   # test server needs to be available
@@ -57,6 +57,8 @@ buildPythonPackage rec {
     "response"
     "request"
     "timeout"
+    "test_sync_transport_short_read_download_stream"
+    "test_aio_transport_short_read_download_stream"
   # disable 8 tests failing on some darwin machines with errors:
   # azure.core.polling.base_polling.BadStatus: Invalid return status 403 for 'GET' operation
   # azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden'
diff --git a/pkgs/development/python-modules/azure-mgmt-core/default.nix b/pkgs/development/python-modules/azure-mgmt-core/default.nix
index 6adca4c02c7..0a65dbfb7ec 100644
--- a/pkgs/development/python-modules/azure-mgmt-core/default.nix
+++ b/pkgs/development/python-modules/azure-mgmt-core/default.nix
@@ -2,6 +2,7 @@
 , buildPythonPackage
 , fetchPypi
 , azure-core
+, typing-extensions
 }:
 
 buildPythonPackage rec {
@@ -16,6 +17,7 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [
     azure-core
+    typing-extensions
   ];
 
   pythonNamespaces = "azure.mgmt";
diff --git a/pkgs/development/python-modules/azure-mgmt-msi/default.nix b/pkgs/development/python-modules/azure-mgmt-msi/default.nix
index bf81b5e67c7..1f1a2dde376 100644
--- a/pkgs/development/python-modules/azure-mgmt-msi/default.nix
+++ b/pkgs/development/python-modules/azure-mgmt-msi/default.nix
@@ -9,12 +9,12 @@
 
 buildPythonPackage rec {
   pname = "azure-mgmt-msi";
-  version = "1.0.0";
+  version = "6.0.0";
 
   src = fetchPypi {
     inherit pname version;
     extension = "zip";
-    sha256 = "0n4gbwk843z66hhpcp1kcrnwqkzygbbc2ma01r9asgfv4nmklvyl";
+    sha256 = "sha256-RpmYeF6LRKqu0KrjNAFAaOGxyfPuK+TImOumP+FPX2w=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/bcrypt/default.nix b/pkgs/development/python-modules/bcrypt/default.nix
index d6347b17904..13fb25d0371 100644
--- a/pkgs/development/python-modules/bcrypt/default.nix
+++ b/pkgs/development/python-modules/bcrypt/default.nix
@@ -1,9 +1,19 @@
-{ lib, buildPythonPackage, isPyPy, fetchPypi, pythonOlder
-, cffi, pycparser, mock, pytest, py, six }:
+{ lib
+, buildPythonPackage
+, setuptools
+, isPyPy
+, fetchPypi
+, pythonOlder
+, cffi
+, pytestCheckHook
+, six
+}:
 
 buildPythonPackage rec {
-  version = "3.2.0";
   pname = "bcrypt";
+  version = "3.2.0";
+  format = "pyproject";
+
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
@@ -11,16 +21,31 @@ buildPythonPackage rec {
     sha256 = "5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29";
   };
 
-  buildInputs = [ pycparser mock pytest py ];
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  propagatedBuildInputs = [
+    six
+    cffi
+  ];
+
+  propagatedNativeBuildInputs = [
+    cffi
+  ];
 
-  propagatedBuildInputs = [ six ] ++ lib.optional (!isPyPy) cffi;
+  checkInputs = [
+    pytestCheckHook
+  ];
 
-  propagatedNativeBuildInputs = lib.optional (!isPyPy) cffi;
+  pythonImportsCheck = [
+    "bcrypt"
+  ];
 
   meta = with lib; {
-    maintainers = with maintainers; [ domenkozar ];
     description = "Modern password hashing for your software and your servers";
-    license = licenses.asl20;
     homepage = "https://github.com/pyca/bcrypt/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ domenkozar ];
   };
 }
diff --git a/pkgs/development/python-modules/beautifultable/default.nix b/pkgs/development/python-modules/beautifultable/default.nix
index def8f207ee8..646cfe8af9a 100644
--- a/pkgs/development/python-modules/beautifultable/default.nix
+++ b/pkgs/development/python-modules/beautifultable/default.nix
@@ -1,6 +1,7 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
+, wcwidth
 , pytestCheckHook
 }:
 
@@ -15,6 +16,10 @@ buildPythonPackage rec {
     sha256 = "12ci6jy8qmbphsvzvj98466nlhclfzs0a0pmbsv3mf5bfcdwvbh7";
   };
 
+  propagatedBuildInputs = [
+    wcwidth
+  ];
+
   checkInputs = [
     pytestCheckHook
   ];
@@ -25,7 +30,7 @@ buildPythonPackage rec {
 
   meta = with lib; {
     description = "Python package for printing visually appealing tables";
-    homepage = "https://github.com/CERT-Polska/mwdblib";
+    homepage = "https://github.com/pri22296/beautifultable";
     license = with licenses; [ mit ];
     maintainers = with maintainers; [ fab ];
   };
diff --git a/pkgs/development/python-modules/behave/default.nix b/pkgs/development/python-modules/behave/default.nix
index 2384a51e502..5254f79c4b2 100644
--- a/pkgs/development/python-modules/behave/default.nix
+++ b/pkgs/development/python-modules/behave/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub
 , buildPythonApplication, python
-, pytestCheckHook, mock, pathpy, pyhamcrest, pytest-html
+, pytestCheckHook, mock, path, pyhamcrest, pytest-html
 , glibcLocales
 , colorama, cucumber-tag-expressions, parse, parse-type, six
 }:
@@ -16,7 +16,7 @@ buildPythonApplication rec {
     hash = "sha256-B8PUN1Q4UAsDWrHjPZDlpaPjCKjI/pAogCSI+BQnaWs=";
   };
 
-  checkInputs = [ pytestCheckHook mock pathpy pyhamcrest pytest-html ];
+  checkInputs = [ pytestCheckHook mock path pyhamcrest pytest-html ];
 
   # upstream tests are failing, so instead we only check if we can import it
   doCheck = false;
diff --git a/pkgs/development/python-modules/bitarray/default.nix b/pkgs/development/python-modules/bitarray/default.nix
index be7f69fbd8d..d5806d77112 100644
--- a/pkgs/development/python-modules/bitarray/default.nix
+++ b/pkgs/development/python-modules/bitarray/default.nix
@@ -6,11 +6,11 @@
 
 buildPythonPackage rec {
   pname = "bitarray";
-  version = "2.4.0";
+  version = "2.4.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-8SA+kC1R3zGRfXfuupw/540DKHOirXjHN+JkIPAIDlg=";
+    sha256 = "sha256-+uygP5eemSzHb3QGr365eVyxEbjYlpyJGgMr10l8h9o=";
   };
 
   checkPhase = ''
diff --git a/pkgs/development/python-modules/bitstruct/default.nix b/pkgs/development/python-modules/bitstruct/default.nix
index 78b34dfbf17..050e3f27bf7 100644
--- a/pkgs/development/python-modules/bitstruct/default.nix
+++ b/pkgs/development/python-modules/bitstruct/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "bitstruct";
-  version = "8.12.1";
+  version = "8.13.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "45b2b932ce6681f5c6ce8cba39abdd423b579b0568c76fa48b1e09c88368ede7";
+    sha256 = "sha256-e4fZ5B/1UqjK4G6iNow3crbzECvatLZeeTvnWQ1p8Ds=";
   };
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/black/default.nix b/pkgs/development/python-modules/black/default.nix
index 064fe8187ed..884629da0ff 100644
--- a/pkgs/development/python-modules/black/default.nix
+++ b/pkgs/development/python-modules/black/default.nix
@@ -23,13 +23,13 @@
 
 buildPythonPackage rec {
   pname = "black";
-  version = "22.1.0";
+  version = "22.3.0";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-p8AZLTVjX2/BF0vldct5FekuXdYp7nn9rw3PpBqAr7U=";
+    hash = "sha256-NQILiIbAIs7ZKCtRtah1ttGrDDh7MaBluE23wzCFynk=";
   };
 
   nativeBuildInputs = [ setuptools-scm ];
diff --git a/pkgs/development/python-modules/blinker/default.nix b/pkgs/development/python-modules/blinker/default.nix
index ca59a0d710a..53aaacbdf82 100644
--- a/pkgs/development/python-modules/blinker/default.nix
+++ b/pkgs/development/python-modules/blinker/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildPythonPackage, fetchPypi, nose, pytestCheckHook }:
+{ lib, buildPythonPackage, fetchPypi, nose }:
 
 buildPythonPackage rec {
   pname = "blinker";
@@ -9,13 +9,18 @@ buildPythonPackage rec {
     sha256 = "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7";
   };
 
-  checkInputs = [ nose pytestCheckHook ];
+  checkInputs = [ nose ];
+
+  checkPhase = ''
+    nosetests
+  '';
+
   pythonImportsCheck = [ "blinker" ];
 
   meta = with lib; {
     homepage = "https://pythonhosted.org/blinker/";
     description = "Fast, simple object-to-object and broadcast signaling";
     license = licenses.mit;
-    maintainers = with maintainers; [ ];
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/boto3/default.nix b/pkgs/development/python-modules/boto3/default.nix
index d1a104f6ae9..d849d49b64f 100644
--- a/pkgs/development/python-modules/boto3/default.nix
+++ b/pkgs/development/python-modules/boto3/default.nix
@@ -13,11 +13,11 @@
 
 buildPythonPackage rec {
   pname = "boto3";
-  version = "1.21.12"; # N.B: if you change this, change botocore and awscli to a matching version
+  version = "1.21.30"; # N.B: if you change this, change botocore and awscli to a matching version
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-yS7CCmcHIbWhvAE7MFqE2yt/nHFmU7MFbOfi+9KhgO8=";
+    sha256 = "sha256-8K+PTvX+Y1PHlM08zmJ9Rpphi1is58p1pjz9cZ32Fc4=";
   };
 
   propagatedBuildInputs = [ botocore jmespath s3transfer ] ++ lib.optionals (!isPy3k) [ futures ];
diff --git a/pkgs/development/python-modules/botocore/default.nix b/pkgs/development/python-modules/botocore/default.nix
index 0c69de1c0e0..52b8d8d37fc 100644
--- a/pkgs/development/python-modules/botocore/default.nix
+++ b/pkgs/development/python-modules/botocore/default.nix
@@ -13,11 +13,11 @@
 
 buildPythonPackage rec {
   pname = "botocore";
-  version = "1.24.12"; # N.B: if you change this, change boto3 and awscli to a matching version
+  version = "1.24.33"; # N.B: if you change this, change boto3 and awscli to a matching version
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-AXSZmgSwouQkVxBgk6zps2+pR3KkQtm89gdQJj0dBz4=";
+    sha256 = "sha256-6l/RgAggMKbDP6Gb8BHXKXDz7SPP/xtBQTBp4yV2gQM=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/boxx/default.nix b/pkgs/development/python-modules/boxx/default.nix
index dd521523179..964bf2dd812 100644
--- a/pkgs/development/python-modules/boxx/default.nix
+++ b/pkgs/development/python-modules/boxx/default.nix
@@ -18,11 +18,11 @@
 
 buildPythonPackage rec {
   pname = "boxx";
-  version = "0.9.10";
+  version = "0.9.11";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-Iw6jRhKAroqfWmbXhD7YTn4s8FrE/Iyd31EOP0tMdkQ=";
+    sha256 = "sha256-xB/bCSIzT0JF5ZPWqSn3P8soBJnzDTfCyan+iOrfWzw=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/build/default.nix b/pkgs/development/python-modules/build/default.nix
index f1f7f0e81bd..d36804649b7 100644
--- a/pkgs/development/python-modules/build/default.nix
+++ b/pkgs/development/python-modules/build/default.nix
@@ -52,8 +52,6 @@ buildPythonPackage rec {
   ];
 
   pytestFlagsArray = [
-    "-n"
-    "$NIX_BUILD_CORES"
     "-W"
     "ignore::DeprecationWarning"
   ];
diff --git a/pkgs/development/python-modules/buildbot/default.nix b/pkgs/development/python-modules/buildbot/default.nix
index 5190c1fa74f..743c9f2c4b1 100644
--- a/pkgs/development/python-modules/buildbot/default.nix
+++ b/pkgs/development/python-modules/buildbot/default.nix
@@ -31,11 +31,11 @@ let
 
   package = buildPythonPackage rec {
     pname = "buildbot";
-    version = "3.4.1";
+    version = "3.5.0";
 
     src = fetchPypi {
       inherit pname version;
-      sha256 = "sha256-GmKMqejHjtEiEtlZffze7PGNjVwUKB/ZcvUgJ4DoeDQ=";
+      sha256 = "sha256-woGHdCan5qTp00toNkWa821EgVQMrPK+OWXoqFcgIDQ=";
     };
 
     propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/buildbot/pkg.nix b/pkgs/development/python-modules/buildbot/pkg.nix
index a35506c89b8..a2cffd739d1 100644
--- a/pkgs/development/python-modules/buildbot/pkg.nix
+++ b/pkgs/development/python-modules/buildbot/pkg.nix
@@ -6,7 +6,7 @@ buildPythonPackage rec {
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-A2a5rEL5MN9jlu5vVnUIKx9ma2H6wuJAWjkqLpQgcfc=";
+    sha256 = "sha256-CYbMixfZZ1xypV0J7TW54n/fja9RGMlWiF7StJYFnqM=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/buildbot/plugins.nix b/pkgs/development/python-modules/buildbot/plugins.nix
index 5b64f4c51ab..62aa51e053d 100644
--- a/pkgs/development/python-modules/buildbot/plugins.nix
+++ b/pkgs/development/python-modules/buildbot/plugins.nix
@@ -7,7 +7,7 @@
 
     src = fetchPypi {
       inherit pname version;
-      sha256 = "sha256-Hly1dwUbWblHoP+ufjxyz4boXby8kxeFSHLMHcCpc1o=";
+      sha256 = "sha256-boa/MWi/HAhNU3/n96i0fuoQ+jT5I+dWoe1Zd7f/Yvs=";
     };
 
     # Remove unneccessary circular dependency on buildbot
@@ -34,7 +34,7 @@
 
     src = fetchPypi {
       inherit pname version;
-      sha256 = "sha256-QuV808Wg9epCgjehuUaMKCLLTLfFJVWBdKPy8sZfBYg=";
+      sha256 = "sha256-NUDTwgkQuasOlJxNTlvfIm99LNVCrRIdBmgeJnwkSU8=";
     };
 
     buildInputs = [ buildbot-pkg ];
@@ -56,7 +56,7 @@
 
     src = fetchPypi {
       inherit pname version;
-      sha256 = "sha256-p8PRQaWrPb63RrF4FtTX65qM3HdzI4Gl4tR0zTOBFEI=";
+      sha256 = "sha256-EmiIDCG4iFIwFnwii8fjII7C7wsBifzeZeW7HyY04dE=";
     };
 
     buildInputs = [ buildbot-pkg ];
@@ -78,7 +78,7 @@
 
     src = fetchPypi {
       inherit pname version;
-      sha256 = "sha256-cNYptEp98padbyoY1DmZbpaED7O5pfck9oMjst4RHnI=";
+      sha256 = "sha256-QcS8QJ17uzDvkynTczj05LojuIT6feGiQNCwCESbVLw=";
     };
 
     buildInputs = [ buildbot-pkg ];
@@ -100,7 +100,7 @@
 
     src = fetchPypi {
       inherit pname version;
-      sha256 = "sha256-o747SIyqJom4ucZ7hmODcP0VC7i+ydgvi+oMxn/vupc=";
+      sha256 = "sha256-U9ecRxpDowzjD4GsrW4FUHcbNaWeAFGKDlqMrbIoTrQ=";
     };
 
     buildInputs = [ buildbot-pkg ];
diff --git a/pkgs/development/python-modules/buildbot/worker.nix b/pkgs/development/python-modules/buildbot/worker.nix
index 97a3eec770b..8c5319868ce 100644
--- a/pkgs/development/python-modules/buildbot/worker.nix
+++ b/pkgs/development/python-modules/buildbot/worker.nix
@@ -1,5 +1,26 @@
-{ lib, buildPythonPackage, fetchPypi, buildbot, setuptoolsTrial, mock, twisted,
-  future, coreutils, nixosTests }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, buildbot
+
+# patch
+, coreutils
+
+# propagates
+, autobahn
+, future
+, msgpack
+, twisted
+
+# tests
+, mock
+, parameterized
+, psutil
+, setuptoolsTrial
+
+# passthru
+, nixosTests
+}:
 
 buildPythonPackage (rec {
   pname = "buildbot-worker";
@@ -7,18 +28,31 @@ buildPythonPackage (rec {
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-9wdUvp00vuP7peJ+Oo4guHLfIz0YWHwp6q/zlKOOoXg=";
+    sha256 = "sha256-HZH3TdH5dhr3f6ev25O3SgPPNbiFGMmAp9DHwcb/2MA=";
   };
 
-  propagatedBuildInputs = [ twisted future ];
-
-  checkInputs = [ setuptoolsTrial mock ];
-
   postPatch = ''
     substituteInPlace buildbot_worker/scripts/logwatcher.py \
       --replace /usr/bin/tail "${coreutils}/bin/tail"
   '';
 
+  nativeBuildInputs = [
+    setuptoolsTrial
+  ];
+
+  propagatedBuildInputs = [
+    autobahn
+    future
+    msgpack
+    twisted
+  ];
+
+  checkInputs = [
+    mock
+    parameterized
+    psutil
+  ];
+
   passthru.tests = {
     smoke-test = nixosTests.buildbot;
   };
diff --git a/pkgs/development/python-modules/cattrs/default.nix b/pkgs/development/python-modules/cattrs/default.nix
index 94a357df98b..69a351e3c34 100644
--- a/pkgs/development/python-modules/cattrs/default.nix
+++ b/pkgs/development/python-modules/cattrs/default.nix
@@ -52,9 +52,6 @@ buildPythonPackage rec {
     ujson
   ];
 
-  pytestFlagsArray = [
-    "--numprocesses $NIX_BUILD_CORES"
-  ];
 
   postPatch = ''
     substituteInPlace pyproject.toml \
diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix
index a65cd297f43..22d2e87cd27 100644
--- a/pkgs/development/python-modules/cffi/default.nix
+++ b/pkgs/development/python-modules/cffi/default.nix
@@ -19,11 +19,12 @@ if isPyPy then null else buildPythonPackage rec {
 
   propagatedBuildInputs = [ pycparser ];
 
-  prePatch = lib.optionalString stdenv.isDarwin ''
+  postPatch = lib.optionalString stdenv.isDarwin ''
     # Remove setup.py impurities
-    substituteInPlace setup.py --replace "'-iwithsysroot/usr/include/ffi'" ""
-    substituteInPlace setup.py --replace "'/usr/include/ffi'," ""
-    substituteInPlace setup.py --replace '/usr/include/libffi' '${lib.getDev libffi}/include'
+    substituteInPlace setup.py \
+      --replace "'-iwithsysroot/usr/include/ffi'" "" \
+      --replace "'/usr/include/ffi'," "" \
+      --replace '/usr/include/libffi' '${lib.getDev libffi}/include'
   '';
 
   # The tests use -Werror but with python3.6 clang detects some unreachable code.
diff --git a/pkgs/development/python-modules/chalice/default.nix b/pkgs/development/python-modules/chalice/default.nix
index 93499d0f563..d309bc71731 100644
--- a/pkgs/development/python-modules/chalice/default.nix
+++ b/pkgs/development/python-modules/chalice/default.nix
@@ -62,7 +62,7 @@ buildPythonPackage rec {
     sed -i setup.py -e "/pip>=/c\'pip',"
     substituteInPlace setup.py \
       --replace "typing==3.6.4" "typing" \
-      --replace "attrs>=19.3.0,<21.3.0" "attrs"
+      --replace "jmespath>=0.9.3,<1.0.0" "jmespath>=0.9.3,<2.0.0"
   '';
 
   disabledTestPaths = [
diff --git a/pkgs/development/python-modules/cherrypy/default.nix b/pkgs/development/python-modules/cherrypy/default.nix
index 01bbfe8841b..f4272f90d62 100644
--- a/pkgs/development/python-modules/cherrypy/default.nix
+++ b/pkgs/development/python-modules/cherrypy/default.nix
@@ -6,7 +6,7 @@
 , jaraco_collections
 , more-itertools
 , objgraph
-, pathpy
+, path
 , portend
 , pytest-forked
 , pytest-services
@@ -51,7 +51,7 @@ buildPythonPackage rec {
 
   checkInputs = [
     objgraph
-    pathpy
+    path
     pytest-forked
     pytest-services
     pytestCheckHook
diff --git a/pkgs/development/python-modules/ckcc-protocol/default.nix b/pkgs/development/python-modules/ckcc-protocol/default.nix
index 670e4a3c923..e2a8ebd9776 100644
--- a/pkgs/development/python-modules/ckcc-protocol/default.nix
+++ b/pkgs/development/python-modules/ckcc-protocol/default.nix
@@ -10,12 +10,12 @@
 
 buildPythonPackage rec {
   pname = "ckcc-protocol";
-  version = "1.3.0";
+  version = "1.3.1";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-UVLKJHDPxi9ivY3JyIySmce0NUhxIIlIxVTdPoXMaKM=";
+    sha256 = "sha256-5wsVg7GX/9UygzpGI6DwrkAvexgcOmJyuv8GXiPPWvk=";
   };
 
   propagatedBuildInputs = [ click ecdsa hidapi pyaes ];
diff --git a/pkgs/development/python-modules/claripy/default.nix b/pkgs/development/python-modules/claripy/default.nix
index 9816ff3782b..b1650577149 100644
--- a/pkgs/development/python-modules/claripy/default.nix
+++ b/pkgs/development/python-modules/claripy/default.nix
@@ -8,6 +8,7 @@
 , pysmt
 , pythonOlder
 , pytestCheckHook
+, six
 , z3
 }:
 
@@ -36,6 +37,7 @@ buildPythonPackage rec {
   checkInputs = [
     nose
     pytestCheckHook
+    six
   ];
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/click-log/default.nix b/pkgs/development/python-modules/click-log/default.nix
index 3145d4775e3..c0b8c89ea64 100644
--- a/pkgs/development/python-modules/click-log/default.nix
+++ b/pkgs/development/python-modules/click-log/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "click-log";
-  version = "0.3.2";
+  version = "0.4.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "16fd1ca3fc6b16c98cea63acf1ab474ea8e676849dc669d86afafb0ed7003124";
+    sha256 = "sha256-OXD4VwrFRJEje82z2KtePu9sBX3yn4w9EVGlGpwjuXU=";
   };
 
   propagatedBuildInputs = [ click ];
diff --git a/pkgs/development/python-modules/click/default.nix b/pkgs/development/python-modules/click/default.nix
index 5156ad1048f..a75f563862a 100644
--- a/pkgs/development/python-modules/click/default.nix
+++ b/pkgs/development/python-modules/click/default.nix
@@ -3,7 +3,6 @@
 , pythonOlder
 , fetchPypi
 , importlib-metadata
-, locale
 , pytestCheckHook
 
 # large-rebuild downstream dependencies
@@ -17,18 +16,14 @@
 
 buildPythonPackage rec {
   pname = "click";
-  version = "8.0.4";
+  version = "8.1.2";
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-hFjXsSh8X7EoyQ4jOBz5nc3nS+r2x/9jhM6E1v4JCts=";
+    sha256 = "sha256-R5cH/hTZ7JoHV2GLehAKCuTE4jb6xbf4DKaAKBQaGnI=";
   };
 
-  postPatch = ''
-    substituteInPlace src/click/_unicodefun.py \
-      --replace '"locale"' "'${locale}/bin/locale'"
-  '';
-
   propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
     importlib-metadata
   ];
diff --git a/pkgs/development/python-modules/clickhouse-driver/default.nix b/pkgs/development/python-modules/clickhouse-driver/default.nix
index dd1698f9a3a..826ce08c1e0 100644
--- a/pkgs/development/python-modules/clickhouse-driver/default.nix
+++ b/pkgs/development/python-modules/clickhouse-driver/default.nix
@@ -57,8 +57,6 @@ buildPythonPackage rec {
   # some test in test_buffered_reader.py doesn't seem to return
   disabledTestPaths = [ "tests/test_buffered_reader.py" ];
 
-  pytestFlagsArray = [ "-n" "$NIX_BUILD_CORES" ];
-
   # most tests require `clickhouse`
   # TODO: enable tests after `clickhouse` unbroken
   doCheck = false;
diff --git a/pkgs/development/python-modules/clize/default.nix b/pkgs/development/python-modules/clize/default.nix
index 75c4513d1e3..10b4c8f68c6 100644
--- a/pkgs/development/python-modules/clize/default.nix
+++ b/pkgs/development/python-modules/clize/default.nix
@@ -1,12 +1,18 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, python-dateutil
+
+# propagtes
 , sigtools
 , six
 , attrs
 , od
 , docutils
+
+# extras: datetime
+, python-dateutil
+
+# tests
 , pygments
 , unittest2
 , pytestCheckHook
@@ -21,6 +27,25 @@ buildPythonPackage rec {
     sha256 = "3177a028e4169d8865c79af82bdd441b24311d4bd9c0ae8803641882d340a51d";
   };
 
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "docutils ~= 0.17.0" "docutils"
+  '';
+
+  propagatedBuildInputs = [
+    attrs
+    docutils
+    od
+    sigtools
+    six
+  ];
+
+  passthru.extras-require = {
+    datetime = [
+      python-dateutil
+    ];
+  };
+
   # repeated_test no longer exists in nixpkgs
   # also see: https://github.com/epsy/clize/issues/74
   doCheck = false;
@@ -31,14 +56,6 @@ buildPythonPackage rec {
     unittest2
   ];
 
-  propagatedBuildInputs = [
-    attrs
-    docutils
-    od
-    sigtools
-    six
-  ];
-
   pythonImportsCheck = [ "clize" ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/cppy/default.nix b/pkgs/development/python-modules/cppy/default.nix
index fffa9174424..5b7e092c42a 100644
--- a/pkgs/development/python-modules/cppy/default.nix
+++ b/pkgs/development/python-modules/cppy/default.nix
@@ -1,23 +1,28 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, isPy3k
+, pythonOlder
+, pytestCheckHook
+, setuptools-scm
 }:
 
 buildPythonPackage rec {
   pname = "cppy";
-  version = "1.1.0";
+  version = "1.2.1";
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642";
+    sha256 = "sha256-g7Q78XsQhawVxd69tCFU8Ti5KCNLIURzWJgfadDW/hs=";
   };
 
-  # Headers-only library, no tests
-  doCheck = false;
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
 
-  # Not supported
-  disabled = !isPy3k;
+  checkInputs = [ pytestCheckHook ];
+
+  pythonImportsCheck = [ "cppy" ];
 
   meta = {
     description = "C++ headers for C extension development";
diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix
index b4a79137d59..607e431b39c 100644
--- a/pkgs/development/python-modules/cryptography/default.nix
+++ b/pkgs/development/python-modules/cryptography/default.nix
@@ -1,16 +1,17 @@
-{ lib, stdenv
+{ lib
+, stdenv
+, callPackage
 , buildPythonPackage
 , fetchPypi
 , rustPlatform
 , setuptools-rust
 , openssl
-, cryptography_vectors
-, darwin
+, Security
 , packaging
 , six
 , isPyPy
 , cffi
-, pytest
+, pytestCheckHook
 , pytest-subtests
 , pretend
 , libiconv
@@ -19,20 +20,23 @@
 , hypothesis
 }:
 
+let
+  cryptography-vectors = callPackage ./vectors.nix { };
+in
 buildPythonPackage rec {
   pname = "cryptography";
-  version = "36.0.0"; # Also update the hash in vectors.nix
+  version = "36.0.2"; # Also update the hash in vectors.nix
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0zshc1jaavykdnic5ns8zax6gqganys6gp5f35bqcfggnkn6kxsj";
+    sha256 = "sha256-cPj097sqyfNAZVy6yJ1oxSevW7Q4dSKoQT6EHj5mKMk=";
   };
 
   cargoDeps = rustPlatform.fetchCargoTarball {
     inherit src;
     sourceRoot = "${pname}-${version}/${cargoRoot}";
     name = "${pname}-${version}";
-    sha256 = "1nbw4cfshyc125jwdivg9gxy52qcd1iz31lypl95ij9bn1dyx933";
+    sha256 = "sha256-6C4N445h4Xf2nCc9rJWpSZaNPilR9GfgbmKvNlSIFqg=";
   };
 
   cargoRoot = "src/rust";
@@ -47,37 +51,31 @@ buildPythonPackage rec {
   ] ++ (with rustPlatform; [ rust.cargo rust.rustc ]);
 
   buildInputs = [ openssl ]
-             ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security libiconv ];
-  propagatedBuildInputs = [
-    packaging
-    six
-  ] ++ lib.optionals (!isPyPy) [
+    ++ lib.optionals stdenv.isDarwin [ Security libiconv ];
+
+  propagatedBuildInputs = lib.optionals (!isPyPy) [
     cffi
   ];
 
   checkInputs = [
-    cryptography_vectors
+    cryptography-vectors
     hypothesis
     iso8601
     pretend
-    pytest
+    pytestCheckHook
     pytest-subtests
     pytz
   ];
 
-  pytestFlags = lib.concatStringsSep " " ([
+  pytestFlagsArray = [
     "--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 ${pytestFlags} tests
-  '';
+  disabledTestPaths = 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"
+  ];
 
   meta = with lib; {
     description = "A package which provides cryptographic recipes and primitives";
@@ -92,6 +90,6 @@ buildPythonPackage rec {
     changelog = "https://cryptography.io/en/latest/changelog/#v"
       + replaceStrings [ "." ] [ "-" ] version;
     license = with licenses; [ asl20 bsd3 psfl ];
-    maintainers = with maintainers; [ primeos ];
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/cryptography/vectors.nix b/pkgs/development/python-modules/cryptography/vectors.nix
index 577c2c87091..99372090726 100644
--- a/pkgs/development/python-modules/cryptography/vectors.nix
+++ b/pkgs/development/python-modules/cryptography/vectors.nix
@@ -1,23 +1,26 @@
 { buildPythonPackage, fetchPypi, lib, cryptography }:
 
 buildPythonPackage rec {
-  pname = "cryptography_vectors";
-  # The test vectors must have the same version as the cryptography package:
-  version = cryptography.version;
+  pname = "cryptography-vectors";
+  # The test vectors must have the same version as the cryptography package
+  inherit (cryptography) version;
 
   src = fetchPypi {
-    inherit pname version;
-    sha256 = "19gs051jbsixxwhlfs4xdxpzg8w1vypzpz3w56bp9x01qwzfbdy6";
+    pname = "cryptography_vectors";
+    inherit version;
+    sha256 = "sha256-KnkkRJoDAl+vf4dUpvQgAAHKshBzSmzmrB9r2s06aOQ=";
   };
 
   # No tests included
   doCheck = false;
 
+  pythonImportsCheck = [ "cryptography_vectors" ];
+
   meta = with lib; {
     description = "Test vectors for the cryptography package";
     homepage = "https://cryptography.io/en/latest/development/test-vectors/";
     # Source: https://github.com/pyca/cryptography/tree/master/vectors;
     license = with licenses; [ asl20 bsd3 ];
-    maintainers = with maintainers; [ primeos ];
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/dask/default.nix b/pkgs/development/python-modules/dask/default.nix
index ffdca65a606..79f07c6e88f 100644
--- a/pkgs/development/python-modules/dask/default.nix
+++ b/pkgs/development/python-modules/dask/default.nix
@@ -67,8 +67,6 @@ buildPythonPackage rec {
   '';
 
   pytestFlagsArray = [
-    # parallelize
-    "--numprocesses $NIX_BUILD_CORES"
     # rerun failed tests up to three times
     "--reruns 3"
     # don't run tests that require network access
diff --git a/pkgs/development/python-modules/datasette/default.nix b/pkgs/development/python-modules/datasette/default.nix
index f2a0d531a0a..18c6943d1e6 100644
--- a/pkgs/development/python-modules/datasette/default.nix
+++ b/pkgs/development/python-modules/datasette/default.nix
@@ -32,7 +32,7 @@ buildPythonPackage rec {
   pname = "datasette";
   version = "0.61.1";
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "simonw";
@@ -41,6 +41,17 @@ buildPythonPackage rec {
     sha256 = "sha256-HVzMyF4ujYK12UQ25il/XROPo+iBldsMxOTx+duoc5o=";
   };
 
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace '"pytest-runner"' "" \
+      --replace "click>=7.1.1,<8.1.0" "click>=7.1.1,<8.2.0" \
+      --replace "click-default-group~=1.2.2" "click-default-group" \
+      --replace "hupper~=1.9" "hupper" \
+      --replace "Jinja2>=2.10.3,<3.1.0" "Jinja2" \
+      --replace "pint~=0.9" "pint" \
+      --replace "uvicorn~=0.11" "uvicorn"
+  '';
+
   propagatedBuildInputs = [
     aiofiles
     asgi-csrf
@@ -70,17 +81,6 @@ buildPythonPackage rec {
     trustme
   ];
 
-  postConfigure = ''
-    substituteInPlace setup.py \
-      --replace '"pytest-runner"' ""
-    substituteInPlace setup.py \
-      --replace "click-default-group~=1.2.2" "click-default-group" \
-      --replace "hupper~=1.9" "hupper" \
-      --replace "pint~=0.9" "pint" \
-      --replace "pluggy~=0.13.0" "pluggy" \
-      --replace "uvicorn~=0.11" "uvicorn" \
-  '';
-
   # takes 30-180 mins to run entire test suite, not worth the CPU resources, slows down reviews
   # with pytest-xdist, it still takes around 10 mins with 32 cores
   # just run the csv tests, as this should give some indictation of correctness
diff --git a/pkgs/development/python-modules/datashader/default.nix b/pkgs/development/python-modules/datashader/default.nix
index 152582f6716..b9630aa07fd 100644
--- a/pkgs/development/python-modules/datashader/default.nix
+++ b/pkgs/development/python-modules/datashader/default.nix
@@ -70,7 +70,6 @@ buildPythonPackage rec {
   '';
 
   pytestFlagsArray = [
-    "-n $NIX_BUILD_CORES"
     "datashader"
   ];
 
diff --git a/pkgs/development/python-modules/dateparser/default.nix b/pkgs/development/python-modules/dateparser/default.nix
index 467ed5184c1..7f92077c0c7 100644
--- a/pkgs/development/python-modules/dateparser/default.nix
+++ b/pkgs/development/python-modules/dateparser/default.nix
@@ -18,7 +18,7 @@
 
 buildPythonPackage rec {
   pname = "dateparser";
-  version = "1.1.0";
+  version = "1.1.1";
 
   disabled = !isPy3k;
 
@@ -26,7 +26,7 @@ buildPythonPackage rec {
     owner = "scrapinghub";
     repo = "dateparser";
     rev = "v${version}";
-    sha256 = "sha256-RpQWDsj7vGtfu6wf4yETdswfXDfoTkburTl6aOA03Ww=";
+    sha256 = "sha256-bDup3q93Zq+pvwsy/lQy2byOMjG6C/+7813hWQMbZRU=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/debtcollector/default.nix b/pkgs/development/python-modules/debtcollector/default.nix
index 1915b64aca8..ced1929bcd7 100644
--- a/pkgs/development/python-modules/debtcollector/default.nix
+++ b/pkgs/development/python-modules/debtcollector/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "debtcollector";
-  version = "2.4.0";
+  version = "2.5.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-G8A+LZAX3kgMQc8+Wg2MyV8bDI8TOSgbTsqKIqz3aiM=";
+    sha256 = "sha256-3J0a0/dFxD9LvtvKMPn/6JBajAKMmSbmEHeEfV6iV6s=";
   };
 
   nativeBuildInputs = [ pbr ];
diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix
index 9f6026ce736..04b78d6c802 100644
--- a/pkgs/development/python-modules/debugpy/default.nix
+++ b/pkgs/development/python-modules/debugpy/default.nix
@@ -84,7 +84,6 @@ buildPythonPackage rec {
   # Override default arguments in pytest.ini
   pytestFlagsArray = [
     "--timeout=0"
-    "-n=$NIX_BUILD_CORES"
   ];
 
   disabledTests = lib.optionals (pythonAtLeast "3.10") [
diff --git a/pkgs/development/python-modules/dictpath/default.nix b/pkgs/development/python-modules/dictpath/default.nix
index 2809d859589..5a648f7898f 100644
--- a/pkgs/development/python-modules/dictpath/default.nix
+++ b/pkgs/development/python-modules/dictpath/default.nix
@@ -2,6 +2,7 @@
 , buildPythonPackage
 , fetchFromGitHub
 , pytestCheckHook
+, six
 }:
 
 buildPythonPackage rec {
@@ -21,6 +22,7 @@ buildPythonPackage rec {
 
   checkInputs = [
     pytestCheckHook
+    six
   ];
 
   pythonImportsCheck = [ "dictpath" ];
diff --git a/pkgs/development/python-modules/diskcache/default.nix b/pkgs/development/python-modules/diskcache/default.nix
index 26cb0e438f0..cf3f7b514b1 100644
--- a/pkgs/development/python-modules/diskcache/default.nix
+++ b/pkgs/development/python-modules/diskcache/default.nix
@@ -45,10 +45,6 @@ buildPythonPackage rec {
     "test_get_many"
   ];
 
-  pytestFlagsArray = [
-    "-n $NIX_BUILD_CORES"
-  ];
-
   pythonImportsCheck = [
     "diskcache"
   ];
diff --git a/pkgs/development/python-modules/django-allauth/default.nix b/pkgs/development/python-modules/django-allauth/default.nix
index a68cfd6d9cd..591d41a960c 100644
--- a/pkgs/development/python-modules/django-allauth/default.nix
+++ b/pkgs/development/python-modules/django-allauth/default.nix
@@ -1,31 +1,45 @@
-{ lib, buildPythonPackage, fetchFromGitHub, requests, requests_oauthlib
-, django, python3-openid, mock, coverage }:
+{ lib
+, buildPythonPackage
+, django
+, fetchFromGitHub
+, python3-openid
+, pythonOlder
+, requests
+, requests-oauthlib
+}:
 
 buildPythonPackage rec {
   pname = "django-allauth";
   version = "0.47.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
-  # no tests on PyPI
   src = fetchFromGitHub {
     owner = "pennersr";
     repo = pname;
     rev = version;
-    sha256 = "sha256-wKrsute6TCl331UrxNEBf/zTtGnyGHsOZQwdiicbg2o=";
+    hash = "sha256-wKrsute6TCl331UrxNEBf/zTtGnyGHsOZQwdiicbg2o=";
   };
 
-  propagatedBuildInputs = [ requests requests_oauthlib django python3-openid ];
-
-  checkInputs = [ coverage mock ];
+  propagatedBuildInputs = [
+    requests
+    requests-oauthlib
+    django
+    python3-openid
+  ];
 
+  # Tests requires a Django instance
   doCheck = false;
-  checkPhase = ''
-    cd $NIX_BUILD_TOP/$sourceRoot
-    coverage run manage.py test allauth
-  '';
+
+  pythonImportsCheck = [
+    "allauth"
+  ];
 
   meta = with lib; {
     description = "Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication";
     homepage = "https://www.intenct.nl/projects/django-allauth";
     license = licenses.mit;
+    maintainers = with maintainers; [ ];
   };
 }
diff --git a/pkgs/development/python-modules/django/3.nix b/pkgs/development/python-modules/django/3.nix
index 1538b8a82b4..f1cee8c5ffa 100644
--- a/pkgs/development/python-modules/django/3.nix
+++ b/pkgs/development/python-modules/django/3.nix
@@ -13,14 +13,14 @@
 
 buildPythonPackage rec {
   pname = "django";
-  version = "3.2.12";
+  version = "3.2.13";
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     pname = "Django";
     inherit version;
-    sha256 = "sha256-l3Lmk1cD5Z6ZOWCDLWamFM8CM6HFEjvGIk7MataeQeI=";
+    sha256 = "sha256-bZNJegqb9roOCxopzM3EDvv8dilyVbEwmzqISmiOxLY=";
   };
 
   patches = lib.optional withGdal
diff --git a/pkgs/development/python-modules/django/4.nix b/pkgs/development/python-modules/django/4.nix
index 57c752725d5..db005067981 100644
--- a/pkgs/development/python-modules/django/4.nix
+++ b/pkgs/development/python-modules/django/4.nix
@@ -39,14 +39,14 @@
 
 buildPythonPackage rec {
   pname = "Django";
-  version = "4.0.3";
+  version = "4.0.4";
   format = "pyproject";
 
   disabled = pythonOlder "3.8";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-d/8ucFDjMkybZ+KbZwd1RWb1hRQRKprHMxD2DNUmGTA=";
+    hash = "sha256-ToF3hYUkQXVjzAQw8p6iSZRtgx6ssAaKFFVoZYffQLU=";
   };
 
   patches = lib.optional withGdal
diff --git a/pkgs/development/python-modules/django_modelcluster/default.nix b/pkgs/development/python-modules/django_modelcluster/default.nix
index fc0d0e0921b..02995c1570b 100644
--- a/pkgs/development/python-modules/django_modelcluster/default.nix
+++ b/pkgs/development/python-modules/django_modelcluster/default.nix
@@ -1,25 +1,43 @@
 { lib
 , buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
+, django
+, django-taggit
 , pytz
 , pythonOlder
-, six
+, python
 }:
 
 buildPythonPackage rec {
   pname = "django-modelcluster";
-  version = "5.2";
+  version = "6.0";
+  format = "setuptools";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "e541a46a0a899ef4778a4708be22e71cac3efacc09a6ff44bc065c5c9194c054";
+  disabled = pythonOlder "3.5";
+
+  src = fetchFromGitHub {
+    owner = "wagtail";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-p6hvOkPWRVJYLHvwyn9nS05wblikRFmlSYZuLiCcuqc=";
   };
 
-  disabled = pythonOlder "3.5";
+  propagatedBuildInputs = [
+    django
+    pytz
+  ];
+
+  passthru.extras-require.taggit = [
+    django-taggit
+  ];
 
-  doCheck = false;
+  checkInputs = passthru.extras-require.taggit;
 
-  propagatedBuildInputs = [ pytz six ];
+  checkPhase = ''
+    runHook preCheck
+    ${python.interpreter} ./runtests.py --noinput
+    runHook postCheck
+  '';
 
   meta = with lib; {
     description = "Django extension to allow working with 'clusters' of models as a single unit, independently of the database";
diff --git a/pkgs/development/python-modules/dm-haiku/default.nix b/pkgs/development/python-modules/dm-haiku/default.nix
index 8a6eabfde0f..cfae82668bc 100644
--- a/pkgs/development/python-modules/dm-haiku/default.nix
+++ b/pkgs/development/python-modules/dm-haiku/default.nix
@@ -39,7 +39,6 @@ buildPythonPackage rec {
     pytestCheckHook
     tensorflow
   ];
-  pytestFlagsArray = [ "-n $NIX_BUILD_CORES" ];
 
   pythonImportsCheck = [
     "haiku"
diff --git a/pkgs/development/python-modules/dnspython/default.nix b/pkgs/development/python-modules/dnspython/default.nix
index 5676d270935..1dbbba48b10 100644
--- a/pkgs/development/python-modules/dnspython/default.nix
+++ b/pkgs/development/python-modules/dnspython/default.nix
@@ -10,13 +10,13 @@
 
 buildPythonPackage rec {
   pname = "dnspython";
-  version = "2.2.0";
+  version = "2.2.1";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
     extension = "tar.gz";
-    sha256 = "1mi6l2n766y1gic3x1swp2jk2nr7wbkb191qinwhddnh6bh534z7";
+    sha256 = "0gk00m8zxjghxnzafhars51k5ahd6wfhf123nrc1j5gzlsj6jx8g";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/docutils/default.nix b/pkgs/development/python-modules/docutils/default.nix
index 529a09d3f04..3cd680e062f 100644
--- a/pkgs/development/python-modules/docutils/default.nix
+++ b/pkgs/development/python-modules/docutils/default.nix
@@ -8,11 +8,11 @@
 
 buildPythonPackage rec {
   pname = "docutils";
-  version = "0.17.1";
+  version = "0.18.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125";
+    sha256 = "sha256-Z5mHyvNhp1OdduWEy+3cMR467pN4d8hzRvMd68Y+nQY=";
   };
 
   # Only Darwin needs LANG, but we could set it in general.
diff --git a/pkgs/development/python-modules/dugong/default.nix b/pkgs/development/python-modules/dugong/default.nix
index 5130ea3b004..190411b5333 100644
--- a/pkgs/development/python-modules/dugong/default.nix
+++ b/pkgs/development/python-modules/dugong/default.nix
@@ -2,6 +2,7 @@
 , buildPythonPackage
 , fetchFromGitHub
 , pythonOlder
+, pythonAtLeast
 , pytestCheckHook
 }:
 
@@ -21,6 +22,10 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
+  # Lots of tests hang during teardown with:
+  #   ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2396)
+  doCheck = pythonOlder "3.10";
+
   pythonImportsCheck = [ "dugong" ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/entrypoint2/default.nix b/pkgs/development/python-modules/entrypoint2/default.nix
index 73ede85fb88..4fd464d483f 100644
--- a/pkgs/development/python-modules/entrypoint2/default.nix
+++ b/pkgs/development/python-modules/entrypoint2/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildPythonPackage, fetchPypi, EasyProcess, pathpy, pytestCheckHook }:
+{ lib, buildPythonPackage, fetchPypi, EasyProcess, path, pytestCheckHook }:
 
 buildPythonPackage rec {
   pname = "entrypoint2";
@@ -11,7 +11,7 @@ buildPythonPackage rec {
 
   pythonImportsCheck = [ "entrypoint2" ];
 
-  checkInputs = [ EasyProcess pathpy pytestCheckHook ];
+  checkInputs = [ EasyProcess path pytestCheckHook ];
 
   meta = with lib; {
     description = "Easy to use command-line interface for python modules";
diff --git a/pkgs/development/python-modules/ephemeral-port-reserve/default.nix b/pkgs/development/python-modules/ephemeral-port-reserve/default.nix
new file mode 100644
index 00000000000..0af57945073
--- /dev/null
+++ b/pkgs/development/python-modules/ephemeral-port-reserve/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+}:
+
+let
+  pname = "ephemeral-port-reserve";
+  version = "1.1.4";
+in
+buildPythonPackage {
+  inherit pname version;
+  format = "setuptools";
+
+  src = fetchFromGitHub {
+    owner = "Yelp";
+    repo = "ephemeral-port-reserve";
+    rev = "v${version}";
+    hash = "sha256-R6NRpfaT05PO/cTWgCakiGfCuCyucjVOXbAezn5x1cU=";
+  };
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  disabledTests = lib.optionals stdenv.isDarwin [
+    # can't find hostname in our darwin build environment
+    "test_fqdn"
+  ];
+
+  pythonImportsCheck = [
+    "ephemeral_port_reserve"
+  ];
+
+  meta = with lib; {
+    description = "Find an unused port, reliably";
+    homepage = "https://github.com/Yelp/ephemeral-port-reserve/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ hexa ];
+  };
+}
diff --git a/pkgs/development/python-modules/exchangelib/default.nix b/pkgs/development/python-modules/exchangelib/default.nix
index 3550f1e1736..2f3f5fe16ab 100644
--- a/pkgs/development/python-modules/exchangelib/default.nix
+++ b/pkgs/development/python-modules/exchangelib/default.nix
@@ -17,7 +17,7 @@
 , pyyaml
 , requests
 , requests_ntlm
-, requests_oauthlib
+, requests-oauthlib
 , requests-kerberos
 , requests-mock
 , tzdata
@@ -35,7 +35,7 @@ buildPythonPackage rec {
     owner = "ecederstrand";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-fdYc+fJEePgCzAkUWz7pmL/CI/O9zm5G9xh1f4bhrH4=";
+    hash = "sha256-fdYc+fJEePgCzAkUWz7pmL/CI/O9zm5G9xh1f4bhrH4=";
   };
 
   propagatedBuildInputs = [
@@ -48,7 +48,7 @@ buildPythonPackage rec {
     pygments
     requests
     requests_ntlm
-    requests_oauthlib
+    requests-oauthlib
     requests-kerberos
     tzdata
     tzlocal
diff --git a/pkgs/development/python-modules/faker/default.nix b/pkgs/development/python-modules/faker/default.nix
index 728339621f8..7ca49a48434 100644
--- a/pkgs/development/python-modules/faker/default.nix
+++ b/pkgs/development/python-modules/faker/default.nix
@@ -12,12 +12,12 @@
 
 buildPythonPackage rec {
   pname = "faker";
-  version = "13.3.0";
+  version = "13.3.4";
 
   src = fetchPypi {
     pname = "Faker";
     inherit version;
-    hash = "sha256-YYsUDHdHV4bb46VAmtU1Ict2dGq3pcd7mcZj8+8bG8I=";
+    hash = "sha256-GIlhBl+1x46mOfQhdvVRAPcskMOjF5rGyVXEvXErBRE=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/fakeredis/default.nix b/pkgs/development/python-modules/fakeredis/default.nix
index 5860a959afc..5d45c4dc5ce 100644
--- a/pkgs/development/python-modules/fakeredis/default.nix
+++ b/pkgs/development/python-modules/fakeredis/default.nix
@@ -26,6 +26,11 @@ buildPythonPackage rec {
     hash = "sha256-fCxLobQuCnUzfFS3d78GcQVrRWllDj/5J+S5s4WvyOw=";
   };
 
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace "redis<4.2.0" "redis"
+  '';
+
   propagatedBuildInputs = [
     aioredis
     lupa
diff --git a/pkgs/development/python-modules/falcon/default.nix b/pkgs/development/python-modules/falcon/default.nix
index 5dba22d8391..58bbae87283 100644
--- a/pkgs/development/python-modules/falcon/default.nix
+++ b/pkgs/development/python-modules/falcon/default.nix
@@ -1,22 +1,21 @@
 { lib
 , buildPythonPackage
 , pythonOlder
-, fetchPypi
-, pytestCheckHook
+, isPyPy
+, fetchFromGitHub
+
+# build
+, cython
+
+# tests
 , aiofiles
 , cbor2
-, ddt
-, gunicorn
 , httpx
-, hypercorn
-, jsonschema
 , msgpack
 , mujson
-, nose
 , orjson
-, pecan
 , pytest-asyncio
-, python-mimeparse
+, pytestCheckHook
 , pyyaml
 , rapidjson
 , requests
@@ -28,43 +27,57 @@
 
 buildPythonPackage rec {
   pname = "falcon";
-  version = "3.0.1";
+  version = "3.1.0";
   format = "pyproject";
   disabled = pythonOlder "3.5";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "sha256-xB2E2zJYgahw6LcSnV7P2XL6QyPPd7cRmh0qIZZu5oE=";
+  src = fetchFromGitHub {
+    owner = "falconry";
+    repo = pname;
+    rev = version;
+    hash = "sha256-Y6bD0GCXhqpvMV+/i1v59p2qWZ91f2ey7sPQrVALY54=";
   };
 
+  nativeBuildInputs = lib.optionals (!isPyPy) [
+    cython
+  ];
+
+  preCheck = ''
+    export HOME=$TMPDIR
+    cp -R tests examples $TMPDIR
+    pushd $TMPDIR
+  '';
+
+  postCheck = ''
+    popd
+  '';
+
   checkInputs = [
-    aiofiles
-    cbor2
-    ddt
-    gunicorn
-    httpx
-    hypercorn
-    jsonschema
-    msgpack
-    mujson
-    nose
-    orjson
-    pecan
-    pytest-asyncio
+    # https://github.com/falconry/falcon/blob/master/requirements/tests
     pytestCheckHook
-    python-mimeparse
     pyyaml
-    rapidjson
     requests
-    testtools
-    ujson
+    rapidjson
+    orjson
+
+    # ASGI specific
+    pytest-asyncio
+    aiofiles
+    httpx
     uvicorn
     websockets
+
+    # handler specific
+    cbor2
+    msgpack
+    mujson
+    ujson
+  ] ++ lib.optionals (pythonOlder "3.10") [
+    testtools
   ];
 
-  disabledTestPaths = [
-    # missing optional nuts package
-    "falcon/bench/nuts/nuts/tests/test_functional.py"
+  pytestFlagsArray = [
+    "tests"
   ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/fasteners/default.nix b/pkgs/development/python-modules/fasteners/default.nix
index b1281c686d8..ef8a62bc8e8 100644
--- a/pkgs/development/python-modules/fasteners/default.nix
+++ b/pkgs/development/python-modules/fasteners/default.nix
@@ -2,6 +2,7 @@
 , buildPythonPackage
 , fetchFromGitHub
 , diskcache
+, more-itertools
 , pytestCheckHook
 }:
 
@@ -19,6 +20,7 @@ buildPythonPackage rec {
 
   checkInputs = [
     diskcache
+    more-itertools
     pytestCheckHook
   ];
 
diff --git a/pkgs/development/python-modules/fastparquet/default.nix b/pkgs/development/python-modules/fastparquet/default.nix
index 56fb6a53e14..30aa6a2ab76 100644
--- a/pkgs/development/python-modules/fastparquet/default.nix
+++ b/pkgs/development/python-modules/fastparquet/default.nix
@@ -13,13 +13,13 @@
 
 buildPythonPackage rec {
   pname = "fastparquet";
-  version = "0.7.1";
+  version = "0.8.1";
 
   src = fetchFromGitHub {
     owner = "dask";
     repo = pname;
     rev = version;
-    hash = "sha256-xV0AXNZSy4LSrHf11OP/+KDbeDQu8yF1ugX+W4mie1E=";
+    sha256 = "05qb4nz87p9vnrdsyl25hdp5sj35lki64gjza5dahc89fwfdnsmd";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/findpython/default.nix b/pkgs/development/python-modules/findpython/default.nix
index ad35f379b90..877637344d4 100644
--- a/pkgs/development/python-modules/findpython/default.nix
+++ b/pkgs/development/python-modules/findpython/default.nix
@@ -15,7 +15,7 @@
 
 let
   pname = "findpython";
-  version = "0.1.3";
+  version = "0.1.4";
 in
 buildPythonPackage {
   inherit pname version;
@@ -25,7 +25,7 @@ buildPythonPackage {
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-tVpBa5/PLShyG/vqHOsqbLZ6APmexLlKdtoix6IAKHA=";
+    hash = "sha256-TOGYRUaW7lOcp5kNTq3NBHHKXvA7XE7y+SWJGsZPgok=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/fitbit/default.nix b/pkgs/development/python-modules/fitbit/default.nix
index b41ac0a4983..3a1c7677677 100644
--- a/pkgs/development/python-modules/fitbit/default.nix
+++ b/pkgs/development/python-modules/fitbit/default.nix
@@ -1,41 +1,49 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
-, coverage
-, python-dateutil
 , freezegun
 , mock
+, pytestCheckHook
+, python-dateutil
+, pythonOlder
 , requests-mock
-, requests_oauthlib
-, sphinx
+, requests-oauthlib
 }:
 
 buildPythonPackage rec {
   pname = "fitbit";
   version = "0.3.1";
+  format = "setuptools";
 
-  checkInputs = [ coverage freezegun mock requests-mock sphinx ];
-  propagatedBuildInputs = [ python-dateutil requests_oauthlib ];
+  disabled = pythonOlder "3.7";
 
-  # The source package on PyPi is missing files required for unit testing.
-  # https://github.com/orcasgit/python-fitbit/issues/148
   src = fetchFromGitHub {
-    rev = version;
     owner = "orcasgit";
     repo = "python-fitbit";
-    sha256 = "1w2lpgf6bs5nbnmslppaf4lbhr9cj6grg0a525xv41jip7iy3vfn";
+    rev = version;
+    hash = "sha256-1u3h47lRBrJ7EUWBl5+RLGW4KHHqXqqrXbboZdy7VPA=";
   };
 
-  postPatch = ''
-    substituteInPlace requirements/test.txt \
-      --replace 'Sphinx>=1.2,<1.4' 'Sphinx' \
-      --replace 'coverage>=3.7,<4.0' 'coverage'
-  '';
+  propagatedBuildInputs = [
+    python-dateutil
+    requests-oauthlib
+  ];
+
+  checkInputs = [
+    freezegun
+    mock
+    pytestCheckHook
+    requests-mock
+  ];
+
+  pythonImportsCheck = [
+    "fitbit"
+  ];
 
   meta = with lib; {
     description = "Fitbit API Python Client Implementation";
-    license = licenses.asl20;
     homepage = "https://github.com/orcasgit/python-fitbit";
+    license = licenses.asl20;
     maintainers = with maintainers; [ delroth ];
   };
 }
diff --git a/pkgs/development/python-modules/flake8-blind-except/default.nix b/pkgs/development/python-modules/flake8-blind-except/default.nix
index ee3f46d078c..c25985e1681 100644
--- a/pkgs/development/python-modules/flake8-blind-except/default.nix
+++ b/pkgs/development/python-modules/flake8-blind-except/default.nix
@@ -1,6 +1,7 @@
 { lib
 , fetchPypi
 , buildPythonPackage
+, pycodestyle
 , pythonOlder
 }:
 
@@ -16,6 +17,10 @@ buildPythonPackage rec {
     hash = "sha256-8lpXWp3LPus8dgv5wi22C4taIxICJO0fqppD913X3RY=";
   };
 
+  propagatedBuildInputs = [
+    pycodestyle
+  ];
+
   # Module has no tests
   doCheck = false;
 
diff --git a/pkgs/development/python-modules/flake8/default.nix b/pkgs/development/python-modules/flake8/default.nix
index c707cb3caaa..73dc7403b25 100644
--- a/pkgs/development/python-modules/flake8/default.nix
+++ b/pkgs/development/python-modules/flake8/default.nix
@@ -25,7 +25,7 @@ buildPythonPackage rec {
 
   postPatch = ''
     substituteInPlace setup.cfg \
-      --replace "pyflakes >= 2.3.0, < 2.4.0" "pyflakes >= 2.3.0, < 2.5.0"
+      --replace "mccabe>=0.6.0,<0.7.0" "mccabe>=0.7.0,<0.8.0"
   '';
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/flask-login/default.nix b/pkgs/development/python-modules/flask-login/default.nix
index 3c7058c1212..62eb3287f8c 100644
--- a/pkgs/development/python-modules/flask-login/default.nix
+++ b/pkgs/development/python-modules/flask-login/default.nix
@@ -12,7 +12,7 @@
 
 buildPythonPackage rec {
   pname = "flask-login";
-  version = "0.5.0";
+  version = "0.6.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
@@ -20,7 +20,7 @@ buildPythonPackage rec {
   src = fetchPypi {
     pname = "Flask-Login";
     inherit version;
-    sha256 = "6d33aef15b5bcead780acc339464aae8a6e28f13c90d8b1cf9de8b549d1c0b4b";
+    sha256 = "sha256-qoT8+0w88JyljAjoFre85z8TSboc8T0A2N/8WHLV/PY=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/flask-paranoid/default.nix b/pkgs/development/python-modules/flask-paranoid/default.nix
index 787b34a93b3..8de346593ef 100644
--- a/pkgs/development/python-modules/flask-paranoid/default.nix
+++ b/pkgs/development/python-modules/flask-paranoid/default.nix
@@ -7,13 +7,13 @@
 
 buildPythonPackage rec {
   pname = "flask-paranoid";
-  version = "0.2";
+  version = "0.3.0";
 
   src = fetchFromGitHub {
     owner = "miguelgrinberg";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0WWc/ktAOuTk4A75xI1jCj/aef2+1TjLKBA9+PRfJO0=";
+    sha256 = "sha256-tikD8efc3Q3xIQnaC3SSBaCRQxMI1HzXxeupvYeNnE4=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/flask-restful/default.nix b/pkgs/development/python-modules/flask-restful/default.nix
index db7a63c5ed4..1af875d4bbc 100644
--- a/pkgs/development/python-modules/flask-restful/default.nix
+++ b/pkgs/development/python-modules/flask-restful/default.nix
@@ -20,6 +20,10 @@ buildPythonPackage rec {
     sha256 = "0gm5dz088v3d2k1dkcp9b3nnqpkk0fp2jly870hijj2xhc5nbv6c";
   };
 
+  patches = [
+    ./werkzeug-2.1.0-compat.patch
+  ];
+
   propagatedBuildInputs = [
     aniso8601
     flask
diff --git a/pkgs/development/python-modules/flask-restful/werkzeug-2.1.0-compat.patch b/pkgs/development/python-modules/flask-restful/werkzeug-2.1.0-compat.patch
new file mode 100644
index 00000000000..c8707b23943
--- /dev/null
+++ b/pkgs/development/python-modules/flask-restful/werkzeug-2.1.0-compat.patch
@@ -0,0 +1,114 @@
+Fixes compatibility with Werkzeug 2.1.0 ported over from flask-restx#423.
+
+https://github.com/python-restx/flask-restx/pull/423
+
+diff --git a/flask_restful/reqparse.py b/flask_restful/reqparse.py
+index 9bb3099..5c59594 100644
+--- a/flask_restful/reqparse.py
++++ b/flask_restful/reqparse.py
+@@ -114,7 +114,10 @@ class Argument(object):
+         :param request: The flask request object to parse arguments from
+         """
+         if isinstance(self.location, six.string_types):
+-            value = getattr(request, self.location, MultiDict())
++            if self.location in {"json", "get_json"}:
++                value = request.get_json(silent=True)
++            else:
++                value = getattr(request, self.location, MultiDict())
+             if callable(value):
+                 value = value()
+             if value is not None:
+@@ -122,7 +125,10 @@ class Argument(object):
+         else:
+             values = MultiDict()
+             for l in self.location:
+-                value = getattr(request, l, None)
++                if l in {"json", "get_json"}:
++                    value = request.get_json(silent=True)
++                else:
++                    value = getattr(request, l, None)
+                 if callable(value):
+                     value = value()
+                 if value is not None:
+diff --git a/tests/test_api.py b/tests/test_api.py
+index 15f12eb..9a9cceb 100644
+--- a/tests/test_api.py
++++ b/tests/test_api.py
+@@ -936,7 +936,7 @@ class APITestCase(unittest.TestCase):
+         app = app.test_client()
+         resp = app.get('/api')
+         self.assertEqual(resp.status_code, 302)
+-        self.assertEqual(resp.headers['Location'], 'http://localhost/')
++        self.assertEqual(resp.headers['Location'], '/')
+ 
+     def test_json_float_marshalled(self):
+         app = Flask(__name__)
+diff --git a/tests/test_reqparse.py b/tests/test_reqparse.py
+index 1d75e40..e5c586b 100644
+--- a/tests/test_reqparse.py
++++ b/tests/test_reqparse.py
+@@ -23,8 +23,9 @@ class ReqParseTestCase(unittest.TestCase):
+         with app.app_context():
+             parser = RequestParser()
+             parser.add_argument('foo', choices=('one', 'two'), help='Bad choice: {error_msg}')
+-            req = Mock(['values'])
++            req = Mock(["values", "get_json"])
+             req.values = MultiDict([('foo', 'three')])
++            req.get_json.return_value = None
+             parser.parse_args(req)
+             expected = {'foo': 'Bad choice: three is not a valid choice'}
+             abort.assert_called_with(400, message=expected)
+@@ -35,8 +36,9 @@ class ReqParseTestCase(unittest.TestCase):
+         with app.app_context():
+             parser = RequestParser()
+             parser.add_argument('foo', choices=('one', 'two'), help=u'Bad choice: {error_msg}')
+-            req = Mock(['values'])
++            req = Mock(["values", "get_json"])
+             req.values = MultiDict([('foo', u'\xf0\x9f\x8d\x95')])
++            req.get_json.return_value = None
+             parser.parse_args(req)
+             expected = {'foo': u'Bad choice: \xf0\x9f\x8d\x95 is not a valid choice'}
+             abort.assert_called_with(400, message=expected)
+@@ -47,8 +49,9 @@ class ReqParseTestCase(unittest.TestCase):
+         with app.app_context():
+             parser = RequestParser()
+             parser.add_argument('foo', choices=['one', 'two'], help='Please select a valid choice')
+-            req = Mock(['values'])
++            req = Mock(["values", "get_json"])
+             req.values = MultiDict([('foo', 'three')])
++            req.get_json.return_value = None
+             parser.parse_args(req)
+             expected = {'foo': 'Please select a valid choice'}
+             abort.assert_called_with(400, message=expected)
+@@ -58,8 +61,9 @@ class ReqParseTestCase(unittest.TestCase):
+         def bad_choice():
+             parser = RequestParser()
+             parser.add_argument('foo', choices=['one', 'two'])
+-            req = Mock(['values'])
++            req = Mock(["values", "get_json"])
+             req.values = MultiDict([('foo', 'three')])
++            req.get_json.return_value = None
+             parser.parse_args(req)
+             abort.assert_called_with(400, message='three is not a valid choice')
+         app = Flask(__name__)
+@@ -190,7 +194,8 @@ class ReqParseTestCase(unittest.TestCase):
+         self.assertTrue(len(arg.source(req)) == 0)  # yes, basically you don't find it
+ 
+     def test_source_default_location(self):
+-        req = Mock(['values'])
++        req = Mock(['values', 'get_json'])
++        req.get_json.return_value = None
+         req._get_child_mock = lambda **kwargs: MultiDict()
+         arg = Argument('foo')
+         self.assertEqual(arg.source(req), req.values)
+@@ -215,8 +220,9 @@ class ReqParseTestCase(unittest.TestCase):
+         args = parser.parse_args(req)
+         self.assertEqual(args['foo'], "bar")
+ 
+-        req = Mock()
++        req = Mock(['get_json'])
+         req.values = ()
++        req.get_json.return_value = None
+         req.json = None
+         req.view_args = {"foo": "bar"}
+         parser = RequestParser()
diff --git a/pkgs/development/python-modules/flask-restx/default.nix b/pkgs/development/python-modules/flask-restx/default.nix
index 42e3eabec74..4b88ab56450 100644
--- a/pkgs/development/python-modules/flask-restx/default.nix
+++ b/pkgs/development/python-modules/flask-restx/default.nix
@@ -1,6 +1,7 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
+, fetchpatch
 , aniso8601
 , jsonschema
 , flask
@@ -28,6 +29,20 @@ buildPythonPackage rec {
     sha256 = "18vrmknyxw6adn62pz3kr9kvazfgjgl4pgimdf8527fyyiwcqy15";
   };
 
+  patches = [
+    # Fixes werkzeug 2.1 compatibility
+    (fetchpatch {
+      # https://github.com/python-restx/flask-restx/pull/427
+      url = "https://github.com/python-restx/flask-restx/commit/bb72a51860ea8a42c928f69bdd44ad20b1f9ee7e.patch";
+      hash = "sha256-DRH3lI6TV1m0Dq1VyscL7GQS26OOra9g88dXZNrNpmQ=";
+    })
+    (fetchpatch {
+      # https://github.com/python-restx/flask-restx/pull/427
+      url = "https://github.com/python-restx/flask-restx/commit/bb3e9dd83b9d4c0d0fa0de7d7ff713fae71eccee.patch";
+      hash = "sha256-HJpjG4aQWzEPCMfbXfkw4mz5TH9d89BCvGH2dE6Jfv0=";
+    })
+  ];
+
   propagatedBuildInputs = [
     aniso8601
     flask
diff --git a/pkgs/development/python-modules/flask-security-too/default.nix b/pkgs/development/python-modules/flask-security-too/default.nix
index e88556c07d0..88fd2da77d7 100644
--- a/pkgs/development/python-modules/flask-security-too/default.nix
+++ b/pkgs/development/python-modules/flask-security-too/default.nix
@@ -1,29 +1,44 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, flask
+
+# extras: babel
+, Babel
+, flask-babel
+
+# extras: common
+, bcrypt
+, bleach
+, flask_mail
+
+# extras: fsqla
+, flask_sqlalchemy
+, sqlalchemy
+, sqlalchemy-utils
+
+# extras: mfa
+, cryptography
+, phonenumbers
+, pyqrcode
+
+# propagates
 , blinker
-, setuptools
-, itsdangerous
-, flask_principal
-, passlib
 , email_validator
-, flask_wtf
+, flask
 , flask_login
-, pytestCheckHook
-, flask_mail
-, sqlalchemy
-, flask_sqlalchemy
+, flask_principal
+, flask_wtf
+, itsdangerous
+, passlib
+
+# tests
 , flask-mongoengine
+, mongoengine
+, mongomock
 , peewee
 , pony
+, pytestCheckHook
 , zxcvbn
-, mongoengine
-, cryptography
-, pyqrcode
-, phonenumbers
-, bleach
-, mongomock
 }:
 
 buildPythonPackage rec {
@@ -37,32 +52,73 @@ buildPythonPackage rec {
   };
 
   propagatedBuildInputs = [
+    blinker
+    email_validator
     flask
     flask_login
     flask_principal
     flask_wtf
-    email_validator
     itsdangerous
     passlib
-    blinker
-    setuptools
   ];
 
+  passthru.extras-require = {
+    babel = [
+      Babel
+      flask-babel
+    ];
+    common = [
+      bcrypt
+      bleach
+      flask_mail
+    ];
+    fsqla = [
+      flask_sqlalchemy
+      sqlalchemy
+      sqlalchemy-utils
+    ];
+    mfa = [
+      cryptography
+      phonenumbers
+      pyqrcode
+    ];
+  };
+
   checkInputs = [
-    pytestCheckHook
-    flask_mail
-    sqlalchemy
-    flask_sqlalchemy
     flask-mongoengine
+    mongoengine
+    mongomock
     peewee
     pony
+    pytestCheckHook
     zxcvbn
-    mongoengine
-    cryptography
-    pyqrcode
-    phonenumbers
-    bleach
-    mongomock
+  ]
+  ++ passthru.extras-require.babel
+  ++ passthru.extras-require.common
+  ++ passthru.extras-require.fsqla
+  ++ passthru.extras-require.mfa;
+
+  disabledTests = [
+    # flask 2.1.0 incompatibilities https://github.com/Flask-Middleware/flask-security/issues/594
+    "test_admin_setup_reset"
+    "test_authn_freshness"
+    "test_authn_freshness_nc"
+    "test_bad_sender"
+    "test_change_invalidates_auth_token"
+    "test_change_invalidates_session"
+    "test_default_authn_bp"
+    "test_default_unauthn"
+    "test_default_unauthn_bp"
+    "test_email_not_identity"
+    "test_next"
+    "test_post_security_with_application_root"
+    "test_post_security_with_application_root_and_views"
+    "test_recover_invalidates_session"
+    "test_two_factor_flag"
+    "test_unauthorized_access_with_referrer"
+    "test_verify"
+    "test_verify_link"
+    "test_view_configuration"
   ];
 
   pythonImportsCheck = [ "flask_security" ];
diff --git a/pkgs/development/python-modules/flask-socketio/default.nix b/pkgs/development/python-modules/flask-socketio/default.nix
index 496676600fc..a429e81ce0f 100644
--- a/pkgs/development/python-modules/flask-socketio/default.nix
+++ b/pkgs/development/python-modules/flask-socketio/default.nix
@@ -9,13 +9,13 @@
 
 buildPythonPackage rec {
   pname = "Flask-SocketIO";
-  version = "5.0.1";
+  version = "5.1.1";
 
   src = fetchFromGitHub {
     owner = "miguelgrinberg";
     repo = "Flask-SocketIO";
     rev = "v${version}";
-    sha256 = "01zf6cy95pgc4flgn0740z2my90l7rxwliahp6rb2xbp7rh32cng";
+    sha256 = "sha256-PnNJEtcWaisOlt6OmYUl97TlZb9cK2ORvtEcmGPxSB0=";
   };
 
   propagatedBuildInputs = [
@@ -28,6 +28,10 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
+  pytestFlagsArray = [
+    "test_socketio.py"
+  ];
+
   pythonImportsCheck = [ "flask_socketio" ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/flask-talisman/default.nix b/pkgs/development/python-modules/flask-talisman/default.nix
index b57d5882470..82f3e09b479 100644
--- a/pkgs/development/python-modules/flask-talisman/default.nix
+++ b/pkgs/development/python-modules/flask-talisman/default.nix
@@ -8,11 +8,11 @@
 
 buildPythonPackage rec {
   pname = "flask-talisman";
-  version = "0.8.1";
+  version = "1.0.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "11gjgqkpj2yqydb0pfhjyx56iy4l9szgz33vg5d7bw8vqp02wl2x";
+    sha256 = "sha256-IF0958Xs+tZnyEEj9fvlgLH2jNmhsFjXNTzANI4Vsb8=";
   };
 
   buildInputs = [
diff --git a/pkgs/development/python-modules/flask/default.nix b/pkgs/development/python-modules/flask/default.nix
index 6b49d2d2a6e..997a28de1e9 100644
--- a/pkgs/development/python-modules/flask/default.nix
+++ b/pkgs/development/python-modules/flask/default.nix
@@ -3,21 +3,22 @@
 , fetchPypi
 , asgiref
 , click
+, importlib-metadata
 , itsdangerous
 , jinja2
 , python-dotenv
 , werkzeug
-, setuptools
 , pytestCheckHook
+, pythonOlder
 }:
 
 buildPythonPackage rec {
-  version = "2.0.3";
+  version = "2.1.1";
   pname = "Flask";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-4RIMIoyi9VO0cN9KX6knq2YlhGdSYGmYGz6wqRkCaH0=";
+    sha256 = "sha256-qMm9PlWOyZZG0Xepc5xB3x3tBilIC0yNKXVBLzyVGcg=";
   };
 
   propagatedBuildInputs = [
@@ -27,11 +28,7 @@ buildPythonPackage rec {
     itsdangerous
     jinja2
     werkzeug
-
-    # required for CLI subcommand autodiscovery
-    # see: https://github.com/pallets/flask/blob/fdac8a5404e3e3a316568107a293f134707c75bb/src/flask/cli.py#L498
-    setuptools
-  ];
+  ] ++ lib.optional (pythonOlder "3.10") importlib-metadata;
 
   checkInputs = [
     pytestCheckHook
@@ -48,5 +45,6 @@ buildPythonPackage rec {
       Python web application frameworks.
     '';
     license = licenses.bsd3;
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/flax/default.nix b/pkgs/development/python-modules/flax/default.nix
index 1f1622dc1ae..82675df46c9 100644
--- a/pkgs/development/python-modules/flax/default.nix
+++ b/pkgs/development/python-modules/flax/default.nix
@@ -42,7 +42,6 @@ buildPythonPackage rec {
     pytestCheckHook
     tensorflow
   ];
-  pytestFlagsArray = [ "-n $NIX_BUILD_CORES" ];
 
   disabledTestPaths = [
     # Docs test, needs extra deps + we're not interested in it.
diff --git a/pkgs/development/python-modules/flickrapi/default.nix b/pkgs/development/python-modules/flickrapi/default.nix
index d7d20f19ea7..8ad1071cd24 100644
--- a/pkgs/development/python-modules/flickrapi/default.nix
+++ b/pkgs/development/python-modules/flickrapi/default.nix
@@ -1,35 +1,66 @@
 { lib
 , buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
 , requests
 , requests-toolbelt
-, requests_oauthlib
-, pytest
-, pytest-runner
-, pytest-cov
+, requests-oauthlib
+, pytestCheckHook
 , responses
+, pythonOlder
 }:
 
 buildPythonPackage rec {
-  pname   = "flickrapi";
-  version = "2.4.0";
+  pname = "flickrapi";
+  version = "2.4";
+  format = "setuptools";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "03g2z21k6nhxgwysjrgnxj9m1yg25mnnkr10gpyfhfkd9w77pcpz";
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "sybrenstuvel";
+    repo = pname;
+    rev = "version-${version}";
+    hash = "sha256-vRZrlXKI0UDdmDevh3XUngH4X8G3VlOCSP0z/rxhIgw=";
   };
 
-  propagatedBuildInputs = [ requests requests-toolbelt requests_oauthlib ];
+  propagatedBuildInputs = [
+    requests
+    requests-toolbelt
+    requests-oauthlib
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    responses
+  ];
+
+  preCheck = ''
+    export HOME=$(mktemp -d);
+  '';
+
+  disabledTests = [
+    # Tests require network access
+    "test_default_format"
+    "test_etree_default_format"
+    "test_etree_format_error"
+    "test_etree_format_happy"
+    "test_explicit_format"
+    "test_json_callback_format"
+    "test_json_format"
+    "test_parsed_json_format"
+    "test_walk"
+    "test_xmlnode_format"
+    "test_xmlnode_format_error"
+  ];
 
-  checkInputs = [ pytest pytest-runner pytest-cov responses ];
-  doCheck = false; # Otherwise:
-  # ========================= no tests ran in 0.01 seconds =========================
-  # builder for '/nix/store/c8a58v6aa18zci08q2l53s12ywn8jqhq-python3.6-flickrapi-2.4.0.drv' failed with exit code 5
+  pythonImportsCheck = [
+    "flickrapi"
+  ];
 
-  meta = {
+  meta = with lib; {
     description = "A Python interface to the Flickr API";
-    homepage    = "https://stuvel.eu/flickrapi";
-    license     = lib.licenses.psfl;
-    maintainers = with lib.maintainers; [ obadz ];
+    homepage = "https://stuvel.eu/flickrapi";
+    license = licenses.psfl;
+    maintainers = with maintainers; [ obadz ];
   };
 }
diff --git a/pkgs/development/python-modules/flit-core/default.nix b/pkgs/development/python-modules/flit-core/default.nix
index 35bba06f1f3..d0b83d30ea2 100644
--- a/pkgs/development/python-modules/flit-core/default.nix
+++ b/pkgs/development/python-modules/flit-core/default.nix
@@ -6,7 +6,7 @@
 
 buildPythonPackage rec {
   pname = "flit-core";
-  version = "3.6.0";
+  inherit (flit) version;
   format = "pyproject";
 
   outputs = [
@@ -35,7 +35,7 @@ buildPythonPackage rec {
 
   meta = with lib; {
     description = "Distribution-building parts of Flit. See flit package for more information";
-    homepage = "https://github.com/takluyver/flit";
+    homepage = "https://github.com/pypa/flit";
     license = licenses.bsd3;
     maintainers = with maintainers; [ fridh SuperSandro2000 ];
   };
diff --git a/pkgs/development/python-modules/flit/default.nix b/pkgs/development/python-modules/flit/default.nix
index 830ed2702b8..598905d97ff 100644
--- a/pkgs/development/python-modules/flit/default.nix
+++ b/pkgs/development/python-modules/flit/default.nix
@@ -3,7 +3,7 @@
 , fetchFromGitHub
 , docutils
 , requests
-, pytest
+, pytestCheckHook
 , testpath
 , responses
 , flit-core
@@ -18,14 +18,14 @@
 
 buildPythonPackage rec {
   pname = "flit";
-  version = "3.6.0";
+  version = "3.7.1";
   format = "pyproject";
 
   src = fetchFromGitHub {
     owner = "takluyver";
     repo = "flit";
     rev = version;
-    sha256 = "sha256-D3q/1g6njrrmizooGmzNd9g2nKs00dMGj9jrrv3Y6HQ=";
+    sha256 = "sha256-zKgaeK3fskz2TuHvIWlxBrdZIWfIJHhaqopZ3+V36wY=";
   };
 
   nativeBuildInputs = [
@@ -40,18 +40,17 @@ buildPythonPackage rec {
     tomli-w
   ];
 
-  checkInputs = [ pytest testpath responses ];
+  checkInputs = [ pytestCheckHook testpath responses ];
 
-  # Disable test that needs some ini file.
-  # Disable test that wants hg
-  checkPhase = ''
-    HOME=$(mktemp -d) pytest -k "not test_invalid_classifier and not test_build_sdist"
-  '';
+  disabledTests = [
+    # needs some ini file.
+    "test_invalid_classifier"
+  ];
 
   meta = with lib; {
     description = "A simple packaging tool for simple packages";
-    homepage = "https://github.com/takluyver/flit";
+    homepage = "https://github.com/pypa/flit";
     license = licenses.bsd3;
-    maintainers = [ maintainers.fridh ];
+    maintainers = with maintainers; [ fridh SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/fn/default.nix b/pkgs/development/python-modules/fn/default.nix
index f64d1a3d122..0acdf24d954 100644
--- a/pkgs/development/python-modules/fn/default.nix
+++ b/pkgs/development/python-modules/fn/default.nix
@@ -1,20 +1,34 @@
-{ lib, buildPythonPackage, fetchPypi }:
+{ lib
+, buildPythonPackage
+, fetchpatch
+, fetchPypi
+}:
 
 buildPythonPackage rec {
   pname = "fn";
   version = "0.4.3";
 
-  meta = {
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1nmsjmn8jb4gp22ksx0j0hhdf4y0zm8rjykyy2i6flzimg6q1kgq";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/kachayev/fn.py/commit/a54fc0bd8aeae277de2db726131d249ce607c0c2.patch";
+      hash = "sha256-I0ZISOgVibsc1k7gwSfeW6qV9PspQqdaHlRLr/IusQ8=";
+      excludes = [
+        "fn/monad.py"
+      ];
+    })
+  ];
+
+  meta = with lib; {
     description = ''
       Functional programming in Python: implementation of missing
       features to enjoy FP
     '';
     homepage = "https://github.com/kachayev/fn.py";
-    license = lib.licenses.asl20;
-  };
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "1nmsjmn8jb4gp22ksx0j0hhdf4y0zm8rjykyy2i6flzimg6q1kgq";
+    license = licenses.asl20;
   };
 }
diff --git a/pkgs/development/python-modules/fontparts/default.nix b/pkgs/development/python-modules/fontparts/default.nix
index 7830cb11712..16d594eab04 100644
--- a/pkgs/development/python-modules/fontparts/default.nix
+++ b/pkgs/development/python-modules/fontparts/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildPythonPackage, fetchPypi, python
+{ lib, buildPythonPackage, fetchPypi, python, pythonOlder
 , fonttools, lxml, fs, unicodedata2
 , defcon, fontpens, fontmath, booleanoperations
 , pytest, setuptools-scm
@@ -6,11 +6,13 @@
 
 buildPythonPackage rec {
   pname = "fontParts";
-  version = "0.10.3";
+  version = "0.10.4";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-aHtjLHdc2/s3ppF8fz8qFAqxwEKMZJJAFNlBaZ7FAb4=";
+    sha256 = "1ic453q86s5hsw8mxnclk1vr4qp69fd67gywhv23zqwz9a7kb7lh";
     extension = "zip";
   };
 
diff --git a/pkgs/development/python-modules/fonttools/default.nix b/pkgs/development/python-modules/fonttools/default.nix
index 84f2edb7210..a70dfef0054 100644
--- a/pkgs/development/python-modules/fonttools/default.nix
+++ b/pkgs/development/python-modules/fonttools/default.nix
@@ -17,16 +17,15 @@
 
 buildPythonPackage rec {
   pname = "fonttools";
-  version = "4.29.1";
+  version = "4.30.0";
 
-  # Bump to 3.7 when https://github.com/fonttools/fonttools/pull/2417 is merged
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner  = pname;
     repo   = pname;
     rev    = version;
-    sha256 = "sha256-xviNGFcb1wj5WuA6UxHpw3BkpdjSJL3fbsBytJacp8w=";
+    sha256 = "1y9f071bdl66rsx42j16j5v53h85xra5qlg860rz3m054s2rmin9";
   };
 
   # all dependencies are optional, but
diff --git a/pkgs/development/python-modules/freezegun/default.nix b/pkgs/development/python-modules/freezegun/default.nix
index 2ffefa1a4e0..171d2b0556a 100644
--- a/pkgs/development/python-modules/freezegun/default.nix
+++ b/pkgs/development/python-modules/freezegun/default.nix
@@ -1,21 +1,23 @@
 { lib
 , buildPythonPackage
-, pythonOlder
-, pythonAtLeast
 , fetchpatch
 , fetchPypi
-, python-dateutil
 , pytestCheckHook
+, python-dateutil
+, pythonAtLeast
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "freezegun";
-  version = "1.1.0";
-  disabled = pythonOlder "3.5";
+  version = "1.2.1";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "177f9dd59861d871e27a484c3332f35a6e3f5d14626f2bf91be37891f18927f3";
+    hash = "sha256-tMZO+ydea8aNxudxsX/+D/D5C4GipRiQQ1ULZRmSa6Q=";
   };
 
   patches = lib.optionals (pythonAtLeast "3.10") [
@@ -26,13 +28,22 @@ buildPythonPackage rec {
     })
   ];
 
-  propagatedBuildInputs = [ python-dateutil ];
-  checkInputs = [ pytestCheckHook ];
+  propagatedBuildInputs = [
+    python-dateutil
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "freezegun"
+  ];
 
   meta = with lib; {
-    description = "FreezeGun: Let your Python tests travel through time";
+    description = "Library that allows your Python tests to travel through time";
     homepage = "https://github.com/spulec/freezegun";
     license = licenses.asl20;
+    maintainers = with maintainers; [ fab ];
   };
-
 }
diff --git a/pkgs/development/python-modules/funcparserlib/default.nix b/pkgs/development/python-modules/funcparserlib/default.nix
index 3ace04b108d..ba535146cf2 100644
--- a/pkgs/development/python-modules/funcparserlib/default.nix
+++ b/pkgs/development/python-modules/funcparserlib/default.nix
@@ -6,6 +6,7 @@
 , python
 , pytestCheckHook
 , pythonOlder
+, six
 }:
 
 buildPythonPackage rec {
@@ -28,6 +29,7 @@ buildPythonPackage rec {
 
   checkInputs = [
     pytestCheckHook
+    six
   ];
 
   patches = [
diff --git a/pkgs/development/python-modules/geoalchemy2/default.nix b/pkgs/development/python-modules/geoalchemy2/default.nix
index 15ba87400e3..8457d74a481 100644
--- a/pkgs/development/python-modules/geoalchemy2/default.nix
+++ b/pkgs/development/python-modules/geoalchemy2/default.nix
@@ -11,12 +11,12 @@
 
 buildPythonPackage rec {
   pname = "GeoAlchemy2";
-  version = "0.10.2";
+  version = "0.11.1";
   format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "3db833746e11bc802b754751ec94eaab81009a9ad8fe647d461fe76d1a47a3fd";
+    sha256 = "sha256-+SoPrdtbdDhNu/PHAAQzNYzo4HoYD+HWwoQ+qgQ3/wg=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/gipc/default.nix b/pkgs/development/python-modules/gipc/default.nix
index 2bab62fbcb1..85d17ee3ab8 100644
--- a/pkgs/development/python-modules/gipc/default.nix
+++ b/pkgs/development/python-modules/gipc/default.nix
@@ -27,8 +27,6 @@ buildPythonPackage rec {
     '';
     homepage = "http://gehrcke.de/gipc";
     license = licenses.mit;
-    # gipc only has support for older versions of gevent
-    broken = versionOlder "1.6" gevent.version;
   };
 
 }
diff --git a/pkgs/development/python-modules/glean-parser/default.nix b/pkgs/development/python-modules/glean-parser/default.nix
index 704c556c003..3cb8d83b7c8 100644
--- a/pkgs/development/python-modules/glean-parser/default.nix
+++ b/pkgs/development/python-modules/glean-parser/default.nix
@@ -26,6 +26,12 @@ buildPythonPackage rec {
     hash = "sha256-PjOMNUnrz0kDfYEXv5Ni/9RIHn4Yylle6NJOK1Rb3SY=";
   };
 
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "pytest-runner" "" \
+      --replace "MarkupSafe==2.0.1" "MarkupSafe"
+  '';
+
   nativeBuildInputs = [
     setuptools-scm
   ];
@@ -44,11 +50,6 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
-  postPatch = ''
-    substituteInPlace setup.py \
-      --replace "pytest-runner" ""
-  '';
-
   disabledTests = [
     # https://bugzilla.mozilla.org/show_bug.cgi?id=1741668
     "test_validate_ping"
diff --git a/pkgs/development/python-modules/google-api-core/default.nix b/pkgs/development/python-modules/google-api-core/default.nix
index 468b2476de9..b5a9bfea212 100644
--- a/pkgs/development/python-modules/google-api-core/default.nix
+++ b/pkgs/development/python-modules/google-api-core/default.nix
@@ -16,14 +16,14 @@
 
 buildPythonPackage rec {
   pname = "google-api-core";
-  version = "2.5.0";
+  version = "2.7.1";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-8zhjpnCWUXA7ixi2cJNRSDjHnysE0CqlASAwefJLgBg=";
+    sha256 = "sha256-sPpXflEvDI4GM4a5dHGLhhRYanmMWJTtNL7fJW2driQ=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/google-api-python-client/default.nix b/pkgs/development/python-modules/google-api-python-client/default.nix
index 493bda2f9d5..bce1897eac5 100644
--- a/pkgs/development/python-modules/google-api-python-client/default.nix
+++ b/pkgs/development/python-modules/google-api-python-client/default.nix
@@ -13,14 +13,14 @@
 
 buildPythonPackage rec {
   pname = "google-api-python-client";
-  version = "2.39.0";
+  version = "2.42.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-QBFpIV7K+1r7aD0/4OQ8BZ62Jccf6hkp8WQD3acqLcE=";
+    sha256 = "sha256-e/WLZltjXQattHeXqaT3NILnOeAu0DbNlg3HwYM2H2c=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/google-auth-oauthlib/default.nix b/pkgs/development/python-modules/google-auth-oauthlib/default.nix
index 6ee0cb06540..449a07ea40c 100644
--- a/pkgs/development/python-modules/google-auth-oauthlib/default.nix
+++ b/pkgs/development/python-modules/google-auth-oauthlib/default.nix
@@ -6,12 +6,16 @@
 , mock
 , pytestCheckHook
 , google-auth
-, requests_oauthlib
+, requests-oauthlib
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "google-auth-oauthlib";
   version = "0.5.1";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
@@ -20,7 +24,7 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [
     google-auth
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   checkInputs = [
@@ -29,7 +33,13 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
-  disabledTests = lib.optionals stdenv.isDarwin [ "test_run_local_server" ];
+  disabledTests = lib.optionals stdenv.isDarwin [
+    "test_run_local_server"
+  ];
+
+  pythonImportsCheck = [
+    "google_auth_oauthlib"
+  ];
 
   meta = with lib; {
     description = "Google Authentication Library: oauthlib integration";
diff --git a/pkgs/development/python-modules/google-cloud-bigquery/default.nix b/pkgs/development/python-modules/google-cloud-bigquery/default.nix
index 86ac3048e0a..e6b2ba11f67 100644
--- a/pkgs/development/python-modules/google-cloud-bigquery/default.nix
+++ b/pkgs/development/python-modules/google-cloud-bigquery/default.nix
@@ -18,12 +18,12 @@
 
 buildPythonPackage rec {
   pname = "google-cloud-bigquery";
-  version = "2.34.2";
+  version = "3.0.1";
   format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-DriC3zCgD1oe89M5ojpnAjCACyqySUWVkafmharWcU8=";
+    sha256 = "sha256-UmW6BEV44Ucdg/hUGSQk/kyDnB+Hsyx4q3AXTQe89hI=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/google-cloud-testutils/default.nix b/pkgs/development/python-modules/google-cloud-testutils/default.nix
index d4551b4954a..c5d02926f50 100644
--- a/pkgs/development/python-modules/google-cloud-testutils/default.nix
+++ b/pkgs/development/python-modules/google-cloud-testutils/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildPythonPackage, fetchPypi, click, google-auth, six }:
+{ lib, buildPythonPackage, fetchPypi, click, google-auth, packaging, six }:
 
 buildPythonPackage rec {
   pname = "google-cloud-testutils";
@@ -9,7 +9,7 @@ buildPythonPackage rec {
     sha256 = "sha256-X85NRgGZt7+OpL4poOyS+UWec4fuABiTxEYyFpkUpqs=";
   };
 
-  propagatedBuildInputs = [ click google-auth six ];
+  propagatedBuildInputs = [ click google-auth packaging six ];
 
   # does not contain tests
   doCheck = false;
diff --git a/pkgs/development/python-modules/google-nest-sdm/default.nix b/pkgs/development/python-modules/google-nest-sdm/default.nix
index b190d7e854e..c14598a8eba 100644
--- a/pkgs/development/python-modules/google-nest-sdm/default.nix
+++ b/pkgs/development/python-modules/google-nest-sdm/default.nix
@@ -11,7 +11,7 @@
 , pytest-asyncio
 , pytestCheckHook
 , pythonOlder
-, requests_oauthlib
+, requests-oauthlib
 }:
 
 buildPythonPackage rec {
@@ -33,7 +33,7 @@ buildPythonPackage rec {
     google-auth
     google-auth-oauthlib
     google-cloud-pubsub
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/grip/default.nix b/pkgs/development/python-modules/grip/default.nix
index dafa692493e..eab4b45547c 100644
--- a/pkgs/development/python-modules/grip/default.nix
+++ b/pkgs/development/python-modules/grip/default.nix
@@ -1,6 +1,5 @@
 { lib
 , fetchFromGitHub
-, fetchpatch
 # Python bits:
 , buildPythonPackage
 , pytest
@@ -16,23 +15,15 @@
 
 buildPythonPackage rec {
   pname = "grip";
-  version = "4.5.2";
+  version = "4.6.1";
 
   src = fetchFromGitHub {
     owner = "joeyespo";
     repo = "grip";
     rev = "v${version}";
-    sha256 = "0hphplnyi903jx7ghfxplg1qlj2kpcav1frr2js7p45pbh5ib9rm";
+    sha256 = "sha256-CHL2dy0H/i0pLo653F7aUHFvZHTeZA6jC/rwn1KrEW4=";
   };
 
-  patches = [
-    # Render "front matter", used in our RFC template and elsewhere
-    (fetchpatch {
-      url = "https://github.com/joeyespo/grip/pull/249.patch";
-      sha256 = "07za5iymfv647dfrvi6hhj54a96hgjyarys51zbi08c51shqyzpg";
-    })
-  ];
-
   checkInputs = [ pytest responses ];
 
   propagatedBuildInputs = [ docopt flask markdown path-and-address pygments requests tabulate ];
diff --git a/pkgs/development/python-modules/grpcio-status/default.nix b/pkgs/development/python-modules/grpcio-status/default.nix
index fc069dccbaf..173353fc9f2 100644
--- a/pkgs/development/python-modules/grpcio-status/default.nix
+++ b/pkgs/development/python-modules/grpcio-status/default.nix
@@ -9,14 +9,14 @@
 
 buildPythonPackage rec {
   pname = "grpcio-status";
-  version = "1.44.0";
+  version = "1.45.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-rGE6t6RTgMv6PlKQItCzcxfYWPFyum5lwYiqc1VTk5g=";
+    sha256 = "sha256-S6rY6Ow8RHiOA4wk49fccCWeBroJ9ApbgXhThWO6Plo=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/grpcio-tools/default.nix b/pkgs/development/python-modules/grpcio-tools/default.nix
index c428be64307..b3794e8b9d4 100644
--- a/pkgs/development/python-modules/grpcio-tools/default.nix
+++ b/pkgs/development/python-modules/grpcio-tools/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "grpcio-tools";
-  version = "1.44.0";
+  version = "1.45.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-vjf0WOpRDJqPHKq7wrJY0S5V0YmlZ/Xtys6Q8n3A778=";
+    sha256 = "sha256-oBbPwh4NkbOwNtPU+WjR/eqGXfoDUkyx++yoRxn9RaI=";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/python-modules/h11/default.nix b/pkgs/development/python-modules/h11/default.nix
index be4802566f7..98dd8eef6cb 100644
--- a/pkgs/development/python-modules/h11/default.nix
+++ b/pkgs/development/python-modules/h11/default.nix
@@ -2,11 +2,13 @@
 , buildPythonPackage
 , fetchPypi
 , pytestCheckHook
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "h11";
   version = "0.13.0";
+  disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
@@ -22,5 +24,6 @@ buildPythonPackage rec {
     description = "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1";
     homepage = "https://github.com/python-hyper/h11";
     license = licenses.mit;
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/hidapi/default.nix b/pkgs/development/python-modules/hidapi/default.nix
index cf54198b18b..b77dcaaa9d3 100644
--- a/pkgs/development/python-modules/hidapi/default.nix
+++ b/pkgs/development/python-modules/hidapi/default.nix
@@ -11,11 +11,11 @@
 
 buildPythonPackage rec {
   pname = "hidapi";
-  version = "0.11.0.post2";
+  version = "0.11.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "da815e0d1d4b2ef1ebbcc85034572105dca29627eb61881337aa39010f2ef8cb";
+    sha256 = "sha256-yYS37C/C6ph81EzwaUflVXJJjtLUPGSJC0q1iymvcrw=";
   };
 
   nativeBuildInputs = lib.optionals stdenv.isDarwin [ xcbuild ];
diff --git a/pkgs/development/python-modules/homeconnect/default.nix b/pkgs/development/python-modules/homeconnect/default.nix
index b6fca4201ad..b615274416a 100644
--- a/pkgs/development/python-modules/homeconnect/default.nix
+++ b/pkgs/development/python-modules/homeconnect/default.nix
@@ -2,26 +2,33 @@
 , buildPythonPackage
 , fetchPypi
 , requests
-, requests_oauthlib
+, requests-oauthlib
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "homeconnect";
   version = "0.7.0";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-/h0dEVmP0R9tVt56mvu72Ksrvnuox1FA7BgrZMOhV6Q=";
+    hash = "sha256-/h0dEVmP0R9tVt56mvu72Ksrvnuox1FA7BgrZMOhV6Q=";
   };
 
   propagatedBuildInputs = [
     requests
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   # Project has no tests
   doCheck = false;
-  pythonImportsCheck = [ "homeconnect" ];
+
+  pythonImportsCheck = [
+    "homeconnect"
+  ];
 
   meta = with lib; {
     description = "Python client for the BSH Home Connect REST API";
diff --git a/pkgs/development/python-modules/hpack/default.nix b/pkgs/development/python-modules/hpack/default.nix
index a5140a216cf..842c6d5f8bf 100644
--- a/pkgs/development/python-modules/hpack/default.nix
+++ b/pkgs/development/python-modules/hpack/default.nix
@@ -1,21 +1,34 @@
 { lib
 , buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
+, pythonOlder
+, hypothesis
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "hpack";
   version = "4.0.0";
+  disabled = pythonOlder "3.6";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "fc41de0c63e687ebffde81187a948221294896f6bdc0ae2312708df339430095";
+  src = fetchFromGitHub {
+    owner = "python-hyper";
+    repo = "hpack";
+    rev = "v${version}";
+    sha256 = "sha256-2CehGy3K5fKbkB1J8+8x1D4XvnBn1Mbapx+p8rdXDYc=";
   };
 
+  checkInputs = [
+    hypothesis
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [ "hpack" ];
+
   meta = with lib; {
     description = "Pure-Python HPACK header compression";
-    homepage = "http://hyper.rtfd.org";
+    homepage = "https://github.com/python-hyper/hpack";
     license = licenses.mit;
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
-
 }
diff --git a/pkgs/development/python-modules/httpbin/default.nix b/pkgs/development/python-modules/httpbin/default.nix
index 8359fcf0a09..a5a77a82af2 100644
--- a/pkgs/development/python-modules/httpbin/default.nix
+++ b/pkgs/development/python-modules/httpbin/default.nix
@@ -2,6 +2,7 @@
 , brotlipy
 , buildPythonPackage
 , decorator
+, fetchpatch
 , fetchPypi
 , flask
 , flask-limiter
@@ -22,6 +23,15 @@ buildPythonPackage rec {
     hash = "sha256-y7N3kMkVdfTxV1f0KtQdn3KesifV7b6J5OwXVIbbjfo=";
   };
 
+  patches = [
+    (fetchpatch {
+      # Replaces BaseResponse class with Response class for Werkezug 2.1.0 compatibility
+      # https://github.com/postmanlabs/httpbin/pull/674
+      url = "https://github.com/postmanlabs/httpbin/commit/5cc81ce87a3c447a127e4a1a707faf9f3b1c9b6b.patch";
+      hash = "sha256-SbEWjiqayMFYrbgAPZtSsXqSyCDUz3z127XgcKOcrkE=";
+    })
+  ];
+
   propagatedBuildInputs = [
     brotlipy
     flask
diff --git a/pkgs/development/python-modules/httplib2/default.nix b/pkgs/development/python-modules/httplib2/default.nix
index 9fc6b4ff144..7f331c8edad 100644
--- a/pkgs/development/python-modules/httplib2/default.nix
+++ b/pkgs/development/python-modules/httplib2/default.nix
@@ -9,21 +9,20 @@
 , pytest-forked
 , pytest-randomly
 , pytest-timeout
-, pytest-xdist
 , pytestCheckHook
 , six
 }:
 
 buildPythonPackage rec {
   pname = "httplib2";
-  version = "0.20.3";
+  version = "0.20.4";
   format = "setuptools";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-Q5KkhVqyHDoIeKjvvYoHRbZPY7LUXGDwgp4CSuyvQ1g=";
+    sha256 = "sha256-eLvxmG9PUX+2RB3M6oG442Wmh6c5GI/aKP/Z8Z5Ixq8=";
   };
 
   propagatedBuildInputs = [
@@ -36,7 +35,6 @@ buildPythonPackage rec {
     pytest-forked
     pytest-randomly
     pytest-timeout
-    pytest-xdist
     six
     pytestCheckHook
   ];
diff --git a/pkgs/development/python-modules/hyperframe/default.nix b/pkgs/development/python-modules/hyperframe/default.nix
index d10ecc6c075..e22dc0761a7 100644
--- a/pkgs/development/python-modules/hyperframe/default.nix
+++ b/pkgs/development/python-modules/hyperframe/default.nix
@@ -11,9 +11,12 @@ buildPythonPackage rec {
 
   checkInputs = [ pytestCheckHook ];
 
+  pythonImportsCheck = [ "hyperframe" ];
+
   meta = with lib; {
     description = "HTTP/2 framing layer for Python";
-    homepage = "http://hyper.rtfd.org/";
+    homepage = "https://github.com/python-hyper/hyperframe/";
     license = licenses.mit;
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/hypothesis/default.nix b/pkgs/development/python-modules/hypothesis/default.nix
index c928a13950c..8eaa808563e 100644
--- a/pkgs/development/python-modules/hypothesis/default.nix
+++ b/pkgs/development/python-modules/hypothesis/default.nix
@@ -19,7 +19,7 @@ buildPythonPackage rec {
   # If you need these, you can just add them to your environment.
 
   pname = "hypothesis";
-  version = "6.38.0";
+  version = "6.40.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
@@ -28,7 +28,7 @@ buildPythonPackage rec {
     owner = "HypothesisWorks";
     repo = "hypothesis-python";
     rev = "hypothesis-python-${version}";
-    sha256 = "sha256-JLAM9gBf/Lh+UO7audy6V2jEPg5Cn4DR7moQV7VBwGc=";
+    hash = "sha256-6BC3CTotkMhguueH4NJM8VjbrYhofHqtZEUytcllMwQ=";
   };
 
   postUnpack = "sourceRoot=$sourceRoot/hypothesis-python";
diff --git a/pkgs/development/python-modules/hypothesmith/default.nix b/pkgs/development/python-modules/hypothesmith/default.nix
index 33174deb657..4bac9c0bb02 100644
--- a/pkgs/development/python-modules/hypothesmith/default.nix
+++ b/pkgs/development/python-modules/hypothesmith/default.nix
@@ -1,4 +1,13 @@
-{ lib, buildPythonPackage, fetchPypi, hypothesis, lark, libcst, black, parso, pytestCheckHook, pytest-cov, pytest-xdist }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, hypothesis
+, lark
+, libcst
+, parso
+, pytestCheckHook
+, pytest-xdist
+}:
 
 buildPythonPackage rec {
   pname = "hypothesmith";
@@ -9,17 +18,32 @@ buildPythonPackage rec {
     sha256 = "0fb7b3fd03d76eddd4474b0561e1c2662457593a74cc300fd27e5409cd4d7922";
   };
 
+  patches = [
+    ./remove-black.patch
+  ];
+
   postPatch = ''
-    substituteInPlace setup.py --replace "lark-parser" "lark"
+    substituteInPlace setup.py \
+      --replace "lark-parser" "lark"
+
+    substituteInPlace tox.ini \
+      --replace "--cov=hypothesmith" "" \
+      --replace "--cov-branch" "" \
+      --replace "--cov-report=term-missing:skip-covered" "" \
+      --replace "--cov-fail-under=100" ""
   '';
 
   propagatedBuildInputs = [ hypothesis lark libcst ];
 
-  checkInputs = [ black parso pytestCheckHook pytest-cov pytest-xdist ];
+  checkInputs = [ parso pytestCheckHook pytest-xdist ];
 
   pytestFlagsArray = [
     "-v"
-    "--numprocesses $NIX_BUILD_CORES"
+  ];
+
+  disabledTests = [
+    # https://github.com/Zac-HD/hypothesmith/issues/21
+    "test_source_code_from_libcst_node_type"
   ];
 
   pythonImportsCheck = [ "hypothesmith" ];
diff --git a/pkgs/development/python-modules/hypothesmith/remove-black.patch b/pkgs/development/python-modules/hypothesmith/remove-black.patch
new file mode 100644
index 00000000000..565f350b06b
--- /dev/null
+++ b/pkgs/development/python-modules/hypothesmith/remove-black.patch
@@ -0,0 +1,88 @@
+diff --git a/tests/test_cst.py b/tests/test_cst.py
+index c436183..bdba2d7 100644
+--- a/tests/test_cst.py
++++ b/tests/test_cst.py
+@@ -3,7 +3,6 @@ import ast
+ from inspect import isabstract
+ from operator import attrgetter
+ 
+-import black
+ import libcst
+ import parso
+ import pytest
+@@ -51,27 +50,6 @@ def test_ast_unparse_from_nodes(source_code):
+     assert ast.dump(first) == ast.dump(second)
+ 
+ 
+-@pytest.mark.xfail
+-@example("A\u2592", black.FileMode())
+-@given(
+-    source_code=hypothesmith.from_node(),
+-    mode=st.builds(
+-        black.FileMode,
+-        line_length=st.just(88) | st.integers(0, 200),
+-        string_normalization=st.booleans(),
+-        is_pyi=st.booleans(),
+-    ),
+-)
+-def test_black_autoformatter_from_nodes(source_code, mode):
+-    try:
+-        result = black.format_file_contents(source_code, fast=False, mode=mode)
+-    except black.NothingChanged:
+-        pass
+-    else:
+-        with pytest.raises(black.NothingChanged):
+-            black.format_file_contents(result, fast=False, mode=mode)
+-
+-
+ @given(source_code=hypothesmith.from_node())
+ def test_from_node_always_compilable(source_code):
+     compile(source_code, "<string>", "exec")
+diff --git a/tests/test_syntactic.py b/tests/test_syntactic.py
+index 7ea42e9..a77ac39 100644
+--- a/tests/test_syntactic.py
++++ b/tests/test_syntactic.py
+@@ -3,8 +3,6 @@ import ast
+ import io
+ import tokenize
+ 
+-import black
+-import blib2to3
+ import parso
+ import pytest
+ from hypothesis import example, given, reject, strategies as st
+@@ -58,34 +56,6 @@ def test_ast_unparse_from_grammar(source_code):
+     assert ast.dump(first) == ast.dump(second)
+ 
+ 
+-@example("\\", black.FileMode())
+-@example("A#\r#", black.FileMode())
+-@given(
+-    source_code=hypothesmith.from_grammar(),
+-    mode=st.builds(
+-        black.FileMode,
+-        line_length=st.just(88) | st.integers(0, 200),
+-        string_normalization=st.booleans(),
+-        is_pyi=st.booleans(),
+-    ),
+-)
+-def test_black_autoformatter_from_grammar(source_code, mode):
+-    try:
+-        result = black.format_file_contents(source_code, fast=False, mode=mode)
+-    except black.NothingChanged:
+-        pass
+-    except blib2to3.pgen2.tokenize.TokenError:
+-        # Fails to tokenise e.g. "\\", though compile("\\", "<string>", "exec") works.
+-        # See https://github.com/psf/black/issues/1012
+-        reject()
+-    except black.InvalidInput:
+-        # e.g. "A#\r#", see https://github.com/psf/black/issues/970
+-        reject()
+-    else:
+-        with pytest.raises(black.NothingChanged):
+-            black.format_file_contents(result, fast=False, mode=mode)
+-
+-
+ @given(source_code=hypothesmith.from_grammar("eval_input"))
+ def test_eval_input_generation(source_code):
+     compile(source_code, filename="<string>", mode="eval")
diff --git a/pkgs/development/python-modules/ibis-framework/default.nix b/pkgs/development/python-modules/ibis-framework/default.nix
index 61b944b4883..e25832fbfcb 100644
--- a/pkgs/development/python-modules/ibis-framework/default.nix
+++ b/pkgs/development/python-modules/ibis-framework/default.nix
@@ -119,7 +119,6 @@ buildPythonPackage rec {
   ];
 
   pytestFlagsArray = [
-    "--numprocesses $NIX_BUILD_CORES"
     "ibis/tests"
     "ibis/backends/tests"
     "ibis/backends/{${lib.concatStringsSep "," backends}}/tests"
diff --git a/pkgs/development/python-modules/img2pdf/default.nix b/pkgs/development/python-modules/img2pdf/default.nix
index 58e3db524a8..791edcb2fb2 100644
--- a/pkgs/development/python-modules/img2pdf/default.nix
+++ b/pkgs/development/python-modules/img2pdf/default.nix
@@ -2,7 +2,6 @@
 , buildPythonPackage
 , isPy27
 , fetchPypi
-, fetchpatch
 , pikepdf
 , pillow
 , stdenv
@@ -19,23 +18,14 @@
 
 buildPythonPackage rec {
   pname = "img2pdf";
-  version = "0.4.3";
+  version = "0.4.4";
   disabled = isPy27;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-jlHFBD76lddRSBtRYHGgBvh8KkBZlhqaxD7COJFd4J8=";
+    sha256 = "8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c";
   };
 
-  patches = [
-    # Disable tests broken by Pillow 9.0.0
-    # https://gitlab.mister-muffin.de/josch/img2pdf/issues/130#issuecomment-586
-    (fetchpatch {
-      url = "https://salsa.debian.org/debian/img2pdf/-/raw/f77fefc81e7c4b235c47ae6777d222d391c59536/debian/patches/pillow9";
-      sha256 = "sha256-8giZCuv5PzSbrBQqslNqiLOhgxbg3LsdBVwt+DWnvh4=";
-    })
-  ];
-
   propagatedBuildInputs = [
     pikepdf
     pillow
diff --git a/pkgs/development/python-modules/importlib-metadata/default.nix b/pkgs/development/python-modules/importlib-metadata/default.nix
index 31181d9b1af..26612ff924e 100644
--- a/pkgs/development/python-modules/importlib-metadata/default.nix
+++ b/pkgs/development/python-modules/importlib-metadata/default.nix
@@ -11,7 +11,7 @@
 
 buildPythonPackage rec {
   pname = "importlib-metadata";
-  version = "4.11.2";
+  version = "4.11.3";
   format = "pyproject";
 
   disabled = pythonOlder "3.7";
@@ -19,7 +19,7 @@ buildPythonPackage rec {
   src = fetchPypi {
     pname = "importlib_metadata";
     inherit version;
-    hash = "sha256-s2/6kl/jE5svb/EdaSX/1Pp7xHhwFl46wmCse0+R5qw=";
+    hash = "sha256-6kxZfr83FC+Ce485KZV54xaFwx06Q4tZ9GlAav0PJTk=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/importlib-resources/default.nix b/pkgs/development/python-modules/importlib-resources/default.nix
index b28932a74f0..61fb5be068d 100644
--- a/pkgs/development/python-modules/importlib-resources/default.nix
+++ b/pkgs/development/python-modules/importlib-resources/default.nix
@@ -11,13 +11,14 @@
 
 buildPythonPackage rec {
   pname = "importlib-resources";
-  version = "5.4.0";
+  version = "5.6.0";
+  format = "pyproject";
   disabled = isPy27;
 
   src = fetchPypi {
     pname = "importlib_resources";
     inherit version;
-    sha256 = "sha256-11bi+F3U3iuom+CyHboqO77C6HGkKjoWcZJYoR+HUGs=";
+    sha256 = "sha256-G5MjjL8jtM3jQkDdgyHZnpvy60vJHAyZsohig+e6rYU=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/installer/default.nix b/pkgs/development/python-modules/installer/default.nix
index a19f27a0a75..8749ea16132 100644
--- a/pkgs/development/python-modules/installer/default.nix
+++ b/pkgs/development/python-modules/installer/default.nix
@@ -9,14 +9,14 @@
 
 buildPythonPackage rec {
   pname = "installer";
-  version = "0.3.0";
+  version = "0.5.1";
   format = "pyproject";
 
   src = fetchFromGitHub {
     owner = "pradyunsg";
     repo = pname;
     rev = version;
-    sha256 = "sha256-AxAQgDhRFkb0HB7ttDb+pHuHzwnNDX6UOm9rswzIwmI=";
+    sha256 = "sha256-vhZYUhUcD5fnjkyEqFMvggVGH9Ri8iNgqRgSBQTOCtM=";
   };
 
   nativeBuildInputs = [ flit-core ];
diff --git a/pkgs/development/python-modules/intbitset/default.nix b/pkgs/development/python-modules/intbitset/default.nix
index 798bdbbd251..9cedf7c4d28 100644
--- a/pkgs/development/python-modules/intbitset/default.nix
+++ b/pkgs/development/python-modules/intbitset/default.nix
@@ -6,12 +6,12 @@
 
 buildPythonPackage rec {
   pname = "intbitset";
-  version = "3.0.0";
+  version = "3.0.1";
   format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-tDG3CAlTZvz9Pi2pLq0TEPhl3DyYuWQS1N6VNNNokEE=";
+    sha256 = "sha256-8ebQPGcpkioiPFGEnfZbnpFuYlrvuRF4Tn+azUwgfVM=";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/intensity-normalization/default.nix b/pkgs/development/python-modules/intensity-normalization/default.nix
index 5e658953fc8..86bc21c488d 100644
--- a/pkgs/development/python-modules/intensity-normalization/default.nix
+++ b/pkgs/development/python-modules/intensity-normalization/default.nix
@@ -15,7 +15,7 @@
 
 buildPythonPackage rec {
   pname = "intensity-normalization";
-  version = "2.2.0";
+  version = "2.2.3";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
@@ -23,7 +23,7 @@ buildPythonPackage rec {
   src = fetchPypi {
     pname = "intensity_normalization";
     inherit version;
-    sha256 = "sha256-0tc21NBj3Cajklk9mWbKfBzbSwjUrBWs/SlakjEHC1U=";
+    sha256 = "sha256-Yjd4hXmbT87xNKSqc6zkKNisOVhQzQAUZI5wBiI/UBk=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/ipykernel/default.nix b/pkgs/development/python-modules/ipykernel/default.nix
index fe67c73cbad..d7302eaaecb 100644
--- a/pkgs/development/python-modules/ipykernel/default.nix
+++ b/pkgs/development/python-modules/ipykernel/default.nix
@@ -3,35 +3,37 @@
 , callPackage
 , fetchPypi
 , pythonOlder
-, argcomplete
 , ipython
 , jupyter-client
+, packaging
+, psutil
 , tornado
 , traitlets
 }:
 
 buildPythonPackage rec {
   pname = "ipykernel";
-  version = "6.9.1";
+  version = "6.12.1";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-+VBwot/TFH+KsZ8Y7kZzMxCBN1hZN0XgfsGPsItAnx0=";
+    sha256 = "sha256-CGj1VhcpreREAR+Mp9NQLcnyf39E4g8dX+5+Hytxg6E=";
   };
 
   # debugpy is optional, see https://github.com/ipython/ipykernel/pull/767
   postPatch = ''
-    substituteInPlace setup.py \
-      --replace "'debugpy>=1.0.0,<2.0'," ""
+    sed -i "/debugpy/d" setup.py
   '';
 
   propagatedBuildInputs = [
     ipython
     jupyter-client
+    packaging
+    psutil
     tornado
     traitlets
-  ] ++ lib.optionals (pythonOlder "3.8") [
-    argcomplete
   ];
 
   # check in passthru.tests.pytest to escape infinite recursion with ipyparallel
diff --git a/pkgs/development/python-modules/ipython/default.nix b/pkgs/development/python-modules/ipython/default.nix
index 24fd28a16f7..0a39950689d 100644
--- a/pkgs/development/python-modules/ipython/default.nix
+++ b/pkgs/development/python-modules/ipython/default.nix
@@ -10,7 +10,6 @@
 # Runtime dependencies
 , appnope
 , backcall
-, black
 , decorator
 , jedi
 , matplotlib-inline
@@ -28,13 +27,13 @@
 
 buildPythonPackage rec {
   pname = "ipython";
-  version = "8.1.0";
+  version = "8.2.0";
   format = "pyproject";
   disabled = pythonOlder "3.8";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-QsI+kLLequYxJmiF3hZWpRehZz1+HbV+jrOku2zVzhs=";
+    sha256 = "sha256-cOXrEyysWUo0tfeZvSUliQCZBfBRBHKK6mpAPsJRncE=";
   };
 
   buildInputs = [
@@ -43,7 +42,6 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [
     backcall
-    black
     decorator
     jedi
     matplotlib-inline
@@ -83,7 +81,7 @@ buildPythonPackage rec {
 
   meta = with lib; {
     description = "IPython: Productive Interactive Computing";
-    homepage = "http://ipython.org/";
+    homepage = "https://ipython.org/";
     license = licenses.bsd3;
     maintainers = with maintainers; [ bjornfor fridh ];
   };
diff --git a/pkgs/development/python-modules/ipywidgets/default.nix b/pkgs/development/python-modules/ipywidgets/default.nix
index c324eea947d..b33ec2759b5 100644
--- a/pkgs/development/python-modules/ipywidgets/default.nix
+++ b/pkgs/development/python-modules/ipywidgets/default.nix
@@ -15,11 +15,11 @@
 
 buildPythonPackage rec {
   pname = "ipywidgets";
-  version = "7.6.5";
+  version = "7.7.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "00974f7cb4d5f8d494c19810fedb9fa9b64bffd3cda7c2be23c133a1ad3c99c5";
+    sha256 = "sha256-q0pVloVaiLg3YZIcdocH1l5YRwaBObwXKd3+g0cDVCo=";
   };
 
   # Tests are not distributed
diff --git a/pkgs/development/python-modules/islpy/default.nix b/pkgs/development/python-modules/islpy/default.nix
index 67b547b724e..b37a2b55b2d 100644
--- a/pkgs/development/python-modules/islpy/default.nix
+++ b/pkgs/development/python-modules/islpy/default.nix
@@ -10,12 +10,12 @@
 
 buildPythonPackage rec {
   pname = "islpy";
-  version = "2022.1.1";
+  version = "2022.1.2";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-eWNc1xxOqEmPdSC1Ha6tfM8ofgkudfOGjvp3ZyM4pxE=";
+    sha256 = "sha256-Z0LXmbQeCyBPP0mtnt+UFyi08tcfP9XLZUS8jzkrADo=";
   };
 
   postConfigure = ''
diff --git a/pkgs/development/python-modules/iterm2/default.nix b/pkgs/development/python-modules/iterm2/default.nix
index 1cba03531b5..1742fc08e1e 100644
--- a/pkgs/development/python-modules/iterm2/default.nix
+++ b/pkgs/development/python-modules/iterm2/default.nix
@@ -5,11 +5,11 @@
 
 buildPythonPackage rec {
   pname = "iterm2";
-  version = "1.30";
+  version = "2.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "148b32a593f3d932a33daad01fdaa4639918eca74a6e153d9729dd8b3cba3345";
+    sha256 = "sha256-oEXDW+ar3S0gJn2DdaOyq6GDE9dJaghQEpPBCfTL2Kw=";
   };
 
   propagatedBuildInputs = [ protobuf websockets ];
diff --git a/pkgs/development/python-modules/itsdangerous/default.nix b/pkgs/development/python-modules/itsdangerous/default.nix
index c2050c6f79c..99bdb965235 100644
--- a/pkgs/development/python-modules/itsdangerous/default.nix
+++ b/pkgs/development/python-modules/itsdangerous/default.nix
@@ -8,12 +8,12 @@
 
 buildPythonPackage rec {
   pname = "itsdangerous";
-  version = "2.1.0";
+  version = "2.1.2";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-2Ej8uLx9UHxFRrRIV06KRPxOorqE6/jXgykNU+gZkvU=";
+    sha256 = "sha256-XbvGizF+XkLzJ/kCF2NUXcP8O/4i5t65aq8fw4h0FWo=";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/jarowinkler/default.nix b/pkgs/development/python-modules/jarowinkler/default.nix
new file mode 100644
index 00000000000..3985a22d5bc
--- /dev/null
+++ b/pkgs/development/python-modules/jarowinkler/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, cmake
+, cython
+, rapidfuzz-capi
+, scikit-build
+, hypothesis
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "jarowinkler";
+  version = "1.0.2";
+
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "maxbachmann";
+    repo = "JaroWinkler";
+    rev = "v${version}";
+    fetchSubmodules = true;
+    hash = "sha256-zVAcV6xxqyfXRUcyWo9PcOdagcexJc/D5k4g5ag3hbY=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    cython
+    rapidfuzz-capi
+    scikit-build
+  ];
+
+  dontUseCmakeConfigure = true;
+
+  checkInputs = [
+    hypothesis
+    pytestCheckHook
+  ];
+
+  preCheck = ''
+    # import from $out
+    rm -r jarowinkler
+  '';
+
+  pythonImportsCheck = [ "jarowinkler" ];
+
+  meta = with lib; {
+    description = "Library for fast approximate string matching using Jaro and Jaro-Winkler similarity";
+    homepage = "https://github.com/maxbachmann/JaroWinkler";
+    license = licenses.mit;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/pkgs/development/python-modules/jax/default.nix b/pkgs/development/python-modules/jax/default.nix
index 94be46b3aeb..43566843ab6 100644
--- a/pkgs/development/python-modules/jax/default.nix
+++ b/pkgs/development/python-modules/jax/default.nix
@@ -54,21 +54,27 @@ buildPythonPackage rec {
     pytest-xdist
   ];
 
+  # high parallelism will result in the tests getting stuck
+  dontUsePytestXdist = true;
+
   # NOTE: Don't run the tests in the expiremental directory as they require flax
   # which creates a circular dependency. See https://discourse.nixos.org/t/how-to-nix-ify-python-packages-with-circular-dependencies/14648/2.
   # Not a big deal, this is how the JAX docs suggest running the test suite
   # anyhow.
   pytestFlagsArray = [
-    "-n auto"
+    "--numprocesses=4"
     "-W ignore::DeprecationWarning"
     "tests/"
   ];
 
-  # See
-  #  * https://github.com/google/jax/issues/9705
-  #  * https://discourse.nixos.org/t/getting-different-results-for-the-same-build-on-two-equally-configured-machines/17921
-  #  * https://github.com/NixOS/nixpkgs/issues/161960
-  disabledTests = lib.optionals usingMKL [
+  disabledTests = [
+    # Exceeds tolerance when the machine is busy
+    "test_custom_linear_solve_aux"
+  ] ++ lib.optionals usingMKL [
+    # See
+    #  * https://github.com/google/jax/issues/9705
+    #  * https://discourse.nixos.org/t/getting-different-results-for-the-same-build-on-two-equally-configured-machines/17921
+    #  * https://github.com/NixOS/nixpkgs/issues/161960
     "test_custom_linear_solve_cholesky"
     "test_custom_root_with_aux"
     "testEigvalsGrad_shape"
diff --git a/pkgs/development/python-modules/jaxlib/default.nix b/pkgs/development/python-modules/jaxlib/default.nix
index 3ecad5e4c7a..a15e86c0161 100644
--- a/pkgs/development/python-modules/jaxlib/default.nix
+++ b/pkgs/development/python-modules/jaxlib/default.nix
@@ -55,6 +55,8 @@ let
     homepage = "https://github.com/google/jax";
     license = licenses.asl20;
     maintainers = with maintainers; [ ndl ];
+    platforms = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin"];
+    hydraPlatforms = ["x86_64-linux" ]; # Don't think anybody is checking the darwin builds
   };
 
   cudatoolkit_joined = symlinkJoin {
diff --git a/pkgs/development/python-modules/jinja2/default.nix b/pkgs/development/python-modules/jinja2/default.nix
index 7c9971b0c45..29b08df8e0f 100644
--- a/pkgs/development/python-modules/jinja2/default.nix
+++ b/pkgs/development/python-modules/jinja2/default.nix
@@ -10,12 +10,13 @@
 
 buildPythonPackage rec {
   pname = "Jinja2";
-  version = "3.0.3";
-  disabled = pythonOlder "3.6";
+  version = "3.1.1";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7";
+    sha256 = "sha256-ZAvtS7UBy9FxlLPKzh3CEm9bYZzwaKcmuYGSoP3nSuk=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/jira/default.nix b/pkgs/development/python-modules/jira/default.nix
index b22f5ccd73a..c6b1386adec 100644
--- a/pkgs/development/python-modules/jira/default.nix
+++ b/pkgs/development/python-modules/jira/default.nix
@@ -5,37 +5,39 @@
 , flaky
 , keyring
 , requests-mock
-, requests_oauthlib
+, requests-oauthlib
 , requests-toolbelt
 , setuptools-scm
 , setuptools-scm-git-archive
 , pytestCheckHook
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "jira";
   version = "3.1.1";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "pycontribs";
     repo = pname;
     rev = version;
-    sha256 = "04s2zgwxip54g894hps2cm081cp07mbi7qipmsv4dvailhsg43nn";
+    hash = "sha256-1g7yNKRR7Ua2rjfiE1c94LKAQGVCX0gSeqTc2Pn7QhM=";
   };
 
-  postPatch = ''
-    substituteInPlace setup.cfg \
-      --replace "--cov-report=xml --cov jira" ""
-  '';
-
-  nativeBuildInputs = [ setuptools-scm setuptools-scm-git-archive ];
+  nativeBuildInputs = [
+    setuptools-scm
+    setuptools-scm-git-archive
+  ];
 
   SETUPTOOLS_SCM_PRETEND_VERSION = version;
 
   propagatedBuildInputs = [
     defusedxml
     keyring
-    requests_oauthlib
+    requests-oauthlib
     requests-toolbelt
   ];
 
@@ -45,11 +47,20 @@ buildPythonPackage rec {
     requests-mock
   ];
 
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace "--cov-report=xml --cov jira" ""
+  '';
+
+  pythonImportsCheck = [
+    "jira"
+  ];
+
   # impure tests because of connectivity attempts to jira servers
   doCheck = false;
 
   meta = with lib; {
-    description = "This library eases the use of the JIRA REST API from Python.";
+    description = "Library to interact with the JIRA REST API";
     homepage = "https://github.com/pycontribs/jira";
     license = licenses.bsd2;
     maintainers = with maintainers; [ globin ];
diff --git a/pkgs/development/python-modules/jmespath/default.nix b/pkgs/development/python-modules/jmespath/default.nix
index 3f74ae8d810..18c2f46216f 100644
--- a/pkgs/development/python-modules/jmespath/default.nix
+++ b/pkgs/development/python-modules/jmespath/default.nix
@@ -7,11 +7,11 @@
 
 buildPythonPackage rec {
   pname = "jmespath";
-  version = "0.10.0";
+  version = "1.0.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9";
+    sha256 = "sha256-pJDigO3R9X1t6IY2mS0Ftx6X1pomoZ8Fjs99MER0v14=";
   };
 
   buildInputs = [ nose ];
diff --git a/pkgs/development/python-modules/josepy/default.nix b/pkgs/development/python-modules/josepy/default.nix
index 036b60e9eca..100228bf4f1 100644
--- a/pkgs/development/python-modules/josepy/default.nix
+++ b/pkgs/development/python-modules/josepy/default.nix
@@ -10,14 +10,14 @@
 
 buildPythonPackage rec {
   pname = "josepy";
-  version = "1.12.0";
+  version = "1.13.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "267004a64f08c016cd54b7aaf7c323fa3ef3679fb62f4b086cd56448d0fecb25";
+    sha256 = "sha256-iTHa84+KTIUnSg6LfLJa3f2NHyj5+4++0FPdUa7HXck=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/json-schema-for-humans/default.nix b/pkgs/development/python-modules/json-schema-for-humans/default.nix
index a9faf437f80..8fb0e2dd40c 100644
--- a/pkgs/development/python-modules/json-schema-for-humans/default.nix
+++ b/pkgs/development/python-modules/json-schema-for-humans/default.nix
@@ -31,6 +31,11 @@ buildPythonPackage rec {
     hash = "sha256-H0jvOnrWE4/xxRYNehshHBRNc/qLX1+sCV7O1ACCdew=";
   };
 
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace 'pytz = "^2021.1"' 'pytz = "*"'
+  '';
+
   nativeBuildInputs = [
     poetry-core
   ];
@@ -54,12 +59,6 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
-  postPatch = ''
-    # https://github.com/coveooss/json-schema-for-humans/issues/127
-    substituteInPlace pyproject.toml \
-      --replace 'PyYAML = "^5.4.1"' 'PyYAML = "*"'
-  '';
-
   disabledTests = [
     # Tests require network access
     "test_references_url"
diff --git a/pkgs/development/python-modules/junos-eznc/default.nix b/pkgs/development/python-modules/junos-eznc/default.nix
index 426b990ccac..d693c73130b 100644
--- a/pkgs/development/python-modules/junos-eznc/default.nix
+++ b/pkgs/development/python-modules/junos-eznc/default.nix
@@ -1,43 +1,77 @@
 { lib
 , buildPythonPackage
-, fetchPypi
-, six
-, scp
-, pyserial
-, paramiko
-, netaddr
+, fetchpatch
+, fetchFromGitHub
+
+# propagates
+, jinja2
+, lxml
 , ncclient
+, netaddr
 , ntc-templates
-, lxml
-, jinja2
+, paramiko
+, pyparsing
+, pyserial
 , pyyaml
+, scp
+, six
 , transitions
 , yamlordereddictloader
+
+# tests
+, mock
 , nose
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "junos-eznc";
   version = "2.6.3";
+  format = "setuptools";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "4eee93d0af203af7cee54a8f0c7bd28af683e829edf1fd68feba85d0ad737395";
+  src = fetchFromGitHub {
+    owner = "Juniper";
+    repo = "py-junos-eznc";
+    rev = version;
+    hash = "sha256-XhQJwtS518AzSwyaWE392nfNdYe9+iYHvXxQsjJfzI8=";
   };
 
+  patches = [
+    (fetchpatch {
+      # Fixes tests with lxml>=4.8.0; remove > 2.6.3
+      url = "https://github.com/Juniper/py-junos-eznc/commit/048f750bb7357b6f6b9db8ad64bea479298c74fb.patch";
+      hash = "sha256-DYVj0BNPwDSbxDrzHhaq4F4kz1bliXB6Au3I63mRauc=";
+    })
+  ];
+
   postPatch = ''
     substituteInPlace requirements.txt \
       --replace "ncclient==0.6.9" "ncclient"
   '';
 
-  checkInputs = [ nose ];
-
   propagatedBuildInputs = [
-    scp six pyserial paramiko netaddr ncclient ntc-templates lxml jinja2 pyyaml transitions yamlordereddictloader
+    jinja2
+    lxml
+    ncclient
+    netaddr
+    ntc-templates
+    paramiko
+    pyparsing
+    pyserial
+    pyyaml
+    scp
+    six
+    transitions
+    yamlordereddictloader
+  ];
+
+  checkInputs = [
+    mock
+    nose
   ];
 
   checkPhase = ''
-    nosetests -v --with-coverage --cover-package=jnpr.junos --cover-inclusive -a unit
+    nosetests -v -a unit --exclude=test_sw_put_ftp
   '';
 
   pythonImportsCheck = [ "jnpr.junos" ];
diff --git a/pkgs/development/python-modules/jupyter-client/default.nix b/pkgs/development/python-modules/jupyter-client/default.nix
index 23580f42bf5..2670fc163f6 100644
--- a/pkgs/development/python-modules/jupyter-client/default.nix
+++ b/pkgs/development/python-modules/jupyter-client/default.nix
@@ -14,11 +14,11 @@
 
 buildPythonPackage rec {
   pname = "jupyter_client";
-  version = "7.1.2";
+  version = "7.2.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-TqYQM3Jsjlee21VibY7i5r8KgxWN3zdRuN1GssXNHpY=";
+    sha256 = "sha256-qhdyeekyBdBoHsDi4hDaAbIsWhRkpWq9RVrcrGTw3pE=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/jupyter-packaging/default.nix b/pkgs/development/python-modules/jupyter-packaging/default.nix
index f3fd7747ff8..bb2837d28fc 100644
--- a/pkgs/development/python-modules/jupyter-packaging/default.nix
+++ b/pkgs/development/python-modules/jupyter-packaging/default.nix
@@ -10,13 +10,13 @@
 
 buildPythonPackage rec {
   pname = "jupyter-packaging";
-  version = "0.11.1";
+  version = "0.12.0";
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     pname = "jupyter_packaging";
     inherit version;
-    sha256 = "6f5c7eeea98f7f3c8fb41d565a94bf59791768a93f93148b3c2dfb7ebade8eec";
+    sha256 = "sha256-snRV1grck6e6ouC484a+gbkyu048ARYEbfntIwzT+qw=";
   };
 
   propagatedBuildInputs = [ deprecation packaging tomlkit ];
diff --git a/pkgs/development/python-modules/jupyter_console/default.nix b/pkgs/development/python-modules/jupyter_console/default.nix
index 9716fbe8e5d..5a3176b462c 100644
--- a/pkgs/development/python-modules/jupyter_console/default.nix
+++ b/pkgs/development/python-modules/jupyter_console/default.nix
@@ -12,12 +12,12 @@
 
 buildPythonPackage rec {
   pname = "jupyter_console";
-  version = "6.4.0";
+  version = "6.4.3";
   disabled = pythonOlder "3.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "242248e1685039cd8bff2c2ecb7ce6c1546eb50ee3b08519729e6e881aec19c7";
+    sha256 = "sha256-VfMmJrC+ZHqF4yF93Nsi22nvx56LQDuXceuezGlgGbU=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/jupyterlab-git/default.nix b/pkgs/development/python-modules/jupyterlab-git/default.nix
index dc909f798da..9f36e03d488 100644
--- a/pkgs/development/python-modules/jupyterlab-git/default.nix
+++ b/pkgs/development/python-modules/jupyterlab-git/default.nix
@@ -17,14 +17,14 @@
 
 buildPythonPackage rec {
   pname = "jupyterlab-git";
-  version = "0.34.2";
+  version = "0.36.0";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     pname = "jupyterlab_git";
     inherit version;
-    sha256 = "sha256-WNBhuHF3rhAWZED4di9B9Loq+shRzpJuaAOOcND1YEE=";
+    sha256 = "sha256-K+h1ra9PsqKlSSPnc1jgSODICv3FoEdwqBGYWQYs6wE=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/jupyterlab_server/default.nix b/pkgs/development/python-modules/jupyterlab_server/default.nix
index ed0fe4bca2d..bcd06ebffb3 100644
--- a/pkgs/development/python-modules/jupyterlab_server/default.nix
+++ b/pkgs/development/python-modules/jupyterlab_server/default.nix
@@ -16,12 +16,12 @@
 
 buildPythonPackage rec {
   pname = "jupyterlab_server";
-  version = "2.10.3";
+  version = "2.12.0";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "3fb84a5813d6d836ceda773fb2d4e9ef3c7944dbc1b45a8d59d98641a80de80a";
+    sha256 = "sha256-AOD0tMOZ9Vk4Mj6hDPktkVKI/hJ1PjXRBp9soItyq78=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/kivy-garden/default.nix b/pkgs/development/python-modules/kivy-garden/default.nix
index edfad0c9b91..1475b444823 100644
--- a/pkgs/development/python-modules/kivy-garden/default.nix
+++ b/pkgs/development/python-modules/kivy-garden/default.nix
@@ -1,29 +1,31 @@
 { lib
-, buildPythonPackage, fetchPypi
+, buildPythonPackage
+, fetchFromGitHub
 , requests
 }:
 
 buildPythonPackage rec {
   pname = "kivy-garden";
-  version = "0.1.4";
+  version = "0.1.5";
+  format = "setuptools";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "0wkcpr2zc1q5jb0bi7v2dgc0vs5h1y7j42mviyh764j2i0kz8mn2";
+  src = fetchFromGitHub {
+    owner = "kivy-garden";
+    repo = "garden";
+    rev = "v${version}";
+    hash = "sha256-xOMBPFKV7mTa51Q0VKja7b0E509IaWjwlJVlSRVdct8=";
   };
 
   propagatedBuildInputs = [ requests ];
 
   pythonImportsCheck = [ "garden" ];
 
-  # There are no tests in the Pypi archive and building from source is not
-  # easily feasible because the build is done using buildozer and multiple
-  # repositories.
+  # There are no tests
   doCheck = false;
 
   meta = with lib; {
     description = "The kivy garden installation script, split into its own package for convenient use in buildozer.";
-    homepage = "https://pypi.python.org/pypi/kivy-garden";
+    homepage = "https://github.com/kivy-garden/garden";
     license = licenses.mit;
     maintainers = with maintainers; [ risson ];
   };
diff --git a/pkgs/development/python-modules/kiwisolver/default.nix b/pkgs/development/python-modules/kiwisolver/default.nix
index e5649c58e46..b968fa3a50a 100644
--- a/pkgs/development/python-modules/kiwisolver/default.nix
+++ b/pkgs/development/python-modules/kiwisolver/default.nix
@@ -4,30 +4,42 @@
 , stdenv
 , libcxx
 , cppy
+, setuptools-scm
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "kiwisolver";
-  version = "1.3.2";
+  version = "1.4.2";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c";
+    hash = "sha256-f2BtkbiogWvkdlE6d/0wq+ZiJwOb1vi0BsNIywJH3Mk=";
   };
 
-  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1";
+  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin [
+    "-I${lib.getDev libcxx}/include/c++/v1"
+  ];
 
   nativeBuildInputs = [
+    setuptools-scm
+  ];
+
+  buildInputs = [
     cppy
   ];
 
-  # Does not include tests
-  doCheck = false;
+  pythonImportsCheck = [
+    "kiwisolver"
+  ];
 
-  meta = {
-    description = "A fast implementation of the Cassowary constraint solver";
+  meta = with lib; {
+    description = "Implementation of the Cassowary constraint solver";
     homepage = "https://github.com/nucleic/kiwi";
-    license = lib.licenses.bsd3;
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ ];
   };
-
 }
diff --git a/pkgs/development/python-modules/kubernetes/default.nix b/pkgs/development/python-modules/kubernetes/default.nix
index 8508e5178f5..61333cc52bd 100644
--- a/pkgs/development/python-modules/kubernetes/default.nix
+++ b/pkgs/development/python-modules/kubernetes/default.nix
@@ -11,7 +11,7 @@
 , python-dateutil
 , pyyaml
 , requests
-, requests_oauthlib
+, requests-oauthlib
 , urllib3
 , websocket-client
 
@@ -24,6 +24,7 @@ buildPythonPackage rec {
   pname = "kubernetes";
   version = "20.13.0";
   format = "setuptools";
+
   disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
@@ -41,7 +42,7 @@ buildPythonPackage rec {
     python-dateutil
     pyyaml
     requests
-    requests_oauthlib
+    requests-oauthlib
     urllib3
     websocket-client
   ];
@@ -61,7 +62,7 @@ buildPythonPackage rec {
   ];
 
   meta = with lib; {
-    description = "Kubernetes python client";
+    description = "Kubernetes Python client";
     homepage = "https://github.com/kubernetes-client/python";
     license = licenses.asl20;
     maintainers = with maintainers; [ lsix ];
diff --git a/pkgs/development/python-modules/levenshtein/default.nix b/pkgs/development/python-modules/levenshtein/default.nix
index e5f743e0fe1..ebc1c511375 100644
--- a/pkgs/development/python-modules/levenshtein/default.nix
+++ b/pkgs/development/python-modules/levenshtein/default.nix
@@ -2,14 +2,17 @@
 , buildPythonPackage
 , fetchFromGitHub
 , pythonOlder
+, cmake
+, cython
 , pytestCheckHook
 , rapidfuzz
+, scikit-build
 }:
 
 buildPythonPackage rec {
   pname = "levenshtein";
   version = "0.18.1";
-  format = "setuptools";
+  format = "pyproject";
 
   disabled = pythonOlder "3.6";
 
@@ -17,13 +20,18 @@ buildPythonPackage rec {
     owner = "maxbachmann";
     repo = "Levenshtein";
     rev = "v${version}";
-    sha256 = "sha256-3p9LM4tv45bqeTsuyngivqfd5uml7uqGB2ICKqPa0qY=";
+    # https://github.com/maxbachmann/Levenshtein/issues/22
+    fetchSubmodules = true;
+    sha256 = "sha256-WREYdD5MFOpCzH4BSceRpzQZdpi3Xxxn0DpMvDsNlGo=";
   };
 
-  postPatch = ''
-    substituteInPlace setup.cfg \
-      --replace "rapidfuzz >= 1.8.2, < 1.9" "rapidfuzz"
-  '';
+  nativeBuildInputs = [
+    cmake
+    cython
+    scikit-build
+  ];
+
+  dontUseCmakeConfigure = true;
 
   propagatedBuildInputs = [
     rapidfuzz
diff --git a/pkgs/development/python-modules/limits/default.nix b/pkgs/development/python-modules/limits/default.nix
index 47738b23dc4..7cb622df047 100644
--- a/pkgs/development/python-modules/limits/default.nix
+++ b/pkgs/development/python-modules/limits/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "limits";
-  version = "2.3.3";
+  version = "2.4.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-1CcNKVkcxezqsZvgU0VaTmGbo5UGJQK94rVoGvfcG+g=";
+    sha256 = "sha256-jiK2PfJjECB6d7db1HRZnwpGE6fZFjZQ7TpCjpzHrjU=";
   };
 
   propagatedBuildInputs = [ six ];
diff --git a/pkgs/development/python-modules/lmnotify/default.nix b/pkgs/development/python-modules/lmnotify/default.nix
index 4e5526a424d..bf9d857dc74 100644
--- a/pkgs/development/python-modules/lmnotify/default.nix
+++ b/pkgs/development/python-modules/lmnotify/default.nix
@@ -3,28 +3,39 @@
 , fetchPypi
 , oauthlib
 , requests
-, requests_oauthlib
+, requests-oauthlib
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "lmnotify";
   version = "0.0.6";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-cCP7BU2f7QJe9gAI298cvkp3OGijvBv8G1RN7qfZ5PE=";
+    hash = "sha256-cCP7BU2f7QJe9gAI298cvkp3OGijvBv8G1RN7qfZ5PE=";
   };
 
-  propagatedBuildInputs = [ oauthlib requests requests_oauthlib ];
+  propagatedBuildInputs = [
+    oauthlib
+    requests
+    requests-oauthlib
+  ];
 
-  doCheck = false; # no tests exist
+  # Module has no tests
+  doCheck = false;
 
-  pythonImportsCheck = [ "lmnotify" ];
+  pythonImportsCheck = [
+    "lmnotify"
+  ];
 
   meta = with lib; {
     description = "Python package for sending notifications to LaMetric Time";
     homepage = "https://github.com/keans/lmnotify";
-    maintainers = with maintainers; [ rhoriguchi ];
     license = licenses.mit;
+    maintainers = with maintainers; [ rhoriguchi ];
   };
 }
diff --git a/pkgs/development/python-modules/mailchecker/default.nix b/pkgs/development/python-modules/mailchecker/default.nix
index ab609b597a4..c877f528ac9 100644
--- a/pkgs/development/python-modules/mailchecker/default.nix
+++ b/pkgs/development/python-modules/mailchecker/default.nix
@@ -6,14 +6,14 @@
 
 buildPythonPackage rec {
   pname = "mailchecker";
-  version = "4.1.13";
+  version = "4.1.14";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-4ez18K9ksVGjzspHHcw/Ja6hxoKTkYLBFn65m7VBWYk=";
+    hash = "sha256-58LwaVwYzjYlIB3sAkMDat1FX8wA7IiAYBwPZ0hMOdE=";
   };
 
   # Module has no tests
diff --git a/pkgs/development/python-modules/markupsafe/default.nix b/pkgs/development/python-modules/markupsafe/default.nix
index b0f876ef3e8..0c36299b1f1 100644
--- a/pkgs/development/python-modules/markupsafe/default.nix
+++ b/pkgs/development/python-modules/markupsafe/default.nix
@@ -7,13 +7,15 @@
 
 buildPythonPackage rec {
   pname = "markupsafe";
-  version = "2.1.0";
-  disabled = pythonOlder "3.6";
+  version = "2.1.1";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     pname = "MarkupSafe";
     inherit version;
-    sha256 = "sha256-gL6vY937xkoEUrhB2ANsoGEeBJZQ4gr8uIL108Jm1l8=";
+    sha256 = "sha256-f5EZfMnkj5idEuTm+8RklcRGY238gbnM9Quw7HS5HUs=";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/marshmallow-sqlalchemy/default.nix b/pkgs/development/python-modules/marshmallow-sqlalchemy/default.nix
index 9887f42bd8f..e7921a29f54 100644
--- a/pkgs/development/python-modules/marshmallow-sqlalchemy/default.nix
+++ b/pkgs/development/python-modules/marshmallow-sqlalchemy/default.nix
@@ -10,12 +10,12 @@
 
 buildPythonPackage rec {
   pname = "marshmallow-sqlalchemy";
-  version = "0.27.0";
+  version = "0.28.0";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1521b129564444648c523a38f6446c137f1aae5c9c7de1ec151d5ebf03fd407d";
+    sha256 = "sha256-+2sGaG84/sLqDsU6XuSXkhlAnisiYPm8keS0MQXRl4I=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/matchpy/default.nix b/pkgs/development/python-modules/matchpy/default.nix
index 8ee3d60f801..efcf1741ab4 100644
--- a/pkgs/development/python-modules/matchpy/default.nix
+++ b/pkgs/development/python-modules/matchpy/default.nix
@@ -1,11 +1,9 @@
 { lib
 , buildPythonPackage
-, fetchpatch
-, fetchPypi
+, fetchFromGitHub
 , hopcroftkarp
 , multiset
-, pytest
-, pytest-runner
+, pytestCheckHook
 , hypothesis
 , setuptools-scm
 , isPy27
@@ -13,37 +11,45 @@
 
 buildPythonPackage rec {
   pname = "matchpy";
-  version = "0.5.1";
+  version = "0.5.5"; # Don't upgrade to 4.3.1, this tag is very old
   disabled = isPy27;
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "1vvf1cd9kw5z1mzvypc9f030nd18lgvvjc8j56b1s9b7dyslli2r";
+  src = fetchFromGitHub {
+    owner = "HPAC";
+    repo = pname;
+    rev = version;
+    hash = "sha256-n5rXIjqVQZzEbfIZVQiGLh2PR1DHAJ9gumcrbvwnasA=";
   };
 
-  patches = [
-    # Fix tests for pytest 4. Remove with the next release
-    (fetchpatch {
-      url = "https://github.com/HPAC/matchpy/commit/b405a2717a7793d58c47b2e2197d9d00c06fb13c.patch";
-      includes = [ "tests/conftest.py" ];
-      sha256 = "1b6gqf2vy9qxg384nqr9k8il335afhbdmlyx4vhd8r8rqpv7gax9";
-    })
-  ];
-
   postPatch = ''
+    sed -i '/pytest-runner/d' setup.cfg
+
     substituteInPlace setup.cfg \
-       --replace "hypothesis>=3.6,<4.0" "hypothesis" \
-       --replace "pytest>=3.0,<4.0" "pytest"
+      --replace "multiset>=2.0,<3.0" "multiset"
   '';
 
-  buildInputs = [ setuptools-scm pytest-runner ];
-  checkInputs = [ pytest hypothesis ];
-  propagatedBuildInputs = [ hopcroftkarp multiset ];
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
+
+  propagatedBuildInputs = [
+    hopcroftkarp
+    multiset
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    hypothesis
+  ];
+
+  pythonImportsCheck = [
+    "matchpy"
+  ];
 
   meta = with lib; {
     description = "A library for pattern matching on symbolic expressions";
     homepage = "https://github.com/HPAC/matchpy";
     license = licenses.mit;
-    maintainers = [ maintainers.costrouc ];
+    maintainers = with maintainers; [ costrouc ];
   };
 }
diff --git a/pkgs/development/python-modules/mccabe/default.nix b/pkgs/development/python-modules/mccabe/default.nix
index f20cb18b488..f47e4e4d4b6 100644
--- a/pkgs/development/python-modules/mccabe/default.nix
+++ b/pkgs/development/python-modules/mccabe/default.nix
@@ -1,15 +1,27 @@
-{ lib, buildPythonPackage, fetchPypi, pytest, pytest-runner }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytest
+, hypothesis
+, hypothesmith
+, python
+}:
 
 buildPythonPackage rec {
   pname = "mccabe";
-  version = "0.6.1";
+  version = "0.7.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx";
+    sha256 = "sha256-NI4CQMM7YLvfTlIxku+RnyjLLD19XHeU90AJKQ8jYyU=";
   };
 
-  buildInputs = [ pytest pytest-runner ];
+  buildInputs = [
+    pytest
+  ];
+
+  # https://github.com/PyCQA/mccabe/issues/93
+  doCheck = false;
 
   meta = with lib; {
     description = "McCabe checker, plugin for flake8";
diff --git a/pkgs/development/python-modules/metakernel/default.nix b/pkgs/development/python-modules/metakernel/default.nix
index f94ddb12ac5..417b4d914e6 100644
--- a/pkgs/development/python-modules/metakernel/default.nix
+++ b/pkgs/development/python-modules/metakernel/default.nix
@@ -6,11 +6,11 @@
 
 buildPythonPackage rec {
   pname = "metakernel";
-  version = "0.28.2";
+  version = "0.29.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "8811a4497444495639ef000902f4c6e8a7e2c57da1d47a8a24bcc9083548b389";
+    sha256 = "sha256-+B8ywp7q42g8H+BPFK+D1VyLfyqgnrYIN3ai/mdcwcA=";
   };
 
   propagatedBuildInputs = [ ipykernel ];
diff --git a/pkgs/development/python-modules/mezzanine/default.nix b/pkgs/development/python-modules/mezzanine/default.nix
index 83085d76a36..6607dc0739d 100644
--- a/pkgs/development/python-modules/mezzanine/default.nix
+++ b/pkgs/development/python-modules/mezzanine/default.nix
@@ -1,38 +1,56 @@
 { lib
-
+, beautifulsoup4
+, bleach
 , buildPythonPackage
-, fetchPypi
-, isPyPy
-, pyflakes
-, pep8
+, chardet
 , django
 , django_contrib_comments
+, fetchPypi
 , filebrowser_safe
-, grappelli_safe
-, bleach
-, tzlocal
-, beautifulsoup4
-, requests
-, requests_oauthlib
 , future
+, grappelli_safe
+, isPyPy
+, pep8
 , pillow
-, chardet
+, pyflakes
+, pythonOlder
+, requests
+, requests-oauthlib
+, tzlocal
 }:
 
 buildPythonPackage rec {
+  pname = "mezzanine";
   version = "5.1.3";
-  pname = "Mezzanine";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6" || isPyPy;
 
   src = fetchPypi {
-    inherit pname version;
-    sha256 = "sha256-G/Oj5g70tFUhnbSVElVk0s9Ka+MEuPsEgj6blcFBOoY=";
+    pname = "Mezzanine";
+    inherit version;
+    hash = "sha256-G/Oj5g70tFUhnbSVElVk0s9Ka+MEuPsEgj6blcFBOoY=";
   };
 
-  disabled = isPyPy || lib.versionOlder django.version "1.11"
-    || lib.versionAtLeast django.version "2.0";
+  buildInputs = [
+    pyflakes
+    pep8
+  ];
 
-  buildInputs = [ pyflakes pep8 ];
-  propagatedBuildInputs = [ django django_contrib_comments filebrowser_safe grappelli_safe bleach tzlocal beautifulsoup4 requests requests_oauthlib future pillow chardet ];
+  propagatedBuildInputs = [
+    beautifulsoup4
+    bleach
+    chardet
+    django
+    django_contrib_comments
+    filebrowser_safe
+    future
+    grappelli_safe
+    pillow
+    requests
+    requests-oauthlib
+    tzlocal
+  ];
 
   # Tests Fail Due to Syntax Warning, Fixed for v3.1.11+
   doCheck = false;
@@ -41,12 +59,10 @@ buildPythonPackage rec {
     sed -i 's/==/>=/' setup.py
   '';
 
-  LC_ALL="en_US.UTF-8";
+  LC_ALL = "en_US.UTF-8";
 
   meta = with lib; {
-    description = ''
-      A content management platform built using the Django framework
-    '';
+    description = "Content management platform built using the Django framework";
     longDescription = ''
       Mezzanine is a powerful, consistent, and flexible content
       management platform. Built using the Django framework, Mezzanine
@@ -64,11 +80,9 @@ buildPythonPackage rec {
     '';
     homepage = "http://mezzanine.jupo.org/";
     downloadPage = "https://github.com/stephenmcd/mezzanine/releases";
-    license = licenses.free;
+    license = licenses.bsd2;
     maintainers = with maintainers; [ prikhi ];
     platforms = platforms.unix;
-    # mezzanine requires django-1.11. Consider overriding python package set to use django_1_11"
-    broken = versionOlder django.version "1.11" || versionAtLeast django.version "2.0";
   };
-
 }
+
diff --git a/pkgs/development/python-modules/mitmproxy/default.nix b/pkgs/development/python-modules/mitmproxy/default.nix
index f3b24ffabff..055cb8aee99 100644
--- a/pkgs/development/python-modules/mitmproxy/default.nix
+++ b/pkgs/development/python-modules/mitmproxy/default.nix
@@ -111,6 +111,7 @@ buildPythonPackage rec {
     # Tests require terminal
     "test_integration"
   ];
+  dontUsePytestXdist = true;
 
   pythonImportsCheck = [ "mitmproxy" ];
 
diff --git a/pkgs/development/python-modules/mkdocs-material/default.nix b/pkgs/development/python-modules/mkdocs-material/default.nix
index dc67a515824..41eff2026b9 100644
--- a/pkgs/development/python-modules/mkdocs-material/default.nix
+++ b/pkgs/development/python-modules/mkdocs-material/default.nix
@@ -9,13 +9,13 @@
 
 buildPythonApplication rec {
   pname = "mkdocs-material";
-  version = "8.2.7";
+  version = "8.2.9";
 
   src = fetchFromGitHub {
     owner = "squidfunk";
     repo = pname;
     rev = version;
-    sha256 = "sha256-Jh0FmtBCYCEk6mYFLOKb1HQXQ4Wc9Z6JCHFVu420IBk=";
+    sha256 = "sha256-lrklTQWWsP1rjixqu5/S7XMN+K095NRGv3JkjRQ4brM=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/mkdocs/default.nix b/pkgs/development/python-modules/mkdocs/default.nix
index 7d4f1cc66c6..13604bc975a 100644
--- a/pkgs/development/python-modules/mkdocs/default.nix
+++ b/pkgs/development/python-modules/mkdocs/default.nix
@@ -3,7 +3,6 @@
   lib
 , buildPythonPackage
 , fetchFromGitHub
-, fetchpatch
 , pythonOlder
   # runtime deps
 , click
@@ -24,24 +23,16 @@
 
 buildPythonPackage rec {
   pname = "mkdocs";
-  version = "1.2.3";
+  version = "1.3.0";
   disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = version;
-    sha256 = "sha256-LBw2ftGyeNvARQ8xiYUho8BiQh+aIEqROP51gKvNxEo=";
+    sha256 = "sha256-S4xkr3jS5GvkMu8JnEGfqhmkxy3FtZZb7Rbuniltudg=";
   };
 
-  patches = [
-    (fetchpatch {
-      url = "https://github.com/mkdocs/mkdocs/commit/c93fc91e4dc0ef33e2ea418aaa32b0584a8d354a.patch";
-      sha256 = "sha256-7uLIuQOt6KU/+iS9cwhXkWPAHzZkQdMyNBxSMut5WK4=";
-      excludes = [ "tox.ini" ];
-    })
-  ];
-
   propagatedBuildInputs = [
     click
     jinja2
diff --git a/pkgs/development/python-modules/mock/default.nix b/pkgs/development/python-modules/mock/default.nix
index 72e40d750ed..464a6ae969d 100644
--- a/pkgs/development/python-modules/mock/default.nix
+++ b/pkgs/development/python-modules/mock/default.nix
@@ -1,31 +1,30 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, isPy27
-, funcsigs
-, six
-, pbr
+, fetchpatch
 , python
+, pythonOlder
 , pytest
 }:
 
 buildPythonPackage rec {
   pname = "mock";
   version = "4.0.3";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "7d3fbbde18228f4ff2f1f119a45cdffa458b4c0dee32eb4d2bb2f82554bac7bc";
   };
 
-  propagatedBuildInputs = [ six pbr ] ++ lib.optionals isPy27 [ funcsigs ];
-
-  # On PyPy for Python 2.7 in particular, Mock's tests have a known failure.
-  # Mock upstream has a decoration to disable the failing test and make
-  # everything pass, but it is not yet released. The commit:
-  # https://github.com/testing-cabal/mock/commit/73bfd51b7185#diff-354f30a63fb0907d4ad57269548329e3L12
-  #doCheck = !(python.isPyPy && python.isPy27);
-  doCheck = false; # Infinite recursion pytest
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/testing-cabal/mock/commit/f3e3d82aab0ede7e25273806dc0505574d85eae2.patch";
+      sha256 = "sha256-wPrv1/WeICZHn31UqFlICFsny2knvn3+Xg8BZoaGbwQ=";
+    })
+  ];
 
   checkPhase = ''
     ${python.interpreter} -m unittest discover
@@ -37,8 +36,7 @@ buildPythonPackage rec {
 
   meta = with lib; {
     description = "Mock objects for Python";
-    homepage = "http://python-mock.sourceforge.net/";
+    homepage = "https://github.com/testing-cabal/mock";
     license = licenses.bsd2;
   };
-
 }
diff --git a/pkgs/development/python-modules/modeled/default.nix b/pkgs/development/python-modules/modeled/default.nix
index acf8ee4c112..c49077d2181 100644
--- a/pkgs/development/python-modules/modeled/default.nix
+++ b/pkgs/development/python-modules/modeled/default.nix
@@ -4,7 +4,7 @@
 , zetup
 , six
 , moretools
-, pathpy
+, path
 , pytestCheckHook
 }:
 
@@ -20,7 +20,7 @@ buildPythonPackage rec {
 
   buildInputs = [ zetup ];
 
-  propagatedBuildInputs = [ six moretools pathpy ];
+  propagatedBuildInputs = [ six moretools path ];
 
   checkInputs = [ pytestCheckHook ];
 
diff --git a/pkgs/development/python-modules/moretools/default.nix b/pkgs/development/python-modules/moretools/default.nix
index 5a96682accd..01f6b58a947 100644
--- a/pkgs/development/python-modules/moretools/default.nix
+++ b/pkgs/development/python-modules/moretools/default.nix
@@ -1,5 +1,5 @@
 { lib, buildPythonPackage, fetchPypi
-, six, pathpy, zetup, pytest
+, six, path, zetup, pytest
 , decorator }:
 
 buildPythonPackage rec {
@@ -16,7 +16,7 @@ buildPythonPackage rec {
   '';
 
   nativeBuildInputs = [ zetup ];
-  checkInputs = [ six pathpy pytest ];
+  checkInputs = [ six path pytest ];
   propagatedBuildInputs = [ decorator ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/moto/default.nix b/pkgs/development/python-modules/moto/default.nix
index f920a06488a..7f3251a6cc2 100644
--- a/pkgs/development/python-modules/moto/default.nix
+++ b/pkgs/development/python-modules/moto/default.nix
@@ -35,14 +35,14 @@
 
 buildPythonPackage rec {
   pname = "moto";
-  version = "3.0.5";
+  version = "3.1.3";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-hfLs4K0DBaoTo5E5zmSKs6/hwEyzKsHbjV5ekRfU0Q4=";
+    sha256 = "sha256-+kgVlfVhHZ/r2vCg0Skwe1433mh2w30DXO7+Rs59isA=";
   };
 
   propagatedBuildInputs = [
@@ -71,14 +71,11 @@ buildPythonPackage rec {
 
   checkInputs = [
     freezegun
-    pytest-xdist
     pytestCheckHook
     sure
   ];
 
   pytestFlagsArray = [
-    "--numprocesses $NIX_BUILD_CORES"
-
     # Disable tests that try to access the network
     "--deselect=tests/test_cloudformation/test_cloudformation_custom_resources.py::test_create_custom_lambda_resource__verify_cfnresponse_failed"
     "--deselect=tests/test_cloudformation/test_server.py::test_cloudformation_server_get"
@@ -92,9 +89,24 @@ buildPythonPackage rec {
     "--deselect=tests/test_sqs/test_sqs_integration.py::test_invoke_function_from_sqs_exception"
     "--deselect=tests/test_stepfunctions/test_stepfunctions.py::test_state_machine_creation_fails_with_invalid_names"
     "--deselect=tests/test_stepfunctions/test_stepfunctions.py::test_state_machine_list_executions_with_pagination"
+    "--deselect=tests/test_iotdata/test_iotdata.py::test_update"
+    "--deselect=tests/test_iotdata/test_iotdata.py::test_basic"
+    "--deselect=tests/test_iotdata/test_iotdata.py::test_delete_field_from_device_shadow"
+    "--deselect=tests/test_iotdata/test_iotdata.py::test_publish"
+    "--deselect=tests/test_s3/test_server.py::test_s3_server_bucket_versioning"
 
     # json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
     "--deselect=tests/test_cloudformation/test_cloudformation_stack_integration.py::test_lambda_function"
+
+    # AssertionError: CloudWatch log event was not found.
+    "--deselect=tests/test_logs/test_integration.py::test_subscription_filter_applies_to_new_streams"
+
+    # KeyError: 'global'
+    "--deselect=tests/test_iotdata/test_server.py::test_iotdata_list"
+    "--deselect=tests/test_iotdata/test_server.py::test_publish"
+
+    # Blocks test execution
+    "--deselect=tests/test_utilities/test_threaded_server.py::TestThreadedMotoServer::test_load_data_from_inmemory_client"
   ];
 
   disabledTestPaths = [
diff --git a/pkgs/development/python-modules/msrest/default.nix b/pkgs/development/python-modules/msrest/default.nix
index 6eb6e49cddd..da130f289fd 100644
--- a/pkgs/development/python-modules/msrest/default.nix
+++ b/pkgs/development/python-modules/msrest/default.nix
@@ -1,51 +1,66 @@
 { lib
+, aiodns
+, aiohttp
 , buildPythonPackage
-, fetchFromGitHub
-, isPy3k
-, requests
-, requests_oauthlib
-, isodate
 , certifi
-, enum34 ? null
-, typing
-, aiohttp
-, aiodns
-, pytest
+, fetchFromGitHub
 , httpretty
-, mock
-, futures ? null
+, isodate
+, pytest-aiohttp
+, pytestCheckHook
+, pythonOlder
+, requests
+, requests-oauthlib
 , trio
 }:
 
 buildPythonPackage rec {
-  version = "0.6.21";
   pname = "msrest";
+  version = "0.6.21";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
-  # no tests in PyPI tarball
-  # see https://github.com/Azure/msrest-for-python/pull/152
   src = fetchFromGitHub {
     owner = "Azure";
     repo = "msrest-for-python";
     rev = "v${version}";
-    sha256 = "sha256-IlBwlVQ/v+vJmCWNbFZKGL6a9K09z4AYrPm3kwaA/nI=";
+    hash = "sha256-IlBwlVQ/v+vJmCWNbFZKGL6a9K09z4AYrPm3kwaA/nI=";
   };
 
   propagatedBuildInputs = [
-    requests requests_oauthlib isodate certifi
-  ] ++ lib.optionals (!isPy3k) [ enum34 typing ]
-    ++ lib.optionals isPy3k [ aiohttp aiodns ];
+    aiodns
+    aiohttp
+    certifi
+    isodate
+    requests
+    requests-oauthlib
+  ];
+
+  checkInputs = [
+    httpretty
+    pytest-aiohttp
+    pytestCheckHook
+    trio
+  ];
 
-  checkInputs = [ pytest httpretty ]
-    ++ lib.optionals (!isPy3k) [ mock futures ]
-    ++ lib.optional isPy3k trio;
+  disabledTests = [
+    # Test require network access
+    "test_basic_aiohttp"
+    "test_basic_aiohttp"
+    "test_basic_async_requests"
+    "test_basic_async_requests"
+    "test_conf_async_requests"
+    "test_conf_async_requests"
+    "test_conf_async_trio_requests"
+  ];
 
-  # Deselected tests require network access
-  checkPhase = ''
-    pytest tests/ -k "not test_conf_async_trio_requests"
-  '';
+  pythonImportsCheck = [
+    "msrest"
+  ];
 
   meta = with lib; {
-    description = "The runtime library 'msrest' for AutoRest generated Python clients.";
+    description = "The runtime library for AutoRest generated Python clients";
     homepage = "https://github.com/Azure/msrest-for-python";
     license = licenses.mit;
     maintainers = with maintainers; [ bendlas jonringer maxwilson ];
diff --git a/pkgs/development/python-modules/mwclient/default.nix b/pkgs/development/python-modules/mwclient/default.nix
index bffc4247632..da260251e9f 100644
--- a/pkgs/development/python-modules/mwclient/default.nix
+++ b/pkgs/development/python-modules/mwclient/default.nix
@@ -1,11 +1,21 @@
-{ lib, buildPythonPackage, fetchFromGitHub
-, requests, requests_oauthlib, six
-, pytest, pytestcache, pytest-cov, responses, mock
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, mock
+, pytestCheckHook
+, pythonOlder
+, requests
+, requests-oauthlib
+, responses
+, six
 }:
 
 buildPythonPackage rec {
   version = "0.10.1";
   pname = "mwclient";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     owner = "mwclient";
@@ -14,17 +24,31 @@ buildPythonPackage rec {
     sha256 = "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj";
   };
 
-  checkInputs = [ pytest pytestcache pytest-cov responses mock ];
+  propagatedBuildInputs = [
+    requests
+    requests-oauthlib
+    six
+  ];
 
-  propagatedBuildInputs = [ requests requests_oauthlib six ];
+  checkInputs = [
+    mock
+    pytestCheckHook
+    responses
+  ];
 
-  checkPhase = ''
-    py.test
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace " --cov mwclient test" ""
   '';
 
+  pythonImportsCheck = [
+    "mwclient"
+  ];
+
   meta = with lib; {
     description = "Python client library to the MediaWiki API";
     license = licenses.mit;
     homepage = "https://github.com/mwclient/mwclient";
+    maintainers = with maintainers; [ ];
   };
 }
diff --git a/pkgs/development/python-modules/mwoauth/default.nix b/pkgs/development/python-modules/mwoauth/default.nix
index 8743329917e..0a12052abc7 100644
--- a/pkgs/development/python-modules/mwoauth/default.nix
+++ b/pkgs/development/python-modules/mwoauth/default.nix
@@ -1,40 +1,47 @@
 { lib
 , buildPythonPackage
-, six
+, fetchPypi
+, oauthlib
 , pyjwt
+, pythonOlder
 , requests
-, oauthlib
-, requests_oauthlib
-, fetchPypi
+, requests-oauthlib
+, six
 }:
 
 buildPythonPackage rec {
   pname = "mwoauth";
   version = "0.3.7";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "9e0d70a1fa6f452584de1cb853ae6c11f41233549f7839cfb879f99410f6ad46";
+    hash = "sha256-ng1wofpvRSWE3hy4U65sEfQSM1SfeDnPuHn5lBD2rUY=";
   };
 
   propagatedBuildInputs = [
     oauthlib
     pyjwt
     requests
-    requests_oauthlib
+    requests-oauthlib
     six
   ];
 
   postPatch = ''
     # https://github.com/mediawiki-utilities/python-mwoauth/pull/43
-    substituteInPlace setup.py --replace "PyJWT>=1.0.1,<2.0.0" "PyJWT>=1.0.1"
+    substituteInPlace setup.py \
+      --replace "PyJWT>=1.0.1,<2.0.0" "PyJWT>=1.0.1"
   '';
 
   # PyPI source has no tests included
   # https://github.com/mediawiki-utilities/python-mwoauth/issues/44
   doCheck = false;
 
-  pythonImportsCheck = [ "mwoauth" ];
+  pythonImportsCheck = [
+    "mwoauth"
+  ];
 
   meta = with lib; {
     description = "Python library to perform OAuth handshakes with a MediaWiki installation";
diff --git a/pkgs/development/python-modules/myfitnesspal/default.nix b/pkgs/development/python-modules/myfitnesspal/default.nix
index f6df7b88f85..791cb708be5 100644
--- a/pkgs/development/python-modules/myfitnesspal/default.nix
+++ b/pkgs/development/python-modules/myfitnesspal/default.nix
@@ -9,6 +9,7 @@
 , python-dateutil
 , requests
 , rich
+, typing-extensions
 , pytestCheckHook
 , mock
 , nose
@@ -36,6 +37,7 @@ buildPythonPackage rec {
     python-dateutil
     requests
     rich
+    typing-extensions
   ];
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/mypy-boto3-s3/default.nix b/pkgs/development/python-modules/mypy-boto3-s3/default.nix
index 4f33912d3df..ecc040f080b 100644
--- a/pkgs/development/python-modules/mypy-boto3-s3/default.nix
+++ b/pkgs/development/python-modules/mypy-boto3-s3/default.nix
@@ -8,14 +8,14 @@
 
 buildPythonPackage rec {
   pname = "mypy-boto3-s3";
-  version = "1.21.7";
+  version = "1.21.27.post1";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-SWzL6AMXoZzYw3LwrBdvbe9JzLMudZioKZWo7HtHM8U=";
+    hash = "sha256-LPc7ejocoSEtVaSW2Iye9EQiMrY4YU91bYSa4F3NRlg=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/nbclient/default.nix b/pkgs/development/python-modules/nbclient/default.nix
index 52478ad4fd6..1b2071e7f0c 100644
--- a/pkgs/development/python-modules/nbclient/default.nix
+++ b/pkgs/development/python-modules/nbclient/default.nix
@@ -6,12 +6,12 @@
 
 buildPythonPackage rec {
   pname = "nbclient";
-  version = "0.5.11";
+  version = "0.5.13";
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-dRUWmS80tYFyutVO7x5L9+T0Rg1Y4lXKGk5clklHYAc=";
+    sha256 = "sha256-QMUsm148MfrsruafICs/U+ONfBxWPeD63enX7aD9r+g=";
   };
 
   inherit doCheck;
diff --git a/pkgs/development/python-modules/nbconvert/default.nix b/pkgs/development/python-modules/nbconvert/default.nix
index 8604698cc2a..5a89210170f 100644
--- a/pkgs/development/python-modules/nbconvert/default.nix
+++ b/pkgs/development/python-modules/nbconvert/default.nix
@@ -5,6 +5,7 @@
 , glibcLocales
 , entrypoints
 , bleach
+, beautifulsoup4
 , mistune
 , nbclient
 , jinja2
@@ -23,11 +24,11 @@
 
 buildPythonPackage rec {
   pname = "nbconvert";
-  version = "6.4.2";
+  version = "6.4.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-6ygD2xj2+szmvzsBtoT+R5B5lL0VbRXqzN8BHj1/gWQ=";
+    sha256 = "sha256-IRY6jiBzwHEJyo85iDbkXv26KqzqaNb3WopUX+8HDU4=";
   };
 
   # Add $out/share/jupyter to the list of paths that are used to search for
@@ -45,7 +46,7 @@ buildPythonPackage rec {
   propagatedBuildInputs = [
     entrypoints bleach mistune jinja2 pygments traitlets testpath
     jupyter_core nbformat ipykernel pandocfilters tornado jupyter-client
-    defusedxml
+    defusedxml beautifulsoup4
     (nbclient.override { doCheck = false; }) # avoid infinite recursion
     jupyterlab-pygments
   ];
diff --git a/pkgs/development/python-modules/nbformat/default.nix b/pkgs/development/python-modules/nbformat/default.nix
index a8e6993d645..e110934fdd1 100644
--- a/pkgs/development/python-modules/nbformat/default.nix
+++ b/pkgs/development/python-modules/nbformat/default.nix
@@ -12,11 +12,11 @@
 
 buildPythonPackage rec {
   pname = "nbformat";
-  version = "5.1.3";
+  version = "5.2.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "b516788ad70771c6250977c1374fcca6edebe6126fd2adb5a69aa5c2356fd1c8";
+    sha256 = "sha256-k98LnGciHTj7lwxI9tNhgZpsOIKZoO8xcbu5Eu3+EyQ=";
   };
 
   LC_ALL="en_US.utf8";
diff --git a/pkgs/development/python-modules/ncclient/default.nix b/pkgs/development/python-modules/ncclient/default.nix
index 2cb040ed8a3..3457c71af4c 100644
--- a/pkgs/development/python-modules/ncclient/default.nix
+++ b/pkgs/development/python-modules/ncclient/default.nix
@@ -9,13 +9,13 @@
 
 buildPythonPackage rec {
   pname = "ncclient";
-  version = "0.6.12";
+  version = "0.6.13";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    sha256 = "1sjvqaxb54nmqljiw5bg1423msa9rg015wiix9fsm6djk3wpklmk";
+    sha256 = "sha256-NrilXB1NFcqNCGrwshhuLdhQoeHJ12PSp4MBScT9kYc=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/ndg-httpsclient/default.nix b/pkgs/development/python-modules/ndg-httpsclient/default.nix
index 0082b8e8db2..39429950b71 100644
--- a/pkgs/development/python-modules/ndg-httpsclient/default.nix
+++ b/pkgs/development/python-modules/ndg-httpsclient/default.nix
@@ -1,6 +1,7 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
+, pyasn1
 , pyopenssl
 }:
 
@@ -8,8 +9,6 @@ buildPythonPackage rec {
   version = "0.5.1";
   pname = "ndg-httpsclient";
 
-  propagatedBuildInputs = [ pyopenssl ];
-
   src = fetchFromGitHub {
     owner = "cedadev";
     repo = "ndg_httpsclient";
@@ -17,6 +16,12 @@ buildPythonPackage rec {
     sha256 = "0lhsgs4am4xyjssng5p0vkfwqncczj1dpa0vss4lrhzq86mnn5rz";
   };
 
+
+  propagatedBuildInputs = [
+    pyasn1
+    pyopenssl
+  ];
+
   # uses networking
   doCheck = false;
 
diff --git a/pkgs/development/python-modules/netmiko/default.nix b/pkgs/development/python-modules/netmiko/default.nix
index 0934439f747..3081b5a6b7c 100644
--- a/pkgs/development/python-modules/netmiko/default.nix
+++ b/pkgs/development/python-modules/netmiko/default.nix
@@ -3,11 +3,11 @@
 
 buildPythonPackage rec {
   pname = "netmiko";
-  version = "3.4.0";
+  version = "4.0.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "14s9c6ws32swizcmfdqmlkkk2yqw6071ybq3w94fhkl6jzfvkbdc";
+    sha256 = "sha256-fVhBkiO1JpqMIFl32xlwSjeCd7aObocXPAr069fKdmc=";
   };
 
   buildInputs = [ setuptools ];
diff --git a/pkgs/development/python-modules/networkx/default.nix b/pkgs/development/python-modules/networkx/default.nix
index c876c0d549d..140eb9bb24c 100644
--- a/pkgs/development/python-modules/networkx/default.nix
+++ b/pkgs/development/python-modules/networkx/default.nix
@@ -10,11 +10,11 @@
 buildPythonPackage rec {
   pname = "networkx";
   # upgrade may break sage, please test the sage build or ping @timokau on upgrade
-  version = "2.7";
+  version = "2.7.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-7/t9nNXDbh4NM/QqOu9brd5QMFNYJqNn1c9gihcK9RU=";
+    sha256 = "sha256-0RlLp1Pl7tB83s0dI8XNejx3IJm9jb0v6jZniM9N57o=";
   };
 
   propagatedBuildInputs = [ decorator setuptools ];
diff --git a/pkgs/development/python-modules/nipype/neurdflib.nix b/pkgs/development/python-modules/nipype/neurdflib.nix
index 0a266ff7bf8..8095b0fb040 100644
--- a/pkgs/development/python-modules/nipype/neurdflib.nix
+++ b/pkgs/development/python-modules/nipype/neurdflib.nix
@@ -3,7 +3,7 @@
 , fetchPypi
 , isodate
 , html5lib
-, SPARQLWrapper
+, sparqlwrapper
 , networkx
 , nose
 , python
@@ -18,7 +18,7 @@ buildPythonPackage rec {
     sha256 = "d34493cee15029ff5db16157429585ff863ba5542675a4d8a94a0da1bc6e3a50";
   };
 
-  propagatedBuildInputs = [ isodate html5lib SPARQLWrapper ];
+  propagatedBuildInputs = [ isodate html5lib sparqlwrapper ];
 
   checkInputs = [ networkx nose ];
 
diff --git a/pkgs/development/python-modules/nocasedict/default.nix b/pkgs/development/python-modules/nocasedict/default.nix
index 982f2abe880..d9140d591c8 100644
--- a/pkgs/development/python-modules/nocasedict/default.nix
+++ b/pkgs/development/python-modules/nocasedict/default.nix
@@ -1,5 +1,8 @@
-{ lib, buildPythonPackage, fetchPypi
-, pytest
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytestCheckHook
+, six
 }:
 
 buildPythonPackage rec {
@@ -11,8 +14,12 @@ buildPythonPackage rec {
     sha256 = "sha256-giC5e6BrCOst7e13TEBsd+DKDVNSrnEkn2+dHyoXvXs=";
   };
 
+  propagatedBuildInputs = [
+    six
+  ];
+
   checkInputs = [
-    pytest
+    pytestCheckHook
   ];
 
   pythonImportsCheck = [
diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix
index 586257a4f8d..3ead3cf4fe2 100644
--- a/pkgs/development/python-modules/notebook/default.nix
+++ b/pkgs/development/python-modules/notebook/default.nix
@@ -27,12 +27,12 @@
 
 buildPythonPackage rec {
   pname = "notebook";
-  version = "6.4.8";
+  version = "6.4.10";
   disabled = !isPy3k;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-Hphcncb2eL3/+53GVzBrVGm/pi1z4D906N77920oQxI=";
+    sha256 = "sha256-JAina8YokoOo7s/KZ+KY7IPGfbUaTC4bcT3RgLs56Q4=";
   };
 
   LC_ALL = "en_US.utf8";
diff --git a/pkgs/development/python-modules/numpydoc/default.nix b/pkgs/development/python-modules/numpydoc/default.nix
index ea092d01dd4..b770ac26fbd 100644
--- a/pkgs/development/python-modules/numpydoc/default.nix
+++ b/pkgs/development/python-modules/numpydoc/default.nix
@@ -1,23 +1,54 @@
-{ lib, buildPythonPackage, fetchPypi, isPy27
+{ lib
+, buildPythonPackage
+, fetchPypi
+, isPy27
 , jinja2
-, nose
-, pytest
 , sphinx
+, pytestCheckHook
+, matplotlib
 }:
 
 buildPythonPackage rec {
   pname = "numpydoc";
-  version = "1.2";
+  version = "1.2.1";
+  format = "setuptools";
+
   disabled = isPy27;
 
   src = fetchPypi {
     inherit pname;
     inherit version;
-    sha256 = "sha256-DOwjN0DGsSWRMAXRboqZluBgUor8uLfK0/JwZinf1vc=";
+    sha256 = "sha256-fOgm7Q1Uw/3JCXmSqNc6TUWdxGhhE1HGjkRP7ESkWvY=";
   };
 
-  checkInputs = [ nose pytest ];
-  propagatedBuildInputs = [ sphinx jinja2 ];
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "Jinja2>=2.10,<3.1" "Jinja2>=2.10,<3.2"
+    substituteInPlace setup.cfg \
+      --replace "--cov-report=" "" \
+      --replace "--cov=numpydoc" ""
+  '';
+
+  propagatedBuildInputs = [
+    jinja2
+    sphinx
+  ];
+
+  checkInputs = [
+    matplotlib
+    pytestCheckHook
+  ];
+
+  disabledTests = [
+    # https://github.com/numpy/numpydoc/issues/373
+    "test_MyClass"
+    "test_my_function"
+    "test_reference"
+  ];
+
+  pythonImportsCheck = [
+    "numpydoc"
+  ];
 
   meta = {
     description = "Sphinx extension to support docstrings in Numpy format";
diff --git a/pkgs/development/python-modules/nunavut/default.nix b/pkgs/development/python-modules/nunavut/default.nix
index 5b974c9b6af..4cfce289917 100644
--- a/pkgs/development/python-modules/nunavut/default.nix
+++ b/pkgs/development/python-modules/nunavut/default.nix
@@ -2,22 +2,24 @@
 , buildPythonPackage
 , pythonOlder
 , fetchPypi
+, importlib-resources
 , pydsdl
 , pyyaml
 }:
 
  buildPythonPackage rec {
   pname = "nunavut";
-  version = "1.7.3";
+  version = "1.7.5";
 
   disabled = pythonOlder "3.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-Tj3zCKDM4IBH9BKonhW9gPFD+lE3Q570Lxfm6b/d5JU=";
+    sha256 = "sha256-4wZfj2C6aUNqHaA00KiiXbKOMf/XBSD0N2+9c++e0K8=";
   };
 
   propagatedBuildInputs = [
+    importlib-resources
     pydsdl
     pyyaml
   ];
diff --git a/pkgs/development/python-modules/oci/default.nix b/pkgs/development/python-modules/oci/default.nix
index 8fd06ae3b40..879a317469e 100644
--- a/pkgs/development/python-modules/oci/default.nix
+++ b/pkgs/development/python-modules/oci/default.nix
@@ -13,7 +13,7 @@
 
 buildPythonPackage rec {
   pname = "oci";
-  version = "2.60.0";
+  version = "2.63.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
@@ -22,7 +22,7 @@ buildPythonPackage rec {
     owner = "oracle";
     repo = "oci-python-sdk";
     rev = "v${version}";
-    hash = "sha256-fXeea4MftVSJWzanHeAuERRiQLBp8l1l1Cw2lG3uz24=";
+    hash = "sha256-EIn7BRXsVf7R2ij8iK3hrNWnLehxKDBlk96lAhFh0xw=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/ondilo/default.nix b/pkgs/development/python-modules/ondilo/default.nix
index 271243ab791..c766e2cb158 100644
--- a/pkgs/development/python-modules/ondilo/default.nix
+++ b/pkgs/development/python-modules/ondilo/default.nix
@@ -4,30 +4,35 @@
 , oauthlib
 , pythonOlder
 , requests
-, requests_oauthlib
+, requests-oauthlib
 }:
 
 buildPythonPackage rec {
   pname = "ondilo";
   version = "0.3.0";
+  format = "setuptools";
+
   disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     owner = "JeromeHXP";
     repo = pname;
     rev = version;
-    sha256 = "sha256-MI6K+41I/IVi+GRBdmRIHbljULDFLAwpo3W8tdxCOBM=";
+    hash = "sha256-MI6K+41I/IVi+GRBdmRIHbljULDFLAwpo3W8tdxCOBM=";
   };
 
   propagatedBuildInputs = [
     oauthlib
     requests
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   # Project has no tests
   doCheck = false;
-  pythonImportsCheck = [ "ondilo" ];
+
+  pythonImportsCheck = [
+    "ondilo"
+  ];
 
   meta = with lib; {
     description = "Python package to access Ondilo ICO APIs";
diff --git a/pkgs/development/python-modules/opentracing/default.nix b/pkgs/development/python-modules/opentracing/default.nix
index 381b0d76b14..bf7ec6a938f 100644
--- a/pkgs/development/python-modules/opentracing/default.nix
+++ b/pkgs/development/python-modules/opentracing/default.nix
@@ -5,12 +5,15 @@
 , futures ? null
 , gevent
 , mock
-, pytest
-, tornado }:
+, pytestCheckHook
+, tornado
+, six
+}:
 
 buildPythonPackage rec {
   pname = "opentracing";
   version = "2.4.0";
+  format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
@@ -19,11 +22,13 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = lib.optional isPy27 futures;
 
-  checkInputs = [ gevent mock pytest tornado ];
-
-  checkPhase = ''
-    pytest
-  '';
+  checkInputs = [
+    gevent
+    mock
+    pytestCheckHook
+    six
+    tornado
+  ];
 
   meta = with lib; {
     homepage = "https://github.com/opentracing/opentracing-python";
diff --git a/pkgs/development/python-modules/optax/default.nix b/pkgs/development/python-modules/optax/default.nix
index f3790a3f59f..b0f896a18eb 100644
--- a/pkgs/development/python-modules/optax/default.nix
+++ b/pkgs/development/python-modules/optax/default.nix
@@ -38,7 +38,6 @@ buildPythonPackage rec {
     tensorflow
     tensorflow-datasets
   ];
-  pytestFlagsArray = [ "-n $NIX_BUILD_CORES" ];
 
   pythonImportsCheck = [
     "optax"
diff --git a/pkgs/development/python-modules/ovh/default.nix b/pkgs/development/python-modules/ovh/default.nix
index 305b03b4d14..b9ab287260d 100644
--- a/pkgs/development/python-modules/ovh/default.nix
+++ b/pkgs/development/python-modules/ovh/default.nix
@@ -1,20 +1,45 @@
 { lib
 , buildPythonPackage
 , fetchPypi
+, mock
+, nose
+, requests
+, yanc
 }:
 
 buildPythonPackage rec {
   pname = "ovh";
-  version = "0.5.0";
-
-  # Needs yanc
-  doCheck = false;
+  version = "1.0.0";
+  format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "f74d190c4bff0953d76124cb8ed319a8a999138720e42957f0db481ef4746ae8";
+    sha256 = "sha256-IQzwu0gwfPNPOLQLCO99KL5Hu2094Y+acQBFXVGzHhU=";
   };
 
+  propagatedBuildInputs = [
+    requests
+  ];
+
+  preCheck = ''
+    export HOME=$(mktemp -d)
+  '';
+
+  checkInputs = [
+    mock
+    nose
+    yanc
+  ];
+
+  # requires network
+  checkPhase = ''
+    nosetests . \
+      -e test_config_get_conf \
+      -e test_config_get_custom_conf \
+      -e test_endpoints \
+      -e test_init_from_custom_config
+  '';
+
   meta = {
     description = "Thin wrapper around OVH's APIs";
     homepage = "https://github.com/ovh/python-ovh";
diff --git a/pkgs/development/python-modules/packaging/default.nix b/pkgs/development/python-modules/packaging/default.nix
index 648a548e521..69457e2a556 100644
--- a/pkgs/development/python-modules/packaging/default.nix
+++ b/pkgs/development/python-modules/packaging/default.nix
@@ -2,40 +2,44 @@
 , buildPythonPackage
 , fetchPypi
 , pyparsing
-, six
 , pytestCheckHook
 , pretend
 , setuptools
 }:
 
-buildPythonPackage rec {
-  pname = "packaging";
-  version = "21.3";
-  format = "pyproject";
+let
+  packaging = buildPythonPackage rec {
+    pname = "packaging";
+    version = "21.3";
+    format = "pyproject";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "sha256-3UfEKSfYmrkR5gZRiQfMLTofOLvQJjhZcGQ/nFuOz+s=";
-  };
+    src = fetchPypi {
+      inherit pname version;
+      sha256 = "sha256-3UfEKSfYmrkR5gZRiQfMLTofOLvQJjhZcGQ/nFuOz+s=";
+    };
+
+    nativeBuildInputs = [
+      setuptools
+    ];
 
-  nativeBuildInputs = [
-    setuptools
-  ];
+    propagatedBuildInputs = [ pyparsing ];
 
-  propagatedBuildInputs = [ pyparsing six ];
+    checkInputs = [
+      pytestCheckHook
+      pretend
+    ];
 
-  checkInputs = [
-    pytestCheckHook
-    pretend
-  ];
+    # Prevent circular dependency
+    doCheck = false;
 
-  # Prevent circular dependency
-  doCheck = false;
+    passthru.tests = packaging.overridePythonAttrs (_: { doCheck = true; });
 
-  meta = with lib; {
-    description = "Core utilities for Python packages";
-    homepage = "https://github.com/pypa/packaging";
-    license = [ licenses.bsd2 licenses.asl20 ];
-    maintainers = with maintainers; [ bennofs ];
+    meta = with lib; {
+      description = "Core utilities for Python packages";
+      homepage = "https://github.com/pypa/packaging";
+      license = with licenses; [ bsd2 asl20 ];
+      maintainers = with maintainers; [ bennofs ];
+    };
   };
-}
+in
+packaging
diff --git a/pkgs/development/python-modules/paho-mqtt/default.nix b/pkgs/development/python-modules/paho-mqtt/default.nix
index 341ef832183..fb249acf633 100644
--- a/pkgs/development/python-modules/paho-mqtt/default.nix
+++ b/pkgs/development/python-modules/paho-mqtt/default.nix
@@ -5,6 +5,7 @@
 , isPy3k
 , pytestCheckHook
 , mock
+, six
 }:
 
 buildPythonPackage rec {
@@ -18,16 +19,9 @@ buildPythonPackage rec {
     sha256 = "sha256-9nH6xROVpmI+iTKXfwv2Ar1PAmWbEunI3HO0pZyK6Rg=";
   };
 
-  postPatch = ''
-    substituteInPlace setup.py \
-      --replace "pylama" "" \
-      --replace "'pytest-runner'" ""
-    substituteInPlace setup.cfg \
-      --replace "--pylama" ""
-  '';
-
   checkInputs = [
     pytestCheckHook
+    six
   ] ++ lib.optional (!isPy3k) [
     mock
   ];
diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix
index 90309ef0b40..70919715eef 100644
--- a/pkgs/development/python-modules/pandas/default.nix
+++ b/pkgs/development/python-modules/pandas/default.nix
@@ -27,12 +27,12 @@
 
 buildPythonPackage rec {
   pname = "pandas";
-  version = "1.4.1";
+  version = "1.4.2";
   format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-jbk+yYrHy1+KwUIMEPXjxDUzFT8lP+f7bYkc9aorgNI=";
+    sha256 = "sha256-krwfxYXxRjyoJ7RVNZV4FbfeshjFSbfBhALDIsdUmhI=";
   };
 
   nativeBuildInputs = [ cython ];
@@ -71,10 +71,16 @@ buildPythonPackage rec {
 
   doCheck = !stdenv.isAarch32 && !stdenv.isAarch64; # upstream doesn't test this architecture
 
+  # don't max out build cores, it breaks tests
+  dontUsePytestXdist = true;
+
   pytestFlagsArray = [
+    # https://github.com/pandas-dev/pandas/blob/main/test_fast.sh
+    "--skip-db"
     "--skip-slow"
     "--skip-network"
-    "--numprocesses" "0"
+    "-m" "'not single_cpu'"
+    "--numprocesses" "4"
   ];
 
   disabledTests = [
diff --git a/pkgs/development/python-modules/parsimonious/default.nix b/pkgs/development/python-modules/parsimonious/default.nix
index 557e632f2ed..ccffbc5a281 100644
--- a/pkgs/development/python-modules/parsimonious/default.nix
+++ b/pkgs/development/python-modules/parsimonious/default.nix
@@ -1,24 +1,33 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, nose
-, six
+, regex
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
-  version = "0.8.1";
   pname = "parsimonious";
+  version = "0.9.0";
+  format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "3add338892d580e0cb3b1a39e4a1b427ff9f687858fdd61097053742391a9f6b";
+    sha256 = "sha256-sq0a5jovZb149eCorFEKmPNgekPx2yqNRmNqXZ5KMME=";
   };
 
-  checkInputs = [ nose ];
-  propagatedBuildInputs = [ six ];
+  propagatedBuildInputs = [
+    regex
+  ];
 
-  # performance tests tend to fail sometimes
-  NOSE_EXCLUDE = "test_benchmarks";
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "parsimonious"
+    "parsimonious.grammar"
+    "parsimonious.nodes"
+  ];
 
   meta = with lib; {
     homepage = "https://github.com/erikrose/parsimonious";
diff --git a/pkgs/development/python-modules/path.py/default.nix b/pkgs/development/python-modules/path.py/default.nix
deleted file mode 100644
index e49b1ceb462..00000000000
--- a/pkgs/development/python-modules/path.py/default.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
-, setuptools-scm
-, pytestCheckHook
-, pytest-flake8
-, glibcLocales
-, packaging
-, isPy38
-, importlib-metadata
-, fetchpatch
-}:
-
-buildPythonPackage rec {
-  pname = "path.py";
-  version = "12.0.1";
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "9f2169633403aa0423f6ec000e8701dd1819526c62465f5043952f92527fea0f";
-  };
-
-  checkInputs = [ pytestCheckHook pytest-flake8 glibcLocales packaging ];
-  buildInputs = [ setuptools-scm ];
-  propagatedBuildInputs = [
-    importlib-metadata
-  ];
-
-  LC_ALL = "en_US.UTF-8";
-
-  meta = {
-    description = "A module wrapper for os.path";
-    homepage = "https://github.com/jaraco/path.py";
-    license = lib.licenses.mit;
-  };
-
-  # ignore performance test which may fail when the system is under load
-  # test_version fails with 3.8 https://github.com/jaraco/path.py/issues/172
-  disabledTests = [ "TestPerformance" ] ++ lib.optionals isPy38 [ "test_version"];
-
-  dontUseSetuptoolsCheck = true;
-
-  patches = [
-    (fetchpatch {
-      url = "https://github.com/jaraco/path.py/commit/02eb16f0eb2cdc0015972ce963357aaa1cd0b84b.patch";
-      sha256 = "0bqa8vjwil7jn35a6984adcm24pvv3pjkhszv10qv6yr442d1mk9";
-    })
-  ];
-
-}
diff --git a/pkgs/development/python-modules/path/default.nix b/pkgs/development/python-modules/path/default.nix
new file mode 100644
index 00000000000..9e89231d9ce
--- /dev/null
+++ b/pkgs/development/python-modules/path/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchPypi
+
+# build time
+, setuptools-scm
+
+# tests
+, pytestCheckHook
+, appdirs
+, packaging
+}:
+
+buildPythonPackage rec {
+  pname = "path";
+  version = "16.4.0";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-uvLnV8Sxm+ggj55n5I+0dbSld9VhNZDORmk7298IL1I=";
+  };
+
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "path"
+  ];
+
+  meta = with lib; {
+    description = "Object-oriented file system path manipulation";
+    homepage = "https://github.com/jaraco/path";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/pkgs/development/python-modules/pdm-pep517/default.nix b/pkgs/development/python-modules/pdm-pep517/default.nix
index 5649e092634..f91df4f6e5e 100644
--- a/pkgs/development/python-modules/pdm-pep517/default.nix
+++ b/pkgs/development/python-modules/pdm-pep517/default.nix
@@ -8,13 +8,13 @@
 
 buildPythonPackage rec {
   pname = "pdm-pep517";
-  version = "0.11.2";
+  version = "0.12.3";
   format = "pyproject";
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-4AC6tDUCwZHXGAiiYw3UTs4wGjGdJuACocrqOnMHzSA=";
+    sha256 = "sha256-EXv7Fhm4a+s0/gCbjUGsrPeQ0fxSQMzBH2ytoVHUaIc=";
   };
 
   preCheck = ''
diff --git a/pkgs/development/python-modules/pep257/default.nix b/pkgs/development/python-modules/pep257/default.nix
deleted file mode 100644
index d6205fc6e72..00000000000
--- a/pkgs/development/python-modules/pep257/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook, mock }:
-
-buildPythonPackage rec {
-  pname = "pep257";
-  version = "6.1.1";
-
-  src = fetchFromGitHub {
-    owner = "GreenSteam";
-    repo = "pep257";
-    rev = version;
-    sha256 = "0hcf3nyvzl8kd6gmc9qsiigz7vpwrjxcd1bd50dd63cad87qqicg";
-  };
-
-  checkInputs = [ pytestCheckHook mock ];
-
-  meta = with lib; {
-    homepage = "https://github.com/GreenSteam/pep257/";
-    description = "Python docstring style checker";
-    longDescription = "Static analysis tool for checking compliance with Python PEP 257.";
-    license = licenses.mit;
-    maintainers = with maintainers; [ ];
-  };
-}
diff --git a/pkgs/development/python-modules/phik/default.nix b/pkgs/development/python-modules/phik/default.nix
index a7cb6e7e838..2919fb5c733 100644
--- a/pkgs/development/python-modules/phik/default.nix
+++ b/pkgs/development/python-modules/phik/default.nix
@@ -19,12 +19,12 @@
 
 buildPythonPackage rec {
   pname = "phik";
-  version = "0.12.0";
+  version = "0.12.2";
   disabled = !isPy3k;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "959fd40482246e3f643cdac5ea04135b2c11a487e917af7d4e75843f47183549";
+    sha256 = "sha256-sGdOuCnSMpBDP3GNI2ASK+gEsXDMyAetnZqNHBOYVTM=";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/phonemizer/default.nix b/pkgs/development/python-modules/phonemizer/default.nix
index 29f7266b691..88bb69e9952 100644
--- a/pkgs/development/python-modules/phonemizer/default.nix
+++ b/pkgs/development/python-modules/phonemizer/default.nix
@@ -12,11 +12,11 @@
 
 buildPythonApplication rec {
   pname = "phonemizer";
-  version = "3.0.1";
+  version = "3.1.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1b4ea53b8da9a156361dff1d0c04ac1a8e65e6966d1cb9a8147c200960b32296";
+    sha256 = "sha256-PWVK0NLVa0Rx1xyUyQF2/RvUo3/geskn53FcEv0Jr0c=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/pickleshare/default.nix b/pkgs/development/python-modules/pickleshare/default.nix
index 34798cc3ee5..381f03bdce5 100644
--- a/pkgs/development/python-modules/pickleshare/default.nix
+++ b/pkgs/development/python-modules/pickleshare/default.nix
@@ -1,7 +1,7 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, pathpy
+, path
 , pathlib2
 , pythonOlder
 }:
@@ -15,7 +15,7 @@ buildPythonPackage rec {
     sha256 = "87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca";
   };
 
-  propagatedBuildInputs = [ pathpy ]
+  propagatedBuildInputs = [ path ]
     ++ lib.optional (pythonOlder "3.4") pathlib2;
 
   # No proper test suite
diff --git a/pkgs/development/python-modules/pikepdf/default.nix b/pkgs/development/python-modules/pikepdf/default.nix
index bb8c2c385c2..d0671f93513 100644
--- a/pkgs/development/python-modules/pikepdf/default.nix
+++ b/pkgs/development/python-modules/pikepdf/default.nix
@@ -81,6 +81,10 @@ buildPythonPackage rec {
     setuptools
   ];
 
+  disabledTests = [
+    "test_image_palette" # https://github.com/pikepdf/pikepdf/issues/328
+  ];
+
   pythonImportsCheck = [ "pikepdf" ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/pillow/default.nix b/pkgs/development/python-modules/pillow/default.nix
index 8aa1ad1f4c4..47ed191c6d9 100644
--- a/pkgs/development/python-modules/pillow/default.nix
+++ b/pkgs/development/python-modules/pillow/default.nix
@@ -1,4 +1,9 @@
-{ lib, stdenv, buildPythonPackage, fetchPypi, isPyPy, isPy3k
+{ lib
+, stdenv
+, buildPythonPackage
+, pythonOlder
+, fetchPypi
+, isPyPy
 , defusedxml, olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
 , libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook
 # for passthru.tests
@@ -6,14 +11,15 @@
 }@args:
 
 import ./generic.nix (rec {
-  pname = "Pillow";
-  version = "9.0.1";
+  pname = "pillow";
+  version = "9.1.0";
 
-  disabled = !isPy3k;
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
-    inherit pname version;
-    sha256 = "bIvII4p9/a96dfXsWmY/QXP4w2flo5+H5yBJXh7tdfo=";
+    pname = "Pillow";
+    inherit version;
+    sha256 = "f401ed2bbb155e1ade150ccc63db1a4f6c1909d3d378f7d1235a44e90d75fb97";
   };
 
   passthru.tests = {
diff --git a/pkgs/development/python-modules/pip/default.nix b/pkgs/development/python-modules/pip/default.nix
index a4370fbaae5..239c91fb88a 100644
--- a/pkgs/development/python-modules/pip/default.nix
+++ b/pkgs/development/python-modules/pip/default.nix
@@ -14,14 +14,14 @@
 
 buildPythonPackage rec {
   pname = "pip";
-  version = "22.0.3";
+  version = "22.0.4";
   format = "other";
 
   src = fetchFromGitHub {
     owner = "pypa";
     repo = pname;
     rev = version;
-    sha256 = "sha256-Wu2QQfb0pehPLLa+za32C4jH1arkBKKc3jlAMRkDV5Q=";
+    sha256 = "sha256-gtDaopeFVpVFXpBtHDzBuZuXUrJciSSIppYXBx1anu4=";
     name = "${pname}-${version}-source";
   };
 
diff --git a/pkgs/development/python-modules/pleroma-bot/default.nix b/pkgs/development/python-modules/pleroma-bot/default.nix
index 1dca45eca76..ed586a4474b 100644
--- a/pkgs/development/python-modules/pleroma-bot/default.nix
+++ b/pkgs/development/python-modules/pleroma-bot/default.nix
@@ -4,30 +4,45 @@
 , pytestCheckHook
 , requests-mock
 , oauthlib
-, requests_oauthlib
+, requests-oauthlib
 , requests
 , pyaml
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "pleroma-bot";
   version = "0.8.6";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "robertoszek";
-    repo = "pleroma-bot";
+    repo = pname;
     rev = version;
-    sha256 = "1q0xhgqq41zbqiawpd4kbdx41zhwxxp5ipn1c2rc8d7pjyb5p75w";
+    hash = "sha256-vJxblpf3NMSyYMHeWG7vHP5AeluTtMtVxOsHgvGDHeA=";
   };
 
-  propagatedBuildInputs = [ pyaml requests requests_oauthlib oauthlib ];
-  checkInputs = [ pytestCheckHook requests-mock ];
+  propagatedBuildInputs = [
+    pyaml
+    requests
+    requests-oauthlib
+    oauthlib
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    requests-mock
+  ];
 
-  pythonImportsCheck = [ "pleroma_bot" ];
+  pythonImportsCheck = [
+    "pleroma_bot"
+  ];
 
   meta = with lib; {
-    homepage = "https://robertoszek.github.io/pleroma-bot/";
     description = "Bot for mirroring one or multiple Twitter accounts in Pleroma/Mastodon";
+    homepage = "https://robertoszek.github.io/pleroma-bot/";
     license = licenses.mit;
     maintainers = with maintainers; [ robertoszek ];
   };
diff --git a/pkgs/development/python-modules/prettytable/default.nix b/pkgs/development/python-modules/prettytable/default.nix
index 25d22c2c5a2..7c4afe4a728 100644
--- a/pkgs/development/python-modules/prettytable/default.nix
+++ b/pkgs/development/python-modules/prettytable/default.nix
@@ -10,11 +10,11 @@
 
 buildPythonPackage rec {
   pname = "prettytable";
-  version = "3.1.1";
+  version = "3.2.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-Q8niMnLKJT0Diudv463eiXlOkuf8qy3fW5SzhkLvTyE=";
+    sha256 = "sha256-rn2WxkEAVD3GFmK0CijzsDwPlKUD7RIcb8ongsWBb4E=";
   };
 
   nativeBuildInputs = [ setuptools-scm ];
diff --git a/pkgs/development/python-modules/prompt-toolkit/default.nix b/pkgs/development/python-modules/prompt-toolkit/default.nix
index 4ec9e381daf..be90726e189 100644
--- a/pkgs/development/python-modules/prompt-toolkit/default.nix
+++ b/pkgs/development/python-modules/prompt-toolkit/default.nix
@@ -3,6 +3,7 @@
 , fetchPypi
 , pytestCheckHook
 , pythonOlder
+, six
 , wcwidth
 }:
 
@@ -20,6 +21,7 @@ buildPythonPackage rec {
   };
 
   propagatedBuildInputs = [
+    six
     wcwidth
   ];
 
diff --git a/pkgs/development/python-modules/psautohint/default.nix b/pkgs/development/python-modules/psautohint/default.nix
index 3004d5f7a9b..b9fb5f3aa14 100644
--- a/pkgs/development/python-modules/psautohint/default.nix
+++ b/pkgs/development/python-modules/psautohint/default.nix
@@ -3,19 +3,20 @@
 , lxml, fs # for fonttools extras
 , setuptools-scm
 , pytestCheckHook, pytest-cov, pytest-xdist
+, runAllTests ? false, psautohint # for passthru.tests
 }:
 
 buildPythonPackage rec {
   pname = "psautohint";
-  version = "2.3.1";
+  version = "2.4.0";
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "adobe-type-tools";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1knh428af0lvzijvd72i30jcvx9n6ga0hai69kxg8386jdpmmvkg";
+    sha256 = "125nx7accvbk626qlfar90va1995kp9qfrz6a978q4kv2kk37xai";
     fetchSubmodules = true; # data dir for tests
   };
 
@@ -34,10 +35,7 @@ buildPythonPackage rec {
     pytest-cov
     pytest-xdist
   ];
-  disabledTests = [
-    # Test that fails on pytest >= v6
-    # https://github.com/adobe-type-tools/psautohint/issues/284#issuecomment-742800965
-    "test_hashmap_old_version"
+  disabledTests = lib.optionals (!runAllTests) [
     # Slow tests, reduces test time from ~5 mins to ~30s
     "test_mmufo"
     "test_flex_ufo"
@@ -48,6 +46,10 @@ buildPythonPackage rec {
     "test_otf"
   ];
 
+  passthru.tests = {
+    fullTestsuite = psautohint.override { runAllTests = true; };
+  };
+
   meta = with lib; {
     description = "Script to normalize the XML and other data inside of a UFO";
     homepage = "https://github.com/adobe-type-tools/psautohint";
diff --git a/pkgs/development/python-modules/purl/default.nix b/pkgs/development/python-modules/purl/default.nix
index aa85ea3965a..8c7b208df2f 100644
--- a/pkgs/development/python-modules/purl/default.nix
+++ b/pkgs/development/python-modules/purl/default.nix
@@ -1,4 +1,7 @@
-{ lib, buildPythonPackage, fetchFromGitHub
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, six
 , pytestCheckHook
 }:
 
@@ -13,7 +16,17 @@ buildPythonPackage rec {
     sha256 = "sha256-Jb3JRW/PtQ7NlO4eQ9DmTPu/sjvFTg2mztphoIF79gc=";
   };
 
-  checkInputs = [ pytestCheckHook];
+  propagatedBuildInputs = [
+    six
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "purl"
+  ];
 
   meta = with lib; {
     description = "Immutable URL class for easy URL-building and manipulation";
diff --git a/pkgs/development/python-modules/py-radix/default.nix b/pkgs/development/python-modules/py-radix/default.nix
index 18fff5ec97f..f4b064d41aa 100644
--- a/pkgs/development/python-modules/py-radix/default.nix
+++ b/pkgs/development/python-modules/py-radix/default.nix
@@ -1,5 +1,6 @@
 { lib
 , buildPythonPackage
+, pythonAtLeast
 , fetchFromGitHub
 , coverage
 , nose
@@ -9,6 +10,8 @@ buildPythonPackage rec {
   pname = "py-radix";
   version = "0.10.0";
 
+  disabled = pythonAtLeast "3.10"; # abandoned, remove when we move to py310/py311
+
   src = fetchFromGitHub {
     owner = "mjschultz";
     repo = "py-radix";
diff --git a/pkgs/development/python-modules/py4j/default.nix b/pkgs/development/python-modules/py4j/default.nix
index cf24d21e17f..cdf8a3c49c3 100644
--- a/pkgs/development/python-modules/py4j/default.nix
+++ b/pkgs/development/python-modules/py4j/default.nix
@@ -3,11 +3,11 @@
 buildPythonPackage rec {
   pname = "py4j";
 
-  version = "0.10.9.3";
+  version = "0.10.9.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0d92844da4cb747155b9563c44fc322c9a1562b3ef0979ae692dbde732d784dd";
+    sha256 = "sha256-J2pKPFohVN8YYO8zA6knRg4C6XsEfcCkfBw/uMzjTbY=";
   };
 
   # No tests in archive
diff --git a/pkgs/development/python-modules/pyasn1/default.nix b/pkgs/development/python-modules/pyasn1/default.nix
index a0037d64683..a3dbc7396b0 100644
--- a/pkgs/development/python-modules/pyasn1/default.nix
+++ b/pkgs/development/python-modules/pyasn1/default.nix
@@ -9,10 +9,12 @@ buildPythonPackage rec {
     sha256 = "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba";
   };
 
+  pythonImportsCheck = [ "pyasn1" ];
+
   meta = with lib; {
-    description = "ASN.1 tools for Python";
-    homepage = "http://pyasn1.sourceforge.net/";
-    license = "mBSD";
-    platforms = platforms.unix;  # arbitrary choice
+    description = "Generic ASN.1 library for Python";
+    homepage = "https://github.com/etingof/pyasn1";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/pyatmo/default.nix b/pkgs/development/python-modules/pyatmo/default.nix
index 5cd314b6cb9..9d75c2b01d8 100644
--- a/pkgs/development/python-modules/pyatmo/default.nix
+++ b/pkgs/development/python-modules/pyatmo/default.nix
@@ -9,7 +9,7 @@
 , pytestCheckHook
 , pythonOlder
 , requests
-, requests_oauthlib
+, requests-oauthlib
 , requests-mock
 , setuptools-scm
 }:
@@ -38,7 +38,7 @@ buildPythonPackage rec {
     aiohttp
     oauthlib
     requests
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/pybids/default.nix b/pkgs/development/python-modules/pybids/default.nix
index 3ad29916575..4640be0c436 100644
--- a/pkgs/development/python-modules/pybids/default.nix
+++ b/pkgs/development/python-modules/pybids/default.nix
@@ -14,12 +14,12 @@
 }:
 
 buildPythonPackage rec {
-  version = "0.14.0";
+  version = "0.15.0";
   pname = "pybids";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "73c4d03aad333f2a7cb4405abe96f55a33cffa4b5a2d23fad6ac5767c45562ef";
+    sha256 = "sha256-Eq+4x7h1uR5QHXfgCEZl+7usc9CBFQClvV36Yyrqbd0=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/pybotvac/default.nix b/pkgs/development/python-modules/pybotvac/default.nix
index dff1374087a..2feee74d319 100644
--- a/pkgs/development/python-modules/pybotvac/default.nix
+++ b/pkgs/development/python-modules/pybotvac/default.nix
@@ -2,29 +2,35 @@
 , buildPythonPackage
 , fetchPypi
 , requests
-, requests_oauthlib
+, requests-oauthlib
 , voluptuous
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "pybotvac";
   version = "0.0.23";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "54b4fe565c10000c54d5644d081e2de1f850daefbac39cea74cea649b47bfb12";
+    hash = "sha256-VLT+VlwQAAxU1WRNCB4t4fhQ2u+6w5zqdM6mSbR7+xI=";
   };
 
   propagatedBuildInputs = [
     requests
-    requests_oauthlib
+    requests-oauthlib
     voluptuous
   ];
 
   # no tests
   doCheck = false;
 
-  pythonImportsCheck = [ "pybotvac" ];
+  pythonImportsCheck = [
+    "pybotvac"
+  ];
 
   meta = with lib; {
     description = "Python module for interacting with Neato Botvac Connected vacuum robots";
diff --git a/pkgs/development/python-modules/pycountry/default.nix b/pkgs/development/python-modules/pycountry/default.nix
index 560c5a70812..3583826f69a 100644
--- a/pkgs/development/python-modules/pycountry/default.nix
+++ b/pkgs/development/python-modules/pycountry/default.nix
@@ -6,11 +6,11 @@
 
 buildPythonPackage rec {
   pname = "pycountry";
-  version = "22.1.10";
+  version = "22.3.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "b9a6d9cdbf53f81ccdf73f6f5de01b0d8493cab2213a230af3e34458de85ea32";
+    sha256 = "sha256-shY6JGxYWJTYCPGHg+GRN8twoMGPs2dI3AH8bxCcFkY=";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/pycurl/default.nix b/pkgs/development/python-modules/pycurl/default.nix
index 9d3319001d3..e7f3b87ad0c 100644
--- a/pkgs/development/python-modules/pycurl/default.nix
+++ b/pkgs/development/python-modules/pycurl/default.nix
@@ -50,16 +50,6 @@ buildPythonPackage rec {
   '';
 
   disabledTests = [
-    # libcurl stopped passing the reason phrase from the HTTP status line
-    # https://github.com/pycurl/pycurl/issues/679
-    "test_failonerror"
-    "test_failonerror_status_line_invalid_utf8_python3"
-    # bottle>=0.12.17 escapes utf8 properly, so these test don't work anymore
-    # https://github.com/pycurl/pycurl/issues/669
-    "test_getinfo_content_type_invalid_utf8_python3"
-    "test_getinfo_cookie_invalid_utf8_python3"
-    "test_getinfo_raw_content_type_invalid_utf8"
-    "test_getinfo_raw_cookie_invalid_utf8"
     # tests that require network access
     "test_keyfunction"
     "test_keyfunction_bogus_return"
diff --git a/pkgs/development/python-modules/pyfakefs/default.nix b/pkgs/development/python-modules/pyfakefs/default.nix
index 63bf4483911..c3c6513f331 100644
--- a/pkgs/development/python-modules/pyfakefs/default.nix
+++ b/pkgs/development/python-modules/pyfakefs/default.nix
@@ -7,13 +7,13 @@
 }:
 
 buildPythonPackage rec {
-  version = "4.5.5";
+  version = "4.5.6";
   pname = "pyfakefs";
   disabled = pythonOlder "3.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-iIIe2MJjJxu2alRBmoJZGqEH+yz9pC3I8hWOC+CIWQc=";
+    sha256 = "sha256-kU17+ZRAbPvv7gtNRZGPYMFbQGr+k/gZSoBNpaRQqCI=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/pygit2/default.nix b/pkgs/development/python-modules/pygit2/default.nix
index 47654ff34c6..2d4deb16276 100644
--- a/pkgs/development/python-modules/pygit2/default.nix
+++ b/pkgs/development/python-modules/pygit2/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "pygit2";
-  version = "1.9.0";
+  version = "1.9.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-xehYisrV4y+gWVWCVxBZ5rkOx8SHxYtOU8KADcveRMg=";
+    sha256 = "sha256-72R5w7YZKCUxawVjNtt36/9ueEmusfu4i3YAGsM3uck=";
   };
 
   preConfigure = lib.optionalString stdenv.isDarwin ''
diff --git a/pkgs/development/python-modules/pykerberos/default.nix b/pkgs/development/python-modules/pykerberos/default.nix
index fd4c0088b08..67246ffbb1a 100644
--- a/pkgs/development/python-modules/pykerberos/default.nix
+++ b/pkgs/development/python-modules/pykerberos/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "pykerberos";
-  version = "1.2.3.dev0";
+  version = "1.2.4";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "17zjiw6rqgfic32px86qls1i3z7anp15dgb3sprbdvywy98alryn";
+    sha256 = "sha256-nXAevY/FlsmdMVXVukWBO9WQjSbvg7oK3SUO22IqvtQ=";
   };
 
   nativeBuildInputs = [ krb5 ]; # for krb5-config
diff --git a/pkgs/development/python-modules/pylint/default.nix b/pkgs/development/python-modules/pylint/default.nix
index b52cb3e2f95..dda915bb7ef 100644
--- a/pkgs/development/python-modules/pylint/default.nix
+++ b/pkgs/development/python-modules/pylint/default.nix
@@ -2,30 +2,35 @@
 , lib
 , buildPythonPackage
 , fetchFromGitHub
+, pythonAtLeast
 , pythonOlder
 , installShellFiles
 , astroid
+, dill
 , isort
-, GitPython
 , mccabe
 , platformdirs
-, toml
+, tomli
+, typing-extensions
+, GitPython
 , pytest-benchmark
+, pytest-timeout
 , pytest-xdist
 , pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "pylint";
-  version = "2.12.2";
+  version = "2.13.5";
+  format = "setuptools";
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.6.2";
 
   src = fetchFromGitHub {
     owner = "PyCQA";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-seBYBTB+8PLIovqxVohkoQEfDAZI1fehLgXuHeTx9Wo=";
+    sha256 = "sha256-FB99vmUtoTc0cTjDUSbx80Tesh0vASigSpPktrDYk08=";
   };
 
   nativeBuildInputs = [
@@ -34,10 +39,14 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [
     astroid
+    dill
     isort
     mccabe
     platformdirs
-    toml
+  ] ++ lib.optionals (pythonOlder "3.11") [
+    tomli
+  ] ++ lib.optionals (pythonOlder "3.9") [
+    typing-extensions
   ];
 
   postInstall = ''
@@ -48,9 +57,12 @@ buildPythonPackage rec {
 
   checkInputs = [
     GitPython
+    # https://github.com/PyCQA/pylint/blob/main/requirements_test_min.txt
     pytest-benchmark
+    pytest-timeout
     pytest-xdist
     pytestCheckHook
+    typing-extensions
   ];
 
   dontUseSetuptoolsCheck = true;
@@ -61,10 +73,6 @@ buildPythonPackage rec {
     export HOME=$TEMPDIR
   '';
 
-  pytestFlagsArray = [
-    "-n auto"
-  ];
-
   disabledTestPaths = [
     # tests miss multiple input files
     # FileNotFoundError: [Errno 2] No such file or directory
diff --git a/pkgs/development/python-modules/pymc3/default.nix b/pkgs/development/python-modules/pymc3/default.nix
index 7c1e46647e3..54a12481e11 100644
--- a/pkgs/development/python-modules/pymc3/default.nix
+++ b/pkgs/development/python-modules/pymc3/default.nix
@@ -23,12 +23,12 @@
 
 buildPythonPackage rec {
   pname = "pymc3";
-  version = "3.11.4";
+  version = "3.11.5";
   disabled = pythonOlder "3.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "3b88d1e6c85f7fb8a9b99d6f136ac860672170370ec4146338fdd160c3b3fd3f";
+    sha256 = "sha256-M0HLvZYpCROLfV6+TtfP7in0Cy/nyt64iLOda7wXE4w=";
   };
 
   # No need for coverage stats in Nix builds
diff --git a/pkgs/development/python-modules/pymemcache/default.nix b/pkgs/development/python-modules/pymemcache/default.nix
index f2055ca9a79..81c05f4e97c 100644
--- a/pkgs/development/python-modules/pymemcache/default.nix
+++ b/pkgs/development/python-modules/pymemcache/default.nix
@@ -1,6 +1,7 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
+, six
 , future
 , mock
 , pytestCheckHook
@@ -9,6 +10,7 @@
 buildPythonPackage rec {
   pname = "pymemcache";
   version = "3.5.1";
+  format = "setuptools";
 
   src = fetchFromGitHub {
     owner = "pinterest";
@@ -17,6 +19,10 @@ buildPythonPackage rec {
     sha256 = "sha256-DKqfv5gf9gzbnEPQSzy2mAaVYJZL9jmTKyGWVzj40T4=";
   };
 
+  propagatedBuildInputs = [
+    six
+  ];
+
   checkInputs = [
     future
     mock
diff --git a/pkgs/development/python-modules/pymfy/default.nix b/pkgs/development/python-modules/pymfy/default.nix
index ab5b21e8881..e48966e9da0 100644
--- a/pkgs/development/python-modules/pymfy/default.nix
+++ b/pkgs/development/python-modules/pymfy/default.nix
@@ -6,13 +6,14 @@
 , pytestCheckHook
 , pythonOlder
 , requests
-, requests_oauthlib
+, requests-oauthlib
 }:
 
 buildPythonPackage rec {
   pname = "pymfy";
   version = "0.11.0";
   format = "pyproject";
+
   disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
@@ -22,11 +23,13 @@ buildPythonPackage rec {
     sha256 = "0wpjwjmywfyqgwvfa5kwcjpaljc32qa088kk88nl9nqdvc31mzhv";
   };
 
-  nativeBuildInputs = [ poetry-core ];
+  nativeBuildInputs = [
+    poetry-core
+  ];
 
   propagatedBuildInputs = [
     requests
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   checkInputs = [
@@ -34,7 +37,9 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
-  pythonImportsCheck = [ "pymfy" ];
+  pythonImportsCheck = [
+    "pymfy"
+  ];
 
   meta = with lib; {
     description = "Python client for the Somfy Open API";
diff --git a/pkgs/development/python-modules/pympler/default.nix b/pkgs/development/python-modules/pympler/default.nix
index 4f132ad2c82..6fc917981a7 100644
--- a/pkgs/development/python-modules/pympler/default.nix
+++ b/pkgs/development/python-modules/pympler/default.nix
@@ -1,6 +1,7 @@
 { lib, stdenv
 , buildPythonPackage
 , fetchPypi
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
@@ -12,9 +13,15 @@ buildPythonPackage rec {
     sha256 = "993f1a3599ca3f4fcd7160c7545ad06310c9e12f70174ae7ae8d4e25f6c5d3fa";
   };
 
-  postPatch = ''
-   rm test/asizeof/test_asizeof.py
-  '';
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  disabledTests = [
+    # 'AssertionError: 'function (test.muppy.test_summary.func)' != 'function (muppy.test_summary.func)'
+    # https://github.com/pympler/pympler/issues/134
+    "test_repr_function"
+  ];
 
   doCheck = stdenv.hostPlatform.isLinux;
 
diff --git a/pkgs/development/python-modules/pynello/default.nix b/pkgs/development/python-modules/pynello/default.nix
index 43852cbcd4c..a7a75d7c5dd 100644
--- a/pkgs/development/python-modules/pynello/default.nix
+++ b/pkgs/development/python-modules/pynello/default.nix
@@ -4,7 +4,7 @@
 , python-dateutil
 , pythonOlder
 , requests
-, requests_oauthlib
+, requests-oauthlib
 }:
 
 buildPythonPackage rec {
@@ -18,19 +18,21 @@ buildPythonPackage rec {
     owner = "pschmitt";
     repo = pname;
     rev = version;
-    sha256 = "015rlccsn2vff9if82rjj2fza3bjbmawqhamc22wq40gq7pbfk5i";
+    hash = "sha256-sUy37sEPEMyFYFVBzFVdcg31nZAyC+Ricm4LqxmjuQQ=";
   };
 
   propagatedBuildInputs = [
     python-dateutil
     requests
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   # Project has no tests
   doCheck = false;
 
-  pythonImportsCheck = [ "pynello" ];
+  pythonImportsCheck = [
+    "pynello"
+  ];
 
   meta = with lib; {
     description = "Python library for nello.io intercoms";
diff --git a/pkgs/development/python-modules/pyopenssl/default.nix b/pkgs/development/python-modules/pyopenssl/default.nix
index e4655082af9..d629d97637f 100644
--- a/pkgs/development/python-modules/pyopenssl/default.nix
+++ b/pkgs/development/python-modules/pyopenssl/default.nix
@@ -4,13 +4,9 @@
 , fetchPypi
 , openssl
 , cryptography
-, pyasn1
-, idna
 , pytestCheckHook
 , pretend
 , flaky
-, glibcLocales
-, six
 }:
 
 buildPythonPackage rec {
@@ -30,9 +26,9 @@ buildPythonPackage rec {
   doCheck = !stdenv.isDarwin;
 
   nativeBuildInputs = [ openssl ];
-  propagatedBuildInputs = [ cryptography pyasn1 idna six ];
+  propagatedBuildInputs = [ cryptography ];
 
-  checkInputs = [ pytestCheckHook pretend flaky glibcLocales ];
+  checkInputs = [ pytestCheckHook pretend flaky ];
 
   preCheck = ''
     export LANG="en_US.UTF-8"
diff --git a/pkgs/development/python-modules/pyparsing/default.nix b/pkgs/development/python-modules/pyparsing/default.nix
index 449c5334e66..fb5abc5c352 100644
--- a/pkgs/development/python-modules/pyparsing/default.nix
+++ b/pkgs/development/python-modules/pyparsing/default.nix
@@ -5,6 +5,7 @@
 # since this is a dependency of pytest, we need to avoid
 # circular dependencies
 , jinja2
+, pytestCheckHook
 , railroad-diagrams
 }:
 
@@ -24,12 +25,11 @@ let
     doCheck = false;
     checkInputs = [
       jinja2
+      pytestCheckHook
       railroad-diagrams
     ];
 
-    checkPhase = ''
-      python -m unittest
-    '';
+    pythonImportsCheck = [ "pyparsing" ];
 
     passthru.tests = {
       check = pyparsing.overridePythonAttrs (_: { doCheck = true; });
@@ -39,9 +39,7 @@ let
       homepage = "https://github.com/pyparsing/pyparsing";
       description = "An alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions";
       license = licenses.mit;
-      maintainers = with maintainers; [
-        kamadorueda
-      ];
+      maintainers = with maintainers; [ kamadorueda ];
     };
   };
 in
diff --git a/pkgs/development/python-modules/pyrad/default.nix b/pkgs/development/python-modules/pyrad/default.nix
index 67841cab7d9..c8fb0310548 100644
--- a/pkgs/development/python-modules/pyrad/default.nix
+++ b/pkgs/development/python-modules/pyrad/default.nix
@@ -1,8 +1,17 @@
-{ buildPythonPackage, fetchFromGitHub, lib, netaddr, six, nose }:
+{ buildPythonPackage
+, fetchFromGitHub
+, fetchpatch
+, lib
+, poetry-core
+, netaddr
+, six
+, python
+}:
 
 buildPythonPackage rec {
   pname = "pyrad";
   version = "2.4";
+  format = "pyproject";
 
   src = fetchFromGitHub {
     owner = "pyradius";
@@ -11,19 +20,43 @@ buildPythonPackage rec {
     sha256 = "sha256-oqgkE0xG/8cmLeRZdGoHkaHbjtByeJwzBJwEdxH8oNY=";
   };
 
-  propagatedBuildInputs = [ netaddr six ];
-  checkInputs = [ nose ];
+  patches = [
+    (fetchpatch {
+      # Migrate to poetry-core
+      url = "https://github.com/pyradius/pyrad/commit/a4b70067dd6269e14a2f9530d820390a8a454231.patch";
+      hash = "sha256-1We9wrVY3Or3GLIKK6hZvEjVYv6JOaahgP9zOMvgErE=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    netaddr
+    six
+  ];
+
+  preCheck = ''
+    substituteInPlace tests/testServer.py \
+      --replace "def testBind(self):" "def dontTestBind(self):" \
+      --replace "def testBindv6(self):" "def dontTestBindv6(self):"
+  '';
 
   checkPhase = ''
-    nosetests -e testBind
+    runHook preCheck
+    ${python.interpreter} -m unittest discover
+    runHook postCheck
   '';
 
-  pythonImportsCheck = [ "pyrad" ];
+  pythonImportsCheck = [
+    "pyrad"
+  ];
 
   meta = with lib; {
     description = "Python RADIUS Implementation";
-    homepage = "https://bitbucket.org/zzzeek/sqlsoup";
+    homepage = "https://github.com/pyradius/pyrad";
     license = licenses.bsd3;
-    maintainers = [ maintainers.globin ];
+    maintainers = with maintainers; [ globin ];
   };
 }
diff --git a/pkgs/development/python-modules/pyramid_jinja2/default.nix b/pkgs/development/python-modules/pyramid_jinja2/default.nix
index d1eaf49e6bc..455f4fb73b6 100644
--- a/pkgs/development/python-modules/pyramid_jinja2/default.nix
+++ b/pkgs/development/python-modules/pyramid_jinja2/default.nix
@@ -8,11 +8,11 @@
 
 buildPythonPackage rec {
   pname = "pyramid_jinja2";
-  version = "2.8";
+  version = "2.10";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "81e0615cb3108f2a251ff3141ad0d698a5d03685819f3a836ea84787e8489502";
+    sha256 = "sha256-8nEGnZ6ay6x622kSGQqEj2M49+V6+68+lSN/6DzI9NI=";
   };
 
   buildInputs = [ webtest ];
diff --git a/pkgs/development/python-modules/pyro-ppl/default.nix b/pkgs/development/python-modules/pyro-ppl/default.nix
index f810cf6f37b..d4837dd9fb1 100644
--- a/pkgs/development/python-modules/pyro-ppl/default.nix
+++ b/pkgs/development/python-modules/pyro-ppl/default.nix
@@ -2,12 +2,12 @@
 , graphviz, networkx, six, opt-einsum, tqdm, pyro-api }:
 
 buildPythonPackage rec {
-  version = "1.8.0";
+  version = "1.8.1";
   pname = "pyro-ppl";
 
   src = fetchPypi {
     inherit version pname;
-    sha256 = "68e4ea30f219227dd88e55de2550d3f8c20a20adbdb67ad1e13b50868bb2ac0c";
+    sha256 = "sha256-18BJ6y50haYStN2ZwkwwnMhgx8vGsZczhwNPVDbRyNY=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/pyslurm/default.nix b/pkgs/development/python-modules/pyslurm/default.nix
index f25651dcf98..248ccc41033 100644
--- a/pkgs/development/python-modules/pyslurm/default.nix
+++ b/pkgs/development/python-modules/pyslurm/default.nix
@@ -1,17 +1,27 @@
-{ lib, fetchFromGitHub, buildPythonPackage, cython, slurm }:
+{ lib
+, pythonOlder
+, fetchFromGitHub
+, buildPythonPackage
+, cython
+, slurm
+}:
 
 buildPythonPackage rec {
   pname = "pyslurm";
-  version = "19-05-0";
+  version = "21.08.4";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     repo = "pyslurm";
     owner = "PySlurm";
-    rev = version;
-    sha256 = "1lfb4q81y96syz5an1lzscfcvmfvlkf4cfl3i5zllw9r3gbarl2r";
+    rev = "v${version}";
+    hash = "sha256-9ZYTBO8g+5B9D8Ll5JjkJYFyh0RQNIjxg958UZoCNmA=";
   };
 
   buildInputs = [ cython slurm ];
+
   setupPyBuildFlags = [ "--slurm-lib=${slurm}/lib" "--slurm-inc=${slurm.dev}/include" ];
 
   # Test cases need /etc/slurm/slurm.conf and require a working slurm installation
@@ -23,6 +33,5 @@ buildPythonPackage rec {
     license = licenses.gpl2;
     maintainers = with maintainers; [ bhipple ];
     platforms = platforms.linux;
-    broken = true;  # still needs slurm-19.05, but nixpkgs has slurm-20+ now
   };
 }
diff --git a/pkgs/development/python-modules/pysmappee/default.nix b/pkgs/development/python-modules/pysmappee/default.nix
index c2322819ae4..ae9d5fa9830 100644
--- a/pkgs/development/python-modules/pysmappee/default.nix
+++ b/pkgs/development/python-modules/pysmappee/default.nix
@@ -1,25 +1,27 @@
 { lib
 , buildPythonPackage
-, fetchFromGitHub
 , cachetools
+, fetchFromGitHub
 , paho-mqtt
+, pythonOlder
 , pytz
 , requests
-, requests_oauthlib
+, requests-oauthlib
 , schedule
-, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "pysmappee";
   version = "0.2.29";
+  format = "setuptools";
+
   disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "smappee";
     repo = pname;
     rev = version;
-    sha256 = "sha256-Ffi55FZsZUKDcS4qV46NpRK3VP6axzrL2BO+hYW7J9E=";
+    hash = "sha256-Ffi55FZsZUKDcS4qV46NpRK3VP6axzrL2BO+hYW7J9E=";
   };
 
   propagatedBuildInputs = [
@@ -27,14 +29,16 @@ buildPythonPackage rec {
     paho-mqtt
     pytz
     requests
-    requests_oauthlib
+    requests-oauthlib
     schedule
   ];
 
   # Project has no tests
   doCheck = false;
 
-  pythonImportsCheck = [ "pysmappee" ];
+  pythonImportsCheck = [
+    "pysmappee"
+  ];
 
   meta = with lib; {
     description = "Python Library for the Smappee dev API";
diff --git a/pkgs/development/python-modules/pysnow/default.nix b/pkgs/development/python-modules/pysnow/default.nix
index 1c9fccb7068..5baa9e90321 100644
--- a/pkgs/development/python-modules/pysnow/default.nix
+++ b/pkgs/development/python-modules/pysnow/default.nix
@@ -1,56 +1,72 @@
 { lib
+, brotli
 , buildPythonPackage
 , fetchFromGitHub
-, poetry
-, brotli
-, ijson
-, nose
+, fetchpatch
 , httpretty
-, requests_oauthlib
+, ijson
+, poetry-core
 , python_magic
 , pytz
+, pytestCheckHook
+, requests-oauthlib
 }:
 
 buildPythonPackage rec {
   pname = "pysnow";
   version = "0.7.16";
+  format = "pyproject";
+
 
-  # tests not included in pypi tarball
   src = fetchFromGitHub {
     owner = "rbw";
     repo = pname;
     rev = version;
-    sha256 = "0dj90w742klfcjnx7yhp0nzki2mzafqzzr0rk2dp6vxn8h58z8ww";
+    hash = "sha256-nKOPCkS2b3ObmBnk/7FTv4o4vwUX+tOtZI5OQQ4HSTY=";
   };
-  format = "pyproject";
 
-  postPatch = ''
-    substituteInPlace pyproject.toml \
-      --replace 'ijson = "^2.5.1"' 'ijson = "*"' \
-      --replace 'pytz = "^2019.3"' 'pytz = "*"' \
-      --replace 'oauthlib = "^3.1.0"' 'oauthlib = "*"'
-  '';
+  nativeBuildInputs = [
+    poetry-core
+  ];
 
-  nativeBuildInputs = [ poetry ];
   propagatedBuildInputs = [
     brotli
     ijson
     python_magic
     pytz
-    requests_oauthlib
+    requests-oauthlib
+  ];
+
+  checkInputs = [
+    httpretty
+    pytestCheckHook
   ];
 
-  checkInputs = [ nose httpretty ];
-  checkPhase = ''
-    nosetests --cover-package=pysnow --with-coverage --cover-erase
+  patches = [
+    # Switch to peotry-core, https://github.com/rbw/pysnow/pull/183
+    (fetchpatch {
+      name = "switch-to-poetry-core.patch";
+      url = "https://github.com/rbw/pysnow/commit/f214a203432b329df5317f3a25b2c0d9b55a9029.patch";
+      sha256 = "sha256-ViRR+9WStlaQwyrLGk/tMOUAcEMY+kB61ZEKGMQJ30o=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace 'ijson = "^2.5.1"' 'ijson = "*"' \
+      --replace 'pytz = "^2019.3"' 'pytz = "*"' \
+      --replace 'oauthlib = "^3.1.0"' 'oauthlib = "*"'
   '';
-  pythonImportsCheck = [ "pysnow" ];
+
+  pythonImportsCheck = [
+    "pysnow"
+  ];
 
   meta = with lib; {
     description = "ServiceNow HTTP client library written in Python";
     homepage = "https://github.com/rbw/pysnow";
     license = licenses.mit;
-    maintainers = [ maintainers.almac ];
+    maintainers = with maintainers; [ almac ];
   };
 
 }
diff --git a/pkgs/development/python-modules/pyspark/default.nix b/pkgs/development/python-modules/pyspark/default.nix
index c424e3195e7..6acc5b3bf92 100644
--- a/pkgs/development/python-modules/pyspark/default.nix
+++ b/pkgs/development/python-modules/pyspark/default.nix
@@ -18,7 +18,7 @@ buildPythonPackage rec {
     sed -i "s/'pypandoc'//" setup.py
 
     substituteInPlace setup.py \
-      --replace py4j==0.10.9.2 'py4j>=0.10.9,<0.11'
+      --replace py4j==0.10.9.3 'py4j>=0.10.9,<0.11'
   '';
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/pytest-asyncio/default.nix b/pkgs/development/python-modules/pytest-asyncio/default.nix
index da60feb724f..8c368c50e32 100644
--- a/pkgs/development/python-modules/pytest-asyncio/default.nix
+++ b/pkgs/development/python-modules/pytest-asyncio/default.nix
@@ -11,7 +11,7 @@
 
 buildPythonPackage rec {
   pname = "pytest-asyncio";
-  version = "0.18.1";
+  version = "0.18.3";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
@@ -20,7 +20,7 @@ buildPythonPackage rec {
     owner = "pytest-dev";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-9KN45+Pdz40rJv1NUxuoy8xWtLGt7kz7YcqfjfZ9x4A=";
+    hash = "sha256-eopKlDKiTvGmqcqw44MKlhvSKswKZd/VDYRpZbuyOqM=";
   };
 
   SETUPTOOLS_SCM_PRETEND_VERSION = version;
@@ -29,17 +29,20 @@ buildPythonPackage rec {
     setuptools-scm
   ];
 
-  propagatedBuildInputs = [
+  buildInputs = [
     pytest
   ];
 
   checkInputs = [
     flaky
     hypothesis
-    flaky
     pytestCheckHook
   ];
 
+  disabledTestPaths = [
+    "tests/trio" # pytest-trio causes infinite recursion
+  ];
+
   pythonImportsCheck = [
     "pytest_asyncio"
   ];
@@ -47,6 +50,7 @@ buildPythonPackage rec {
   meta = with lib; {
     description = "Library for testing asyncio code with pytest";
     homepage = "https://github.com/pytest-dev/pytest-asyncio";
+    changelog = "https://github.com/pytest-dev/pytest-asyncio/blob/${src.rev}/CHANGELOG.rst";
     license = licenses.asl20;
     maintainers = with maintainers; [ dotlambda ];
   };
diff --git a/pkgs/development/python-modules/pytest-check/default.nix b/pkgs/development/python-modules/pytest-check/default.nix
index 3498b9f8ab9..c690e01778b 100644
--- a/pkgs/development/python-modules/pytest-check/default.nix
+++ b/pkgs/development/python-modules/pytest-check/default.nix
@@ -7,13 +7,13 @@
 
 buildPythonPackage rec {
   pname = "pytest-check";
-  version = "1.0.4";
+  version = "1.0.5";
   format = "flit";
 
   src = fetchPypi {
     pname = "pytest_check";
     inherit version;
-    sha256 = "c93eee5a98bcd28634a4ec657ab62c46d25fa384300811e5a925d9c4d98b9540";
+    sha256 = "sha256-ucjbax3uPB5mFivQebgcCDKWy3Ex6YQVGcKKQIGKSHU=";
   };
 
   buildInputs = [ pytest ];
diff --git a/pkgs/development/python-modules/pytest-httpbin/default.nix b/pkgs/development/python-modules/pytest-httpbin/default.nix
index 0069eb6f179..7dc70c49280 100644
--- a/pkgs/development/python-modules/pytest-httpbin/default.nix
+++ b/pkgs/development/python-modules/pytest-httpbin/default.nix
@@ -28,6 +28,12 @@ buildPythonPackage rec {
     six
   ];
 
+  preCheck = ''
+    # Remove assertion that doesn't hold for Flask 2.1.0
+    substituteInPlace tests/test_server.py \
+      --replace "assert response.headers['Location'].startswith('https://')" ""
+  '';
+
   checkInputs = [
     pytestCheckHook
     requests
diff --git a/pkgs/development/python-modules/pytest-metadata/default.nix b/pkgs/development/python-modules/pytest-metadata/default.nix
index 9f04cbe407d..057eb06ab3e 100644
--- a/pkgs/development/python-modules/pytest-metadata/default.nix
+++ b/pkgs/development/python-modules/pytest-metadata/default.nix
@@ -1,13 +1,20 @@
-{ lib, buildPythonPackage, fetchPypi
-, pytest, setuptools-scm }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytest
+, pythonOlder
+, setuptools-scm
+}:
 
 buildPythonPackage rec {
   pname = "pytest-metadata";
-  version = "1.11.0";
+  version = "2.0.1";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "71b506d49d34e539cc3cfdb7ce2c5f072bea5c953320002c95968e0238f8ecf1";
+    sha256 = "sha256-XNtq7qi6kQkYHPnxScijrhQw/35EUGqPhmr4qYykYwE=";
   };
 
   nativeBuildInputs = [ setuptools-scm ];
diff --git a/pkgs/development/python-modules/pytest-mock/default.nix b/pkgs/development/python-modules/pytest-mock/default.nix
index 94db409be91..837dec7c96d 100644
--- a/pkgs/development/python-modules/pytest-mock/default.nix
+++ b/pkgs/development/python-modules/pytest-mock/default.nix
@@ -1,5 +1,6 @@
 { lib
 , buildPythonPackage
+, fetchpatch
 , fetchPypi
 , pytest
 , pytest-asyncio
@@ -16,6 +17,14 @@ buildPythonPackage rec {
     hash = "sha256-URK9ksyfGG7pbhqS78hJaepJSTnDrq05xQ9CHEzGlTQ=";
   };
 
+  patches = [
+    (fetchpatch {
+      # pytest7 compatbilitya
+      url = "https://github.com/pytest-dev/pytest-mock/commit/0577f1ad051fb8d0da94ea22dcb02346d74064b2.patch";
+      hash = "sha256-eim4v7U8Mjigr462bXI0pKH/M0ANBzSRc0lT4RpbZ0w=";
+    })
+  ];
+
   nativeBuildInputs = [ setuptools-scm ];
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/pytest-pep257/default.nix b/pkgs/development/python-modules/pytest-pep257/default.nix
deleted file mode 100644
index 827386786b7..00000000000
--- a/pkgs/development/python-modules/pytest-pep257/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ lib, buildPythonPackage, fetchPypi, pytest, pep257 }:
-
-buildPythonPackage rec {
-  pname = "pytest-pep257";
-  version = "0.0.5";
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "082v3d5k4331x53za51kl8zxsndsw1pcyf1xdfpb2gjdjrhixb8w";
-  };
-
-  buildInputs = [ pytest ];
-  propagatedBuildInputs = [ pep257 ];
-
-  meta = with lib; {
-    homepage = "https://github.com/anderslime/pytest-pep257";
-    description = "py.test plugin for PEP257";
-    license = licenses.mit;
-  };
-}
diff --git a/pkgs/development/python-modules/pytest-shutil/default.nix b/pkgs/development/python-modules/pytest-shutil/default.nix
index e43a837d6aa..e3b2277fa99 100644
--- a/pkgs/development/python-modules/pytest-shutil/default.nix
+++ b/pkgs/development/python-modules/pytest-shutil/default.nix
@@ -1,6 +1,6 @@
 { lib, isPyPy, buildPythonPackage, fetchPypi
-, pytest, cmdline, pytest-cov, coverage, setuptools-git, mock, pathpy, execnet
-, contextlib2, termcolor }:
+, pytest, cmdline, pytest-cov, coverage, setuptools-git, mock, path, execnet
+, contextlib2, termcolor, six }:
 
 buildPythonPackage rec {
   pname = "pytest-shutil";
@@ -11,9 +11,14 @@ buildPythonPackage rec {
     sha256 = "0q8j0ayzmnvlraml6i977ybdq4xi096djhf30n2m1rvnvrhm45nq";
   };
 
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "path.py" "path"
+  '';
+
   buildInputs = [ pytest ];
   checkInputs = [ cmdline pytest ];
-  propagatedBuildInputs = [ pytest-cov coverage setuptools-git mock pathpy execnet contextlib2 termcolor ];
+  propagatedBuildInputs = [ pytest-cov coverage setuptools-git mock path execnet contextlib2 termcolor six ];
 
   checkPhase = ''
     py.test ${lib.optionalString isPyPy "-k'not (test_run or test_run_integration)'"}
diff --git a/pkgs/development/python-modules/pytest-testmon/default.nix b/pkgs/development/python-modules/pytest-testmon/default.nix
index 3a397001865..d40aeb9cf64 100644
--- a/pkgs/development/python-modules/pytest-testmon/default.nix
+++ b/pkgs/development/python-modules/pytest-testmon/default.nix
@@ -8,12 +8,12 @@
 
 buildPythonPackage rec {
   pname = "pytest-testmon";
-  version = "1.3.0";
+  version = "1.3.1";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-1Qyroq6Dv11EaCGRAj19bKQBfRz26XSh5TJY7xA/vBE=";
+    sha256 = "sha256-6gWWCtm/GHknhjLyRdVf42koeaSKzk5/V0173DELmj0=";
   };
 
   propagatedBuildInputs = [ coverage ];
diff --git a/pkgs/development/python-modules/pytest-xdist/default.nix b/pkgs/development/python-modules/pytest-xdist/default.nix
index fa1b0f63fab..b17b6f2f763 100644
--- a/pkgs/development/python-modules/pytest-xdist/default.nix
+++ b/pkgs/development/python-modules/pytest-xdist/default.nix
@@ -9,6 +9,7 @@
 , pytest
 , pytest-forked
 , psutil
+, pexpect
 }:
 
 buildPythonPackage rec {
@@ -25,9 +26,15 @@ buildPythonPackage rec {
   buildInputs = [
     pytest
   ];
-  checkInputs = [ pytestCheckHook filelock ];
+  checkInputs = [ pytestCheckHook filelock pexpect ];
   propagatedBuildInputs = [ execnet pytest-forked psutil ];
 
+  pytestFlagsArray = [
+    # pytest can already use xdist at this point
+    "--numprocesses=$NIX_BUILD_CORES"
+    "--forked"
+  ];
+
   # access file system
   disabledTests = [
     "test_distribution_rsyncdirs_example"
@@ -40,6 +47,8 @@ buildPythonPackage rec {
     "test_internal_errors_propagate_to_controller"
   ];
 
+  setupHook = ./setup-hook.sh;
+
   meta = with lib; {
     description = "Pytest xdist plugin for distributed testing and loop-on-failing modes";
     homepage = "https://github.com/pytest-dev/pytest-xdist";
diff --git a/pkgs/development/python-modules/pytest-xdist/setup-hook.sh b/pkgs/development/python-modules/pytest-xdist/setup-hook.sh
new file mode 100644
index 00000000000..5523a7f360f
--- /dev/null
+++ b/pkgs/development/python-modules/pytest-xdist/setup-hook.sh
@@ -0,0 +1,18 @@
+pytestXdistHook() {
+    pytestFlagsArray+=(
+        "--numprocesses=$NIX_BUILD_CORES"
+        "--forked"
+    )
+}
+
+# the flags should be added before pytestCheckHook runs so
+# until we have dependency mechanism in generic builder, we need to use this ugly hack.
+
+if [ -z "${dontUsePytestXdist-}" ] && [ -z "${dontUsePytestCheck-}" ]; then
+    if [[ " ${preDistPhases:-} " =~ " pytestCheckPhase " ]]; then
+        preDistPhases+=" "
+        preDistPhases="${preDistPhases/ pytestCheckPhase / pytestXdistHook pytestCheckPhase }"
+    else
+        preDistPhases+=" pytestXdistHook"
+    fi
+fi
diff --git a/pkgs/development/python-modules/pytest/default.nix b/pkgs/development/python-modules/pytest/default.nix
index 109e9182858..8c40c835feb 100644
--- a/pkgs/development/python-modules/pytest/default.nix
+++ b/pkgs/development/python-modules/pytest/default.nix
@@ -1,47 +1,48 @@
-{ lib, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, isPyPy
-, atomicwrites
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchPypi
+, isPyPy
+, writeText
+
+# build
+, setuptools-scm
+
+# propagates
 , attrs
-, hypothesis
 , iniconfig
-, more-itertools
 , packaging
-, pathlib2
 , pluggy
 , py
-, pygments
-, setuptools
-, setuptools-scm
-, six
 , tomli
-, wcwidth
-, writeText
+
+# tests
+, hypothesis
+, pygments
 }:
 
 buildPythonPackage rec {
   pname = "pytest";
-  version = "7.0.1";
-  disabled = !isPy3k;
+  version = "7.1.1";
+  format = "pyproject";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-4wkFoMEx09lLiWJKHMWv7D4LovvbFRhn2ODr1JhQ8XE=";
+    sha256 = "sha256-hBEyyu9rGtF6mv3kbcT2z6WaBflVWq5RUfc73yggymM=";
   };
 
-  nativeBuildInputs = [ setuptools-scm ];
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
 
   propagatedBuildInputs = [
-    atomicwrites
     attrs
     iniconfig
-    more-itertools
     packaging
     pluggy
     py
-    setuptools
-    six
     tomli
-    wcwidth
-  ] ++ lib.optionals (pythonOlder "3.6") [ pathlib2 ];
+  ];
 
   checkInputs = [
     hypothesis
@@ -50,17 +51,13 @@ buildPythonPackage rec {
 
   doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460
 
-  preCheck = ''
-    # don't test bash builtins
-    rm testing/test_argcomplete.py
-  '';
-
   # Ignored file https://github.com/pytest-dev/pytest/pull/5605#issuecomment-522243929
   # test_missing_required_plugins will emit deprecation warning which is treated as error
   checkPhase = ''
     runHook preCheck
     $out/bin/py.test -x testing/ \
       --ignore=testing/test_junitxml.py \
+      --ignore=testing/test_argcomplete.py \
       -k "not test_collect_pyargs_with_testpaths and not test_missing_required_plugins"
 
     # tests leave behind unreproducible pytest binaries in the output directory, remove:
@@ -86,7 +83,7 @@ buildPythonPackage rec {
     # - files are not needed after tests are finished
     pytestRemoveBytecodePhase () {
         # suffix is defined at:
-        #    https://github.com/pytest-dev/pytest/blob/7.0.1/src/_pytest/assertion/rewrite.py#L51-L53
+        #    https://github.com/pytest-dev/pytest/blob/7.1.1/src/_pytest/assertion/rewrite.py#L51-L53
         find $out -name "*-pytest-*.py[co]" -delete
     }
     preDistPhases+=" pytestRemoveBytecodePhase"
diff --git a/pkgs/development/python-modules/python-dotenv/default.nix b/pkgs/development/python-modules/python-dotenv/default.nix
index 774ca6855ae..d1b5d632b30 100644
--- a/pkgs/development/python-modules/python-dotenv/default.nix
+++ b/pkgs/development/python-modules/python-dotenv/default.nix
@@ -11,12 +11,12 @@
 
 buildPythonPackage rec {
   pname = "python-dotenv";
-  version = "0.19.2";
+  version = "0.20.0";
   disabled = pythonOlder "3.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "a5de49a31e953b45ff2d2fd434bbc2670e8db5273606c1e737cc6b93eff3655f";
+    sha256 = "sha256-t+OwSllpPELDb5qxzCrMRvpd+MeOF4/DOo1M0FyNSY8=";
   };
 
   propagatedBuildInputs = [ click ];
diff --git a/pkgs/development/python-modules/python-google-nest/default.nix b/pkgs/development/python-modules/python-google-nest/default.nix
index a1e612e1f74..3d086fa2684 100644
--- a/pkgs/development/python-modules/python-google-nest/default.nix
+++ b/pkgs/development/python-modules/python-google-nest/default.nix
@@ -2,7 +2,7 @@
 , buildPythonPackage
 , fetchPypi
 , pythonOlder
-, requests_oauthlib
+, requests-oauthlib
 }:
 
 buildPythonPackage rec {
@@ -14,11 +14,11 @@ buildPythonPackage rec {
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "y3BOhorVkJ3rFPifNOopLMqk6y1fHX5vxHGiqWvWHhE=";
+    hash = "sha256-y3BOhorVkJ3rFPifNOopLMqk6y1fHX5vxHGiqWvWHhE=";
   };
 
   propagatedBuildInputs = [
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   # Project has no tests
diff --git a/pkgs/development/python-modules/python-logstash/default.nix b/pkgs/development/python-modules/python-logstash/default.nix
index 55d3c60cd44..7930dcd33e0 100644
--- a/pkgs/development/python-modules/python-logstash/default.nix
+++ b/pkgs/development/python-modules/python-logstash/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "python-logstash";
-  version = "0.4.6";
+  version = "0.4.8";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "13763yx0k655y0c8gxv7jj6cqp45zypx2fmnc56jnn9zz1fkx50h";
+    sha256 = "sha256-0E4c4R7MEH5KTzuAf8V9loEelkpVQIGzu7RHMvdO9fk=";
   };
 
   # no tests
diff --git a/pkgs/development/python-modules/python-registry/default.nix b/pkgs/development/python-modules/python-registry/default.nix
index fbf8df7f322..8b24ca08ff8 100644
--- a/pkgs/development/python-modules/python-registry/default.nix
+++ b/pkgs/development/python-modules/python-registry/default.nix
@@ -4,6 +4,7 @@
 , fetchFromGitHub
 , pytestCheckHook
 , unicodecsv
+, six
 }:
 
 buildPythonPackage rec {
@@ -24,6 +25,7 @@ buildPythonPackage rec {
 
   checkInputs = [
     pytestCheckHook
+    six
   ];
 
   disabledTestPaths = [
diff --git a/pkgs/development/python-modules/python-twitter/default.nix b/pkgs/development/python-modules/python-twitter/default.nix
index f6814a8d0fd..79d262a8b02 100644
--- a/pkgs/development/python-modules/python-twitter/default.nix
+++ b/pkgs/development/python-modules/python-twitter/default.nix
@@ -2,20 +2,23 @@
 , buildPythonPackage
 , fetchFromGitHub
 , fetchpatch
-, pytest-runner
+, filetype
 , future
+, hypothesis
+, pytestCheckHook
+, pythonOlder
 , requests
+, requests-oauthlib
 , responses
-, requests_oauthlib
-, pytest
-, hypothesis
 }:
 
 buildPythonPackage rec {
   pname = "python-twitter";
   version = "3.5";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
-  # No tests in PyPi Tarball
   src = fetchFromGitHub {
     owner = "bear";
     repo = pname;
@@ -31,12 +34,30 @@ buildPythonPackage rec {
     })
   ];
 
-  nativeBuildInputs = [ pytest-runner ];
-  propagatedBuildInputs = [ future requests requests_oauthlib ];
-  checkInputs = [ pytest responses hypothesis ];
+  propagatedBuildInputs = [
+    filetype
+    future
+    requests
+    requests-oauthlib
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    responses
+    hypothesis
+  ];
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "'pytest-runner'" ""
+  '';
+
+  pythonImportsCheck = [
+    "twitter"
+  ];
 
   meta = with lib; {
-    description = "A Python wrapper around the Twitter API";
+    description = "Python wrapper around the Twitter API";
     homepage = "https://github.com/bear/python-twitter";
     license = licenses.asl20;
     maintainers = [ maintainers.marsam ];
diff --git a/pkgs/development/python-modules/python-vagrant/default.nix b/pkgs/development/python-modules/python-vagrant/default.nix
index 92ba757667d..694df9918e1 100644
--- a/pkgs/development/python-modules/python-vagrant/default.nix
+++ b/pkgs/development/python-modules/python-vagrant/default.nix
@@ -1,12 +1,12 @@
 { lib, buildPythonPackage, fetchPypi }:
 
 buildPythonPackage rec {
-  version = "0.5.15";
+  version = "1.0.0";
   pname = "python-vagrant";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1ikrh6canhcxg5y7pzmkcnnydikppv7s6sm9prfx90nk0ac8m6mg";
+    sha256 = "sha256-qP6TzPL/N+zJXsL0nqdKkabOc6TbShapjdJtOXz9CeU=";
   };
 
   # The tests try to connect to qemu
diff --git a/pkgs/development/python-modules/python3-saml/default.nix b/pkgs/development/python-modules/python3-saml/default.nix
index 8bc9cf3090f..dca35089f45 100644
--- a/pkgs/development/python-modules/python3-saml/default.nix
+++ b/pkgs/development/python-modules/python3-saml/default.nix
@@ -13,6 +13,11 @@ buildPythonPackage rec {
     sha256 = "sha256-TAfVXh1fSKhNn/lsi7elq4wFyKCxCtCYUTrnH3ytBTw=";
   };
 
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "lxml<4.7.1" "lxml<5"
+  '';
+
   propagatedBuildInputs = [
     isodate lxml xmlsec
   ];
diff --git a/pkgs/development/python-modules/pytools/default.nix b/pkgs/development/python-modules/pytools/default.nix
index f4710872cbe..2ee74e64b06 100644
--- a/pkgs/development/python-modules/pytools/default.nix
+++ b/pkgs/development/python-modules/pytools/default.nix
@@ -10,12 +10,12 @@
 
 buildPythonPackage rec {
   pname = "pytools";
-  version = "2022.1";
+  version = "2022.1.2";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-GXqs9uH11gxxW5JDh5Kst3Aq7Vnrv7FH+oTtp4DlT+4=";
+    sha256 = "sha256-XoJBAYgKJGNUdWNliAplu0FvaoyrZRO2j8u0j7oJD8s=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/pytorch/bin.nix b/pkgs/development/python-modules/pytorch/bin.nix
index 24533a08e47..daa82bba580 100644
--- a/pkgs/development/python-modules/pytorch/bin.nix
+++ b/pkgs/development/python-modules/pytorch/bin.nix
@@ -76,6 +76,7 @@ in buildPythonPackage {
     # https://www.intel.com/content/www/us/en/developer/articles/license/onemkl-license-faq.html
     license = licenses.bsd3;
     platforms = platforms.linux ++ platforms.darwin;
+    hydraPlatforms = []; # output size 3.2G on 1.11.0
     maintainers = with maintainers; [ junjihashimoto ];
   };
 }
diff --git a/pkgs/development/python-modules/pytz/default.nix b/pkgs/development/python-modules/pytz/default.nix
index f7f406e487c..27b18845804 100644
--- a/pkgs/development/python-modules/pytz/default.nix
+++ b/pkgs/development/python-modules/pytz/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "pytz";
-  version = "2021.3";
+  version = "2022.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326";
+    sha256 = "sha256-HnYOL+aoFjvAs9mhnE+ENCr6Cir/6/qoSwG5eKAuyqc=";
   };
 
   checkPhase = ''
diff --git a/pkgs/development/python-modules/pyvicare/default.nix b/pkgs/development/python-modules/pyvicare/default.nix
index bd3daf7bfb0..379481953ee 100644
--- a/pkgs/development/python-modules/pyvicare/default.nix
+++ b/pkgs/development/python-modules/pyvicare/default.nix
@@ -1,11 +1,11 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
-, pythonOlder
-, requests_oauthlib
-, simplejson
 , pkce
 , pytestCheckHook
+, pythonOlder
+, requests-oauthlib
+, simplejson
 }:
 
 buildPythonPackage rec {
@@ -25,7 +25,7 @@ buildPythonPackage rec {
   SETUPTOOLS_SCM_PRETEND_VERSION = version;
 
   propagatedBuildInputs = [
-    requests_oauthlib
+    requests-oauthlib
     simplejson
     pkce
   ];
diff --git a/pkgs/development/python-modules/pywavelets/default.nix b/pkgs/development/python-modules/pywavelets/default.nix
index cbd7681c63f..a85a59ff4ab 100644
--- a/pkgs/development/python-modules/pywavelets/default.nix
+++ b/pkgs/development/python-modules/pywavelets/default.nix
@@ -10,12 +10,12 @@
 
 buildPythonPackage rec {
   pname = "PyWavelets";
-  version = "1.2.0";
+  version = "1.3.0";
   disabled = isPy27;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "6cbd69b047bb4e00873097472133425f5f08a4e6bc8b3f0ae709274d4d5e9a8d";
+    sha256 = "sha256-y6qdYgUtna+Np2X8jnwww46iuOnhwYhBkT37SuxnHuU=";
   };
 
   checkInputs = [ nose pytest ];
diff --git a/pkgs/development/python-modules/qtconsole/default.nix b/pkgs/development/python-modules/qtconsole/default.nix
index 4cf9bd022da..f9eecbe23a8 100644
--- a/pkgs/development/python-modules/qtconsole/default.nix
+++ b/pkgs/development/python-modules/qtconsole/default.nix
@@ -15,11 +15,11 @@
 
 buildPythonPackage rec {
   pname = "qtconsole";
-  version = "5.2.2";
+  version = "5.3.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "8f9db97b27782184efd0a0f2d57ea3bd852d053747a2e442a9011329c082976d";
+    sha256 = "sha256-jjUg/cdeRqvEzGz/7KFvomUnVBCbiug5+ijifR66ViU=";
   };
 
   checkInputs = [ nose ] ++ lib.optionals isPy27 [mock];
diff --git a/pkgs/development/python-modules/rapidfuzz-capi/default.nix b/pkgs/development/python-modules/rapidfuzz-capi/default.nix
new file mode 100644
index 00000000000..b0235f1eda4
--- /dev/null
+++ b/pkgs/development/python-modules/rapidfuzz-capi/default.nix
@@ -0,0 +1,28 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+}:
+
+buildPythonPackage rec {
+  pname = "rapidfuzz-capi";
+  version = "1.0.5";
+
+  src = fetchFromGitHub {
+    owner = "maxbachmann";
+    repo = "rapidfuzz_capi";
+    rev = "v${version}";
+    hash = "sha256-0IvJl2JU/k1WbGPWRoucVGbVsEFNPHZT1ozEQAKQnPk=";
+  };
+
+  # upstream has no tests
+  doCheck = false;
+
+  pythonImportsCheck = [ "rapidfuzz_capi" ];
+
+  meta = with lib; {
+    description = "C-API of RapidFuzz, which can be used to extend RapidFuzz from separate packages";
+    homepage = "https://github.com/maxbachmann/rapidfuzz_capi";
+    license = licenses.mit;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/pkgs/development/python-modules/rapidfuzz/default.nix b/pkgs/development/python-modules/rapidfuzz/default.nix
index 19ee86e93ab..0ce27eccd0e 100644
--- a/pkgs/development/python-modules/rapidfuzz/default.nix
+++ b/pkgs/development/python-modules/rapidfuzz/default.nix
@@ -2,39 +2,55 @@
 , buildPythonPackage
 , pythonOlder
 , fetchFromGitHub
-, pytestCheckHook
+, cmake
+, cython_3
+, rapidfuzz-capi
+, scikit-build
+, jarowinkler
+, numpy
 , hypothesis
 , pandas
-, numpy
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "rapidfuzz";
-  version = "1.9.1";
+  version = "2.0.8";
 
-  disabled = pythonOlder "3.5";
+  disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     owner = "maxbachmann";
     repo = "RapidFuzz";
     rev = "v${version}";
     fetchSubmodules = true;
-    sha256 = "sha256-aZqsQHrxmPqZARkqR1hWaj7XndOlCJjmWk1Cosx4skA=";
+    hash = "sha256-LA4UpP3jFcVZTYKuq8aBvfGgEhyOLeCUsUXEgSnwb94=";
   };
 
+  nativeBuildInputs = [
+    cmake
+    cython_3
+    rapidfuzz-capi
+    scikit-build
+  ];
+
+  dontUseCmakeConfigure = true;
+
   propagatedBuildInputs = [
+    jarowinkler
     numpy
   ];
 
   checkInputs = [
-    pytestCheckHook
     hypothesis
     pandas
+    pytestCheckHook
   ];
 
-  disabledTests = [
-    "test_levenshtein_block" # hypothesis data generation too slow
-  ];
+  preCheck = ''
+    # import from $out
+    rm -r rapidfuzz
+  '';
 
   pythonImportsCheck = [
     "rapidfuzz.fuzz"
diff --git a/pkgs/development/python-modules/readthedocs-sphinx-ext/default.nix b/pkgs/development/python-modules/readthedocs-sphinx-ext/default.nix
index 74f1c05a201..b71a675f6d8 100644
--- a/pkgs/development/python-modules/readthedocs-sphinx-ext/default.nix
+++ b/pkgs/development/python-modules/readthedocs-sphinx-ext/default.nix
@@ -9,11 +9,11 @@
 
 buildPythonPackage rec {
   pname = "readthedocs-sphinx-ext";
-  version = "2.1.4";
+  version = "2.1.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "2ba023376057c6ba5d07b4fd016ec1d526f1b4fc5ad7a7ce7f0ed8a91dc54bbe";
+    sha256 = "sha256-G/QuIOW3qUOJGnmM5cy5H9W6wiMLDBmdhTgMkhAHa3g=";
   };
 
   propagatedBuildInputs = [ requests ];
diff --git a/pkgs/development/python-modules/redis/default.nix b/pkgs/development/python-modules/redis/default.nix
index 7cd59a5528a..b38975c9c6d 100644
--- a/pkgs/development/python-modules/redis/default.nix
+++ b/pkgs/development/python-modules/redis/default.nix
@@ -4,36 +4,53 @@
 , pythonOlder
 
 # propagates
-, cryptography
+, async-timeout
 , deprecated
-, hiredis
 , importlib-metadata
 , packaging
+, typing-extensions
+
+# extras: hiredis
+, hiredis
+
+# extras: ocsp
+, cryptography
+, pyopenssl
 , requests
 }:
 
 buildPythonPackage rec {
   pname = "redis";
-  version = "4.1.4";
+  version = "4.2.1";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-HZoM34n92T+EJhcz4k9Vp7vUE6myGf2vVuPnKMqaIwY=";
+    sha256 = "sha256-/kVROIEinb7mEGILnggXsfSMR7pjWHAyD9RKcSIEu90=";
   };
 
   propagatedBuildInputs = [
-    cryptography
+    async-timeout
     deprecated
-    hiredis
     packaging
-    requests
+    typing-extensions
   ] ++ lib.optionals (pythonOlder "3.8") [
     importlib-metadata
   ];
 
+  passthru.extras-require = {
+    hidredis = [
+      hiredis
+    ];
+    ocsp = [
+      cryptography
+      pyopenssl
+      requests
+    ];
+  };
+
   pythonImportsCheck = [
     "redis"
     "redis.client"
diff --git a/pkgs/development/python-modules/reedsolo/default.nix b/pkgs/development/python-modules/reedsolo/default.nix
index d9dd54e29f4..44e2c3b9b44 100644
--- a/pkgs/development/python-modules/reedsolo/default.nix
+++ b/pkgs/development/python-modules/reedsolo/default.nix
@@ -1,4 +1,10 @@
-{ lib, buildPythonPackage, fetchFromGitHub, cython, nose }:
+{ lib
+, buildPythonPackage
+, fetchpatch
+, fetchFromGitHub
+, cython
+, nose
+}:
 
 buildPythonPackage rec {
   pname = "reedsolo";
@@ -8,11 +14,18 @@ buildPythonPackage rec {
   src = fetchFromGitHub {
     owner = "tomerfiliba";
     repo = "reedsolomon";
-    # https://github.com/tomerfiliba/reedsolomon/issues/28
-    rev = "73926cdf81b39009bd6e46c8d49f3bbc0eaad4e4";
-    sha256 = "03wrr0c32dsl7h9k794b8fwnyzklvmxgriy49mjvvd3val829cc1";
+    rev = "v${version}";
+    hash = "sha256-GUMdL5HclXxqMYasq9kUE7fCqOkjr1D20wjd/E+xPBk=";
   };
 
+  patches = [
+    (fetchpatch {
+      # python3.10 compat; https://github.com/tomerfiliba/reedsolomon/pull/38
+      url = "https://github.com/tomerfiliba/reedsolomon/commit/63e5bd9fc3ca503990c212eb2c77c10589e6d6c3.patch";
+      hash = "sha256-47g+jUsJEAyqGnlzRA1oSyc2XFPUOfH0EW+vcOJzsxI=";
+    })
+  ];
+
   nativeBuildInputs = [ cython ];
 
   checkInputs = [ nose ];
diff --git a/pkgs/development/python-modules/reportlab/default.nix b/pkgs/development/python-modules/reportlab/default.nix
index 629f8d0ec75..35289d3b5d4 100644
--- a/pkgs/development/python-modules/reportlab/default.nix
+++ b/pkgs/development/python-modules/reportlab/default.nix
@@ -1,4 +1,5 @@
-{ buildPythonPackage
+{ lib
+, buildPythonPackage
 , fetchPypi
 , freetype
 , pillow
@@ -11,11 +12,11 @@ let
   ft = freetype.overrideAttrs (oldArgs: { dontDisableStatic = true; });
 in buildPythonPackage rec {
   pname = "reportlab";
-  version = "3.6.8";
+  version = "3.6.9";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-3HZX/LC8PkhcPIaaRN3bUtcRNWoBpFZmS3vvgnIiyYI=";
+    sha256 = "sha256-XQzDaCRWrSExUPbb/+fUfqtzfYCeUXwxYQM3a+VI+4Q=";
   };
 
   checkInputs = [ glibcLocales ];
@@ -23,6 +24,9 @@ in buildPythonPackage rec {
   buildInputs = [ ft pillow ];
 
   postPatch = ''
+    substituteInPlace setup.py \
+      --replace "mif = findFile(d,'ft2build.h')" "mif = findFile('${lib.getDev ft}','ft2build.h')"
+
     # Remove all the test files that require access to the internet to pass.
     rm tests/test_lib_utils.py
     rm tests/test_platypus_general.py
diff --git a/pkgs/development/python-modules/requests/default.nix b/pkgs/development/python-modules/requests/default.nix
index 86b2c2ffc39..0e823536f54 100644
--- a/pkgs/development/python-modules/requests/default.nix
+++ b/pkgs/development/python-modules/requests/default.nix
@@ -30,21 +30,15 @@ buildPythonPackage rec {
     ./0001-Prefer-NixOS-Nix-default-CA-bundles-over-certifi.patch
   ];
 
-  postPatch = ''
-    # Use latest idna
-    substituteInPlace setup.py \
-      --replace ",<3" ""
-  '';
-
   propagatedBuildInputs = [
     certifi
     idna
     urllib3
     chardet
-  ] ++ lib.optionals (isPy3k) [
+  ] ++ lib.optionals isPy3k [
     brotlicffi
     charset-normalizer
-  ] ++ lib.optionals (isPy27) [
+  ] ++ lib.optionals isPy27 [
     brotli
   ];
 
diff --git a/pkgs/development/python-modules/responses/default.nix b/pkgs/development/python-modules/responses/default.nix
index 95861bda181..7f9372dcdb7 100644
--- a/pkgs/development/python-modules/responses/default.nix
+++ b/pkgs/development/python-modules/responses/default.nix
@@ -1,6 +1,6 @@
 { lib
 , buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
 , pytest-localserver
 , pytestCheckHook
 , pythonOlder
@@ -10,14 +10,16 @@
 
 buildPythonPackage rec {
   pname = "responses";
-  version = "0.18.0";
+  version = "0.20.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-OAytTBwdyULl6KjqrgtNTt9wj08BDbi3vPr60fzSVP8=";
+  src = fetchFromGitHub {
+    owner = "getsentry";
+    repo = pname;
+    rev = version;
+    hash = "sha256-dhIKMQXBJfZGIanJN1bFmlr/FYL1UYgYKGYaSznKhZs=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/rich/default.nix b/pkgs/development/python-modules/rich/default.nix
index 3e7055d274e..addc12b3637 100644
--- a/pkgs/development/python-modules/rich/default.nix
+++ b/pkgs/development/python-modules/rich/default.nix
@@ -3,7 +3,6 @@
 , fetchFromGitHub
 , pythonOlder
 , CommonMark
-, colorama
 , dataclasses
 , poetry-core
 , pygments
@@ -13,7 +12,7 @@
 
 buildPythonPackage rec {
   pname = "rich";
-  version = "11.2.0";
+  version = "12.2.0";
   format = "pyproject";
   disabled = pythonOlder "3.6";
 
@@ -21,18 +20,18 @@ buildPythonPackage rec {
     owner = "Textualize";
     repo = pname;
     rev = "v${version}";
-    sha256 = "19k8c8jnqj1v0ji8kkx3r2ny6wlpwy58ir7lyrh2qyjvzkw08i58";
+    sha256 = "02zypmnc9sijlipki0riywh82piamd3hlrl5xbg2bxlldnlnwx1d";
   };
 
   nativeBuildInputs = [ poetry-core ];
 
   propagatedBuildInputs = [
     CommonMark
-    colorama
     pygments
-    typing-extensions
   ] ++ lib.optional (pythonOlder "3.7") [
     dataclasses
+  ] ++ lib.optional (pythonOlder "3.9") [
+    typing-extensions
   ];
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/ring-doorbell/default.nix b/pkgs/development/python-modules/ring-doorbell/default.nix
index 968182f8535..bffa6fed7d1 100644
--- a/pkgs/development/python-modules/ring-doorbell/default.nix
+++ b/pkgs/development/python-modules/ring-doorbell/default.nix
@@ -1,31 +1,33 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, isPy3k
 , oauthlib
 , pytestCheckHook
+, pythonOlder
 , pytz
 , requests
 , requests-mock
-, requests_oauthlib
+, requests-oauthlib
 }:
 
 buildPythonPackage rec {
   pname = "ring-doorbell";
   version = "0.7.2";
-  disabled = !isPy3k;
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     pname = "ring_doorbell";
     inherit version;
-    sha256 = "0a7e82abf27086843eb39c0279f5dfccea6751ff848560e67154ca6fbfa4ef2b";
+    hash = "sha256-Cn6Cq/JwhoQ+s5wCefXfzOpnUf+EhWDmcVTKb7+k7ys=";
   };
 
   propagatedBuildInputs = [
     oauthlib
     pytz
     requests
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   checkInputs = [
@@ -33,11 +35,13 @@ buildPythonPackage rec {
     requests-mock
   ];
 
-  pythonImportsCheck = [ "ring_doorbell" ];
+  pythonImportsCheck = [
+    "ring_doorbell"
+  ];
 
   meta = with lib; {
+    description = "Python library to communicate with Ring Door Bell";
     homepage = "https://github.com/tchellomello/python-ring-doorbell";
-    description = "A Python library to communicate with Ring Door Bell (https://ring.com/)";
     license = licenses.lgpl3Plus;
     maintainers = with maintainers; [ graham33 ];
   };
diff --git a/pkgs/development/python-modules/robotframework-tools/default.nix b/pkgs/development/python-modules/robotframework-tools/default.nix
index 77a7fe13df9..2c2fe3945b0 100644
--- a/pkgs/development/python-modules/robotframework-tools/default.nix
+++ b/pkgs/development/python-modules/robotframework-tools/default.nix
@@ -3,7 +3,7 @@
 , fetchPypi
 , robotframework
 , moretools
-, pathpy
+, path
 , six
 , zetup
 , modeled
@@ -24,7 +24,7 @@ buildPythonPackage rec {
   propagatedBuildInputs = [
     robotframework
     moretools
-    pathpy
+    path
     six
     modeled
   ];
diff --git a/pkgs/development/python-modules/sagemaker/default.nix b/pkgs/development/python-modules/sagemaker/default.nix
index d18d939be60..dff960429fb 100644
--- a/pkgs/development/python-modules/sagemaker/default.nix
+++ b/pkgs/development/python-modules/sagemaker/default.nix
@@ -17,14 +17,14 @@
 
 buildPythonPackage rec {
   pname = "sagemaker";
-  version = "2.77.1";
+  version = "2.82.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-RX3QcjGDWYaPC9lKz/nJSMTO3jeXxY7MW98fHYfcLq0=";
+    sha256 = "sha256-cQe4b5XpmaC9ZTanI9LKNTLw1HycxqaDCOuLfw/vBRY=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix
index 460927719ad..91d8c564315 100644
--- a/pkgs/development/python-modules/sanic/default.nix
+++ b/pkgs/development/python-modules/sanic/default.nix
@@ -123,6 +123,8 @@ buildPythonPackage rec {
     "test_version"
     # Sensitive comparison of raw HTTP header fails
     "test_raw_headers"
+    # noisy_exceptions sometimes missing from sanic stdout
+    "test_noisy_exceptions"
   ];
 
   disabledTestPaths = [
diff --git a/pkgs/development/python-modules/scikit-build/default.nix b/pkgs/development/python-modules/scikit-build/default.nix
index 3fefba47cbd..17b2ac35567 100644
--- a/pkgs/development/python-modules/scikit-build/default.nix
+++ b/pkgs/development/python-modules/scikit-build/default.nix
@@ -1,22 +1,21 @@
 { lib
 , buildPythonPackage
 , fetchPypi
+, fetchpatch
 , distro
 , packaging
+, python
 , setuptools
+, setuptools-scm
 , wheel
-# Test Inputs
+  # Test Inputs
 , cmake
-, codecov
-, coverage
 , cython
 , flake8
 , ninja
-, pathpy
-, pytest
-, pytest-cov
+, path
+, pytestCheckHook
 , pytest-mock
-, pytest-runner
 , pytest-virtualenv
 , requests
 , six
@@ -25,31 +24,36 @@
 
 buildPythonPackage rec {
   pname = "scikit-build";
-  version = "0.13.1";
+  version = "0.14.1";
+  format = "pyproject";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-XRd0ousVmI4IHFgsJUq0qXUgluajTyNUEct5vWFmDDc=";
+    sha256 = "sha256-Fwc9g3tWVRvt6Pa++utOuj2UM15ZAjmELjZg8HY6CRo=";
   };
 
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/scikit-build/scikit-build/commit/59cf7a5b09a71d418947db3c9d487471c4573a24.patch";
+      sha256 = "sha256-oQllX3qzwWwllczXUMObrwndCfvMdS5FulEhbBORAks=";
+    })
+  ];
+
   propagatedBuildInputs = [
     distro
     packaging
     setuptools
+    setuptools-scm
     wheel
   ];
+
   checkInputs = [
     cmake
-    codecov
-    coverage
     cython
-    flake8
     ninja
-    pathpy
-    pytest
-    pytest-cov
+    path
+    pytestCheckHook
     pytest-mock
-    pytest-runner
     pytest-virtualenv
     requests
     six
@@ -58,7 +62,7 @@ buildPythonPackage rec {
 
   dontUseCmakeConfigure = true;
 
-  disabledTests = lib.concatMapStringsSep " and " (s: "not " + s) ([
+  disabledTests = [
     "test_hello_develop" # tries setuptools develop install
     "test_source_distribution" # pip has no way to install missing dependencies
     "test_wheel" # pip has no way to install missing dependencies
@@ -68,15 +72,21 @@ buildPythonPackage rec {
     "test_setup" # tries to install using distutils
     "test_pep518" # pip exits with code 1
     "test_dual_pep518" # pip exits with code 1
-  ]);
-
-  checkPhase = ''
-    py.test -k '${disabledTests}'
-  '';
+    "test_isolated_env_trigger_reconfigure" # Regex pattern 'exit skbuild saving cmake spec' does not match 'exit skbuild running make'.
+    "test_hello_wheel" # [Errno 2] No such file or directory: '_skbuild/linux-x86_64-3.9/setuptools/bdist.linux-x86_64/wheel/helloModule.py'
+    # sdist contents differ, contains additional setup.py
+    "test_hello_sdist"
+    "test_manifest_in_sdist"
+    "test_sdist_with_symlinks"
+    # distutils.errors.DistutilsArgError: no commands supplied
+    "test_invalid_command"
+    "test_manifest_in_sdist"
+    "test_no_command"
+  ];
 
   meta = with lib; {
     description = "Improved build system generator for CPython C/C++/Fortran/Cython extensions";
-    homepage = "http://scikit-build.org/";
+    homepage = "https://github.com/scikit-build/scikit-build";
     license = with licenses; [ mit bsd2 ]; # BSD due to reuses of PyNE code
     maintainers = with maintainers; [ FlorianFranzen ];
   };
diff --git a/pkgs/development/python-modules/scikit-learn/default.nix b/pkgs/development/python-modules/scikit-learn/default.nix
index 7e2096c9b9b..82a85d70941 100644
--- a/pkgs/development/python-modules/scikit-learn/default.nix
+++ b/pkgs/development/python-modules/scikit-learn/default.nix
@@ -78,8 +78,6 @@ buildPythonPackage rec {
     # https://github.com/scikit-learn/scikit-learn/issues/17582
     # Since we are overriding '-k' we need to include the 'disabledTests' from above manually.
     "-k" "'not (NuSVC and memmap) ${toString (lib.forEach disabledTests (t: "and not ${t}"))}'"
-
-    "-n" "$NIX_BUILD_CORES"
   ];
 
   preCheck = ''
diff --git a/pkgs/development/python-modules/service_identity/default.nix b/pkgs/development/python-modules/service_identity/default.nix
index d7c37e7c433..8ac3b52d58c 100644
--- a/pkgs/development/python-modules/service_identity/default.nix
+++ b/pkgs/development/python-modules/service_identity/default.nix
@@ -7,6 +7,7 @@
 , ipaddress
 , pyasn1
 , pyasn1-modules
+, six
 , pytestCheckHook
 , pythonOlder
 }:
@@ -28,6 +29,7 @@ buildPythonPackage rec {
     idna
     pyasn1
     pyasn1-modules
+    six
   ] ++ lib.optionals (pythonOlder "3.3") [
     ipaddress
   ];
diff --git a/pkgs/development/python-modules/setuptools-rust/default.nix b/pkgs/development/python-modules/setuptools-rust/default.nix
index 2ab609c7d0c..24c60839fe0 100644
--- a/pkgs/development/python-modules/setuptools-rust/default.nix
+++ b/pkgs/development/python-modules/setuptools-rust/default.nix
@@ -12,17 +12,17 @@
 
 buildPythonPackage rec {
   pname = "setuptools-rust";
-  version = "1.1.2";
+  version = "1.2.0";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "a0adb9b503c0ffc4e8fe80b7c617898cefa78049983aaaea7f747e153a3e65d1";
+    sha256 = "sha256-CkraR56Mfj2L18tW4aKazCsruYwjJQUbDNy1fX8Fbeg=";
   };
 
   nativeBuildInputs = [ setuptools-scm ];
 
-  propagatedBuildInputs = [ semantic-version setuptools toml typing-extensions ];
+  propagatedBuildInputs = [ semantic-version setuptools typing-extensions ];
 
   doCheck = false;
   pythonImportsCheck = [ "setuptools_rust" ];
diff --git a/pkgs/development/python-modules/setuptools/default.nix b/pkgs/development/python-modules/setuptools/default.nix
index 6b18422cc18..1d9592022d1 100644
--- a/pkgs/development/python-modules/setuptools/default.nix
+++ b/pkgs/development/python-modules/setuptools/default.nix
@@ -10,7 +10,7 @@
 
 let
   pname = "setuptools";
-  version = "60.8.2";
+  version = "61.2.0";
 
   # Create an sdist of setuptools
   sdist = stdenv.mkDerivation rec {
@@ -20,7 +20,7 @@ let
       owner = "pypa";
       repo = pname;
       rev = "v${version}";
-      sha256 = "1mqpmbn58rx3g24dm6wnllx0xs97ampn2yga3qypqgwnh1nk477i";
+      hash = "sha256-Cgz3uA8U7A1lOZNuj1EYZVViZ3aL6VjcAno8GYQUufk=";
       name = "${pname}-${version}-source";
     };
 
diff --git a/pkgs/development/python-modules/setuptools/setuptools-distutils-C++.patch b/pkgs/development/python-modules/setuptools/setuptools-distutils-C++.patch
index a14e514fda7..43601d8b6eb 100644
--- a/pkgs/development/python-modules/setuptools/setuptools-distutils-C++.patch
+++ b/pkgs/development/python-modules/setuptools/setuptools-distutils-C++.patch
@@ -1,6 +1,3 @@
-Based on pkgs/development/interpreters/python/cpython/3.7/python-3.x-distutils-C++.patch,
-adapted to apply to setuptools 60.x's bundled distutils.
-
 diff --git a/setuptools/_distutils/cygwinccompiler.py b/setuptools/_distutils/cygwinccompiler.py
 index c5c86d8f..b879e447 100644
 --- a/setuptools/_distutils/cygwinccompiler.py
@@ -57,7 +54,7 @@ index c5c86d8f..b879e447 100644
          # Maybe we should also append -mthreads, but then the finished
          # dlls need another dll (mingwm10.dll see Mingw32 docs)
 diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py
-index 4a77a431..1ad85181 100644
+index 9fad3835..889e2595 100644
 --- a/setuptools/_distutils/sysconfig.py
 +++ b/setuptools/_distutils/sysconfig.py
 @@ -216,9 +216,11 @@ def customize_compiler(compiler):
@@ -124,10 +121,10 @@ index 4a77a431..1ad85181 100644
  
          if 'RANLIB' in os.environ and compiler.executables.get('ranlib', None):
 diff --git a/setuptools/_distutils/unixccompiler.py b/setuptools/_distutils/unixccompiler.py
-index a07e5988..576ef490 100644
+index 715408f5..6125a1eb 100644
 --- a/setuptools/_distutils/unixccompiler.py
 +++ b/setuptools/_distutils/unixccompiler.py
-@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
+@@ -110,14 +110,17 @@ class UnixCCompiler(CCompiler):
      # are pretty generic; they will probably have to be set by an outsider
      # (eg. using information discovered by the sysconfig about building
      # Python extensions).
@@ -153,21 +150,17 @@ index a07e5988..576ef490 100644
                    }
  
      if sys.platform[:6] == "darwin":
-@@ -110,12 +113,19 @@ class UnixCCompiler(CCompiler):
- 
+@@ -169,9 +172,15 @@ class UnixCCompiler(CCompiler):
      def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
-         compiler_so = self.compiler_so
-+        compiler_so_cxx = self.compiler_so_cxx
-         if sys.platform == 'darwin':
-             compiler_so = _osx_support.compiler_fixup(compiler_so,
-                                                     cc_args + extra_postargs)
-+            compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
-+                                                    cc_args + extra_postargs)
+         compiler_so = compiler_fixup(
+             self.compiler_so, cc_args + extra_postargs)
++        compiler_so_cxx = compiler_fixup(
++            self.compiler_so_cxx, cc_args + extra_postargs)
          try:
 -            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
 -                       extra_postargs)
 +            if self.detect_language(src) == 'c++':
-+                self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
++                self.spawn(compiler_so_cxx + cc_args + [ src, '-o', obj] +
 +                           extra_postargs)
 +            else:
 +                self.spawn(compiler_so + cc_args + [src, '-o', obj] +
@@ -175,42 +168,13 @@ index a07e5988..576ef490 100644
          except DistutilsExecError as msg:
              raise CompileError(msg)
  
-@@ -173,30 +183,16 @@ class UnixCCompiler(CCompiler):
-                 ld_args.extend(extra_postargs)
-             self.mkpath(os.path.dirname(output_filename))
-             try:
--                if target_desc == CCompiler.EXECUTABLE:
--                    linker = self.linker_exe[:]
-+                if target_lang == "c++":
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe_cxx[:]
-+                    else:
-+                        linker = self.linker_so_cxx[:]
-                 else:
--                    linker = self.linker_so[:]
--                if target_lang == "c++" and self.compiler_cxx:
--                    # skip over environment variable settings if /usr/bin/env
--                    # is used to set up the linker's environment.
--                    # This is needed on OSX. Note: this assumes that the
--                    # normal and C++ compiler have the same environment
--                    # settings.
--                    i = 0
--                    if os.path.basename(linker[0]) == "env":
--                        i = 1
--                        while '=' in linker[i]:
--                            i += 1
--
--                    if os.path.basename(linker[i]) == 'ld_so_aix':
--                        # AIX platforms prefix the compiler with the ld_so_aix
--                        # script, so we need to adjust our linker index
--                        offset = 1
-+                    if target_desc == CCompiler.EXECUTABLE:
-+                        linker = self.linker_exe[:]
-                     else:
--                        offset = 0
--
--                    linker[i+offset] = self.compiler_cxx[i]
-+                        linker = self.linker_so[:]
+@@ -233,7 +242,8 @@ class UnixCCompiler(CCompiler):
+                 # building an executable or linker_so (with shared options)
+                 # when building a shared library.
+                 building_exe = target_desc == CCompiler.EXECUTABLE
+-                linker = (self.linker_exe if building_exe else self.linker_so)[:]
++                linker = (self.linker_exe if building_exe else (self.linker_so_cxx if
++                              target_lang == "c++" else self.linker_so))[:]
  
-                 if sys.platform == 'darwin':
-                     linker = _osx_support.compiler_fixup(linker, ld_args)
+                 if target_lang == "c++" and self.compiler_cxx:
+                     env, linker_ne = _split_env(linker)
diff --git a/pkgs/development/python-modules/shapely/default.nix b/pkgs/development/python-modules/shapely/default.nix
index 818cce6a567..8d5d0d2aa4f 100644
--- a/pkgs/development/python-modules/shapely/default.nix
+++ b/pkgs/development/python-modules/shapely/default.nix
@@ -12,12 +12,12 @@
 
 buildPythonPackage rec {
   pname = "Shapely";
-  version = "1.8.0";
+  version = "1.8.1.post1";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "177g8wxsgnphhhn4634n6ca1qrk462ijqlznpj5ry6d49ghpwc7m";
+    sha256 = "sha256-k/8G/wX74r6EO5PHsa2CkuVuZlugG0cI91rop1eXLp8=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/shapely/library-paths.patch b/pkgs/development/python-modules/shapely/library-paths.patch
index d55630be9c1..484af67ef68 100644
--- a/pkgs/development/python-modules/shapely/library-paths.patch
+++ b/pkgs/development/python-modules/shapely/library-paths.patch
@@ -1,8 +1,8 @@
 diff --git a/shapely/geos.py b/shapely/geos.py
-index 4619732..1abdb5e 100644
+index 13ab835..1abdb5e 100644
 --- a/shapely/geos.py
 +++ b/shapely/geos.py
-@@ -55,148 +55,21 @@ def load_dll(libname, fallbacks=None, mode=DEFAULT_MODE):
+@@ -55,174 +55,21 @@ def load_dll(libname, fallbacks=None, mode=DEFAULT_MODE):
              "Could not find lib {} or load any of its variants {}.".format(
                  libname, fallbacks or []))
  
@@ -61,16 +61,23 @@ index 4619732..1abdb5e 100644
 -
 -elif sys.platform == 'darwin':
 -    # Test to see if we have a delocated wheel with a GEOS dylib.
--    geos_whl_dylib = os.path.abspath(os.path.join(os.path.dirname(
--        __file__), '.dylibs/libgeos_c.1.dylib'))
+-    dylib_path = os.path.abspath(
+-        os.path.join(os.path.dirname(__file__), ".dylibs/*.dylib")
+-    )
+-    LOG.debug("Formed path for globbing: dylib_path=%r", dylib_path)
+-
+-    geos_whl_dylib = glob.glob(dylib_path)
+-    LOG.debug("Globbed: geos_whl_dylib=%r", geos_whl_dylib)
 -
--    if os.path.exists(geos_whl_dylib):
+-    if len(geos_whl_dylib) > 0:
 -        handle = CDLL(None)
 -        if hasattr(handle, "initGEOS_r"):
 -            LOG.debug("GEOS already loaded")
 -            _lgeos = handle
 -        else:
--            _lgeos = CDLL(geos_whl_dylib)
+-            geos_whl_dylib = sorted(geos_whl_dylib)
+-            CDLL(geos_whl_dylib[0])
+-            _lgeos = CDLL(geos_whl_dylib[-1])
 -            LOG.debug("Found GEOS DLL: %r, using it.", _lgeos)
 -
 -    elif exists_conda_env():
@@ -112,25 +119,44 @@ index 4619732..1abdb5e 100644
 -elif sys.platform == 'win32':
 -    _conda_dll_path = os.path.join(sys.prefix, 'Library', 'bin', 'geos_c.dll')
 -    if exists_conda_env() and os.path.exists(_conda_dll_path):
--        # conda package.
 -        _lgeos = CDLL(_conda_dll_path)
 -    else:
--        try:
--            egg_dlls = os.path.abspath(
--                os.path.join(os.path.dirname(__file__), 'DLLs'))
--            if hasattr(sys, '_MEIPASS'):
--                wininst_dlls = sys._MEIPASS
--            elif hasattr(sys, "frozen"):
--                wininst_dlls = os.path.normpath(
--                    os.path.abspath(sys.executable + '../../DLLS'))
--            else:
--                wininst_dlls = os.path.abspath(os.__file__ + "../../../DLLs")
--            original_path = os.environ['PATH']
--            os.environ['PATH'] = "%s;%s;%s" % \
--                (egg_dlls, wininst_dlls, original_path)
--            _lgeos = load_dll("geos_c.dll")
--        except (ImportError, WindowsError, OSError):
--            raise
+-        geos_whl_dll = glob.glob(
+-            os.path.abspath(
+-                os.path.join(
+-                    os.path.dirname(__file__), "..", "Shapely.libs", "geos*.dll"
+-                )
+-            )
+-        )
+-
+-        if len(geos_whl_dll) > 0:
+-            geos_whl_dll = sorted(geos_whl_dll)
+-            # CDLL(geos_whl_so[0])
+-            _lgeos = CDLL(geos_whl_dll[-1])
+-            LOG.debug("Found GEOS DLL: %r, using it.", _lgeos)
+-        else:
+-            try:
+-                egg_dlls = os.path.abspath(
+-                    os.path.join(os.path.dirname(__file__), "DLLs")
+-                )
+-                if hasattr(sys, "_MEIPASS"):
+-                    wininst_dlls = sys._MEIPASS
+-                elif hasattr(sys, "frozen"):
+-                    wininst_dlls = os.path.normpath(
+-                        os.path.abspath(sys.executable + "../../DLLS")
+-                    )
+-                else:
+-                    wininst_dlls = os.path.abspath(os.__file__ + "../../../DLLs")
+-                original_path = os.environ["PATH"]
+-                os.environ["PATH"] = "%s;%s;%s" % (
+-                    egg_dlls,
+-                    wininst_dlls,
+-                    original_path,
+-                )
+-                _lgeos = load_dll("geos_c.dll")
+-
+-            except (ImportError, WindowsError, OSError):
+-                raise
 -
 -        def free(m):
 -            try:
diff --git a/pkgs/development/python-modules/social-auth-core/default.nix b/pkgs/development/python-modules/social-auth-core/default.nix
index ede138218e0..667c4ec4245 100644
--- a/pkgs/development/python-modules/social-auth-core/default.nix
+++ b/pkgs/development/python-modules/social-auth-core/default.nix
@@ -3,7 +3,7 @@
 , fetchFromGitHub
 , requests
 , oauthlib
-, requests_oauthlib
+, requests-oauthlib
 , pyjwt
 , cryptography
 , defusedxml
@@ -38,7 +38,7 @@ buildPythonPackage rec {
   propagatedBuildInputs = [
     requests
     oauthlib
-    requests_oauthlib
+    requests-oauthlib
     pyjwt
     cryptography
     defusedxml
diff --git a/pkgs/development/python-modules/sortedcontainers/default.nix b/pkgs/development/python-modules/sortedcontainers/default.nix
index 8920336f8db..4edd68f1f07 100644
--- a/pkgs/development/python-modules/sortedcontainers/default.nix
+++ b/pkgs/development/python-modules/sortedcontainers/default.nix
@@ -1,24 +1,39 @@
 { lib
 , buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
+, pytestCheckHook
 }:
 
-buildPythonPackage rec {
-  pname = "sortedcontainers";
-  version = "2.4.0";
+let
+  sortedcontainers = buildPythonPackage rec {
+    pname = "sortedcontainers";
+    version = "2.4.0";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88";
-  };
+    src = fetchFromGitHub {
+      owner = "grantjenks";
+      repo = "python-sortedcontainers";
+      rev = "v${version}";
+      sha256 = "sha256-YRbSM2isWi7AzfquFvuZBlpEMNUnBJTBLBn0/XYVHKQ=";
+    };
+
+    doCheck = false;
+
+    checkInputs = [
+      pytestCheckHook
+    ];
+
+    pythonImportsCheck = [ "sortedcontainers" ];
 
-  # pypi tarball does not come with tests
-  doCheck = false;
+    passthru.tests = {
+      pytest = sortedcontainers.overridePythonAttrs (_: { doCheck = true; });
+    };
 
-  meta = {
-    description = "Python Sorted Container Types: SortedList, SortedDict, and SortedSet";
-    homepage = "http://www.grantjenks.com/docs/sortedcontainers/";
-    license = lib.licenses.asl20;
-    maintainers = with lib.maintainers; [ costrouc ];
+    meta = with lib; {
+      description = "Python Sorted Container Types: SortedList, SortedDict, and SortedSet";
+      homepage = "https://grantjenks.com/docs/sortedcontainers/";
+      license = licenses.asl20;
+      maintainers = with maintainers; [ SuperSandro2000 ];
+    };
   };
-}
+in
+sortedcontainers
diff --git a/pkgs/development/python-modules/spacy-transformers/default.nix b/pkgs/development/python-modules/spacy-transformers/default.nix
index d203f8709c3..2a81a5bce08 100644
--- a/pkgs/development/python-modules/spacy-transformers/default.nix
+++ b/pkgs/development/python-modules/spacy-transformers/default.nix
@@ -12,13 +12,13 @@
 
 buildPythonPackage rec {
   pname = "spacy-transformers";
-  version = "1.1.4";
+  version = "1.1.5";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-G09bZiXTdEuukvKjPOYYTW/B19d406QSRDOU5ZflDDU=";
+    sha256 = "sha256-nxbmnFyHptbe5M7rQi2ECGoBpxUuutdCtY20eHsGDPI=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/spacy/default.nix b/pkgs/development/python-modules/spacy/default.nix
index 5e3bc6aac8b..41e6a8cc37c 100644
--- a/pkgs/development/python-modules/spacy/default.nix
+++ b/pkgs/development/python-modules/spacy/default.nix
@@ -31,13 +31,13 @@
 
 buildPythonPackage rec {
   pname = "spacy";
-  version = "3.2.3";
+  version = "3.2.4";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-JdAz/Ae4+/yb3Te3cLilhtxBTb1gMShEmvMldqOJFnM=";
+    sha256 = "sha256-PkxvKY1UBEWC2soRQrCC7jiDG7PXu5MdLuYB6Ljc5k8=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/sparqlwrapper/default.nix b/pkgs/development/python-modules/sparqlwrapper/default.nix
index 41c11172d9b..0660b8a403c 100644
--- a/pkgs/development/python-modules/sparqlwrapper/default.nix
+++ b/pkgs/development/python-modules/sparqlwrapper/default.nix
@@ -1,31 +1,28 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, six
-, isodate
-, pyparsing
-, html5lib
 , keepalive
 }:
 
 buildPythonPackage rec {
-  pname = "SPARQLWrapper";
-  version = "1.8.5";
+  pname = "sparqlwrapper";
+  version = "2.0.0";
 
   src = fetchPypi {
-    inherit pname version;
-    sha256 = "d6a66b5b8cda141660e07aeb00472db077a98d22cb588c973209c7336850fb3c";
+    pname = "SPARQLWrapper";
+    inherit version;
+    sha256 = "sha256-P+0+vMd2F6SnTSZEuG/Yjg8y5/cAOseyszTAJiAXMfE=";
   };
 
   # break circular dependency loop
   patchPhase = ''
-    sed -i '/rdflib/d' requirements.txt
+    sed -i '/rdflib/d' setup.cfg
   '';
 
   # Doesn't actually run tests
   doCheck = false;
 
-  propagatedBuildInputs = [ six isodate pyparsing html5lib keepalive ];
+  propagatedBuildInputs = [ keepalive ];
 
   meta = with lib; {
     description = "This is a wrapper around a SPARQL service. It helps in creating the query URI and, possibly, convert the result into a more manageable format";
diff --git a/pkgs/development/python-modules/sphinx-jinja/default.nix b/pkgs/development/python-modules/sphinx-jinja/default.nix
index 7f5ea8c4241..28d57575255 100644
--- a/pkgs/development/python-modules/sphinx-jinja/default.nix
+++ b/pkgs/development/python-modules/sphinx-jinja/default.nix
@@ -1,29 +1,26 @@
-{ lib, buildPythonPackage, fetchPypi, isPy27, pbr, sphinx, sphinx-testing, nose, glibcLocales }:
+{ lib, buildPythonPackage, fetchPypi, pythonOlder, sphinx }:
 
 buildPythonPackage rec {
   pname = "sphinx-jinja";
-  version = "1.4.0";
+  version = "2.0.1";
+
+  disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "e6614d986c0289cb85b016c25eb8cb9781ceb841e70bee639c5123f39ad90b38";
+    sha256 = "sha256-3lMY1InG1PaAqhIrp5kovE6t+kTTpTKS3ir+WI/+RAY=";
   };
 
-  buildInputs = [ pbr ];
   propagatedBuildInputs = [ sphinx ];
 
-  checkInputs = [ sphinx-testing nose glibcLocales ];
+  # upstream source is not updated to 2.0.X and pypi does not contain tests
+  doCheck = false;
 
-  checkPhase = lib.optionalString (!isPy27) ''
-    # prevent python from loading locally and breaking namespace
-    mv sphinxcontrib .sphinxcontrib
-  '' + ''
-    # Zip (epub) does not support files with epoch timestamp
-    LC_ALL="en_US.UTF-8" nosetests -e test_build_epub
-  '';
+  pythonImportsCheck = [ "sphinx_jinja" ];
 
   meta = with lib; {
     description = "Sphinx extension to include jinja templates in documentation";
+    homepage = "https://github.com/tardyp/sphinx-jinja";
     maintainers = with maintainers; [ ];
     license = licenses.mit;
   };
diff --git a/pkgs/development/python-modules/sphinx/default.nix b/pkgs/development/python-modules/sphinx/default.nix
index 7d79aaa457a..020cf5c143a 100644
--- a/pkgs/development/python-modules/sphinx/default.nix
+++ b/pkgs/development/python-modules/sphinx/default.nix
@@ -30,14 +30,16 @@
 
 buildPythonPackage rec {
   pname = "sphinx";
-  version = "4.4.0";
-  disabled = pythonOlder "3.5";
+  version = "4.5.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     owner = "sphinx-doc";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-Q4CqPO08AfR+CDB02al65A+FHRFUDUfFTba0u8YQx+8=";
+    sha256 = "sha256-Lw9yZWCQpt02SL/McWPcyFRfVhQHC0TejcYRbVw+VxY=";
     extraPostFetch = ''
       cd $out
       mv tests/roots/test-images/testimäge.png \
@@ -46,6 +48,11 @@ buildPythonPackage rec {
     '';
   };
 
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "docutils>=0.14,<0.18" "docutils>=0.14"
+  '';
+
   propagatedBuildInputs = [
     Babel
     alabaster
diff --git a/pkgs/development/python-modules/sphinx_rtd_theme/default.nix b/pkgs/development/python-modules/sphinx_rtd_theme/default.nix
index 1d890de94f7..d0c9a3883af 100644
--- a/pkgs/development/python-modules/sphinx_rtd_theme/default.nix
+++ b/pkgs/development/python-modules/sphinx_rtd_theme/default.nix
@@ -18,7 +18,7 @@ buildPythonPackage rec {
 
   postPatch = ''
     substituteInPlace setup.py \
-      --replace "docutils<0.17" "docutils"
+      --replace "docutils<0.18" "docutils"
   '';
 
   preBuild = ''
diff --git a/pkgs/development/python-modules/spyder-kernels/default.nix b/pkgs/development/python-modules/spyder-kernels/default.nix
index 4ddacc91190..95d54e40447 100644
--- a/pkgs/development/python-modules/spyder-kernels/default.nix
+++ b/pkgs/development/python-modules/spyder-kernels/default.nix
@@ -3,11 +3,11 @@
 
 buildPythonPackage rec {
   pname = "spyder-kernels";
-  version = "2.2.1";
+  version = "2.3.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "574ee1bd03f7236b9f9dacae34936a0625cd67ccfe3df11fec69f26889a0b866";
+    sha256 = "sha256-pdU20Oil53TX1hbBAqj6LWqkX9MwoLeZuY7vFYNW02w=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/spyder/default.nix b/pkgs/development/python-modules/spyder/default.nix
index 40e393b57d6..c117cb4990f 100644
--- a/pkgs/development/python-modules/spyder/default.nix
+++ b/pkgs/development/python-modules/spyder/default.nix
@@ -8,13 +8,13 @@
 
 buildPythonPackage rec {
   pname = "spyder";
-  version = "5.2.2";
+  version = "5.3.0";
 
   disabled = isPy27;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-3DIikQlsc7Ptagi8ddR5ia+u24dXeBdppRkIn/xp3bg=";
+    sha256 = "sha256-ggCFvYUdUm5fVSpTZoN/OhNPJAQOyehwrQprYTzprbc=";
   };
 
   nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ];
diff --git a/pkgs/development/python-modules/sqlalchemy-imageattach/default.nix b/pkgs/development/python-modules/sqlalchemy-imageattach/default.nix
deleted file mode 100644
index 55026b2b553..00000000000
--- a/pkgs/development/python-modules/sqlalchemy-imageattach/default.nix
+++ /dev/null
@@ -1,42 +0,0 @@
-{ lib
-, buildPythonPackage
-, pytest
-, Wand
-, webob
-, sqlalchemy
-, isPyPy
-, pkgs
-}:
-
-buildPythonPackage rec {
-  pname = "SQLAlchemy-ImageAttach";
-  version = "1.0.0";
-
-  src = pkgs.fetchFromGitHub {
-    repo = "sqlalchemy-imageattach";
-    owner = "dahlia";
-    rev = version;
-    sha256 = "0ba97pn5dh00qvxyjbr0mr3pilxqw5kb3a6jd4wwbsfcv6nngqig";
-  };
-
-  checkInputs = [ pytest Wand.imagemagick webob ];
-  propagatedBuildInputs = [ sqlalchemy Wand ];
-
-  checkPhase = ''
-    cd tests
-    export MAGICK_HOME="${pkgs.imagemagick.dev}"
-    export PYTHONPATH=$PYTHONPATH:../
-    py.test
-    cd ..
-  '';
-
-  doCheck = !isPyPy;  # failures due to sqla version mismatch
-
-  meta = with lib; {
-    homepage = "https://github.com/dahlia/sqlalchemy-imageattach";
-    description = "SQLAlchemy extension for attaching images to entity objects";
-    license = licenses.mit;
-    broken = true; # Incompatible with sqlalchemy>=1.4 (https://github.com/dahlia/sqlalchemy-imageattach/issues/47)
-  };
-
-}
diff --git a/pkgs/development/python-modules/sqlalchemy/default.nix b/pkgs/development/python-modules/sqlalchemy/default.nix
index d379fc92942..b6e800a7ed3 100644
--- a/pkgs/development/python-modules/sqlalchemy/default.nix
+++ b/pkgs/development/python-modules/sqlalchemy/default.nix
@@ -13,11 +13,11 @@
 
 buildPythonPackage rec {
   pname = "SQLAlchemy";
-  version = "1.4.32";
+  version = "1.4.35";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-b90txZMdqrd4wrZbA99q5oN24CijCY62JNCQnZmYhbw=";
+    hash = "sha256-L/yBOwHcZHOZD15XXyEMpawvVGWs45CLeP/W0gBYqrU=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/starlette/default.nix b/pkgs/development/python-modules/starlette/default.nix
index 00283cd9ec9..caa841339e1 100644
--- a/pkgs/development/python-modules/starlette/default.nix
+++ b/pkgs/development/python-modules/starlette/default.nix
@@ -21,7 +21,7 @@
 
 buildPythonPackage rec {
   pname = "starlette";
-  version = "0.18.0";
+  version = "0.19.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
@@ -30,7 +30,7 @@ buildPythonPackage rec {
     owner = "encode";
     repo = pname;
     rev = version;
-    sha256 = "sha256-N2X9pjCiQ6TKRcm6VlyybLLyCdjQuIZHu1vK99gY8rY=";
+    sha256 = "sha256-gjRTMzoQ8pqxjIusRwRXGs72VYo6xsp2DSUxmEr9KxU=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/svg-path/default.nix b/pkgs/development/python-modules/svg-path/default.nix
index e01909fc93a..fa436ff8446 100644
--- a/pkgs/development/python-modules/svg-path/default.nix
+++ b/pkgs/development/python-modules/svg-path/default.nix
@@ -1,13 +1,31 @@
-{ lib, buildPythonPackage, fetchPypi }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pillow
+, pytestCheckHook
+}:
+
 buildPythonPackage rec {
   pname = "svg.path";
-  version = "4.1";
+  version = "5.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "7e6847ba690ff620e20f152818d52e1685b993aacbc41b321f8fee3d1cb427db";
+    sha256 = "sha256-CltSq7BGQNmC/3EI5N0wx4QDu0zZWMJLovCUdtXZIws=";
   };
 
+  checkInputs = [
+    pillow
+    pytestCheckHook
+  ];
+
+  disabledTests = [
+    # generated image differs from example
+    "test_image"
+  ];
+
+  pythonImportsCheck = [ "svg.path" ];
+
   meta = with lib; {
     description = "SVG path objects and parser";
     homepage = "https://github.com/regebro/svg.path";
diff --git a/pkgs/development/python-modules/sympy/default.nix b/pkgs/development/python-modules/sympy/default.nix
index 7d6206f04c8..17765a37529 100644
--- a/pkgs/development/python-modules/sympy/default.nix
+++ b/pkgs/development/python-modules/sympy/default.nix
@@ -7,11 +7,11 @@
 
 buildPythonPackage rec {
   pname = "sympy";
-  version = "1.9";
+  version = "1.10.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "c7a880e229df96759f955d4f3970d4cabce79f60f5b18830c08b90ce77cd5fdc";
+    sha256 = "sha256-WTnu/9+eFSFyYBRjYmwCKiwn51z2J43o1AHVDJ1YeHs=";
   };
 
   checkInputs = [ glibcLocales ];
diff --git a/pkgs/development/python-modules/tellduslive/default.nix b/pkgs/development/python-modules/tellduslive/default.nix
index 5a6a84af839..f933553dcdb 100644
--- a/pkgs/development/python-modules/tellduslive/default.nix
+++ b/pkgs/development/python-modules/tellduslive/default.nix
@@ -3,12 +3,16 @@
 , docopt
 , fetchFromGitHub
 , requests
-, requests_oauthlib
+, requests-oauthlib
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "tellduslive";
   version = "0.10.11";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "molobrakos";
@@ -20,12 +24,15 @@ buildPythonPackage rec {
   propagatedBuildInputs = [
     docopt
     requests
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   # Project has no tests
   doCheck = false;
-  pythonImportsCheck = [ "tellduslive" ];
+
+  pythonImportsCheck = [
+    "tellduslive"
+  ];
 
   meta = with lib; {
     description = "Python module to communicate with Telldus Live";
diff --git a/pkgs/development/python-modules/tensorflow-datasets/default.nix b/pkgs/development/python-modules/tensorflow-datasets/default.nix
index 959ecd9092a..38d6458d4fd 100644
--- a/pkgs/development/python-modules/tensorflow-datasets/default.nix
+++ b/pkgs/development/python-modules/tensorflow-datasets/default.nix
@@ -100,7 +100,6 @@ buildPythonPackage rec {
     tensorflow
     tifffile
   ];
-  pytestFlagsArray = [ "-n $NIX_BUILD_CORES" ];
 
   disabledTestPaths = [
     # Sandbox violations: network access, filesystem write attempts outside of build dir, ...
diff --git a/pkgs/development/python-modules/terminado/default.nix b/pkgs/development/python-modules/terminado/default.nix
index 6a63fe53716..30673971a16 100644
--- a/pkgs/development/python-modules/terminado/default.nix
+++ b/pkgs/development/python-modules/terminado/default.nix
@@ -7,11 +7,11 @@
 
 buildPythonPackage rec {
   pname = "terminado";
-  version = "0.13.1";
+  version = "0.13.3";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-W4K1xumR8HBadvlh9DJip/seVbCTwW3Kg/FjhKfzm3s=";
+    sha256 = "sha256-lNHPq2NSWZP31cm0aaUKGNDN85Q1tZeFcVU53UHjbA0=";
   };
 
   propagatedBuildInputs = [ ptyprocess tornado ];
diff --git a/pkgs/development/python-modules/tifffile/default.nix b/pkgs/development/python-modules/tifffile/default.nix
index 01294ff5007..0faea93ebde 100644
--- a/pkgs/development/python-modules/tifffile/default.nix
+++ b/pkgs/development/python-modules/tifffile/default.nix
@@ -12,14 +12,14 @@
 
 buildPythonPackage rec {
   pname = "tifffile";
-  version = "2022.2.9";
+  version = "2022.3.25";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-ftp0EXZDaBuyyqaVtI854iQ7SIf3z5kdWt/9gT5cg3M=";
+    hash = "sha256-bZQ/LAGxo0pHbJY9EZVl+6EI9VngYUJsY6UVeEaVntk=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/tomlkit/default.nix b/pkgs/development/python-modules/tomlkit/default.nix
index 22f3ffab299..fbe6c7be4d1 100644
--- a/pkgs/development/python-modules/tomlkit/default.nix
+++ b/pkgs/development/python-modules/tomlkit/default.nix
@@ -4,11 +4,11 @@
 
 buildPythonPackage rec {
   pname = "tomlkit";
-  version = "0.10.0";
+  version = "0.10.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-2ZlGxq7TOHyYuJ2R+57f+PkBv5JVkBCBJmqE+1YErc0=";
+    sha256 = "sha256-PFF4lOre9T6QctND035EJ7jwtiAKcLfJoZsuvR9TuVE=";
   };
 
   propagatedBuildInputs =
diff --git a/pkgs/development/python-modules/torchinfo/default.nix b/pkgs/development/python-modules/torchinfo/default.nix
index 331729e25c5..da0544c299c 100644
--- a/pkgs/development/python-modules/torchinfo/default.nix
+++ b/pkgs/development/python-modules/torchinfo/default.nix
@@ -10,12 +10,12 @@
 
 buildPythonPackage rec {
   pname = "torchinfo";
-  version = "1.6.3";
+  version = "1.6.5";
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-g1xhtdwygzPTTswP8iZ364ynBQE7D+aAsZ3d9EpyvIA=";
+    sha256 = "sha256-Vg/TXD+/VMIv1wHywaOuEj4MDTq90lUo99n+Nppu0uI=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/tornado/default.nix b/pkgs/development/python-modules/tornado/default.nix
index 893943cbc72..4519641c482 100644
--- a/pkgs/development/python-modules/tornado/default.nix
+++ b/pkgs/development/python-modules/tornado/default.nix
@@ -2,28 +2,34 @@
 , python
 , buildPythonPackage
 , fetchPypi
+, pycares
+, pycurl
+, twisted
 }:
 
 buildPythonPackage rec {
   pname = "tornado";
   version = "6.1";
 
-  # We specify the name of the test files to prevent
-  # https://github.com/NixOS/nixpkgs/issues/14634
-  checkPhase = ''
-    ${python.interpreter} -m unittest discover *_test.py
-  '';
-
   src = fetchPypi {
     inherit pname version;
     sha256 = "33c6e81d7bd55b468d2e793517c909b139960b6c790a60b7991b9b6b76fb9791";
   };
 
+  checkInputs = [
+    pycares
+    pycurl
+    twisted
+  ];
+
+  pythonImportsCheck = [ "tornado" ];
+
   __darwinAllowLocalNetworking = true;
 
-  meta = {
+  meta = with lib; {
     description = "A web framework and asynchronous networking library";
     homepage = "https://www.tornadoweb.org/";
-    license = lib.licenses.asl20;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/tpm2-pytss/default.nix b/pkgs/development/python-modules/tpm2-pytss/default.nix
index 5cd14c7704d..77f778b0010 100644
--- a/pkgs/development/python-modules/tpm2-pytss/default.nix
+++ b/pkgs/development/python-modules/tpm2-pytss/default.nix
@@ -9,12 +9,12 @@ buildPythonPackage rec {
 
   # Last version on github is 0.2.4, but it looks
   # like a mistake (it's missing commits from 0.1.9)
-  version = "1.0.0";
+  version = "1.1.0";
   disabled = pythonOlder "3.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-Gx1nIXYuhTmQva9LmtTYvd1nyRH/pBQZ5bJ8OLcc1lo=";
+    sha256 = "sha256-O0d1b99/V8b3embg8veerTrJGSVb/prlPVb7qSHErdQ=";
   };
   postPatch = ''
     substituteInPlace tpm2_pytss/config.py --replace \
diff --git a/pkgs/development/python-modules/tqdm/default.nix b/pkgs/development/python-modules/tqdm/default.nix
index 2613a2b587d..40b6b47a946 100644
--- a/pkgs/development/python-modules/tqdm/default.nix
+++ b/pkgs/development/python-modules/tqdm/default.nix
@@ -14,11 +14,11 @@
 
 buildPythonPackage rec {
   pname = "tqdm";
-  version = "4.63.0";
+  version = "4.63.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-HZg17ejjlLuMncv/vKAtcXIXETrcZ5I2hz7qrFvAs80=";
+    sha256 = "sha256-QjCkkRmkFsiMxH0NLTLV2Q8aKC1eSX1JgBlQcE5Jhj0=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/trytond/default.nix b/pkgs/development/python-modules/trytond/default.nix
index 6a52dd869e0..c2509c662d3 100644
--- a/pkgs/development/python-modules/trytond/default.nix
+++ b/pkgs/development/python-modules/trytond/default.nix
@@ -1,5 +1,6 @@
 { lib
 , buildPythonApplication
+, fetchpatch
 , fetchPypi
 , pythonOlder
 , mock
@@ -34,6 +35,14 @@ buildPythonApplication rec {
     sha256 = "sha256-Sof6A9lxU70YnCbboJr56CAdTL0cRbaRNxdvG5Tnqnw=";
   };
 
+  patches = [
+    (fetchpatch {
+      # werkzeug 2.1 compatibility for the tests
+      url = "https://github.com/tryton/trytond/commit/86a50ca06cf0d79404dbd731141ed29f8e9fcb9d.patch";
+      hash = "sha256-xY5Sdhkd0lEgscV7NHwX2YWxobWqQFElY5BJvDT+we8=";
+    })
+  ];
+
   # Tells the tests which database to use
   DB_NAME = ":memory:";
 
diff --git a/pkgs/development/python-modules/tweepy/default.nix b/pkgs/development/python-modules/tweepy/default.nix
index 6b7dbee8fa5..a2c815b45e2 100644
--- a/pkgs/development/python-modules/tweepy/default.nix
+++ b/pkgs/development/python-modules/tweepy/default.nix
@@ -3,11 +3,11 @@
 , buildPythonPackage
 , fetchFromGitHub
 , oauthlib
-, requests
+, pytestCheckHook
 , pythonOlder
+, requests
+, requests-oauthlib
 , vcrpy
-, pytestCheckHook
-, requests_oauthlib
 }:
 
 buildPythonPackage rec {
@@ -20,15 +20,15 @@ buildPythonPackage rec {
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
-    rev = "refs/tags/v${version}";
-    sha256 = "sha256-RaM2JN2WOHyZY+AxzgQLvhXg6UnevDbSFSR4jFLsYrc=";
+    rev = "v${version}";
+    hash = "sha256-RaM2JN2WOHyZY+AxzgQLvhXg6UnevDbSFSR4jFLsYrc=";
   };
 
   propagatedBuildInputs = [
     aiohttp
     oauthlib
     requests
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/twine/default.nix b/pkgs/development/python-modules/twine/default.nix
index d6fea594211..6cfb7f36047 100644
--- a/pkgs/development/python-modules/twine/default.nix
+++ b/pkgs/development/python-modules/twine/default.nix
@@ -1,40 +1,42 @@
-{ lib, buildPythonPackage, fetchPypi, pythonOlder
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pythonOlder
 , importlib-metadata
 , keyring
 , pkginfo
-, pyblake2
 , readme_renderer
 , requests
 , requests-toolbelt
-, setuptools-scm
-, tqdm
-, colorama
+, rich
 , rfc3986
+, setuptools-scm
+, urllib3
 }:
 
 buildPythonPackage rec {
   pname = "twine";
-  version = "3.8.0";
+  version = "4.0.0";
   format = "pyproject";
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-jvpSZY4K53BoahO2dVaTKPH7qYN+XeGGe/5fRqmu/hk=";
+    sha256 = "sha256-gXqgwL3AKl6+MgUeFo4jxxoGCDNOYkx5MBHxINu8Bbc=";
   };
 
   nativeBuildInputs = [ setuptools-scm ];
+
   propagatedBuildInputs = [
     importlib-metadata
     keyring
     pkginfo
-    pyblake2
     readme_renderer
     requests
     requests-toolbelt
-    tqdm
-    colorama
     rfc3986
+    rich
+    urllib3
   ];
 
   # Requires network
diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix
index ea7cca173a1..02a993fdf13 100644
--- a/pkgs/development/python-modules/twisted/default.nix
+++ b/pkgs/development/python-modules/twisted/default.nix
@@ -1,6 +1,5 @@
 { lib, stdenv
 , buildPythonPackage
-, fetchpatch
 , fetchPypi
 , python
 , zope_interface
@@ -18,26 +17,14 @@
 }:
 buildPythonPackage rec {
   pname = "Twisted";
-  version = "22.2.0";
+  version = "22.4.0";
 
   src = fetchPypi {
     inherit pname version;
     extension = "tar.gz";
-    sha256 = "1wml02jxni8k15984pskks7d6yin81w4d2ac026cpyiqd0gjpwsp";
+    sha256 = "sha256-oEeZD1ffrh4L0rffJSbU8W3NyEN3TcEIt4xS8qXxNoA=";
   };
 
-  patches = [
-    (fetchpatch {
-      # https://github.com/twisted/twisted/security/advisories/GHSA-c2jg-hw38-jrqq
-      name = "CVE-2022-24801.patch";
-      url = "https://github.com/twisted/twisted/commit/592217e951363d60e9cd99c5bbfd23d4615043ac.patch";
-      hash = "sha256-psX5vAM9myuILuTazpebSk8QTT52CB6N7RXAY4MAV8g=";
-      excludes = [
-        "src/twisted/web/newsfragments/10323.bugfix"
-      ];
-    })
-  ];
-
   propagatedBuildInputs = [ zope_interface incremental automat constantly hyperlink pyhamcrest attrs setuptools typing-extensions ];
 
   passthru.extras.tls = [ pyopenssl service-identity idna ];
diff --git a/pkgs/development/python-modules/twitterapi/default.nix b/pkgs/development/python-modules/twitterapi/default.nix
index acaf3bf640e..313249e50d9 100644
--- a/pkgs/development/python-modules/twitterapi/default.nix
+++ b/pkgs/development/python-modules/twitterapi/default.nix
@@ -2,7 +2,7 @@
 , buildPythonPackage
 , fetchFromGitHub
 , requests
-, requests_oauthlib
+, requests-oauthlib
 , pythonOlder
 }:
 
@@ -17,12 +17,12 @@ buildPythonPackage rec {
     owner = "geduldig";
     repo = "TwitterAPI";
     rev = "v${version}";
-    sha256 = "sha256-WqeoIZt2OGDXKPAbjm3cHI1kgiCEJC6+ROXXx4TR4b4=";
+    hash = "sha256-WqeoIZt2OGDXKPAbjm3cHI1kgiCEJC6+ROXXx4TR4b4=";
   };
 
   propagatedBuildInputs = [
     requests
-    requests_oauthlib
+    requests-oauthlib
   ];
 
   # Tests are interacting with the Twitter API
diff --git a/pkgs/development/python-modules/typer/default.nix b/pkgs/development/python-modules/typer/default.nix
index 17008eafc1b..9ef2b53b947 100644
--- a/pkgs/development/python-modules/typer/default.nix
+++ b/pkgs/development/python-modules/typer/default.nix
@@ -1,30 +1,34 @@
 { lib
 , stdenv
 , buildPythonPackage
+, fetchpatch
 , fetchPypi
+, flit-core
 , click
 , pytestCheckHook
 , shellingham
 , pytest-xdist
 , pytest-sugar
 , coverage
-, mypy
-, black
-, isort
 , pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "typer";
-  version = "0.4.0";
+  version = "0.4.1";
+  format = "pyproject";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1pgm0zsylbmz1r96q4n3rfi0h3pn4jss2yfs83z0yxa90nmsxhv3";
+    sha256 = "sha256-Vkau8Nk2ssdhoQOT8DhO5rXH/guz5c1xCxcTTKHZnP8=";
   };
 
+  nativeBuildInputs = [
+    flit-core
+  ];
+
   propagatedBuildInputs = [
     click
   ];
@@ -34,10 +38,7 @@ buildPythonPackage rec {
     pytest-xdist
     pytest-sugar
     shellingham
-    coverage
-    mypy
-    black
-    isort
+    coverage # execs coverage in tests
   ];
 
   preCheck = ''
diff --git a/pkgs/development/python-modules/tzdata/default.nix b/pkgs/development/python-modules/tzdata/default.nix
index cfc46a658d3..ee8166abb94 100644
--- a/pkgs/development/python-modules/tzdata/default.nix
+++ b/pkgs/development/python-modules/tzdata/default.nix
@@ -9,12 +9,12 @@
 
 buildPythonPackage rec {
   pname = "tzdata";
-  version = "2021.5";
+  version = "2022.1";
   format = "pyproject";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-aNvkGv0BuGeJS739VPoD9GjPpPAIa/tK3NjejyTz7iE=";
+    hash = "sha256-i1NqjsY9wHUTQrOYQZOjEY+Pyir+JXUrubf//TmFUtM=";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/uamqp/default.nix b/pkgs/development/python-modules/uamqp/default.nix
index f3c8792e569..a838f44eb95 100644
--- a/pkgs/development/python-modules/uamqp/default.nix
+++ b/pkgs/development/python-modules/uamqp/default.nix
@@ -16,11 +16,11 @@
 
 buildPythonPackage rec {
   pname = "uamqp";
-  version = "1.5.1";
+  version = "1.5.3";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-VevtbXtOTKQEqVYpNKFrDhvyDBJY+uQMhld6in+EroE=";
+    sha256 = "sha256-guhfOMvddC4E+oOmvpeG8GsXEfqLcSHVdtj3w8fF2Vs=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/ufo2ft/default.nix b/pkgs/development/python-modules/ufo2ft/default.nix
index 03ebd566b70..8f700107bce 100644
--- a/pkgs/development/python-modules/ufo2ft/default.nix
+++ b/pkgs/development/python-modules/ufo2ft/default.nix
@@ -12,13 +12,13 @@
 
 buildPythonPackage rec {
   pname = "ufo2ft";
-  version = "2.25.3";
+  version = "2.26.0";
 
   format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-4OuEol+YorvOeK5bj33Po8V9KD0trcgTMXCTQ+J7q94=";
+    sha256 = "sha256-1WQAs1ypWtLObgBzPtqtvHjkKnDWohu3PbI3bF7B0Sg=";
   };
 
   patches = [
diff --git a/pkgs/development/python-modules/urllib3/default.nix b/pkgs/development/python-modules/urllib3/default.nix
index 4c1a61b09fc..6d29a107f00 100644
--- a/pkgs/development/python-modules/urllib3/default.nix
+++ b/pkgs/development/python-modules/urllib3/default.nix
@@ -18,12 +18,12 @@
 
 buildPythonPackage rec {
   pname = "urllib3";
-  version = "1.26.8";
+  version = "1.26.9";
   format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-Dnwz2aY+fd/LhngKrIe+/C+930bFjbtIfghV987sKDw=";
+    hash = "sha256-qrrxZHeAal4d0ZqkH4wreVDdPHRjYtfjIj2+beasRI4=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/ush/default.nix b/pkgs/development/python-modules/ush/default.nix
index d7a90bcb9e8..3e7773fb2fd 100644
--- a/pkgs/development/python-modules/ush/default.nix
+++ b/pkgs/development/python-modules/ush/default.nix
@@ -1,4 +1,9 @@
-{ lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook}:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, six
+}:
 
 buildPythonPackage rec {
   pname = "ush";
@@ -11,7 +16,10 @@ buildPythonPackage rec {
     sha256 = "sha256-eL3vG3yS02enbLYorKvvYKbju9HInffUhrZgkodwhvo=";
   };
 
-  checkInputs = [ pytestCheckHook ];
+  checkInputs = [
+    pytestCheckHook
+    six
+  ];
 
   disabledTestPaths = [
     # seems to be outdated?
diff --git a/pkgs/development/python-modules/validators/default.nix b/pkgs/development/python-modules/validators/default.nix
index 29ec9cd73d7..f83fe801a2a 100644
--- a/pkgs/development/python-modules/validators/default.nix
+++ b/pkgs/development/python-modules/validators/default.nix
@@ -3,6 +3,7 @@
 , fetchPypi
 , isPy27
 , decorator
+, six
 , pytestCheckHook
 }:
 
@@ -18,6 +19,7 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [
     decorator
+    six
   ];
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/validictory/default.nix b/pkgs/development/python-modules/validictory/default.nix
index 29ffb76591e..c4172079a60 100644
--- a/pkgs/development/python-modules/validictory/default.nix
+++ b/pkgs/development/python-modules/validictory/default.nix
@@ -1,5 +1,6 @@
 { lib
 , buildPythonPackage
+, pythonAtLeast
 , fetchPypi
 }:
 
@@ -7,6 +8,8 @@ buildPythonPackage rec {
   pname = "validictory";
   version = "1.1.2";
 
+  disabled = pythonAtLeast "3.10"; # abandoned, should be removed when we move to py310/311
+
   src = fetchPypi {
     inherit pname version;
     sha256 = "1fim11vj990rmn59qd67knccjx1p4an7gavbgprpabsrb13bi1rs";
diff --git a/pkgs/development/python-modules/variants/default.nix b/pkgs/development/python-modules/variants/default.nix
index e23407ab06b..2b5dccec558 100644
--- a/pkgs/development/python-modules/variants/default.nix
+++ b/pkgs/development/python-modules/variants/default.nix
@@ -4,6 +4,7 @@
 , pytest-runner
 , setuptools-scm
 , pytestCheckHook
+, six
 , lib
 }:
 
@@ -17,12 +18,12 @@ buildPythonPackage rec {
   };
 
   nativeBuildInputs = [
-    pytest-runner
     setuptools-scm
   ];
 
   checkInputs = [
     pytestCheckHook
+    six
   ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/vdirsyncer/default.nix b/pkgs/development/python-modules/vdirsyncer/default.nix
index edb61ccb703..b5124673951 100644
--- a/pkgs/development/python-modules/vdirsyncer/default.nix
+++ b/pkgs/development/python-modules/vdirsyncer/default.nix
@@ -7,7 +7,7 @@
 , click-threading
 , requests-toolbelt
 , requests
-, requests_oauthlib # required for google oauth sync
+, requests-oauthlib
 , atomicwrites
 , hypothesis
 , pytestCheckHook
@@ -17,22 +17,31 @@
 }:
 
 buildPythonPackage rec {
-  version = "0.18.0";
   pname = "vdirsyncer";
+  version = "0.18.0";
+  format = "setuptools";
+
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-J7w+1R93STX7ujkpFcjI1M9jmuUaRLZ0aGtJoQJfwgE=";
+    hash = "sha256-J7w+1R93STX7ujkpFcjI1M9jmuUaRLZ0aGtJoQJfwgE=";
   };
 
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "click-log>=0.3.0, <0.4.0" "click-log>=0.3.0, <0.5.0"
+
+    sed -i -e '/--cov/d' -e '/--no-cov/d' setup.cfg
+  '';
+
   propagatedBuildInputs = [
     atomicwrites
     click
     click-log
     click-threading
     requests
-    requests_oauthlib # required for google oauth sync
+    requests-oauthlib
     requests-toolbelt
   ];
 
@@ -47,10 +56,6 @@ buildPythonPackage rec {
     pytest-subtesthack
   ];
 
-  postPatch = ''
-    sed -i -e '/--cov/d' -e '/--no-cov/d' setup.cfg
-  '';
-
   preCheck = ''
     export DETERMINISTIC_TESTS=true
   '';
diff --git a/pkgs/development/python-modules/virtualenv/default.nix b/pkgs/development/python-modules/virtualenv/default.nix
index 126bf4e6c6c..a739ab2fd6c 100644
--- a/pkgs/development/python-modules/virtualenv/default.nix
+++ b/pkgs/development/python-modules/virtualenv/default.nix
@@ -23,11 +23,11 @@
 
 buildPythonPackage rec {
   pname = "virtualenv";
-  version = "20.13.2";
+  version = "20.14.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-AfX4B0TSSjdDzmGFgSNIjpHLLdHTvfkq2vG7o5/97fA=";
+    sha256 = "sha256-jltAIDcocSboHM3pQyuVqL5bGdNlhPZJVwYKNIjBHKg=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/waitress/default.nix b/pkgs/development/python-modules/waitress/default.nix
index aa09b0068d9..e2cbe59ab28 100644
--- a/pkgs/development/python-modules/waitress/default.nix
+++ b/pkgs/development/python-modules/waitress/default.nix
@@ -5,11 +5,11 @@
 
 buildPythonPackage rec {
   pname = "waitress";
-  version = "2.0.0";
+  version = "2.1.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "69e1f242c7f80273490d3403c3976f3ac3b26e289856936d1f620ed48f321897";
+    sha256 = "sha256-4uYFds8UoVOdp597fuHnmnHmTzZqC0fbVKFelx9XuxY=";
   };
 
   doCheck = false;
diff --git a/pkgs/development/python-modules/wasm/default.nix b/pkgs/development/python-modules/wasm/default.nix
index f6c2cc42e38..adc3c958bee 100644
--- a/pkgs/development/python-modules/wasm/default.nix
+++ b/pkgs/development/python-modules/wasm/default.nix
@@ -1,5 +1,6 @@
 { buildPythonPackage
 , fetchPypi
+, pythonAtLeast
 , lib
 }:
 
@@ -7,6 +8,8 @@ buildPythonPackage rec {
   pname = "wasm";
   version = "1.2";
 
+  disabled = pythonAtLeast "3.10"; # project is abandoned, remove we whe move to py310/311
+
   src = fetchPypi {
     inherit pname version;
     sha256 = "179xcinfc35xgk0bf9y58kwxzymzk7c1p58w6khmqfiqvb91j3r8";
diff --git a/pkgs/development/python-modules/watchdog/default.nix b/pkgs/development/python-modules/watchdog/default.nix
index 1bc471c7287..9afd0f032fc 100644
--- a/pkgs/development/python-modules/watchdog/default.nix
+++ b/pkgs/development/python-modules/watchdog/default.nix
@@ -12,12 +12,12 @@
 
 buildPythonPackage rec {
   pname = "watchdog";
-  version = "2.1.6";
+  version = "2.1.7";
   format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-o25132x2fL9G9hqRxws7pxgR36CspKMk2UB6Bqi3ouc=";
+    sha256 = "sha256-P9R4FTU76cRO68lMwo/iaysMW9iJ2vxKWny9+SQUNIA=";
   };
 
   buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
diff --git a/pkgs/development/python-modules/watchgod/default.nix b/pkgs/development/python-modules/watchgod/default.nix
index 5bb84258642..70e93f1a209 100644
--- a/pkgs/development/python-modules/watchgod/default.nix
+++ b/pkgs/development/python-modules/watchgod/default.nix
@@ -1,17 +1,22 @@
 { lib
 , buildPythonPackage
 , fetchPypi
+, anyio
 }:
 
 buildPythonPackage rec {
   pname = "watchgod";
-  version = "0.7";
+  version = "0.8.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0aagm0n5fkpzdsfgl0r21gkz5qaicgq3f4rqz2fdvsgbn1i0s528";
+    sha256 = "sha256-wS0V8999EedAcE5FOYJ3918dePRq1Zyp11Bb/YuNMIY=";
   };
 
+  propagatedBuildInputs = [
+    anyio
+  ];
+
   # no tests in release
   doCheck = false;
 
diff --git a/pkgs/development/python-modules/websocket-client/default.nix b/pkgs/development/python-modules/websocket-client/default.nix
index 37d926e5055..a1c0cfa82e1 100644
--- a/pkgs/development/python-modules/websocket-client/default.nix
+++ b/pkgs/development/python-modules/websocket-client/default.nix
@@ -4,20 +4,22 @@
 , pythonOlder
 , pytestCheckHook
 , python-socks
+, six
 }:
 
 buildPythonPackage rec {
   pname = "websocket-client";
-  version = "1.3.1";
+  version = "1.3.2";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-YninUGU5VBgoP4h958O+r7OqaNraXKy+SyFOjSbaSZs=";
+    sha256 = "sha256-ULIdsAWPepU9Z8wERb5LlI1/wZbsvrgIPWjZRijkq/Y=";
   };
 
   propagatedBuildInputs = [
     python-socks
+    six
    ];
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/weconnect-mqtt/default.nix b/pkgs/development/python-modules/weconnect-mqtt/default.nix
index 0bb0a8f7999..b49d6c35821 100644
--- a/pkgs/development/python-modules/weconnect-mqtt/default.nix
+++ b/pkgs/development/python-modules/weconnect-mqtt/default.nix
@@ -10,7 +10,7 @@
 
 buildPythonPackage rec {
   pname = "weconnect-mqtt";
-  version = "0.30.2";
+  version = "0.32.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
@@ -19,7 +19,7 @@ buildPythonPackage rec {
     owner = "tillsteinbach";
     repo = "WeConnect-mqtt";
     rev = "v${version}";
-    sha256 = "sha256-e8dDdtabEHQKNx3c63Ou3T3ygsj4763C9Pd8usFrSCE=";
+    sha256 = "sha256-XuWiWL3cszC8aM+CJcAk359VaBCZNUOu4mAfmbdpoGg=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/weconnect/default.nix b/pkgs/development/python-modules/weconnect/default.nix
index 096f1b0e99b..db3cc1b8f82 100644
--- a/pkgs/development/python-modules/weconnect/default.nix
+++ b/pkgs/development/python-modules/weconnect/default.nix
@@ -12,7 +12,7 @@
 
 buildPythonPackage rec {
   pname = "weconnect";
-  version = "0.37.2";
+  version = "0.38.1";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
@@ -21,7 +21,7 @@ buildPythonPackage rec {
     owner = "tillsteinbach";
     repo = "WeConnect-python";
     rev = "v${version}";
-    sha256 = "sha256-54T4L1MzF2rkKM0AXz+bPBdVL7Izdho6c3AVSXBho2E=";
+    sha256 = "sha256-n9MqJ+npdHYpQJ8m6V8Oop+VuQ3EOCRrfIlU5qAc/Y8=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/werkzeug/default.nix b/pkgs/development/python-modules/werkzeug/default.nix
index 63c3ad1b420..f961d0359db 100644
--- a/pkgs/development/python-modules/werkzeug/default.nix
+++ b/pkgs/development/python-modules/werkzeug/default.nix
@@ -5,6 +5,7 @@
 , fetchPypi
 , watchdog
 , dataclasses
+, ephemeral-port-reserve
 , pytest-timeout
 , pytest-xprocess
 , pytestCheckHook
@@ -12,15 +13,15 @@
 
 buildPythonPackage rec {
   pname = "werkzeug";
-  version = "2.0.3";
+  version = "2.1.0";
   format = "setuptools";
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     pname = "Werkzeug";
     inherit version;
-    sha256 = "sha256-uGP4/wV8UiFktgZ8niiwQRYbS+W6TQ2s7qpQoWOCLTw=";
+    sha256 = "sha256-m1VGaj6Z4TsfBoamYRfTm9qFqZIWbgp5rt/PNYYyj3o=";
   };
 
   propagatedBuildInputs = lib.optionals (!stdenv.isDarwin) [
@@ -31,6 +32,7 @@ buildPythonPackage rec {
   ];
 
   checkInputs = [
+    ephemeral-port-reserve
     pytest-timeout
     pytest-xprocess
     pytestCheckHook
@@ -40,6 +42,11 @@ buildPythonPackage rec {
     "test_get_machine_id"
   ];
 
+  disabledTestPaths = [
+    # ConnectionRefusedError: [Errno 111] Connection refused
+    "tests/test_serving.py"
+  ];
+
   pytestFlagsArray = [
     # don't run tests that are marked with filterwarnings, they fail with
     # warnings._OptionError: unknown warning category: 'pytest.PytestUnraisableExceptionWarning'
diff --git a/pkgs/development/python-modules/widgetsnbextension/default.nix b/pkgs/development/python-modules/widgetsnbextension/default.nix
index 8f6cb6ad186..5b4f535563c 100644
--- a/pkgs/development/python-modules/widgetsnbextension/default.nix
+++ b/pkgs/development/python-modules/widgetsnbextension/default.nix
@@ -7,11 +7,11 @@
 
 buildPythonPackage rec {
   pname = "widgetsnbextension";
-  version = "3.5.2";
+  version = "3.6.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "e0731a60ba540cd19bbbefe771a9076dcd2dde90713a8f87f27f53f2d1db7727";
+    sha256 = "sha256-6Ep6n8ubrz1XEG4YSnOJqPjrk1v3QaXrnWCqGMwCmoA=";
   };
 
   propagatedBuildInputs = [ notebook ];
diff --git a/pkgs/development/python-modules/wsproto/default.nix b/pkgs/development/python-modules/wsproto/default.nix
index 803ddd51d9f..bcc9428b460 100644
--- a/pkgs/development/python-modules/wsproto/default.nix
+++ b/pkgs/development/python-modules/wsproto/default.nix
@@ -1,30 +1,31 @@
-{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy36
-, dataclasses
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pythonOlder
 , h11
-, pytest
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "wsproto";
   version = "1.1.0";
-  disabled = pythonOlder "3.6"; # python versions <3.6
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "sha256-ouVr/Vx82DwTadg7X+zNbTd5i3SHKGbmJhbg7PERvag=";
   };
 
-  propagatedBuildInputs = [ h11 ] ++ lib.optional isPy36 dataclasses;
+  propagatedBuildInputs = [ h11 ];
 
-  checkInputs = [ pytest ];
+  checkInputs = [ pytestCheckHook ];
 
-  checkPhase = ''
-    py.test
-  '';
+  pythonImportsCheck = [ "wsproto" ];
 
   meta = with lib; {
     description = "Pure Python, pure state-machine WebSocket implementation";
     homepage = "https://github.com/python-hyper/wsproto/";
     license = licenses.mit;
+    maintainers = with maintainers; [ SuperSandro2000 ];
   };
 }
diff --git a/pkgs/development/python-modules/wxPython/4.1.nix b/pkgs/development/python-modules/wxPython/4.1.nix
index 71f8b2847e3..e5942c17d4c 100644
--- a/pkgs/development/python-modules/wxPython/4.1.nix
+++ b/pkgs/development/python-modules/wxPython/4.1.nix
@@ -48,12 +48,14 @@ buildPythonPackage rec {
     doxygen
     wxGTK.gtk
     pkg-config
+  ] ++ lib.optionals stdenv.isLinux [
     autoPatchelfHook
   ];
 
   buildInputs = [
     wxGTK.gtk
     ncurses
+  ] ++ lib.optionals stdenv.isLinux [
     libXinerama
     libSM
     libXxf86vm
diff --git a/pkgs/development/python-modules/yamlfix/default.nix b/pkgs/development/python-modules/yamlfix/default.nix
index 7243b3891f4..b789aab0370 100644
--- a/pkgs/development/python-modules/yamlfix/default.nix
+++ b/pkgs/development/python-modules/yamlfix/default.nix
@@ -37,11 +37,6 @@ buildPythonPackage rec {
       --replace 'python_paths = "."' ""
   '';
 
-  pytestFlagsArray = [
-    "-n"
-    "$NIX_BUILD_CORES"
-  ];
-
   pythonImportsCheck = [
     "yamlfix"
   ];
diff --git a/pkgs/development/python-modules/yanc/default.nix b/pkgs/development/python-modules/yanc/default.nix
index 925276c0ad6..37e7d91a809 100644
--- a/pkgs/development/python-modules/yanc/default.nix
+++ b/pkgs/development/python-modules/yanc/default.nix
@@ -4,16 +4,16 @@ buildPythonPackage rec {
   pname = "yanc";
   version = "0.3.3";
 
-  # Tests fail on Python>=3.5. See: https://github.com/0compute/yanc/issues/10
-  disabled = !(pythonOlder "3.5");
-
-  checkInputs = [ nose ];
-
   src = fetchPypi {
     inherit pname version;
     sha256 = "0z35bkk9phs40lf5061k1plhjdl5fskm0dmdikrsqi1bjihnxp8w";
   };
 
+  # Tests fail on Python>=3.5. See: https://github.com/0compute/yanc/issues/10
+  doCheck = pythonOlder "3.5";
+
+  checkInputs = [ nose ];
+
   checkPhase = ''
     nosetests .
   '';
diff --git a/pkgs/development/python-modules/zarr/default.nix b/pkgs/development/python-modules/zarr/default.nix
index c943f34c52e..972bd527ad0 100644
--- a/pkgs/development/python-modules/zarr/default.nix
+++ b/pkgs/development/python-modules/zarr/default.nix
@@ -12,12 +12,12 @@
 
 buildPythonPackage rec {
   pname = "zarr";
-  version = "2.11.0";
+  version = "2.11.1";
   disabled = isPy27;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-sIc74nr1aQc4+hWOp6gC6uRUkEwzmVBWGFrMWnQltFE=";
+    sha256 = "sha256-EbYo9C3sNuAUeHnovUcVJLWbI4CUubIePDW+eDmcEV4=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/zetup/default.nix b/pkgs/development/python-modules/zetup/default.nix
index c2e707347b3..41b5f05cfeb 100644
--- a/pkgs/development/python-modules/zetup/default.nix
+++ b/pkgs/development/python-modules/zetup/default.nix
@@ -2,7 +2,7 @@
 , buildPythonPackage
 , fetchPypi
 , nbconvert
-, pathpy
+, path
 , pytestCheckHook
 , setuptools-scm
 , pythonAtLeast
@@ -33,7 +33,7 @@ buildPythonPackage rec {
   propagatedBuildInputs = [ setuptools-scm ];
 
   checkInputs = [
-    pathpy
+    path
     nbconvert
     pytestCheckHook
   ];
diff --git a/pkgs/development/python-modules/zodb/default.nix b/pkgs/development/python-modules/zodb/default.nix
index e4f1e403cd9..7c788f7a9f8 100644
--- a/pkgs/development/python-modules/zodb/default.nix
+++ b/pkgs/development/python-modules/zodb/default.nix
@@ -16,11 +16,11 @@
 
 buildPythonPackage rec {
   pname = "ZODB";
-  version = "5.6.0";
+  version = "5.7.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1zh7rd182l15swkbkm3ib0wgyn16xasdz2mzry8k4lwk6dagnm26";
+    sha256 = "sha256-+kC7wF7NoewkNc0MbdAqE7dphGBVikYENm9qCmhAHNM=";
   };
 
   # remove broken test
diff --git a/pkgs/development/python-modules/zope_testing/default.nix b/pkgs/development/python-modules/zope_testing/default.nix
index ea2d531f763..f8ea4e83b15 100644
--- a/pkgs/development/python-modules/zope_testing/default.nix
+++ b/pkgs/development/python-modules/zope_testing/default.nix
@@ -9,11 +9,11 @@
 
 buildPythonPackage rec {
   pname = "zope.testing";
-  version = "4.9";
+  version = "4.10";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "475cb847a7af9d547313ee93f5d0b8800bf627e6d0d9a51d11967984083cb54e";
+    sha256 = "sha256-O25ZBsrd0UjCP+lY5qrj+tyKCKilP3R9l5HC2BNe5W4=";
   };
 
   doCheck = !isPyPy;
diff --git a/pkgs/development/python-modules/zopfli/default.nix b/pkgs/development/python-modules/zopfli/default.nix
index 1bc880456b6..dc2b14bdc62 100644
--- a/pkgs/development/python-modules/zopfli/default.nix
+++ b/pkgs/development/python-modules/zopfli/default.nix
@@ -1,12 +1,14 @@
-{ lib, buildPythonPackage, fetchPypi, setuptools-scm, zopfli, pytest }:
+{ lib, buildPythonPackage, fetchPypi, pythonOlder, setuptools-scm, zopfli, pytestCheckHook }:
 
 buildPythonPackage rec {
   pname = "zopfli";
-  version = "0.2.0";
+  version = "0.2.1";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-x9PzVcSR84TkNNsuYmheq269pmuWTonhdUuxFLLTjOo=";
+    sha256 = "1ipjkcgdbplsrhr31ypk48px8cax4cm9gcjj7yrcrhg20ql3s9p5";
     extension = "zip";
   };
 
@@ -15,8 +17,7 @@ buildPythonPackage rec {
   buildInputs = [ zopfli ];
   USE_SYSTEM_ZOPFLI = "True";
 
-  # doesn't work with pytestCheckHook
-  checkInputs = [ pytest ];
+  checkInputs = [ pytestCheckHook ];
 
   meta = with lib; {
     description = "cPython bindings for zopfli";
diff --git a/pkgs/development/python2-modules/cryptography/default.nix b/pkgs/development/python2-modules/cryptography/default.nix
index 357bb35dacf..0b4e2ae394c 100644
--- a/pkgs/development/python2-modules/cryptography/default.nix
+++ b/pkgs/development/python2-modules/cryptography/default.nix
@@ -1,10 +1,11 @@
-{ lib, stdenv
+{ lib
+, stdenv
+, callPackage
 , buildPythonPackage
 , fetchPypi
 , isPy27
 , ipaddress
 , openssl
-, cryptography_vectors
 , darwin
 , packaging
 , six
@@ -18,6 +19,9 @@
 , enum34
 }:
 
+let
+  cryptography-vectors = callPackage ./vectors.nix { };
+in
 buildPythonPackage rec {
   pname = "cryptography";
   version = "3.3.2"; # Also update the hash in vectors-3.3.nix
@@ -36,18 +40,19 @@ buildPythonPackage rec {
   ];
 
   buildInputs = [ openssl ]
-             ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
+    ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
   propagatedBuildInputs = [
     packaging
     six
   ] ++ lib.optionals (!isPyPy) [
     cffi
   ] ++ lib.optionals isPy27 [
-    ipaddress enum34
+    ipaddress
+    enum34
   ];
 
   checkInputs = [
-    cryptography_vectors
+    cryptography-vectors
     hypothesis
     iso8601
     pretend
diff --git a/pkgs/development/python2-modules/cryptography-vectors/default.nix b/pkgs/development/python2-modules/cryptography/vectors.nix
index f9b7c525237..4d6214807e7 100644
--- a/pkgs/development/python2-modules/cryptography-vectors/default.nix
+++ b/pkgs/development/python2-modules/cryptography/vectors.nix
@@ -1,12 +1,13 @@
 { buildPythonPackage, fetchPypi, lib, cryptography }:
 
 buildPythonPackage rec {
-  pname = "cryptography_vectors";
+  pname = "cryptography-vectors";
   # The test vectors must have the same version as the cryptography package:
   version = cryptography.version;
 
   src = fetchPypi {
-    inherit pname version;
+    pname = "cryptography_vectors";
+    inherit version;
     sha256 = "1yhaps0f3h2yjb6lmz953z1l1d84y9swk4k3gj9nqyk4vbx5m7cc";
   };
 
diff --git a/pkgs/development/ruby-modules/bundler-app/default.nix b/pkgs/development/ruby-modules/bundler-app/default.nix
index 03bf7275cc7..e3c430cc923 100644
--- a/pkgs/development/ruby-modules/bundler-app/default.nix
+++ b/pkgs/development/ruby-modules/bundler-app/default.nix
@@ -57,7 +57,7 @@ in
                                 "--set BUNDLE_FROZEN 1 "+
                                 "--set GEM_HOME ${basicEnv}/${ruby.gemPath} "+
                                 "--set GEM_PATH ${basicEnv}/${ruby.gemPath} "+
-                                "--run \"cd $srcdir\";\n") scripts)}
+                                "--chdir \"$srcdir\";\n") scripts)}
 
     ${lib.optionalString installManpages ''
     for section in {1..9}; do
diff --git a/pkgs/development/tools/analysis/codeql/default.nix b/pkgs/development/tools/analysis/codeql/default.nix
index abc2dc24474..2584965499e 100644
--- a/pkgs/development/tools/analysis/codeql/default.nix
+++ b/pkgs/development/tools/analysis/codeql/default.nix
@@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
     description = "Semantic code analysis engine";
     homepage = "https://codeql.github.com";
     maintainers = [ maintainers.dump_stack ];
+    platforms = [ "x86_64-linux" ];
     license = licenses.unfree;
   };
 }
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix
index 0ecf6300eb2..9f2fb8b40f4 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix
@@ -112,7 +112,8 @@ let
 
     src = srcDepsSet."java_tools_javac11_${system}-v4.0.zip";
 
-    nativeBuildInputs = [ autoPatchelfHook unzip ];
+    nativeBuildInputs = [ unzip ]
+      ++ lib.optional stdenv.isLinux autoPatchelfHook;
     buildInputs = [ gcc-unwrapped ];
 
     sourceRoot = ".";
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix
index 3adf52ec905..0402fb85f26 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix
@@ -112,7 +112,8 @@ let
 
     src = srcDepsSet."java_tools_javac11_${system}-v6.1.zip";
 
-    nativeBuildInputs = [ autoPatchelfHook unzip ];
+    nativeBuildInputs = [ unzip ]
+      ++ lib.optional stdenv.isLinux autoPatchelfHook;
     buildInputs = [ gcc-unwrapped ];
 
     sourceRoot = ".";
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix
index 3c71c8cc089..3a5c9e2e76f 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix
@@ -117,7 +117,8 @@ let
 
     src = srcDepsSet."java_tools_javac11_${system}-v10.0.zip";
 
-    nativeBuildInputs = [ autoPatchelfHook unzip ];
+    nativeBuildInputs = [ unzip ]
+      ++ lib.optional stdenv.isLinux autoPatchelfHook;
     buildInputs = [ gcc-unwrapped ];
 
     sourceRoot = ".";
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix
index 72c971d1334..79bb378534b 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix
@@ -142,7 +142,8 @@ let
 
     src = srcDepsSet."java_tools_javac11_${system}-v10.6.zip";
 
-    nativeBuildInputs = [ autoPatchelfHook unzip ];
+    nativeBuildInputs = [ unzip ]
+      ++ lib.optional stdenv.isLinux autoPatchelfHook;
     buildInputs = [ gcc-unwrapped ];
 
     sourceRoot = ".";
diff --git a/pkgs/development/tools/build-managers/bloop/default.nix b/pkgs/development/tools/build-managers/bloop/default.nix
index ab8c5856a1a..0649b0c86c6 100644
--- a/pkgs/development/tools/build-managers/bloop/default.nix
+++ b/pkgs/development/tools/build-managers/bloop/default.nix
@@ -66,7 +66,8 @@ stdenv.mkDerivation rec {
   };
 
   dontUnpack = true;
-  nativeBuildInputs = [ autoPatchelfHook installShellFiles makeWrapper ];
+  nativeBuildInputs = [ installShellFiles makeWrapper ]
+    ++ lib.optional stdenv.isLinux autoPatchelfHook;
   buildInputs = [ stdenv.cc.cc.lib zlib ];
   propagatedBuildInputs = [ jre ];
 
diff --git a/pkgs/development/tools/build-managers/wafHook/setup-hook.sh b/pkgs/development/tools/build-managers/wafHook/setup-hook.sh
index 6cea8fcc2ea..e2f6714a32d 100644
--- a/pkgs/development/tools/build-managers/wafHook/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/wafHook/setup-hook.sh
@@ -10,6 +10,10 @@ wafConfigurePhase() {
         wafConfigureFlags="${prefixKey:---prefix=}$prefix $wafConfigureFlags"
     fi
 
+    if [ -n "${PKG_CONFIG}" ]; then
+      export PKGCONFIG="${PKG_CONFIG}"
+    fi
+
     local flagsArray=(
         "${flagsArray[@]}"
         $wafConfigureFlags "${wafConfigureFlagsArray[@]}"
diff --git a/pkgs/development/tools/ccloud-cli/default.nix b/pkgs/development/tools/ccloud-cli/default.nix
index 5814ab90e6d..2a3d1de41a1 100644
--- a/pkgs/development/tools/ccloud-cli/default.nix
+++ b/pkgs/development/tools/ccloud-cli/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
       sha256 = "0936hipcl37w4mzzsnjlz4q1z4j9094i4irigzqwg14gdbs7p11s";
     });
 
-  nativeBuildInputs = [ autoPatchelfHook ];
+  nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
 
   dontStrip = stdenv.isDarwin;
 
diff --git a/pkgs/development/tools/confluent-cli/default.nix b/pkgs/development/tools/confluent-cli/default.nix
index 9664a75703a..059a3272038 100644
--- a/pkgs/development/tools/confluent-cli/default.nix
+++ b/pkgs/development/tools/confluent-cli/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
       sha256 = "1wvy7x56cc7imycf0d83mxcqzdvv56cc0zbp913xgghjn9dl2z7a";
     });
 
-  nativeBuildInputs = [ autoPatchelfHook ];
+  nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
 
   dontStrip = stdenv.isDarwin;
 
diff --git a/pkgs/development/tools/database/litecli/default.nix b/pkgs/development/tools/database/litecli/default.nix
index b2a96ab0dc5..a1c35c88ee8 100644
--- a/pkgs/development/tools/database/litecli/default.nix
+++ b/pkgs/development/tools/database/litecli/default.nix
@@ -4,12 +4,12 @@
 
 python3Packages.buildPythonApplication rec {
   pname = "litecli";
-  version = "1.6.0";
+  version = "1.8.0";
   disabled = python3Packages.pythonOlder "3.4";
 
   src = python3Packages.fetchPypi {
     inherit pname version;
-    sha256 = "sha256-TSdOFHW007syOEg4gwvEqDiJkrfLgRmqjP/H/6oBZ/k=";
+    sha256 = "sha256-AvaSdHlwRlw7rN/o8GjcXZbyXVsrEh+XF37wVTBEED4=";
   };
 
   propagatedBuildInputs = with python3Packages; [
diff --git a/pkgs/development/tools/database/sqldeveloper/default.nix b/pkgs/development/tools/database/sqldeveloper/default.nix
index da43a4daf7d..655156c176c 100644
--- a/pkgs/development/tools/database/sqldeveloper/default.nix
+++ b/pkgs/development/tools/database/sqldeveloper/default.nix
@@ -62,7 +62,7 @@ in
 
     makeWrapper $out/libexec/sqldeveloper/bin/sqldeveloper $out/bin/sqldeveloper \
       --set JAVA_HOME ${jdk.home} \
-      --run "cd $out/libexec/sqldeveloper/bin"
+      --chdir "$out/libexec/sqldeveloper/bin"
   '';
 
   meta = with lib; {
diff --git a/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch b/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch
new file mode 100644
index 00000000000..f9c6e88d97b
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch
@@ -0,0 +1,137 @@
+From beca4a2c25ee86e4020f8b8bddc4d8e0ed3430b3 Mon Sep 17 00:00:00 2001
+From: Andrew Childs <andrew.childs@bibo.com.ph>
+Date: Tue, 22 Feb 2022 11:28:04 +0900
+Subject: [PATCH] Revert "libtool.m4: fix nm BSD flag detection"
+
+This reverts commit bef9ef8ca0f941d743c77cc55b5fe7985990b2a7.
+---
+ ChangeLog  |  9 ------
+ libtool.m4 | 88 ++++++++++++++++++++++++++----------------------------
+ 2 files changed, 43 insertions(+), 54 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 18e8b6835da..c12f07403c3 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -375,15 +375,6 @@
+ 
+ 	* src-release.sh (GDB_SUPPPORT_DIRS): Add libbacktrace.
+ 
+-2021-09-27  Nick Alcock  <nick.alcock@oracle.com>
+-
+-	PR libctf/27967
+-	* libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided
+-	NM, if there is one.  Run nm on itself, not on /dev/null, to avoid
+-	errors from nms that refuse to work on non-regular files.  Remove
+-	other workarounds for this problem.  Strip out blank lines from the
+-	nm output.
+-
+ 2021-09-27  Nick Alcock  <nick.alcock@oracle.com>
+ 
+ 	PR libctf/27967
+diff --git a/libtool.m4 b/libtool.m4
+index a216bb14e99..7a711249304 100644
+--- a/libtool.m4
++++ b/libtool.m4
+@@ -3200,55 +3200,53 @@ _LT_DECL([], [file_magic_cmd], [1],
+ 
+ # LT_PATH_NM
+ # ----------
+-# find the pathname to a BSD- or MS-compatible name lister, and any flags
+-# needed to make it compatible
++# find the pathname to a BSD- or MS-compatible name lister
+ AC_DEFUN([LT_PATH_NM],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+ AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+ [if test -n "$NM"; then
+-   # Let the user override the nm to test.
+-   lt_nm_to_check="$NM"
+- else
+-   lt_nm_to_check="${ac_tool_prefix}nm"
+-   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+-     lt_nm_to_check="$lt_nm_to_check nm"
+-   fi
+- fi
+- for lt_tmp_nm in $lt_nm_to_check; do
+-   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+-   for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+-     IFS="$lt_save_ifs"
+-     test -z "$ac_dir" && ac_dir=.
+-     case "$lt_tmp_nm" in
+-     */*|*\\*) tmp_nm="$lt_tmp_nm";;
+-     *) tmp_nm="$ac_dir/$lt_tmp_nm";;
+-     esac
+-     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+-       # Check to see if the nm accepts a BSD-compat flag.
+-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+-       #   nm: unknown option "B" ignored
+-       case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
+-       *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
+-	 break
+-	 ;;
+-       *)
+-	 case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
+-	 *$tmp_nm*)
+-	   lt_cv_path_NM="$tmp_nm -p"
+-	   break
+-	   ;;
+-	 *)
+-	   lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+-	   continue # so that we can try to find one that supports BSD flags
+-	   ;;
+-	 esac
+-	 ;;
+-       esac
+-     fi
+-   done
+-   IFS="$lt_save_ifs"
+- done
+- : ${lt_cv_path_NM=no}])
++  # Let the user override the test.
++  lt_cv_path_NM="$NM"
++else
++  lt_nm_to_check="${ac_tool_prefix}nm"
++  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
++    lt_nm_to_check="$lt_nm_to_check nm"
++  fi
++  for lt_tmp_nm in $lt_nm_to_check; do
++    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
++    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
++      IFS="$lt_save_ifs"
++      test -z "$ac_dir" && ac_dir=.
++      tmp_nm="$ac_dir/$lt_tmp_nm"
++      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
++	# Check to see if the nm accepts a BSD-compat flag.
++	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
++	#   nm: unknown option "B" ignored
++	# Tru64's nm complains that /dev/null is an invalid object file
++	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
++	*/dev/null* | *'Invalid file or object type'*)
++	  lt_cv_path_NM="$tmp_nm -B"
++	  break
++	  ;;
++	*)
++	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
++	  */dev/null*)
++	    lt_cv_path_NM="$tmp_nm -p"
++	    break
++	    ;;
++	  *)
++	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
++	    continue # so that we can try to find one that supports BSD flags
++	    ;;
++	  esac
++	  ;;
++	esac
++      fi
++    done
++    IFS="$lt_save_ifs"
++  done
++  : ${lt_cv_path_NM=no}
++fi])
+ if test "$lt_cv_path_NM" != "no"; then
+   NM="$lt_cv_path_NM"
+ else
+-- 
+2.34.1
+
diff --git a/pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch b/pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch
new file mode 100644
index 00000000000..e601be3a330
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch
@@ -0,0 +1,47 @@
+From 33a8dc728eb5da3e1d3439c96810d1f6b2660b89 Mon Sep 17 00:00:00 2001
+From: Andrew Childs <andrew.childs@bibo.com.ph>
+Date: Tue, 22 Feb 2022 12:24:46 +0900
+Subject: [PATCH] libtool.m4: update macos version detection block
+
+Includes upstream change
+9e8c882517082fe5755f2524d23efb02f1522490
+---
+ libtool.m4 | 21 ++++++++-------------
+ 1 file changed, 8 insertions(+), 13 deletions(-)
+
+diff --git a/libtool.m4 b/libtool.m4
+index 7a711249304..f452efb4300 100644
+--- a/libtool.m4
++++ b/libtool.m4
+@@ -996,20 +996,15 @@ _LT_EOF
+     ])
+     case $host_os in
+     rhapsody* | darwin1.[[012]])
+-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
++      _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]][[,.]]*)
+-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+-	10.*)
+-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
++    darwin*)
++      case $MACOSX_DEPLOYMENT_TARGET,$host in
++        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
++          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
++        *)
++          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+       esac
+     ;;
+   esac
+-- 
+2.34.1
+
diff --git a/pkgs/development/tools/misc/binutils/CVE-2020-35448.patch b/pkgs/development/tools/misc/binutils/CVE-2020-35448.patch
deleted file mode 100644
index 2eba7b51849..00000000000
--- a/pkgs/development/tools/misc/binutils/CVE-2020-35448.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 8642dafaef21aa6747cec01df1977e9c52eb4679 Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Fri, 4 Sep 2020 19:19:18 +0930
-Subject: [PATCH] PR26574, heap buffer overflow in
- _bfd_elf_slurp_secondary_reloc_section
-
-A horribly fuzzed object with section headers inside the ELF header.
-Disallow that, and crazy reloc sizes.
-
-	PR 26574
-	* elfcode.h (elf_object_p): Sanity check section header offset.
-	* elf.c (_bfd_elf_slurp_secondary_reloc_section): Sanity check
-	sh_entsize.
----
- bfd/elf.c     | 4 +++-
- bfd/elfcode.h | 8 ++++----
- 3 files changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/bfd/elf.c b/bfd/elf.c
-index ac2095f787d..5a02f8dc309 100644
---- a/bfd/elf.c
-+++ b/bfd/elf.c
-@@ -12576,7 +12576,9 @@ _bfd_elf_slurp_secondary_reloc_section (bfd *      abfd,
-       Elf_Internal_Shdr * hdr = & elf_section_data (relsec)->this_hdr;
- 
-       if (hdr->sh_type == SHT_SECONDARY_RELOC
--	  && hdr->sh_info == (unsigned) elf_section_data (sec)->this_idx)
-+	  && hdr->sh_info == (unsigned) elf_section_data (sec)->this_idx
-+	  && (hdr->sh_entsize == ebd->s->sizeof_rel
-+	      || hdr->sh_entsize == ebd->s->sizeof_rela))
- 	{
- 	  bfd_byte * native_relocs;
- 	  bfd_byte * native_reloc;
-diff --git a/bfd/elfcode.h b/bfd/elfcode.h
-index 2ed2f135c34..606ff64fd4d 100644
---- a/bfd/elfcode.h
-+++ b/bfd/elfcode.h
-@@ -571,7 +571,7 @@ elf_object_p (bfd *abfd)
- 
-   /* If this is a relocatable file and there is no section header
-      table, then we're hosed.  */
--  if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_type == ET_REL)
-+  if (i_ehdrp->e_shoff < sizeof (x_ehdr) && i_ehdrp->e_type == ET_REL)
-     goto got_wrong_format_error;
- 
-   /* As a simple sanity check, verify that what BFD thinks is the
-@@ -581,7 +581,7 @@ elf_object_p (bfd *abfd)
-     goto got_wrong_format_error;
- 
-   /* Further sanity check.  */
--  if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_shnum != 0)
-+  if (i_ehdrp->e_shoff < sizeof (x_ehdr) && i_ehdrp->e_shnum != 0)
-     goto got_wrong_format_error;
- 
-   ebd = get_elf_backend_data (abfd);
-@@ -618,7 +618,7 @@ elf_object_p (bfd *abfd)
-       && ebd->elf_osabi != ELFOSABI_NONE)
-     goto got_wrong_format_error;
- 
--  if (i_ehdrp->e_shoff != 0)
-+  if (i_ehdrp->e_shoff >= sizeof (x_ehdr))
-     {
-       file_ptr where = (file_ptr) i_ehdrp->e_shoff;
- 
-@@ -819,7 +819,7 @@ elf_object_p (bfd *abfd)
- 	}
-     }
- 
--  if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff != 0)
-+  if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff >= sizeof (x_ehdr))
-     {
-       unsigned int num_sec;
- 
--- 
-2.27.0
-
-
diff --git a/pkgs/development/tools/misc/binutils/CVE-2021-3487.patch b/pkgs/development/tools/misc/binutils/CVE-2021-3487.patch
deleted file mode 100644
index 004271bd45a..00000000000
--- a/pkgs/development/tools/misc/binutils/CVE-2021-3487.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From: Nick Clifton <nickc@redhat.com>
-Date: Thu, 26 Nov 2020 17:08:33 +0000 (+0000)
-Subject: Prevent a memory allocation failure when parsing corrupt DWARF debug sections.
-X-Git-Tag: binutils-2_36~485
-X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=647cebce12a6b0a26960220caff96ff38978cf24;hp=239ca5e497dda2c151009d664d500086a5c2173a
-
-Prevent a memory allocation failure when parsing corrupt DWARF debug sections.
-
-	PR 26946
-	* dwarf2.c (read_section): Check for debug sections with excessive
-	sizes.
----
-
-diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
-index 977bf43a6a1..8bbfc81d3e7 100644
---- a/bfd/dwarf2.c
-+++ b/bfd/dwarf2.c
-@@ -531,22 +531,24 @@ read_section (bfd *	      abfd,
- 	      bfd_byte **     section_buffer,
- 	      bfd_size_type * section_size)
- {
--  asection *msec;
-   const char *section_name = sec->uncompressed_name;
-   bfd_byte *contents = *section_buffer;
--  bfd_size_type amt;
- 
-   /* The section may have already been read.  */
-   if (contents == NULL)
-     {
-+      bfd_size_type amt;
-+      asection *msec;
-+      ufile_ptr filesize;
-+
-       msec = bfd_get_section_by_name (abfd, section_name);
--      if (! msec)
-+      if (msec == NULL)
- 	{
- 	  section_name = sec->compressed_name;
- 	  if (section_name != NULL)
- 	    msec = bfd_get_section_by_name (abfd, section_name);
- 	}
--      if (! msec)
-+      if (msec == NULL)
- 	{
- 	  _bfd_error_handler (_("DWARF error: can't find %s section."),
- 			      sec->uncompressed_name);
-@@ -554,12 +556,23 @@ read_section (bfd *	      abfd,
- 	  return FALSE;
- 	}
- 
--      *section_size = msec->rawsize ? msec->rawsize : msec->size;
-+      amt = bfd_get_section_limit_octets (abfd, msec);
-+      filesize = bfd_get_file_size (abfd);
-+      if (amt >= filesize)
-+	{
-+	  /* PR 26946 */
-+	  _bfd_error_handler (_("DWARF error: section %s is larger than its filesize! (0x%lx vs 0x%lx)"),
-+			      section_name, (long) amt, (long) filesize);
-+	  bfd_set_error (bfd_error_bad_value);
-+	  return FALSE;
-+	}
-+      *section_size = amt;
-       /* Paranoia - alloc one extra so that we can make sure a string
- 	 section is NUL terminated.  */
--      amt = *section_size + 1;
-+      amt += 1;
-       if (amt == 0)
- 	{
-+	  /* Paranoia - this should never happen.  */
- 	  bfd_set_error (bfd_error_no_memory);
- 	  return FALSE;
- 	}
-
diff --git a/pkgs/development/tools/misc/binutils/CVE-2021-45078.patch b/pkgs/development/tools/misc/binutils/CVE-2021-45078.patch
deleted file mode 100644
index af1c95fac80..00000000000
--- a/pkgs/development/tools/misc/binutils/CVE-2021-45078.patch
+++ /dev/null
@@ -1,239 +0,0 @@
-based on upstream https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=161e87d12167b1e36193385485c1f6ce92f74f02;hp=d5c94731766bf4f276146fd29c1df8eebc2aaf69
-
-adapted by ris to apply to 2.35.2 (simply capitalizing booleans)
-
-diff --git a/binutils/stabs.c b/binutils/stabs.c
-index 274bfb0e7fa..83ee3ea5fa4 100644
---- a/binutils/stabs.c
-+++ b/binutils/stabs.c
-@@ -202,7 +202,7 @@ static debug_type stab_find_type (void *, struct stab_handle *, const int *);
- static bool stab_record_type
-   (void *, struct stab_handle *, const int *, debug_type);
- static debug_type stab_xcoff_builtin_type
--  (void *, struct stab_handle *, int);
-+  (void *, struct stab_handle *, unsigned int);
- static debug_type stab_find_tagged_type
-   (void *, struct stab_handle *, const char *, int, enum debug_type_kind);
- static debug_type *stab_demangle_argtypes
-@@ -3496,166 +3496,167 @@ stab_record_type (void *dhandle ATTRIBUTE_UNUSED, struct stab_handle *info,
- 
- static debug_type
- stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
--			 int typenum)
-+			 unsigned int typenum)
- {
-   debug_type rettype;
-   const char *name;
- 
--  if (typenum >= 0 || typenum < -XCOFF_TYPE_COUNT)
-+  typenum = -typenum - 1;
-+  if (typenum >= XCOFF_TYPE_COUNT)
-     {
--      fprintf (stderr, _("Unrecognized XCOFF type %d\n"), typenum);
-+      fprintf (stderr, _("Unrecognized XCOFF type %d\n"), -typenum - 1);
-       return DEBUG_TYPE_NULL;
-     }
--  if (info->xcoff_types[-typenum] != NULL)
--    return info->xcoff_types[-typenum];
-+  if (info->xcoff_types[typenum] != NULL)
-+    return info->xcoff_types[typenum];
- 
--  switch (-typenum)
-+  switch (typenum)
-     {
--    case 1:
-+    case 0:
-       /* The size of this and all the other types are fixed, defined
- 	 by the debugging format.  */
-       name = "int";
-       rettype = debug_make_int_type (dhandle, 4, FALSE);
-       break;
--    case 2:
-+    case 1:
-       name = "char";
-       rettype = debug_make_int_type (dhandle, 1, FALSE);
-       break;
--    case 3:
-+    case 2:
-       name = "short";
-       rettype = debug_make_int_type (dhandle, 2, FALSE);
-       break;
--    case 4:
-+    case 3:
-       name = "long";
-       rettype = debug_make_int_type (dhandle, 4, FALSE);
-       break;
--    case 5:
-+    case 4:
-       name = "unsigned char";
-       rettype = debug_make_int_type (dhandle, 1, TRUE);
-       break;
--    case 6:
-+    case 5:
-       name = "signed char";
-       rettype = debug_make_int_type (dhandle, 1, FALSE);
-       break;
--    case 7:
-+    case 6:
-       name = "unsigned short";
-       rettype = debug_make_int_type (dhandle, 2, TRUE);
-       break;
--    case 8:
-+    case 7:
-       name = "unsigned int";
-       rettype = debug_make_int_type (dhandle, 4, TRUE);
-       break;
--    case 9:
-+    case 8:
-       name = "unsigned";
-       rettype = debug_make_int_type (dhandle, 4, TRUE);
-       break;
--    case 10:
-+    case 9:
-       name = "unsigned long";
-       rettype = debug_make_int_type (dhandle, 4, TRUE);
-       break;
--    case 11:
-+    case 10:
-       name = "void";
-       rettype = debug_make_void_type (dhandle);
-       break;
--    case 12:
-+    case 11:
-       /* IEEE single precision (32 bit).  */
-       name = "float";
-       rettype = debug_make_float_type (dhandle, 4);
-       break;
--    case 13:
-+    case 12:
-       /* IEEE double precision (64 bit).  */
-       name = "double";
-       rettype = debug_make_float_type (dhandle, 8);
-       break;
--    case 14:
-+    case 13:
-       /* This is an IEEE double on the RS/6000, and different machines
- 	 with different sizes for "long double" should use different
- 	 negative type numbers.  See stabs.texinfo.  */
-       name = "long double";
-       rettype = debug_make_float_type (dhandle, 8);
-       break;
--    case 15:
-+    case 14:
-       name = "integer";
-       rettype = debug_make_int_type (dhandle, 4, FALSE);
-       break;
--    case 16:
-+    case 15:
-       name = "boolean";
-       rettype = debug_make_bool_type (dhandle, 4);
-       break;
--    case 17:
-+    case 16:
-       name = "short real";
-       rettype = debug_make_float_type (dhandle, 4);
-       break;
--    case 18:
-+    case 17:
-       name = "real";
-       rettype = debug_make_float_type (dhandle, 8);
-       break;
--    case 19:
-+    case 18:
-       /* FIXME */
-       name = "stringptr";
-       rettype = NULL;
-       break;
--    case 20:
-+    case 19:
-       /* FIXME */
-       name = "character";
-       rettype = debug_make_int_type (dhandle, 1, TRUE);
-       break;
--    case 21:
-+    case 20:
-       name = "logical*1";
-       rettype = debug_make_bool_type (dhandle, 1);
-       break;
--    case 22:
-+    case 21:
-       name = "logical*2";
-       rettype = debug_make_bool_type (dhandle, 2);
-       break;
--    case 23:
-+    case 22:
-       name = "logical*4";
-       rettype = debug_make_bool_type (dhandle, 4);
-       break;
--    case 24:
-+    case 23:
-       name = "logical";
-       rettype = debug_make_bool_type (dhandle, 4);
-       break;
--    case 25:
-+    case 24:
-       /* Complex type consisting of two IEEE single precision values.  */
-       name = "complex";
-       rettype = debug_make_complex_type (dhandle, 8);
-       break;
--    case 26:
-+    case 25:
-       /* Complex type consisting of two IEEE double precision values.  */
-       name = "double complex";
-       rettype = debug_make_complex_type (dhandle, 16);
-       break;
--    case 27:
-+    case 26:
-       name = "integer*1";
-       rettype = debug_make_int_type (dhandle, 1, FALSE);
-       break;
--    case 28:
-+    case 27:
-       name = "integer*2";
-       rettype = debug_make_int_type (dhandle, 2, FALSE);
-       break;
--    case 29:
-+    case 28:
-       name = "integer*4";
-       rettype = debug_make_int_type (dhandle, 4, FALSE);
-       break;
--    case 30:
-+    case 29:
-       /* FIXME */
-       name = "wchar";
-       rettype = debug_make_int_type (dhandle, 2, FALSE);
-       break;
--    case 31:
-+    case 30:
-       name = "long long";
-       rettype = debug_make_int_type (dhandle, 8, FALSE);
-       break;
--    case 32:
-+    case 31:
-       name = "unsigned long long";
-       rettype = debug_make_int_type (dhandle, 8, TRUE);
-       break;
--    case 33:
-+    case 32:
-       name = "logical*8";
-       rettype = debug_make_bool_type (dhandle, 8);
-       break;
--    case 34:
-+    case 33:
-       name = "integer*8";
-       rettype = debug_make_int_type (dhandle, 8, FALSE);
-       break;
-@@ -3664,9 +3665,7 @@ stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
-     }
- 
-   rettype = debug_name_type (dhandle, name, rettype);
--
--  info->xcoff_types[-typenum] = rettype;
--
-+  info->xcoff_types[typenum] = rettype;
-   return rettype;
- }
- 
--- 
-2.27.0
-
diff --git a/pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch b/pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch
deleted file mode 100644
index c166066c980..00000000000
--- a/pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd%2Felf.c;h=af62aadc3d446cd5b1f0201b207c90c22e7809b1;hp=36733e080dd9d9be28b576b246aaf5bd8c8569c7;hb=84fd26d8209e99fc3a432dd0b09b6c053de1ce65;hpb=abe2a28aaa7a2bfd0f3061c72a98eb898976b721
-
-diff --git a/bfd/elf.c b/bfd/elf.c
-index 36733e080dd..af62aadc3d4 100644
---- a/bfd/elf.c
-+++ b/bfd/elf.c
-@@ -2454,6 +2454,8 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
- 		     "for section %pA found - ignoring"),
- 		   abfd, name, target_sect);
- 	      }
-+	    else
-+	      esdt->has_secondary_relocs = TRUE;
- 	    goto success;
- 	  }
- 
-@@ -12587,6 +12589,9 @@ _bfd_elf_slurp_secondary_reloc_section (bfd *       abfd,
- #endif
-     r_sym = elf32_r_sym;
-   
-+  if (!elf_section_data (sec)->has_secondary_relocs)
-+    return TRUE;
-+
-   /* Discover if there are any secondary reloc sections
-      associated with SEC.  */
-   for (relsec = abfd->sections; relsec != NULL; relsec = relsec->next)
-
diff --git a/pkgs/development/tools/misc/binutils/build-components-separately.patch b/pkgs/development/tools/misc/binutils/build-components-separately.patch
index 38fa4934a28..0b4162d8488 100644
--- a/pkgs/development/tools/misc/binutils/build-components-separately.patch
+++ b/pkgs/development/tools/misc/binutils/build-components-separately.patch
@@ -1,8 +1,8 @@
 diff --git a/bfd/configure.ac b/bfd/configure.ac
-index c5bfbd5d..45ad4c26 100644
+index fec067b2135..377e1f5443f 100644
 --- a/bfd/configure.ac
 +++ b/bfd/configure.ac
-@@ -278,31 +278,19 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
+@@ -292,30 +292,16 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
  
  LT_LIB_M
  
@@ -21,24 +21,22 @@ index c5bfbd5d..45ad4c26 100644
 -  if test -n "$x"; then
 -    SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
 -  fi
+-fi
 -
+ SHARED_LIBADD="$SHARED_LIBADD $LIBINTL"
+ 
+-if test "$enable_shared" = "yes"; then
    case "${host}" in
    # More hacks to build DLLs on Windows.
    *-*-cygwin*)
      SHARED_LDFLAGS="-no-undefined"
--    SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
-+    SHARED_LIBADD="-liberty -lintl -lcygwin -lkernel32"
-   ;;
- 
-   # Use built-in libintl on macOS, since it is not provided by libc.
-   *-*-darwin*)
--    SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
-+    SHARED_LIBADD="-liberty -lintl"
+-    SHARED_LIBADD="-L`pwd`/../libiberty -liberty $SHARED_LIBADD -lcygwin -lkernel32"
++    SHARED_LIBADD="-liberty $SHARED_LIBADD -lcygwin -lkernel32"
    ;;
    esac
  
 diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
-index 4f06074a..6836c589 100644
+index 0e04b4c05c4..848a02662e7 100644
 --- a/opcodes/Makefile.am
 +++ b/opcodes/Makefile.am
 @@ -51,7 +51,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir)
@@ -50,7 +48,7 @@ index 4f06074a..6836c589 100644
  
  BUILD_LIBS = @BUILD_LIBS@
  BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
-@@ -301,7 +301,7 @@ OFILES = @BFD_MACHINES@
+@@ -303,7 +303,7 @@ OFILES = @BFD_MACHINES@
  # development.sh is used to determine -Werror default.
  CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
  
@@ -59,10 +57,7 @@ index 4f06074a..6836c589 100644
  
  disassemble.lo: disassemble.c
  if am__fastdepCC
-@@ -322,12 +322,21 @@ libopcodes_la_SOURCES =  dis-buf.c disassemble.c dis-init.c
- # old version of libbfd, or to pick up libbfd for the wrong architecture
- # if host != build. So for building with shared libraries we use a
- # hardcoded path to libbfd.so instead of relying on the entries in libbfd.la.
+@@ -327,9 +327,18 @@ libopcodes_la_SOURCES =  dis-buf.c disassemble.c dis-init.c
 -libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@
 +libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ libtool-soversion
  libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@
@@ -84,18 +79,19 @@ index 4f06074a..6836c589 100644
  # the build directory so that we don't have to convert all the
  # programs that use libopcodes.a simultaneously.  This is a hack which
 diff --git a/opcodes/configure.ac b/opcodes/configure.ac
-index 00be9c88..6e589ae4 100644
+index e564f067334..5da62a3d58b 100644
 --- a/opcodes/configure.ac
 +++ b/opcodes/configure.ac
-@@ -86,6 +86,7 @@ AC_PROG_INSTALL
+@@ -98,6 +98,8 @@ BFD_64_BIT
+ AC_SUBST(HDEFINES)
+ AC_PROG_INSTALL
  
- AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h)
- ACX_HEADER_STRING
 +GCC_HEADER_STDINT(bfd_stdint.h)
- 
++
  AC_CHECK_DECLS([basename, stpcpy])
  
-@@ -137,61 +138,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
+ # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
+@@ -148,44 +150,21 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
  
  LT_LIB_M
  
@@ -122,7 +118,7 @@ index 00be9c88..6e589ae4 100644
 -SHARED_LIBADD=
 +SHARED_LIBADD=-liberty
  SHARED_DEPENDENCIES=
- if test "$enable_shared" = "yes"; then
+-if test "$enable_shared" = "yes"; then
 -# When building a shared libopcodes, link against the pic version of libiberty
 -# so that apps that use libopcodes won't need libiberty just to satisfy any
 -# libopcodes references.
@@ -131,32 +127,27 @@ index 00be9c88..6e589ae4 100644
  # Note that linking against libbfd as we do here, which is itself linked
  # against libiberty, may not satisfy all the libopcodes libiberty references
  # since libbfd may not pull in the entirety of libiberty.
+ # Also, jam libintl into the right place in all of this: after libiberty,
+ # which uses it, but before -lcygwin, which it uses.
 -changequote(,)dnl
 -  x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
 -changequote([,])dnl
 -  if test -n "$x"; then
 -    SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
 -  fi
--
+-fi
+ 
+ SHARED_LIBADD="$SHARED_LIBADD $LIBINTL"
+ 
+@@ -193,11 +172,10 @@ if test "$enable_shared" = "yes"; then
    case "${host}" in
      *-*-cygwin*)
        SHARED_LDFLAGS="-no-undefined"
--      SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
-+      SHARED_LIBADD="-lbfd -liberty -lintl -lcygwin"
+-      SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD"
++      SHARED_LIBADD="-lbfd -liberty $SHARED_LIBADD"
        ;;
--   *-*-darwin*)
--     SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}"
--     SHARED_DEPENDENCIES="../bfd/libbfd.la"
--     ;;
      *)
--      case "$host_vendor" in
--        hp)
--          SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}"
--	  ;;
--	*)
--          SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}"
--	  ;;
--      esac
+-      SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}"
 -      SHARED_DEPENDENCIES="../bfd/libbfd.la"
 +      SHARED_LIBADD="-lbfd ${SHARED_LIBADD}"
        ;;
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix
index ff89f1ad493..b593e876761 100644
--- a/pkgs/development/tools/misc/binutils/default.nix
+++ b/pkgs/development/tools/misc/binutils/default.nix
@@ -2,65 +2,78 @@ let
   execFormatIsELF = platform: platform.parsed.kernel.execFormat.name == "elf";
 in
 
-{ stdenv, lib, buildPackages
-, fetchFromGitHub, fetchurl, zlib, autoreconfHook, gettext
-# Enabling all targets increases output size to a multiple.
-, withAllTargets ? false, libbfd, libopcodes
-, enableShared ? !stdenv.hostPlatform.isStatic
-, noSysDirs
-, gold ? execFormatIsELF stdenv.targetPlatform
-, bison ? null
+{ stdenv
+, autoreconfHook
+, autoconf269, automake, libtool
+, bison
+, buildPackages
+, fetchFromGitHub
+, fetchurl
 , flex
-, texinfo
+, gettext
+, lib
+, noSysDirs
 , perl
 , substitute
+, texinfo
+, zlib
+
+, enableGold ? execFormatIsELF stdenv.targetPlatform
+, enableShared ? !stdenv.hostPlatform.isStatic
+  # WARN: Enabling all targets increases output size to a multiple.
+, withAllTargets ? false, libbfd, libopcodes
 }:
 
-# configure silently disables ld.gold if it's unsupported,
-# so we need to make sure that intent matches result ourselves.
-assert gold -> execFormatIsELF stdenv.targetPlatform;
+# WARN: configure silently disables ld.gold if it's unsupported, so we need to
+# make sure that intent matches result ourselves.
+assert enableGold -> execFormatIsELF stdenv.targetPlatform;
 
-# 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.
 
 let
-  reuseLibs = enableShared && withAllTargets;
-
-  version = "2.35.2";
-  basename = "binutils";
-  # The targetPrefix prepended to binary names to allow multiple binuntils on the
-  # PATH to both be usable.
-  targetPrefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
-                  "${stdenv.targetPlatform.config}-";
-  vc4-binutils-src = fetchFromGitHub {
-    owner = "itszor";
-    repo = "binutils-vc4";
-    rev = "708acc851880dbeda1dd18aca4fd0a95b2573b36";
-    sha256 = "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63";
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  version = "2.38";
+
+  srcs = {
+    normal = fetchurl {
+      url = "mirror://gnu/binutils/binutils-${version}.tar.bz2";
+      sha256 = "sha256-Bw7HHPB3pqWOC5WfBaCaNQFTeMLYpR6Q866r/jBZDvg=";
+    };
+    vc4-none = fetchFromGitHub {
+      owner = "itszor";
+      repo = "binutils-vc4";
+      rev = "708acc851880dbeda1dd18aca4fd0a95b2573b36";
+      sha256 = "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63";
+    };
   };
-  # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM
-  normal-src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl {
-    url = "mirror://gnu/binutils/${basename}-${version}.tar.bz2";
-    sha256 = "sha256-z6dkTb7PRZHhNutAfBwdoWV4vSsD8MLorNzroZS7nWE=";
-  });
+
+  #INFO: The targetPrefix prepended to binary names to allow multiple binuntils
+  # on the PATH to both be usable.
+  targetPrefix = lib.optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-";
 in
 
 stdenv.mkDerivation {
-  pname = targetPrefix + basename;
+  pname = targetPrefix + "binutils";
   inherit version;
 
-  src = if stdenv.targetPlatform.isVc4 then vc4-binutils-src else normal-src;
+  # HACK: Ensure that we preserve source from bootstrap binutils to not rebuild LLVM
+  src = stdenv.__bootPackages.binutils-unwrapped.src
+    or srcs.${targetPlatform.system}
+    or srcs.normal;
 
+  # WARN: 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.
   patches = [
     # Make binutils output deterministic by default.
     ./deterministic.patch
 
-    # Help bfd choose between elf32-littlearm, elf32-littlearm-symbian, and
-    # elf32-littlearm-vxworks in favor of the first.
-    # https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766
-    ./disambiguate-arm-targets.patch
+
+    # Breaks nm BSD flag detection
+    ./0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch
+
+    # Required for newer macos versions
+    ./0001-libtool.m4-update-macos-version-detection-block.patch
 
     # For some reason bfd ld doesn't search DT_RPATH when cross-compiling. It's
     # not clear why this behavior was decided upon but it has the unfortunate
@@ -69,40 +82,24 @@ stdenv.mkDerivation {
     # override this behavior, forcing ld to search DT_RPATH even when
     # cross-compiling.
     ./always-search-rpath.patch
-
-    # Fix quadratic slowdown in `strip` performance.
-    # See #129467 and https://sourceware.org/bugzilla/show_bug.cgi?id=28058
-    # Remove when we're on binutils > 2.36.1.
-    # The patch is downloaded from
-    #     https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd/elf.c;h=af62aadc3d446cd5b1f0201b207c90c22e7809b1;hp=36733e080dd9d9be28b576b246aaf5bd8c8569c7;hb=84fd26d8209e99fc3a432dd0b09b6c053de1ce65;hpb=abe2a28aaa7a2bfd0f3061c72a98eb898976b721
-    # which is the 2.36 backport (using `TRUE` instead of `true` of binutils master commit:
-    #     https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=956ea65cd707707c0f725930214cbc781367a831
-    ./bfd-elf-Dont-read-non-existing-secondary-relocs.patch
-
-    # Fix building plv8’s v8.
-    # https://github.com/NixOS/nixpkgs/issues/134190
-    # Obtained from: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=586e30940e640f67bd55bd72e1d1355a4faf8079
-    ./gold-Update-GNU_PROPERTY_X86_XXX-macros.patch
-
-    ./CVE-2020-35448.patch
-    ./CVE-2021-3487.patch
-    ./CVE-2021-45078.patch
-  ] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch
-    ++ # This patch was suggested by Nick Clifton to fix
-       # https://sourceware.org/bugzilla/show_bug.cgi?id=16177
-       # It can be removed when that 7-year-old bug is closed.
-       # This binutils bug causes GHC to emit broken binaries on armv7, and
-       # indeed GHC will refuse to compile with a binutils suffering from it. See
-       # this comment for more information:
-       # https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333
-       lib.optional (stdenv.targetPlatform.isAarch32 && stdenv.hostPlatform.system != stdenv.targetPlatform.system) ./R_ARM_COPY.patch
-    ++ lib.optional stdenv.targetPlatform.isWindows ./windres-locate-gcc.patch
-    ++ lib.optional stdenv.targetPlatform.isMips64n64
-       # this patch is from debian:
-       # https://sources.debian.org/data/main/b/binutils/2.38-3/debian/patches/mips64-default-n64.diff
-       (if stdenv.targetPlatform.isMusl
-        then substitute { src = ./mips64-default-n64.patch; replacements = [ "--replace" "gnuabi64" "muslabi64" ]; }
-        else ./mips64-default-n64.patch);
+  ]
+  ++ lib.optional targetPlatform.isiOS ./support-ios.patch
+  # This patch was suggested by Nick Clifton to fix
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+  # It can be removed when that 7-year-old bug is closed.
+  # This binutils bug causes GHC to emit broken binaries on armv7, and indeed
+  # GHC will refuse to compile with a binutils suffering from it. See this
+  # comment for more information:
+  # https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333
+  ++ lib.optional (targetPlatform.isAarch32 && hostPlatform.system != targetPlatform.system) ./R_ARM_COPY.patch
+  ++ lib.optional stdenv.targetPlatform.isWindows ./windres-locate-gcc.patch
+  ++ lib.optional stdenv.targetPlatform.isMips64n64
+     # this patch is from debian:
+     # https://sources.debian.org/data/main/b/binutils/2.38-3/debian/patches/mips64-default-n64.diff
+     (if stdenv.targetPlatform.isMusl
+      then substitute { src = ./mips64-default-n64.patch; replacements = [ "--replace" "gnuabi64" "muslabi64" ]; }
+      else ./mips64-default-n64.patch)
+  ;
 
   outputs = [ "out" "info" "man" ];
 
@@ -111,14 +108,26 @@ stdenv.mkDerivation {
     bison
     perl
     texinfo
-  ] ++ (lib.optionals stdenv.targetPlatform.isiOS [
-    autoreconfHook
-  ]) ++ lib.optionals stdenv.targetPlatform.isVc4 [ flex ];
+  ]
+  ++ lib.optionals targetPlatform.isiOS [ autoreconfHook ]
+  ++ lib.optionals targetPlatform.isDarwin [ autoconf269 automake gettext libtool ]
+  ++ lib.optionals targetPlatform.isVc4 [ flex ]
+  ;
+
   buildInputs = [ zlib gettext ];
 
   inherit noSysDirs;
 
-  preConfigure = ''
+  preConfigure = (lib.optionalString targetPlatform.isDarwin ''
+    for i in */configure.ac; do
+      pushd "$(dirname "$i")"
+      echo "Running autoreconf in $PWD"
+      # autoreconf doesn't work, don't know why
+      # autoreconf ''${autoreconfFlags:---install --force --verbose}
+      autoconf
+      popd
+    done
+  '') + ''
     # Clear the default library search path.
     if test "$noSysDirs" = "1"; then
         echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
@@ -133,7 +142,8 @@ stdenv.mkDerivation {
 
   # As binutils takes part in the stdenv building, we don't want references
   # to the bootstrap-tools libgcc (as uses to happen on arm/mips)
-  NIX_CFLAGS_COMPILE = if stdenv.hostPlatform.isDarwin
+  NIX_CFLAGS_COMPILE =
+    if hostPlatform.isDarwin
     then "-Wno-string-plus-int -Wno-deprecated-declarations"
     else "-static-libgcc";
 
@@ -141,11 +151,7 @@ stdenv.mkDerivation {
 
   configurePlatforms = [ "build" "host" "target" ];
 
-  configureFlags =
-    (if enableShared then [ "--enable-shared" "--disable-static" ]
-                     else [ "--disable-shared" "--enable-static" ])
-  ++ lib.optional withAllTargets "--enable-targets=all"
-  ++ [
+  configureFlags = [
     "--enable-64-bit-bfd"
     "--with-system-zlib"
 
@@ -158,35 +164,40 @@ stdenv.mkDerivation {
     # RUNPATH can be overriden using LD_LIBRARY_PATH at runtime.
     "--enable-new-dtags"
 
-    # force target prefix. Some versions of binutils will make it empty
-    # if `--host` and `--target` are too close, even if Nixpkgs thinks
-    # the platforms are different (e.g. because not all the info makes
-    # the `config`). Other versions of binutils will always prefix if
-    # `--target` is passed, even if `--host` and `--target` are the same.
-    # The easiest thing for us to do is not leave it to chance, and force
-    # the program prefix to be what we want it to be.
+    # force target prefix. Some versions of binutils will make it empty if
+    # `--host` and `--target` are too close, even if Nixpkgs thinks the
+    # platforms are different (e.g. because not all the info makes the
+    # `config`). Other versions of binutils will always prefix if `--target` is
+    # passed, even if `--host` and `--target` are the same. The easiest thing
+    # for us to do is not leave it to chance, and force the program prefix to be
+    # what we want it to be.
     "--program-prefix=${targetPrefix}"
-  ] ++ lib.optionals gold [
-    "--enable-gold"
-    "--enable-plugins"
-  ];
-
-  doCheck = false; # fails
-
-  postFixup = lib.optionalString reuseLibs ''
+  ]
+  ++ lib.optionals withAllTargets [ "--enable-targets=all" ]
+  ++ lib.optionals enableGold [ "--enable-gold" "--enable-plugins" ]
+  ++ (if enableShared
+      then [ "--enable-shared" "--disable-static" ]
+      else [ "--disable-shared" "--enable-static" ])
+  ;
+
+  # Fails
+  doCheck = false;
+
+  postFixup = lib.optionalString (enableShared && withAllTargets) ''
     rm "$out"/lib/lib{bfd,opcodes}-${version}.so
     ln -s '${lib.getLib libbfd}/lib/libbfd-${version}.so' "$out/lib/"
     ln -s '${lib.getLib libopcodes}/lib/libopcodes-${version}.so' "$out/lib/"
   '';
 
-  # else fails with "./sanity.sh: line 36: $out/bin/size: not found"
-  doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform && stdenv.hostPlatform == stdenv.targetPlatform;
+  # INFO: Otherwise it fails with:
+  # `./sanity.sh: line 36: $out/bin/size: not found`
+  doInstallCheck = (buildPlatform == hostPlatform) && (hostPlatform == targetPlatform);
 
   enableParallelBuilding = true;
 
   passthru = {
     inherit targetPrefix;
-    hasGold = gold;
+    hasGold = enableGold;
     isGNU = true;
   };
 
@@ -200,11 +211,11 @@ stdenv.mkDerivation {
     '';
     homepage = "https://www.gnu.org/software/binutils/";
     license = licenses.gpl3Plus;
-    maintainers = with maintainers; [ ericson2314 ];
+    maintainers = with maintainers; [ ericson2314 lovesegfault ];
     platforms = platforms.unix;
 
-    /* Give binutils a lower priority than gcc-wrapper to prevent a
-       collision due to the ld/as wrappers/symlinks in the latter. */
+    # INFO: Give binutils a lower priority than gcc-wrapper to prevent a
+    # collision due to the ld/as wrappers/symlinks in the latter.
     priority = 10;
   };
 }
diff --git a/pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch b/pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch
deleted file mode 100644
index abbfa73da05..00000000000
--- a/pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
-index 9f956d3..f5b61f1 100644
---- a/bfd/elf32-arm.c
-+++ b/bfd/elf32-arm.c
-@@ -19585,7 +19585,10 @@ elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
- #undef  ELF_MAXPAGESIZE
- #define ELF_MAXPAGESIZE			0x1000
- 
-+/* Prioritize elf32-*arm (priority 1) over elf32-*arm-vxworks (priority 2) */
-+#define elf_match_priority 2
- #include "elf32-target.h"
-+#undef  elf_match_priority
- 
- 
- /* Merge backend specific data from an object file to the output
-@@ -19974,4 +19977,7 @@ elf32_arm_symbian_plt_sym_val (bfd_vma i, const asection *plt,
- #undef  ELF_MAXPAGESIZE
- #define ELF_MAXPAGESIZE			0x8000
- 
-+/* Prioritize elf32-*arm (priority 1) over elf32-*arm-symbian (priority 2) */
-+#define elf_match_priority 2
- #include "elf32-target.h"
-+#undef  elf_match_priority
diff --git a/pkgs/development/tools/misc/binutils/gold-Update-GNU_PROPERTY_X86_XXX-macros.patch b/pkgs/development/tools/misc/binutils/gold-Update-GNU_PROPERTY_X86_XXX-macros.patch
deleted file mode 100644
index c4eef87a0c8..00000000000
--- a/pkgs/development/tools/misc/binutils/gold-Update-GNU_PROPERTY_X86_XXX-macros.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-From 586e30940e640f67bd55bd72e1d1355a4faf8079 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Tue, 13 Oct 2020 05:20:49 -0700
-Subject: [PATCH] gold: Update GNU_PROPERTY_X86_XXX macros
-
-This patch updates GNU_PROPERTY_X86_XXX macros for gold:
-
-1. GNU_PROPERTY_X86_UINT32_AND_XXX: A 4-byte unsigned integer property.
-A bit is set if it is set in all relocatable inputs:
-
- #define GNU_PROPERTY_X86_UINT32_AND_LO      0xc0000002
- #define GNU_PROPERTY_X86_UINT32_AND_HI      0xc0007fff
-
-2. GNU_PROPERTY_X86_UINT32_OR_XXX: A 4-byte unsigned integer property.
-A bit is set if it is set in any relocatable inputs:
-
- #define GNU_PROPERTY_X86_UINT32_OR_LO    0xc0008000
- #define GNU_PROPERTY_X86_UINT32_OR_HI    0xc000ffff
-
-3. GNU_PROPERTY_X86_UINT32_OR_AND_XXX: A 4-byte unsigned integer property.
-A bit is set if it is set in any relocatable inputs and the property is
-present in all relocatable inputs:
-
- #define GNU_PROPERTY_X86_UINT32_OR_AND_LO   0xc0010000
- #define GNU_PROPERTY_X86_UINT32_OR_AND_HI   0xc0017fff
-
-4. GNU_PROPERTY_X86_FEATURE_2_NEEDED, GNU_PROPERTY_X86_FEATURE_2_USED
-and GNU_PROPERTY_X86_FEATURE_2_XXX bits.
-
-GNU_PROPERTY_X86_FEATURE_1_AND is unchanged.  GNU_PROPERTY_X86_ISA_1_USED
-and GNU_PROPERTY_X86_ISA_1_NEEDED are updated to better support targeted
-processors since GNU_PROPERTY_X86_ISA_1_?86 aren't isn't very useful.
-A new set of GNU_PROPERTY_X86_ISA_1_XXX bits are defined.  The previous
-GNU_PROPERTY_X86_ISA_1_XXX macros are deprecated and renamed to
-GNU_PROPERTY_X86_COMPAT_ISA_1_XXX and GNU_PROPERTY_X86_COMPAT_2_ISA_1_XXX.
-
-elfcpp/
-
-	* elfcpp.h (GNU_PROPERTY_X86_ISA_1_USED): Renamed to ...
-	(GNU_PROPERTY_X86_COMPAT_ISA_1_USED): This.
-	(GNU_PROPERTY_X86_ISA_1_NEEDED): Renamed to ...
-	(GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED): This.
-	(GNU_PROPERTY_X86_UINT32_AND_LO): New.
-	(GNU_PROPERTY_X86_UINT32_AND_HI): Likewise.
-	(GNU_PROPERTY_X86_UINT32_OR_LO): Likewise.
-	(GNU_PROPERTY_X86_UINT32_OR_HI): Likewise.
-	(GNU_PROPERTY_X86_UINT32_OR_AND_LO): Likewise.
-	(GNU_PROPERTY_X86_UINT32_OR_AND_HI): Likewise.
-	(GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED): New.
-	(GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED): Likewise.
-	(GNU_PROPERTY_X86_FEATURE_1_AND): Updated to
-	(GNU_PROPERTY_X86_UINT32_AND_LO + 0).
-	(GNU_PROPERTY_X86_ISA_1_NEEDED): New.  Defined to
-	GNU_PROPERTY_X86_UINT32_OR_LO + 2.
-	(GNU_PROPERTY_X86_FEATURE_2_NEEDED): New.  Defined to
-	(GNU_PROPERTY_X86_UINT32_OR_LO + 1).
-	(GNU_PROPERTY_X86_ISA_1_USED): New.  Defined to
-	GNU_PROPERTY_X86_UINT32_OR_AND_LO + 2.
-	(GNU_PROPERTY_X86_FEATURE_2_USED): New.  Defined to
-	(GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1).
-
-gold/
-
-	* x86_64.cc (Target_x86_64::Target_x86_64): Initialize
-	feature_2_used_, feature_2_needed_ and object_feature_2_used_.
-	(Target_x86_64::feature_2_used_): New data member.
-	(Target_x86_64::feature_2_needed_): Likewise.
-	(Target_x86_64::object_isa_1_used_): Likewise.
-	(Target_x86_64::record_gnu_property): Support
-	GNU_PROPERTY_X86_COMPAT_ISA_1_USED,
-	GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED,
-	GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED,
-	GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED,
-	GNU_PROPERTY_X86_FEATURE_2_USED and
-	GNU_PROPERTY_X86_FEATURE_2_NEEDED.
-	(Target_x86_64::merge_gnu_properties): Merge FEATURE_2_USED bits.
-	Initialize object_feature_2_used_.
-	(Target_x86_64::do_finalize_gnu_properties): Support
-	GNU_PROPERTY_X86_FEATURE_2_USED and
-	GNU_PROPERTY_X86_FEATURE_2_NEEDED.
-	* testsuite/gnu_property_a.S (GNU_PROPERTY_X86_ISA_1_USED): Set
-	to 0xc0010002.
-	(GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
-	* testsuite/gnu_property_b.S (GNU_PROPERTY_X86_ISA_1_USED): Set
-	to 0xc0010002.
-	(GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
-	* testsuite/gnu_property_c.S (GNU_PROPERTY_X86_ISA_1_USED): Set
-	to 0xc0010002.
-	(GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
-	* testsuite/gnu_property_test.sh: Updated.
----
- elfcpp/ChangeLog                    | [omitted]
- elfcpp/elfcpp.h                     | 18 ++++++++++++---
- gold/ChangeLog                      | [omitted]
- gold/testsuite/gnu_property_a.S     |  4 ++--
- gold/testsuite/gnu_property_b.S     |  4 ++--
- gold/testsuite/gnu_property_c.S     |  4 ++--
- gold/testsuite/gnu_property_test.sh |  4 ++--
- gold/x86_64.cc                      | 34 +++++++++++++++++++++++++++--
- 8 files changed, 110 insertions(+), 13 deletions(-)
-
-diff --git a/elfcpp/elfcpp.h b/elfcpp/elfcpp.h
-index 65d803c00e2..4b6ff94a654 100644
---- a/elfcpp/elfcpp.h
-+++ b/elfcpp/elfcpp.h
-@@ -1013,9 +1013,21 @@ enum
-   GNU_PROPERTY_STACK_SIZE = 1,
-   GNU_PROPERTY_NO_COPY_ON_PROTECTED = 2,
-   GNU_PROPERTY_LOPROC = 0xc0000000,
--  GNU_PROPERTY_X86_ISA_1_USED = 0xc0000000,
--  GNU_PROPERTY_X86_ISA_1_NEEDED = 0xc0000001,
--  GNU_PROPERTY_X86_FEATURE_1_AND = 0xc0000002,
-+  GNU_PROPERTY_X86_COMPAT_ISA_1_USED = 0xc0000000,
-+  GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED = 0xc0000001,
-+  GNU_PROPERTY_X86_UINT32_AND_LO = 0xc0000002,
-+  GNU_PROPERTY_X86_UINT32_AND_HI = 0xc0007fff,
-+  GNU_PROPERTY_X86_UINT32_OR_LO = 0xc0008000,
-+  GNU_PROPERTY_X86_UINT32_OR_HI = 0xc000ffff,
-+  GNU_PROPERTY_X86_UINT32_OR_AND_LO = 0xc0010000,
-+  GNU_PROPERTY_X86_UINT32_OR_AND_HI = 0xc0017fff,
-+  GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED = GNU_PROPERTY_X86_UINT32_OR_LO + 0,
-+  GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED = GNU_PROPERTY_X86_UINT32_OR_AND_LO + 0,
-+  GNU_PROPERTY_X86_FEATURE_1_AND = GNU_PROPERTY_X86_UINT32_AND_LO + 0,
-+  GNU_PROPERTY_X86_ISA_1_NEEDED = GNU_PROPERTY_X86_UINT32_OR_LO + 2,
-+  GNU_PROPERTY_X86_FEATURE_2_NEEDED = GNU_PROPERTY_X86_UINT32_OR_LO + 1,
-+  GNU_PROPERTY_X86_ISA_1_USED = GNU_PROPERTY_X86_UINT32_OR_AND_LO + 2,
-+  GNU_PROPERTY_X86_FEATURE_2_USED = GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1,
-   GNU_PROPERTY_HIPROC = 0xdfffffff,
-   GNU_PROPERTY_LOUSER = 0xe0000000,
-   GNU_PROPERTY_HIUSER = 0xffffffff
-diff --git a/gold/testsuite/gnu_property_a.S b/gold/testsuite/gnu_property_a.S
-index 463bc8e52fe..5fbbbc9c4bb 100644
---- a/gold/testsuite/gnu_property_a.S
-+++ b/gold/testsuite/gnu_property_a.S
-@@ -1,8 +1,8 @@
- #define NT_GNU_PROPERTY_TYPE_0 5
- 
- #define GNU_PROPERTY_STACK_SIZE 1
--#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000
--#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001
-+#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002
-+#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002
- #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002
- 
- #if __SIZEOF_PTRDIFF_T__  == 8
-diff --git a/gold/testsuite/gnu_property_b.S b/gold/testsuite/gnu_property_b.S
-index 0c0c038ead1..7028f73d7ab 100644
---- a/gold/testsuite/gnu_property_b.S
-+++ b/gold/testsuite/gnu_property_b.S
-@@ -2,8 +2,8 @@
- 
- #define GNU_PROPERTY_STACK_SIZE 1
- #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2
--#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000
--#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001
-+#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002
-+#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002
- #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002
- 
- #if __SIZEOF_PTRDIFF_T__  == 8
-diff --git a/gold/testsuite/gnu_property_c.S b/gold/testsuite/gnu_property_c.S
-index ace159a9a9d..c8cbd8bce28 100644
---- a/gold/testsuite/gnu_property_c.S
-+++ b/gold/testsuite/gnu_property_c.S
-@@ -2,8 +2,8 @@
- 
- #define GNU_PROPERTY_STACK_SIZE 1
- #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2
--#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000
--#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001
-+#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002
-+#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002
- #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002
- 
- #if __SIZEOF_PTRDIFF_T__  == 8
-diff --git a/gold/testsuite/gnu_property_test.sh b/gold/testsuite/gnu_property_test.sh
-index 1806d3474cc..a4096005b78 100755
---- a/gold/testsuite/gnu_property_test.sh
-+++ b/gold/testsuite/gnu_property_test.sh
-@@ -77,8 +77,8 @@ check_count gnu_property_test.stdout "^  NOTE" 2
- 
- check gnu_property_test.stdout "stack size: 0x111100"
- check gnu_property_test.stdout "no copy on protected"
--check gnu_property_test.stdout "x86 ISA used: i486, SSE2, SSE4_2, AVX512CD"
--check gnu_property_test.stdout "x86 ISA needed: i486, SSE2, SSE4_2, AVX512CD"
-+check gnu_property_test.stdout "x86 ISA used: x86-64-v2, <unknown: 10>, <unknown: 100>, <unknown: 1000>"
-+check gnu_property_test.stdout "x86 ISA needed: x86-64-v2, <unknown: 10>, <unknown: 100>, <unknown: 1000>"
- check gnu_property_test.stdout "x86 feature: IBT"
- 
- exit 0
-diff --git a/gold/x86_64.cc b/gold/x86_64.cc
-index 9cb2cf0a322..378bac16f78 100644
---- a/gold/x86_64.cc
-+++ b/gold/x86_64.cc
-@@ -706,8 +706,9 @@ class Target_x86_64 : public Sized_target<size, false>
-       rela_irelative_(NULL), copy_relocs_(elfcpp::R_X86_64_COPY),
-       got_mod_index_offset_(-1U), tlsdesc_reloc_info_(),
-       tls_base_symbol_defined_(false), isa_1_used_(0), isa_1_needed_(0),
--      feature_1_(0), object_isa_1_used_(0), object_feature_1_(0),
--      seen_first_object_(false)
-+      feature_1_(0), feature_2_used_(0), feature_2_needed_(0),
-+      object_isa_1_used_(0), object_feature_1_(0),
-+      object_feature_2_used_(0), seen_first_object_(false)
-   { }
- 
-   // Hook for a new output section.
-@@ -1382,6 +1383,8 @@ class Target_x86_64 : public Sized_target<size, false>
-   uint32_t isa_1_used_;
-   uint32_t isa_1_needed_;
-   uint32_t feature_1_;
-+  uint32_t feature_2_used_;
-+  uint32_t feature_2_needed_;
-   // Target-specific properties from the current object.
-   // These bits get ORed into ISA_1_USED_ after all properties for the object
-   // have been processed. But if either is all zeroes (as when the property
-@@ -1391,6 +1394,7 @@ class Target_x86_64 : public Sized_target<size, false>
-   // These bits get ANDed into FEATURE_1_ after all properties for the object
-   // have been processed.
-   uint32_t object_feature_1_;
-+  uint32_t object_feature_2_used_;
-   // Whether we have seen our first object, for use in initializing FEATURE_1_.
-   bool seen_first_object_;
- };
-@@ -1594,9 +1598,15 @@ Target_x86_64<size>::record_gnu_property(
- 
-   switch (pr_type)
-     {
-+    case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_USED:
-+    case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED:
-+    case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED:
-+    case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED:
-     case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
-     case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
-     case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
-+    case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
-+    case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
-       if (pr_datasz != 4)
- 	{
- 	  gold_warning(_("%s: corrupt .note.gnu.property section "
-@@ -1625,6 +1635,12 @@ Target_x86_64<size>::record_gnu_property(
-       // If we see multiple feature props in one object, OR them together.
-       this->object_feature_1_ |= val;
-       break;
-+    case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
-+      this->object_feature_2_used_ |= val;
-+      break;
-+    case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
-+      this->feature_2_needed_ |= val;
-+      break;
-     }
- }
- 
-@@ -1642,15 +1658,23 @@ Target_x86_64<size>::merge_gnu_properties(const Object*)
-       else if (this->isa_1_used_ != 0)
- 	this->isa_1_used_ |= this->object_isa_1_used_;
-       this->feature_1_ &= this->object_feature_1_;
-+      // If any object is missing the FEATURE_2_USED property, we must
-+      // omit it from the output file.
-+      if (this->object_feature_2_used_ == 0)
-+	this->feature_2_used_ = 0;
-+      else if (this->feature_2_used_ != 0)
-+	this->feature_2_used_ |= this->object_feature_2_used_;
-     }
-   else
-     {
-       this->isa_1_used_ = this->object_isa_1_used_;
-       this->feature_1_ = this->object_feature_1_;
-+      this->feature_2_used_ = this->object_feature_2_used_;
-       this->seen_first_object_ = true;
-     }
-   this->object_isa_1_used_ = 0;
-   this->object_feature_1_ = 0;
-+  this->object_feature_2_used_ = 0;
- }
- 
- static inline void
-@@ -1676,6 +1700,12 @@ Target_x86_64<size>::do_finalize_gnu_properties(Layout* layout) const
-   if (this->feature_1_ != 0)
-     add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND,
- 		 this->feature_1_);
-+  if (this->feature_2_used_ != 0)
-+    add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED,
-+		 this->feature_2_used_);
-+  if (this->feature_2_needed_ != 0)
-+    add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED,
-+		 this->feature_2_needed_);
- }
- 
- // Write the first three reserved words of the .got.plt section.
--- 
-2.27.0
-
diff --git a/pkgs/development/tools/misc/libtool/libtool2-macos11.patch b/pkgs/development/tools/misc/libtool/libtool2-macos11.patch
deleted file mode 100644
index 1552ae7a949..00000000000
--- a/pkgs/development/tools/misc/libtool/libtool2-macos11.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-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 44e4c8665c8..3d15752fc0a 100644
--- a/pkgs/development/tools/misc/libtool/libtool2.nix
+++ b/pkgs/development/tools/misc/libtool/libtool2.nix
@@ -1,4 +1,6 @@
 { lib, stdenv, fetchurl, fetchpatch, autoconf, automake, m4, perl, help2man
+, runtimeShell
+, file
 }:
 
 # Note: this package is used for bootstrapping fetchurl, and thus
@@ -8,20 +10,18 @@
 
 stdenv.mkDerivation rec {
   pname = "libtool";
-  version = "2.4.6";
+  version = "2.4.7";
 
   src = fetchurl {
     url = "mirror://gnu/libtool/${pname}-${version}.tar.gz";
-    sha256 = "1qq61k6lp1fp75xs398yzi6wvbx232l7xbyn3p13cnh27mflvgg3";
+    sha256 = "sha256-BOlsJATqcMWQxUbrpCAqThJyLGQAFsErmy8c49SB6ag=";
   };
 
   outputs = [ "out" "lib" ];
 
-  patches = [
-    # Suport macOS version 11.0
-    # https://lists.gnu.org/archive/html/libtool-patches/2020-06/msg00001.html
-    ./libtool2-macos11.patch
-  ];
+  # FILECMD was added in libtool 2.4.7; previous versions hardwired `/usr/bin/file`
+  #   https://lists.gnu.org/archive/html/autotools-announce/2022-03/msg00000.html
+  FILECMD = "${file}/bin/file";
 
   # Normally we'd use autoreconfHook, but that includes libtoolize.
   postPatch = ''
@@ -34,10 +34,18 @@ stdenv.mkDerivation rec {
     automake
     autoconf
     popd
+  '' +
+  # libtool commit da2e352735722917bf0786284411262195a6a3f6 changed
+  # the shebang from `/bin/sh` (which is a special sandbox exception)
+  # to `/usr/bin/env sh`, meaning that we now need to patch shebangs
+  # in libtoolize and ltmain.sh since `dontPatchShebangs` is set:
+  ''
+    substituteInPlace libtoolize.in       --replace '#! /usr/bin/env sh' '#!${runtimeShell}'
+    substituteInPlace build-aux/ltmain.in --replace '#! /usr/bin/env sh' '#!${runtimeShell}'
   '';
 
-  nativeBuildInputs = [ perl help2man m4 ] ++ [ autoconf automake ];
-  propagatedBuildInputs = [ m4 ];
+  nativeBuildInputs = [ autoconf automake help2man m4 perl ];
+  propagatedBuildInputs = [ m4 file ];
 
   # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the
   # "fixed" path in generated files!
diff --git a/pkgs/development/tools/mold/default.nix b/pkgs/development/tools/mold/default.nix
index db1c13da2f9..491afd68bbb 100644
--- a/pkgs/development/tools/mold/default.nix
+++ b/pkgs/development/tools/mold/default.nix
@@ -41,6 +41,8 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/rui314/mold";
     license = lib.licenses.agpl3Plus;
     maintainers = with maintainers; [ nitsky ];
-    broken = stdenv.isAarch64;
+    platforms = platforms.unix;
+    # error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
+    broken = stdenv.isAarch64 || stdenv.isDarwin;
   };
 }
diff --git a/pkgs/development/tools/rust/cbindgen/default.nix b/pkgs/development/tools/rust/cbindgen/default.nix
index 6e8f67bd0a5..a4f02023bb0 100644
--- a/pkgs/development/tools/rust/cbindgen/default.nix
+++ b/pkgs/development/tools/rust/cbindgen/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "rust-cbindgen";
-  version = "0.20.0";
+  version = "0.21.0";
 
   src = fetchFromGitHub {
     owner = "eqrion";
     repo = "cbindgen";
     rev = "v${version}";
-    sha256 = "sha256-BLiAFYkqVJSpeNPW7UF2PpAttd6ADGeQ9yneiVfNi4g=";
+    sha256 = "sha256-WvCGAjFxjaql/y35QfHyHvwbEL4pKtlc3JO2NecqQCM=";
   };
 
-  cargoSha256 = "sha256-P58qANcl0mYqJDP1QnSx560y8BLH+ePTZ+uHuix89R4=";
+  cargoSha256 = "sha256-Kl2/u+ttPn1k7f3+XRCord4u+c4QZ80/Okb40XeyeIk=";
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix
index 1e05850884c..317de55ada5 100644
--- a/pkgs/development/web/nodejs/nodejs.nix
+++ b/pkgs/development/web/nodejs/nodejs.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, openssl, python, zlib, libuv, util-linux, http-parser
-, pkg-config, which
+, pkg-config, which, buildPackages
 # for `.pkgs` attribute
 , callPackage
 # Updater dependencies
@@ -50,6 +50,10 @@ let
       inherit sha256;
     };
 
+    CC_host = "cc";
+    CXX_host = "c++";
+    depsBuildBuild = [ buildPackages.stdenv.cc openssl libuv zlib ];
+
     buildInputs = optionals stdenv.isDarwin [ CoreServices ApplicationServices ]
       ++ [ zlib libuv openssl http-parser icu ];
 
@@ -69,12 +73,23 @@ let
       "--cross-compiling"
       "--without-intl"
       "--without-snapshot"
+      "--dest-cpu=${let platform = stdenv.hostPlatform; in
+                    if      platform.isAarch32 then "arm"
+                    else if platform.isAarch64 then "arm64"
+                    else if platform.isMips32 && platform.isLittleEndian then "mipsel"
+                    else if platform.isMips32 && !platform.isLittleEndian then "mips"
+                    else if platform.isMips64 && platform.isLittleEndian then "mips64el"
+                    else if platform.isPower && platform.is32bit then "ppc"
+                    else if platform.isPower && platform.is64bit then "ppc64"
+                    else if platform.isx86_64 then "x86_64"
+                    else if platform.isx86_32 then "x86"
+                    else if platform.isS390 && platform.is64bit then "s390x"
+                    else if platform.isRiscV && platform.is64bit then "riscv64"
+                    else throw "unsupported cpu ${stdenv.hostPlatform.uname.processor}"}"
     ]) ++ (optionals (isCross && isAarch32 && hasAttr "fpu" gcc) [
       "--with-arm-fpu=${gcc.fpu}"
     ]) ++ (optionals (isCross && isAarch32 && hasAttr "float-abi" gcc) [
       "--with-arm-float-abi=${gcc.float-abi}"
-    ]) ++ (optionals (isCross && isAarch32) [
-      "--dest-cpu=arm"
     ]) ++ extraConfigFlags;
 
     configurePlatforms = [];
diff --git a/pkgs/games/airstrike/default.nix b/pkgs/games/airstrike/default.nix
index 12b485764a5..8441ac7a2fe 100644
--- a/pkgs/games/airstrike/default.nix
+++ b/pkgs/games/airstrike/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     cp -r data airstrikerc $out/share
 
     wrapProgram $out/bin/airstrike \
-      --run "cd $out/share"
+      --chdir "$out/share"
   '';
 
   meta = with lib; {
diff --git a/pkgs/games/assaultcube/default.nix b/pkgs/games/assaultcube/default.nix
index 1013be2694e..4a0951d0964 100644
--- a/pkgs/games/assaultcube/default.nix
+++ b/pkgs/games/assaultcube/default.nix
@@ -52,13 +52,13 @@ stdenv.mkDerivation rec {
       install -Dpm644 packages/misc/icon.png $out/share/pixmaps/assaultcube.png
 
       makeWrapper $out/bin/ac_client $out/bin/${pname} \
-        --run "cd $out/$gamedatadir" --add-flags "--home=\$HOME/.assaultcube/v1.2next --init"
+        --chdir "$out/$gamedatadir" --add-flags "--home=\$HOME/.assaultcube/v1.2next --init"
     fi
 
     if (test -e source/src/ac_server) then
       cp source/src/ac_server $bindir
       makeWrapper $out/bin/ac_server $out/bin/${pname}-server \
-        --run "cd $out/$gamedatadir" --add-flags "-Cconfig/servercmdline.txt"
+        --chdir "$out/$gamedatadir" --add-flags "-Cconfig/servercmdline.txt"
     fi
     '';
 
diff --git a/pkgs/games/domination/default.nix b/pkgs/games/domination/default.nix
index b7eae5e5acd..8ef45b85019 100644
--- a/pkgs/games/domination/default.nix
+++ b/pkgs/games/domination/default.nix
@@ -63,10 +63,10 @@ in stdenv.mkDerivation {
     # Reimplement the two launchers mentioned in Unix_shortcutSpec.xml with makeWrapper
     mkdir -p $out/bin
     makeWrapper ${jre}/bin/java $out/bin/domination \
-      --run "cd $out/share/domination" \
+      --chdir "$out/share/domination" \
       --add-flags "-jar $out/share/domination/Domination.jar"
     makeWrapper ${jre}/bin/java $out/bin/domination-map-editor \
-      --run "cd $out/share/domination" \
+      --chdir "$out/share/domination" \
       --add-flags "-cp $out/share/domination/Domination.jar net.yura.domination.ui.swinggui.SwingGUIFrame"
 
     install -Dm644 \
diff --git a/pkgs/games/enigma/default.nix b/pkgs/games/enigma/default.nix
index 131bd00e185..247d7b9dee1 100644
--- a/pkgs/games/enigma/default.nix
+++ b/pkgs/games/enigma/default.nix
@@ -1,20 +1,33 @@
-{ lib, stdenv, fetchurl, makeWrapper, pkg-config, gettext, imagemagick, curl, libpng, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, xercesc, xdg-utils, hicolor-icon-theme }:
+{ lib, stdenv, fetchurl, fetchpatch, makeWrapper, pkg-config, gettext, imagemagick, curl, libpng, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, xercesc, xdg-utils, hicolor-icon-theme }:
 stdenv.mkDerivation rec {
   pname = "enigma";
-  version = "1.30-alpha";
+  version = "1.30";
 
   src = fetchurl {
-    url = "https://github.com/Enigma-Game/Enigma/releases/download/${version}/${pname}-${version}.tar.gz";
-    sha256 = "1zyk3j43gzfr1lhc6g13j7qai5f33fv5xm5735nnznaqvaz17949";
+    url = "https://github.com/Enigma-Game/Enigma/releases/download/${version}/Enigma-${version}-src.tar.gz";
+    sha256 = "rmS5H7wrEJcAcdDXjtW07enuOGjeLm6VaVRvxYQ3+K8=";
   };
 
+  patches = [
+    # fix format string security warning (turned into error)
+    (fetchpatch {
+      url = "https://github.com/Enigma-Game/Enigma/pull/70/commits/d25051eb6228c885e779a9674f8ee3979da30663.patch";
+      sha256 = "L5C4NCZDDUKji9Tg4geKaiw3CkSY6rCoawqGKqR4dFM=";
+    })
+  ];
+
   nativeBuildInputs = [ pkg-config gettext makeWrapper imagemagick ];
   buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf libpng xercesc curl xdg-utils ];
 
-  # For some reason (might be related to the alpha status), some includes
-  # which are required by lib-src/enigma-core are not picked up by the
-  # configure script. Hence we add them manually.
-  CPPFLAGS = "-I${SDL2.dev}/include/SDL2 -I${SDL2_ttf}/include/SDL2 -I${SDL2_image}/include/SDL2 -I${SDL2_mixer}/include/SDL2";
+  # The configure script of enigma uses pkg-config to determine the header
+  # directories of SDL2. However, pkg-config only returns the path to the core
+  # SDL2 library, not to the additional libraries SDL2_ttf, SDL2_image and
+  # SDL2_mixer. In contrast, sdl2-config does return the correct list of paths.
+  # We don't use configureFlags here so that the shell can correctly carry
+  # out the interpolation.
+  preConfigure = ''
+    export SDL_CFLAGS=$(sdl2-config --cflags)
+  '';
 
   postInstall = ''
     rm -r $out/include
diff --git a/pkgs/games/flare/default.nix b/pkgs/games/flare/default.nix
index 3567a588605..c849b879ea3 100644
--- a/pkgs/games/flare/default.nix
+++ b/pkgs/games/flare/default.nix
@@ -11,7 +11,7 @@ buildEnv {
   nativeBuildInputs = [ makeWrapper ];
   postBuild = ''
     mkdir -p $out/bin
-    makeWrapper $out/games/flare $out/bin/flare --run "cd $out/share/games/flare"
+    makeWrapper $out/games/flare $out/bin/flare --chdir "$out/share/games/flare"
   '';
 
   meta = with lib; {
diff --git a/pkgs/games/frogatto/default.nix b/pkgs/games/frogatto/default.nix
index f987992858d..fa6b46e0751 100644
--- a/pkgs/games/frogatto/default.nix
+++ b/pkgs/games/frogatto/default.nix
@@ -30,7 +30,7 @@ in buildEnv {
 
   postBuild = ''
     wrapProgram $out/bin/frogatto \
-      --run "cd $out/share/frogatto"
+      --chdir "$out/share/frogatto"
   '';
 
   meta = with lib; {
diff --git a/pkgs/games/iortcw/default.nix b/pkgs/games/iortcw/default.nix
index 8af3dfe31f6..9da055acc21 100644
--- a/pkgs/games/iortcw/default.nix
+++ b/pkgs/games/iortcw/default.nix
@@ -17,7 +17,7 @@ in buildEnv {
   # so we can launch sp from mp game and vice versa
   postBuild = ''
     for i in `find -L $out/opt/iortcw -maxdepth 1 -type f -executable`; do
-      makeWrapper $i $out/bin/`basename $i` --run "cd $out/opt/iortcw"
+      makeWrapper $i $out/bin/`basename $i` --chdir "$out/opt/iortcw"
     done
   '';
 
diff --git a/pkgs/games/iortcw/sp.nix b/pkgs/games/iortcw/sp.nix
index fa6f73a177b..d9faa177c17 100644
--- a/pkgs/games/iortcw/sp.nix
+++ b/pkgs/games/iortcw/sp.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
 
   postInstall = ''
     for i in `find $out/opt/iortcw -maxdepth 1 -type f -executable`; do
-      makeWrapper $i $out/bin/`basename $i` --run "cd $out/opt/iortcw"
+      makeWrapper $i $out/bin/`basename $i` --chdir "$out/opt/iortcw"
     done
   '';
 
diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix
index 08104310faa..dc4cd9087fc 100644
--- a/pkgs/games/minecraft/default.nix
+++ b/pkgs/games/minecraft/default.nix
@@ -139,7 +139,7 @@ stdenv.mkDerivation rec {
       --prefix LD_LIBRARY_PATH : ${envLibPath} \
       --prefix PATH : ${lib.makeBinPath [ jre ]} \
       --set JAVA_HOME ${lib.getBin jre} \
-      --run "cd /tmp" \
+      --chdir /tmp \
       "''${gappsWrapperArgs[@]}"
   '';
 
diff --git a/pkgs/games/mudlet/default.nix b/pkgs/games/mudlet/default.nix
index 46ae45b2202..f4ca916aa49 100644
--- a/pkgs/games/mudlet/default.nix
+++ b/pkgs/games/mudlet/default.nix
@@ -85,7 +85,7 @@ stdenv.mkDerivation rec {
       --set LUA_CPATH "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \
       --prefix LUA_PATH : "$NIX_LUA_PATH" \
       --prefix LD_LIBRARY_PATH : "${libsForQt5.qtkeychain}/lib/" \
-      --run "cd $out";
+      --chdir "$out";
 
     runHook postInstall
   '';
diff --git a/pkgs/games/nanosaur/default.nix b/pkgs/games/nanosaur/default.nix
index 75e47fa179b..0d5ea528a92 100644
--- a/pkgs/games/nanosaur/default.nix
+++ b/pkgs/games/nanosaur/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
 
   installPhase = ''
     mv build $out
-    makeWrapper $out/Nanosaur $out/bin/Nanosaur --run "cd $out"
+    makeWrapper $out/Nanosaur $out/bin/Nanosaur --chdir "$out"
   '';
 
   meta = with lib; {
diff --git a/pkgs/games/openjk/default.nix b/pkgs/games/openjk/default.nix
index ffcbb6dca3f..092f442669a 100644
--- a/pkgs/games/openjk/default.nix
+++ b/pkgs/games/openjk/default.nix
@@ -64,10 +64,10 @@ in stdenv.mkDerivation {
     jaPrefix=$openja/opt/JediAcademy
     joPrefix=$openjo/opt/JediOutcast
 
-    makeWrapper $jaPrefix/openjk.* $openja/bin/jamp --run "cd $jaPrefix"
-    makeWrapper $jaPrefix/openjk_sp.* $openja/bin/jasp --run "cd $jaPrefix"
-    makeWrapper $jaPrefix/openjkded.* $openja/bin/openjkded --run "cd $jaPrefix"
-    makeWrapper $joPrefix/openjo_sp.* $openjo/bin/josp --run "cd $joPrefix"
+    makeWrapper $jaPrefix/openjk.* $openja/bin/jamp --chdir "$jaPrefix"
+    makeWrapper $jaPrefix/openjk_sp.* $openja/bin/jasp --chdir "$jaPrefix"
+    makeWrapper $jaPrefix/openjkded.* $openja/bin/openjkded --chdir "$jaPrefix"
+    makeWrapper $joPrefix/openjo_sp.* $openjo/bin/josp --chdir "$joPrefix"
 
     cp $src/shared/icons/OpenJK_Icon_128.png $openjo/share/icons/hicolor/128x128/apps
     cp $src/shared/icons/OpenJK_Icon_128.png $openja/share/icons/hicolor/128x128/apps
diff --git a/pkgs/games/openmw/tes3mp.nix b/pkgs/games/openmw/tes3mp.nix
index 37ad603d7cf..b92c31663fc 100644
--- a/pkgs/games/openmw/tes3mp.nix
+++ b/pkgs/games/openmw/tes3mp.nix
@@ -131,11 +131,11 @@ symlinkJoin rec {
     dir=\''${XDG_CONFIG_HOME:-\$HOME/.config}/openmw
 
     makeWrapper ${unwrapped}/libexec/tes3mp-browser $out/bin/tes3mp-browser \
-      --run "cd $out/bin"
+      --chdir "$out/bin"
 
     makeWrapper ${unwrapped}/libexec/tes3mp-server $out/bin/tes3mp-server \
       --run "mkdir -p $dir" \
       --run "${crudini}/bin/crudini --merge $dir/${cfgFile.name} < ${cfgFile}" \
-      --run "cd $out/bin"
+      --chdir "$out/bin"
   '';
 }
diff --git a/pkgs/games/openra/common.nix b/pkgs/games/openra/common.nix
index 01bd44ee244..67060f9ef38 100644
--- a/pkgs/games/openra/common.nix
+++ b/pkgs/games/openra/common.nix
@@ -34,7 +34,7 @@ in {
       --set TERM xterm
 
     makeWrapper $out/lib/openra${openraSuffix}/launch-game.sh $(mkdirp $out/bin)/openra${openraSuffix} \
-      --run "cd $out/lib/openra${openraSuffix}"
+      --chdir "$out/lib/openra${openraSuffix}"
   '';
 
   packageAttrs = {
diff --git a/pkgs/games/otto-matic/default.nix b/pkgs/games/otto-matic/default.nix
index e213deabe85..5dd7f98e456 100644
--- a/pkgs/games/otto-matic/default.nix
+++ b/pkgs/games/otto-matic/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
     mkdir -p $out/share/OttoMatic
     mv Data $out/share/OttoMatic
     install -Dm755 {.,$out/bin}/OttoMatic
-    wrapProgram $out/bin/OttoMatic --run "cd $out/share/OttoMatic"
+    wrapProgram $out/bin/OttoMatic --chdir "$out/share/OttoMatic"
 
     runHook postInstall
   '';
diff --git a/pkgs/games/runelite/default.nix b/pkgs/games/runelite/default.nix
index d342d543e2f..39ff9c137df 100644
--- a/pkgs/games/runelite/default.nix
+++ b/pkgs/games/runelite/default.nix
@@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
 
     # RuneLite looks for `.so` files in $PWD/natives, so ensure that we set the PWD to the right place
     makeWrapper ${jre}/bin/java $out/bin/runelite \
-      --run "cd $out" \
+      --chdir "$out" \
       --prefix LD_LIBRARY_PATH : "${xorg.libXxf86vm}/lib" \
       --add-flags "-jar $out/share/runelite/RuneLite.jar"
   '';
diff --git a/pkgs/games/sauerbraten/default.nix b/pkgs/games/sauerbraten/default.nix
index 1d2e39d4164..934c590138d 100644
--- a/pkgs/games/sauerbraten/default.nix
+++ b/pkgs/games/sauerbraten/default.nix
@@ -56,9 +56,9 @@ stdenv.mkDerivation rec {
     ln -s $out/share/sauerbraten/cube.png $out/share/icon/sauerbraten.png
 
     makeWrapper $out/share/sauerbraten/sauer_server $out/bin/sauerbraten_server \
-      --run "cd $out/share/sauerbraten"
+      --chdir "$out/share/sauerbraten"
     makeWrapper $out/share/sauerbraten/sauer_client $out/bin/sauerbraten_client \
-      --run "cd $out/share/sauerbraten" \
+      --chdir "$out/share/sauerbraten" \
       --add-flags "-q\''${HOME}/.config/sauerbraten"
 
     runHook postInstall
diff --git a/pkgs/games/starsector/default.nix b/pkgs/games/starsector/default.nix
index 95fb3988f28..efba43e92dd 100644
--- a/pkgs/games/starsector/default.nix
+++ b/pkgs/games/starsector/default.nix
@@ -57,7 +57,8 @@ stdenv.mkDerivation rec {
     wrapProgram $out/starsector.sh \
       --prefix PATH : ${lib.makeBinPath [ openjdk ]} \
       --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs} \
-      --run 'mkdir -p ''${XDG_DATA_HOME:-~/.local/share}/starsector; cd '"$out"
+      --run 'mkdir -p ''${XDG_DATA_HOME:-~/.local/share}/starsector' \
+      --chdir "$out"
     ln -s $out/starsector.sh $out/bin/starsector
 
     runHook postInstall
diff --git a/pkgs/games/tome4/default.nix b/pkgs/games/tome4/default.nix
index 70fbebe084c..1f148feb932 100644
--- a/pkgs/games/tome4/default.nix
+++ b/pkgs/games/tome4/default.nix
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
     install -Dm755 t-engine $dir/t-engine
     cp -r bootstrap game $dir
     makeWrapper $dir/t-engine $out/bin/${pname} \
-      --run "cd $dir"
+      --chdir "$dir"
 
     install -Dm755 ${desktop}/share/applications/${pname}.desktop $out/share/applications/${pname}.desktop
     substituteInPlace $out/share/applications/${pname}.desktop \
diff --git a/pkgs/games/ut2004/wrapper.nix b/pkgs/games/ut2004/wrapper.nix
index bf344372933..cc5b0e400bc 100644
--- a/pkgs/games/ut2004/wrapper.nix
+++ b/pkgs/games/ut2004/wrapper.nix
@@ -38,7 +38,7 @@ in runCommand "ut2004" {
   for i in ${game}/System/*-bin; do
     name="$(basename "$i")"
     makeWrapper $i $out/bin/''${name%-bin} \
-      --run "cd ${game}/System"
+      --chdir "${game}/System"
   done
 
   mkdir -p $out/share/applications
diff --git a/pkgs/games/warsow/default.nix b/pkgs/games/warsow/default.nix
index 81c467dd9db..007b124ba58 100644
--- a/pkgs/games/warsow/default.nix
+++ b/pkgs/games/warsow/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
 
     mkdir -p $out/bin
     for i in ${warsow-engine}/bin/*; do
-      makeWrapper "$i" "$out/bin/$(basename "$i")" --run "cd $out/share/warsow"
+      makeWrapper "$i" "$out/bin/$(basename "$i")" --chdir "$out/share/warsow"
     done
   '';
 
diff --git a/pkgs/games/zod/default.nix b/pkgs/games/zod/default.nix
index 6bf24ed6cb9..ad576b46424 100644
--- a/pkgs/games/zod/default.nix
+++ b/pkgs/games/zod/default.nix
@@ -44,7 +44,7 @@ let
     installPhase = ''
       mkdir -p $out/bin
       install -m755 zod $out/bin/
-      wrapProgram $out/bin/zod --run "cd ${zod_assets}/usr/lib/commander-zod"
+      wrapProgram $out/bin/zod --chdir "${zod_assets}/usr/lib/commander-zod"
     '';
   };
   zod_map_editor = stdenv.mkDerivation {
@@ -56,7 +56,7 @@ let
     installPhase = ''
       mkdir -p $out/bin
       install -m755 zod_map_editor $out/bin
-      wrapProgram $out/bin/zod_map_editor --run "cd ${zod_assets}/usr/lib/commander-zod"
+      wrapProgram $out/bin/zod_map_editor --chdir "${zod_assets}/usr/lib/commander-zod"
     '';
   };
   zod_launcher = stdenv.mkDerivation {
diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix
index 92574231549..2f7ffeb89f3 100644
--- a/pkgs/misc/jackaudio/default.nix
+++ b/pkgs/misc/jackaudio/default.nix
@@ -48,8 +48,6 @@ stdenv.mkDerivation rec {
         --replace /bin/bash ${bash}/bin/bash
   '';
 
-  PKGCONFIG = "${stdenv.cc.targetPrefix}pkg-config";
-
   dontAddWafCrossFlags = "true";
   wafConfigureFlags = [
     "--classic"
diff --git a/pkgs/misc/rich-cli/default.nix b/pkgs/misc/rich-cli/default.nix
new file mode 100644
index 00000000000..e2970bd30ba
--- /dev/null
+++ b/pkgs/misc/rich-cli/default.nix
@@ -0,0 +1,32 @@
+{ lib, python3 }:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "rich-cli";
+  version = "1.5.1";
+
+  src = python3.pkgs.fetchPypi {
+    inherit pname version;
+    sha256 = "18qpdaw4drkwq71xikngwaarkjxhfc0nrb1zm36rw31b8dz0ij2k";
+  };
+
+  format = "pyproject";
+
+  nativeBuildInputs = [ python3.pkgs.poetry-core ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    rich
+    click
+    requests
+    textual
+    rich-rst
+  ];
+
+  buildInputs = [ python3 ];
+
+  meta = with lib; {
+    homepage = "https://github.com/Textualize/rich-cli";
+    description = "Command Line Interface to Rich";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jyooru ];
+  };
+}
diff --git a/pkgs/os-specific/linux/bluez/default.nix b/pkgs/os-specific/linux/bluez/default.nix
index ab9b7055fdd..1f6fb31d93d 100644
--- a/pkgs/os-specific/linux/bluez/default.nix
+++ b/pkgs/os-specific/linux/bluez/default.nix
@@ -22,11 +22,11 @@
   ];
 in stdenv.mkDerivation rec {
   pname = "bluez";
-  version = "5.63";
+  version = "5.64";
 
   src = fetchurl {
     url = "mirror://kernel/linux/bluetooth/${pname}-${version}.tar.xz";
-    sha256 = "sha256-k0nhHoFguz1yCDXScSUNinQk02kPUonm22/gfMZsbXY=";
+    sha256 = "sha256-rkN+ZbazBwwZi8WwEJ/pzeueqjhzgOIHL53mX+ih3jQ=";
   };
 
   buildInputs = [
diff --git a/pkgs/os-specific/linux/displaylink/default.nix b/pkgs/os-specific/linux/displaylink/default.nix
index e7e572ce18e..1823613a58a 100644
--- a/pkgs/os-specific/linux/displaylink/default.nix
+++ b/pkgs/os-specific/linux/displaylink/default.nix
@@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
       --set-rpath ${libPath} \
       $out/bin/DisplayLinkManager
     wrapProgram $out/bin/DisplayLinkManager \
-      --run "cd $out/lib/displaylink"
+      --chdir "$out/lib/displaylink"
 
     # We introduce a dependency on the source file so that it need not be redownloaded everytime
     echo $src >> "$out/share/workspace_dependencies.pin"
diff --git a/pkgs/os-specific/linux/keyutils/default.nix b/pkgs/os-specific/linux/keyutils/default.nix
index f307bd56d1c..88410654f3b 100644
--- a/pkgs/os-specific/linux/keyutils/default.nix
+++ b/pkgs/os-specific/linux/keyutils/default.nix
@@ -15,11 +15,6 @@ stdenv.mkDerivation rec {
   };
 
   patches = [
-    (fetchurl {
-      # improve reproducibility
-      url = "https://salsa.debian.org/debian/keyutils/raw/4cecffcb8e2a2aa4ef41777ed40e4e4bcfb2e5bf/debian/patches/Make-build-reproducible.patch";
-      sha256 = "0wnvbjfrbk7rghd032z684l7vk7mhy3bd41zvhkrhgp3cd5id0bm";
-    })
     ./conf-symlink.patch
     # This patch solves a duplicate symbol error when building with a clang stdenv
     # Before removing this patch, please ensure the package still builds by running eg.
@@ -29,9 +24,16 @@ stdenv.mkDerivation rec {
 
   makeFlags = lib.optionals stdenv.hostPlatform.isStatic "NO_SOLIB=1";
 
-  BUILDDATE = "1970-01-01";
   outputs = [ "out" "lib" "dev" ];
 
+  postPatch = ''
+    # https://github.com/archlinux/svntogit-packages/blob/packages/keyutils/trunk/reproducible.patch
+    substituteInPlace Makefile \
+      --replace \
+        'VCPPFLAGS	:= -DPKGBUILD="\"$(shell date -u +%F)\""' \
+        'VCPPFLAGS	:= -DPKGBUILD="\"$(date -ud "@$SOURCE_DATE_EPOCH" +%F)\""'
+  '';
+
   enableParallelBuilding = true;
 
   installFlags = [
diff --git a/pkgs/os-specific/linux/libcap/default.nix b/pkgs/os-specific/linux/libcap/default.nix
index 750e26313cf..1fa887dd2a3 100644
--- a/pkgs/os-specific/linux/libcap/default.nix
+++ b/pkgs/os-specific/linux/libcap/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
     "PAM_CAP=${if usePam then "yes" else "no"}"
     "BUILD_CC=$(CC_FOR_BUILD)"
     "CC:=$(CC)"
+    "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
   ] ++ lib.optional isStatic "SHARED=no";
 
   postPatch = ''
diff --git a/pkgs/os-specific/linux/lvm2/common.nix b/pkgs/os-specific/linux/lvm2/common.nix
index 7ba08e7d903..641945a5685 100644
--- a/pkgs/os-specific/linux/lvm2/common.nix
+++ b/pkgs/os-specific/linux/lvm2/common.nix
@@ -5,13 +5,17 @@
 , fetchurl
 , pkg-config
 , util-linux
+, coreutils
 , libuuid
 , libaio
+, substituteAll
 , enableCmdlib ? false
 , enableDmeventd ? false
 , udevSupport ? !stdenv.hostPlatform.isStatic, udev ? null
 , onlyLib ? stdenv.hostPlatform.isStatic
 , enableVDO ? false, vdo ? null
+, enableMdadm ? false, mdadm ? null
+, enableMultipath ? false, multipath-tools ? null
 , nixosTests
 }:
 
@@ -82,13 +86,28 @@ stdenv.mkDerivation rec {
     substituteInPlace make.tmpl.in --replace "@systemdsystemunitdir@" "$out/lib/systemd/system"
   '' + lib.optionalString (lib.versionAtLeast version "2.03") ''
     substituteInPlace libdm/make.tmpl.in --replace "@systemdsystemunitdir@" "$out/lib/systemd/system"
+
+    substituteInPlace scripts/blk_availability_systemd_red_hat.service.in \
+      --replace '/usr/bin/true' '${coreutils}/bin/true'
   '';
 
   postConfigure = ''
     sed -i 's|^#define LVM_CONFIGURE_LINE.*$|#define LVM_CONFIGURE_LINE "<removed>"|g' ./include/configure.h
   '';
 
-  patches = lib.optionals (lib.versionOlder version "2.03.15") [
+  patches = [
+    # fixes paths to and checks for tools
+    (substituteAll (let
+      optionalTool = cond: pkg: if cond then pkg else "/run/current-system/sw";
+    in {
+      src = ./fix-blkdeactivate.patch;
+      inherit coreutils;
+      util_linux = util-linux;
+      mdadm = optionalTool enableMdadm mdadm;
+      multipath_tools = optionalTool enableMultipath multipath-tools;
+      vdo = optionalTool enableVDO vdo;
+    }))
+  ] ++ lib.optionals (lib.versionOlder version "2.03.15") [
     # Musl fixes from Alpine.
     ./fix-stdio-usage.patch
     (fetchpatch {
diff --git a/pkgs/os-specific/linux/lvm2/fix-blkdeactivate.patch b/pkgs/os-specific/linux/lvm2/fix-blkdeactivate.patch
new file mode 100644
index 00000000000..db8cfaeae9e
--- /dev/null
+++ b/pkgs/os-specific/linux/lvm2/fix-blkdeactivate.patch
@@ -0,0 +1,51 @@
+diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in
+index 7c517b87b..e51a33778 100644
+--- a/scripts/blkdeactivate.sh.in
++++ b/scripts/blkdeactivate.sh.in
+@@ -34,11 +34,11 @@ TOOL=blkdeactivate
+ DEV_DIR="/dev"
+ SYS_BLK_DIR="/sys/block"
+ 
+-MDADM="/sbin/mdadm"
+-MOUNTPOINT="/bin/mountpoint"
+-MPATHD="/sbin/multipathd"
+-UMOUNT="/bin/umount"
+-VDO="/bin/vdo"
++MDADM="@mdadm@/bin/mdadm"
++MOUNTPOINT="@util_linux@/bin/mountpoint"
++MPATHD="@multipath_tools@/bin/multipathd"
++UMOUNT="@util_linux@/bin/umount"
++VDO="@vdo@/bin/vdo"
+ 
+ sbindir="@SBINDIR@"
+ DMSETUP="$sbindir/dmsetup"
+@@ -48,7 +48,7 @@ if "$UMOUNT" --help | grep -- "--all-targets" >"$DEV_DIR/null"; then
+ 	UMOUNT_OPTS="--all-targets "
+ else
+ 	UMOUNT_OPTS=""
+-	FINDMNT="/bin/findmnt -r --noheadings -u -o TARGET"
++	FINDMNT="@util_linux@/bin/findmnt -r --noheadings -u -o TARGET"
+ 	FINDMNT_READ="read -r mnt"
+ fi
+ DMSETUP_OPTS=""
+@@ -57,10 +57,10 @@ MDADM_OPTS=""
+ MPATHD_OPTS=""
+ VDO_OPTS=""
+ 
+-LSBLK="/bin/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT"
++LSBLK="@util_linux@/bin/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT"
+ LSBLK_VARS="local devtype local kname local name local mnt"
+ LSBLK_READ="read -r devtype kname name mnt"
+-SORT_MNT="/bin/sort -r -u -k 4"
++SORT_MNT="@coreutils@/bin/sort -r -u -k 4"
+ 
+ # Do not show tool errors by default (only done/skipping summary
+ # message provided by this script) and no verbose mode by default.
+@@ -102,6 +102,7 @@ declare -A SKIP_VG_LIST=()
+ # (list is an associative array!)
+ #
+ declare -A SKIP_UMOUNT_LIST=(["/"]=1 \
++                             ["/nix"]=1 ["/nix/store"]=1 \
+                              ["/lib"]=1 ["/lib64"]=1 \
+                              ["/bin"]=1 ["/sbin"]=1 \
+                              ["/var"]=1 ["/var/log"]=1 \
diff --git a/pkgs/os-specific/linux/sgx/psw/default.nix b/pkgs/os-specific/linux/sgx/psw/default.nix
index b418d5c1822..f6564f1560c 100644
--- a/pkgs/os-specific/linux/sgx/psw/default.nix
+++ b/pkgs/os-specific/linux/sgx/psw/default.nix
@@ -135,7 +135,7 @@ stdenv.mkDerivation rec {
     mkdir $out/bin
     makeWrapper $out/aesm/aesm_service $out/bin/aesm_service \
       --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ protobuf ]}:$out/aesm \
-      --run "cd $out/aesm"
+      --chdir "$out/aesm"
 
     # Make sure we didn't forget to handle any files
     rmdir $sgxPswDir || (echo "Error: The directory $installDir still contains unhandled files: $(ls -A $installDir)" >&2 && exit 1)
diff --git a/pkgs/os-specific/linux/sgx/samples/default.nix b/pkgs/os-specific/linux/sgx/samples/default.nix
index f9c5ae45054..2afd62de75d 100644
--- a/pkgs/os-specific/linux/sgx/samples/default.nix
+++ b/pkgs/os-specific/linux/sgx/samples/default.nix
@@ -41,7 +41,7 @@ let
       install *.so $out/lib
 
       wrapProgram "$out/bin/app" \
-        --run "cd $out/lib" \
+        --chdir "$out/lib" \
         ${lib.optionalString (!isSimulation)
         ''--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ sgx-psw ]}"''}
 
@@ -76,7 +76,7 @@ in
 
       for bin in $out/bin/*; do
         wrapProgram $bin \
-          --run "cd $out/lib" \
+          --chdir "$out/lib" \
           ${lib.optionalString (!isSimulation)
           ''--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ sgx-psw ]}"''}
       done
diff --git a/pkgs/servers/home-assistant/cli.nix b/pkgs/servers/home-assistant/cli.nix
index baa418776c5..18bc9c76da0 100644
--- a/pkgs/servers/home-assistant/cli.nix
+++ b/pkgs/servers/home-assistant/cli.nix
@@ -2,7 +2,21 @@
 , python3
 }:
 
-python3.pkgs.buildPythonApplication rec {
+let
+  python = python3.override {
+    packageOverrides = self: super: {
+      click = super.click.overrideAttrs (oldAttrs: rec {
+        version = "8.0.4";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "sha256-hFjXsSh8X7EoyQ4jOBz5nc3nS+r2x/9jhM6E1v4JCts=";
+        };
+      });
+    };
+  };
+in
+
+python.pkgs.buildPythonApplication rec {
   pname = "homeassistant-cli";
   version = "0.9.4";
 
@@ -16,7 +30,7 @@ python3.pkgs.buildPythonApplication rec {
     sed -i "s/'\(.*\)\(==\|>=\).*'/'\1'/g" setup.py
   '';
 
-  propagatedBuildInputs = with python3.pkgs; [
+  propagatedBuildInputs = with python.pkgs; [
     aiohttp
     click
     click-log
@@ -38,7 +52,7 @@ python3.pkgs.buildPythonApplication rec {
   #  $out/bin/hass-cli completion zsh > "$out/share/zsh/site-functions/_hass-cli"
   #'';
 
-  checkInputs = with python3.pkgs; [
+  checkInputs = with python.pkgs; [
     pytestCheckHook
     requests-mock
   ];
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix
index 1ba54a3ef2f..b09ef7b8c05 100644
--- a/pkgs/servers/home-assistant/default.nix
+++ b/pkgs/servers/home-assistant/default.nix
@@ -283,8 +283,6 @@ in python.pkgs.buildPythonApplication rec {
   ];
 
   pytestFlagsArray = [
-    # parallelize test run
-    "--numprocesses $NIX_BUILD_CORES"
     # assign tests grouped by file to workers
     "--dist loadfile"
     # retry racy tests that end in "RuntimeError: Event loop is closed"
diff --git a/pkgs/servers/home-assistant/tests.nix b/pkgs/servers/home-assistant/tests.nix
index 58bb1670e5a..00b2e7fbac0 100644
--- a/pkgs/servers/home-assistant/tests.nix
+++ b/pkgs/servers/home-assistant/tests.nix
@@ -56,7 +56,11 @@ in lib.listToAttrs (map (component: lib.nameValuePair component (
     disabledTests = old.disabledTests ++ extraDisabledTests.${component} or [];
     disabledTestPaths = old.disabledTestPaths ++ extraDisabledTestPaths.${component} or [ ];
 
+    # components are more often racy than the core
+    dontUsePytestXdist = true;
+
     pytestFlagsArray = lib.remove "tests" old.pytestFlagsArray
+      ++ [ "--numprocesses=4" ]
       ++ extraPytestFlagsArray.${component} or [ ]
       ++ [ "tests/components/${component}" ];
 
diff --git a/pkgs/servers/hqplayerd/default.nix b/pkgs/servers/hqplayerd/default.nix
index 7b65a789af8..64a5fd18381 100644
--- a/pkgs/servers/hqplayerd/default.nix
+++ b/pkgs/servers/hqplayerd/default.nix
@@ -130,6 +130,7 @@ stdenv.mkDerivation rec {
     homepage = "https://www.signalyst.com/custom.html";
     description = "High-end upsampling multichannel software embedded HD-audio player";
     license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
     maintainers = with maintainers; [ lovesegfault ];
   };
 }
diff --git a/pkgs/servers/mail/mailman/default.nix b/pkgs/servers/mail/mailman/default.nix
index 8cd087f4174..f5632df7949 100644
--- a/pkgs/servers/mail/mailman/default.nix
+++ b/pkgs/servers/mail/mailman/default.nix
@@ -5,12 +5,18 @@ let
   # Mailman does not support sqlalchemy >= 1.4 https://gitlab.com/mailman/mailman/-/issues/845
   pythonOverride = python3.override {
     packageOverrides = self: super: {
+      alembic = super.alembic.overridePythonAttrs (oldAttrs:  {
+        # does not find tests
+        doCheck = false;
+      });
       sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
         version = "1.3.24";
         src = oldAttrs.src.override {
           inherit version;
-          sha256 = "06bmxzssc66cblk1hamskyv5q3xf1nh1py3vi6dka4lkpxy7gfzb";
+          hash = "sha256-67t3fL+TEjWbiXv4G6ANrg9ctp+6KhgmXcwYpvXvdRk=";
         };
+        # does not find tests
+        doCheck = false;
       });
     };
   };
diff --git a/pkgs/servers/ombi/default.nix b/pkgs/servers/ombi/default.nix
index a99349d8c0d..e0eac1b8c04 100644
--- a/pkgs/servers/ombi/default.nix
+++ b/pkgs/servers/ombi/default.nix
@@ -26,7 +26,8 @@ in stdenv.mkDerivation rec {
     sha256 = hash;
   };
 
-  nativeBuildInputs = [ makeWrapper autoPatchelfHook ]
+  nativeBuildInputs = [ makeWrapper ]
+    ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook
     ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
 
   propagatedBuildInputs = [ stdenv.cc.cc zlib krb5 ];
@@ -37,7 +38,7 @@ in stdenv.mkDerivation rec {
 
     makeWrapper $out/share/${pname}-${version}/Ombi $out/bin/Ombi \
       --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl icu ]} \
-      --run "cd $out/share/${pname}-${version}"
+      --chdir "$out/share/${pname}-${version}"
   '';
 
   passthru = {
diff --git a/pkgs/servers/plik/default.nix b/pkgs/servers/plik/default.nix
index 7c9cd7d00eb..4572573d16f 100644
--- a/pkgs/servers/plik/default.nix
+++ b/pkgs/servers/plik/default.nix
@@ -21,6 +21,6 @@ in
     mv plik-*/webapp/dist $out/libexec/plikd/webapp
     cp ${programs.plikd-unwrapped}/bin/plikd $out/libexec/plikd/bin/plikd
     makeWrapper $out/libexec/plikd/bin/plikd $out/bin/plikd \
-      --run "cd $out/libexec/plikd/bin"
+      --chdir "$out/libexec/plikd/bin"
   '';
 }
diff --git a/pkgs/servers/pulseaudio/add-option-for-installation-sysconfdir.patch b/pkgs/servers/pulseaudio/add-option-for-installation-sysconfdir.patch
index dd4de7321e9..bb56eb13e88 100644
--- a/pkgs/servers/pulseaudio/add-option-for-installation-sysconfdir.patch
+++ b/pkgs/servers/pulseaudio/add-option-for-installation-sysconfdir.patch
@@ -1,9 +1,6 @@
-
-diff --git a/meson.build b/meson.build
-index 86af7243e..e2d48ab94 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -65,6 +65,11 @@ datadir = join_paths(prefix, get_option('datadir'))
+@@ -67,6 +67,11 @@ datadir = join_paths(prefix, get_option('datadir'))
  localedir = join_paths(prefix, get_option('localedir'))
  localstatedir = join_paths(prefix, get_option('localstatedir'))
  sysconfdir = join_paths(prefix, get_option('sysconfdir'))
@@ -14,8 +11,8 @@ index 86af7243e..e2d48ab94 100644
 +endif
  privlibdir = join_paths(libdir, 'pulseaudio')
  
- alsadatadir = get_option('alsadatadir')
-@@ -75,6 +80,11 @@ endif
+ if host_machine.system() == 'windows'
+@@ -82,6 +87,11 @@ endif
  pkgconfigdir = join_paths(libdir, 'pkgconfig')
  pulselibexecdir = join_paths(libexecdir, 'pulse')
  pulsesysconfdir = join_paths(sysconfdir, 'pulse')
@@ -27,11 +24,9 @@ index 86af7243e..e2d48ab94 100644
  
  modlibexecdir = get_option('modlibexecdir')
  if modlibexecdir == ''
-diff --git a/meson_options.txt b/meson_options.txt
-index 824f24e08..59a2b57ab 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -66,6 +66,9 @@ option('bashcompletiondir',
+@@ -72,6 +72,9 @@ option('bashcompletiondir',
  option('zshcompletiondir',
         type : 'string',
         description : 'Directory for zsh completion scripts ["no" disables]')
@@ -41,11 +36,18 @@ index 824f24e08..59a2b57ab 100644
  
  # Optional features
  
-diff --git a/src/daemon/meson.build b/src/daemon/meson.build
-index 9c9f807e7..425cecb46 100644
 --- a/src/daemon/meson.build
 +++ b/src/daemon/meson.build
-@@ -53,7 +53,7 @@ if x11_dep.found()
+@@ -52,7 +52,7 @@ if x11_dep.found()
+     output : '00-pulseaudio-x11',
+     configuration : conf,
+     install : true,
+-    install_dir : join_paths(sysconfdir, 'xdg', 'Xwayland-session.d'),
++    install_dir : join_paths(sysconfdir_install, 'xdg', 'Xwayland-session.d'),
+   )
+ 
+   desktop_file = i18n.merge_file(
+@@ -61,7 +61,7 @@ if x11_dep.found()
      po_dir : po_dir,
      type : 'desktop',
      install : true,
@@ -54,7 +56,7 @@ index 9c9f807e7..425cecb46 100644
    )
  
    desktop_utils = find_program('desktop-file-validate', required: false)
-@@ -85,7 +85,7 @@ custom_target('daemon.conf',
+@@ -93,7 +93,7 @@ custom_target('daemon.conf',
    command : [m4, '@INPUT@'],
    build_by_default : true,
    install : true,
@@ -63,7 +65,7 @@ index 9c9f807e7..425cecb46 100644
  )
  
  default_conf = configuration_data()
-@@ -111,7 +111,7 @@ custom_target('default.pa',
+@@ -117,7 +117,7 @@ custom_target('default.pa',
    command : [m4, '@INPUT@'],
    build_by_default : true,
    install : true,
@@ -72,7 +74,7 @@ index 9c9f807e7..425cecb46 100644
  )
  
  system_conf = configuration_data()
-@@ -132,12 +132,12 @@ custom_target('system.pa',
+@@ -136,12 +136,12 @@ custom_target('system.pa',
    command : [m4, '@INPUT@'],
    build_by_default : true,
    install : true,
@@ -87,11 +89,9 @@ index 9c9f807e7..425cecb46 100644
    )
  endif
  
-diff --git a/src/pulse/meson.build b/src/pulse/meson.build
-index aaebff53e..05a29a0d0 100644
 --- a/src/pulse/meson.build
 +++ b/src/pulse/meson.build
-@@ -130,5 +130,5 @@ client_conf_file = configure_file(
+@@ -134,5 +134,5 @@ client_conf_file = configure_file(
    input : 'client.conf.in',
    output : 'client.conf',
    configuration : client_conf,
diff --git a/pkgs/servers/pulseaudio/correct-ldflags.patch b/pkgs/servers/pulseaudio/correct-ldflags.patch
deleted file mode 100644
index 174cb8b4f74..00000000000
--- a/pkgs/servers/pulseaudio/correct-ldflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/meson.build b/meson.build
-index 45df103f0..d57d13172 100644
---- a/meson.build
-+++ b/meson.build
-@@ -342,7 +342,7 @@ cdata.set('MESON_BUILD', 1)
- # On ELF systems we don't want the libraries to be unloaded since we don't clean them up properly,
- # so we request the nodelete flag to be enabled.
- # On other systems, we don't really know how to do that, but it's welcome if somebody can tell.
--nodelete_link_args = ['-Wl,-z,nodelete']
-+nodelete_link_args = cc.get_supported_link_arguments(['-Wl,-z,nodelete'])
- 
- # Code coverage
- 
diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix
index 664d9ef9f75..b0ccd5f7635 100644
--- a/pkgs/servers/pulseaudio/default.nix
+++ b/pkgs/servers/pulseaudio/default.nix
@@ -1,9 +1,10 @@
-{ lib, stdenv, fetchurl, pkg-config, autoreconfHook
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config
 , libsndfile, libtool, makeWrapper, perlPackages
 , xorg, libcap, alsa-lib, glib, dconf
 , avahi, libjack2, libasyncns, lirc, dbus
 , sbc, bluez5, udev, openssl, fftwFloat
 , soxr, speexdsp, systemd, webrtc-audio-processing
+, check, meson, ninja, m4
 
 , x11Support ? false
 
@@ -31,23 +32,29 @@
 
 stdenv.mkDerivation rec {
   pname = "${if libOnly then "lib" else ""}pulseaudio";
-  version = "14.2";
+  version = "15.0";
 
   src = fetchurl {
     url = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-${version}.tar.xz";
-    sha256 = "sha256-ddP3dCwa5EkEmkyIkA5FS4s1DsqoxUTzSIolYqn/ZvE=";
+    sha256 = "pAuIejupjMJpdusRvbZhOYjxRbGQJNG2VVxqA8nLoaA=";
   };
 
+  patches = [
+    # Install sysconfdir files inside of the nix store,
+    # but use a conventional runtime sysconfdir outside the store
+    ./add-option-for-installation-sysconfdir.patch
+  ];
+
   outputs = [ "out" "dev" ];
 
-  nativeBuildInputs = [ pkg-config autoreconfHook makeWrapper perlPackages.perl perlPackages.XMLParser ]
+  nativeBuildInputs = [ pkg-config meson ninja makeWrapper perlPackages.perl perlPackages.XMLParser m4 ]
     ++ lib.optionals stdenv.isLinux [ glib ];
 
   propagatedBuildInputs =
     lib.optionals stdenv.isLinux [ libcap ];
 
   buildInputs =
-    [ libtool libsndfile soxr speexdsp fftwFloat ]
+    [ libtool libsndfile soxr speexdsp fftwFloat check ]
     ++ lib.optionals stdenv.isLinux [ glib dbus ]
     ++ lib.optionals stdenv.isDarwin [ AudioUnit Cocoa CoreServices ]
     ++ lib.optionals (!libOnly) (
@@ -62,53 +69,45 @@ stdenv.mkDerivation rec {
       ++ lib.optional zeroconfSupport  avahi
   );
 
-  prePatch = ''
-    substituteInPlace bootstrap.sh \
-      --replace pkg-config $PKG_CONFIG
-  '';
-
-  autoreconfPhase = ''
-    # Performs an autoreconf
-    patchShebangs bootstrap.sh
-    NOCONFIGURE=1 ./bootstrap.sh
-
-    # Move the udev rules under $(prefix).
-    sed -i "src/Makefile.in" \
-        -e "s|udevrulesdir[[:blank:]]*=.*$|udevrulesdir = $out/lib/udev/rules.d|g"
-
-    # don't install proximity-helper as root and setuid
-    sed -i "src/Makefile.in" \
-        -e "s|chown root|true |" \
-        -e "s|chmod r+s |true |"
+  mesonFlags = [
+    "-Dalsa=${if !libOnly then "enabled" else "disabled"}"
+    "-Dasyncns=${if !libOnly then "enabled" else "disabled"}"
+    "-Davahi=${if zeroconfSupport then "enabled" else "disabled"}"
+    "-Dbluez5=${if !libOnly then "enabled" else "disabled"}"
+    "-Dbluez5-gstreamer=disabled"
+    "-Ddatabase=simple"
+    "-Ddoxygen=false"
+    "-Delogind=disabled"
+    # gsettings does not support cross-compilation
+    "-Dgsettings=${if stdenv.buildPlatform == stdenv.hostPlatform then "enabled" else "disabled"}"
+    "-Dgstreamer=disabled"
+    "-Dgtk=disabled"
+    "-Djack=${if jackaudioSupport && !libOnly then "enabled" else "disabled"}"
+    "-Dlirc=${if remoteControlSupport then "enabled" else "disabled"}"
+    "-Dopenssl=${if airtunesSupport then "enabled" else "disabled"}"
+    "-Dorc=disabled"
+    "-Dsystemd=${if useSystemd && !libOnly then "enabled" else "disabled"}"
+    "-Dtcpwrap=disabled"
+    "-Dudev=${if !libOnly then "enabled" else "disabled"}"
+    "-Dvalgrind=disabled"
+    "-Dwebrtc-aec=${if !libOnly then "enabled" else "disabled"}"
+    "-Dx11=${if x11Support then "enabled" else "disabled"}"
+
+    "-Dlocalstatedir=/var"
+    "-Dsysconfdir=/etc"
+    "-Dsysconfdir_install=${placeholder "out"}/etc"
+    "-Dudevrulesdir=${placeholder "out"}/lib/udev/rules.d"
+  ]
+    ++ lib.optional (stdenv.isLinux && useSystemd) "-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user"
+    ;
+
+  doCheck = true;
+  preCheck = ''
+    export HOME=$(mktemp -d)
   '';
 
-  configureFlags =
-    [ "--disable-solaris"
-      "--disable-jack"
-      "--disable-oss-output"
-    ] ++ lib.optional (!ossWrapper) "--disable-oss-wrapper" ++
-    [ "--localstatedir=/var"
-      "--sysconfdir=/etc"
-      "--with-access-group=audio"
-      "--with-bash-completion-dir=${placeholder "out"}/share/bash-completions/completions"
-    ]
-    ++ lib.optional (jackaudioSupport && !libOnly) "--enable-jack"
-    ++ lib.optionals stdenv.isDarwin [
-      "--disable-neon-opt"
-    ]
-    ++ lib.optional (stdenv.isLinux && useSystemd) "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user"
-    ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--disable-gsettings";
-
-  enableParallelBuilding = true;
-
-  installFlags =
-    [ "sysconfdir=${placeholder "out"}/etc"
-      "pulseconfdir=${placeholder "out"}/etc/pulse"
-    ];
-
   postInstall = lib.optionalString libOnly ''
     rm -rf $out/{bin,share,etc,lib/{pulse-*,systemd}}
-    sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $out/lib/pulseaudio/libpulsecore-${version}.la
   ''
     + ''
     moveToOutput lib/cmake "$dev"
diff --git a/pkgs/servers/pulseaudio/pali.nix b/pkgs/servers/pulseaudio/pali.nix
deleted file mode 100644
index b07c2fd4ac7..00000000000
--- a/pkgs/servers/pulseaudio/pali.nix
+++ /dev/null
@@ -1,219 +0,0 @@
-{ lib
-, stdenv
-, fetchurl
-, fetchFromGitLab
-, meson
-, ninja
-, pkg-config
-, libsndfile
-, libtool
-, makeWrapper
-, perlPackages
-, xorg
-, libcap
-, alsa-lib
-, glib
-, dconf
-, avahi
-, libjack2
-, libasyncns
-, lirc
-, dbus
-, sbc
-, bluez5
-, udev
-, openssl
-, fftwFloat
-, soxr
-, speexdsp
-, systemd
-, webrtc-audio-processing
-, gtk3
-, tdb
-, orc
-, check
-, gettext
-, gst_all_1
-, libopenaptx
-
-, x11Support ? true
-
-, # Whether to support the JACK sound system as a backend.
-  jackaudioSupport ? false
-
-, airtunesSupport ? true
-
-, bluetoothSupport ? true
-
-, remoteControlSupport ? true
-
-, zeroconfSupport ? true
-
-, # Whether to build only the library.
-  libOnly ? false
-
-# Building from Git source
-, fromGit ? true
-
-, CoreServices
-, AudioUnit
-, Cocoa
-}:
-
-stdenv.mkDerivation rec {
-  pname = "${if libOnly then "lib" else ""}pulseaudio-hsphfpd";
-  version = "13.99.2";
-
-  outputs = [ "out" "dev" ];
-
-  # https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/288
-  src = fetchFromGitLab {
-    domain = "gitlab.freedesktop.org";
-    owner = "pali";
-    repo = "pulseaudio";
-    rev = "5336b39e7e03cf50386e719e287a712b59730eb8";
-    sha256 = "0vc0i5rzkns3xw6y2q0c94p2qdi5k3mgjvhicgq1b0py2qxmji16";
-  };
-
-  patches = [
-    ./add-option-for-installation-sysconfdir.patch
-    ./correct-ldflags.patch
-  ];
-
-  # Says it should be v${version} but it's parsing logic is broken
-  preConfigure = lib.optionalString fromGit ''
-    sed -i "s@version : run_command.*@version: '${version}',@" meson.build
-  '';
-
-  nativeBuildInputs = [
-    gettext
-    makeWrapper
-    meson
-    ninja
-    pkg-config
-    perlPackages.perl
-    perlPackages.XMLParser
-  ];
-
-  checkInputs = [
-    check
-  ];
-
-  propagatedBuildInputs = lib.optional stdenv.isLinux libcap;
-
-  buildInputs = [
-    libopenaptx
-    fftwFloat
-    libsndfile
-    libtool
-    orc
-    soxr
-    speexdsp
-    tdb
-    sbc
-    gst_all_1.gst-plugins-base
-  ] ++ lib.optionals bluetoothSupport [
-    bluez5
-  ] ++ lib.optionals stdenv.isLinux [
-    dbus
-    glib
-    gtk3
-    libasyncns
-  ] ++ lib.optionals stdenv.isDarwin [
-    AudioUnit
-    Cocoa
-    CoreServices
-  ] ++ lib.optionals (!libOnly) (
-    lib.optionals x11Support [
-      xorg.libXi
-      xorg.libXtst
-      xorg.xlibsWrapper
-    ] ++ lib.optionals stdenv.isLinux [
-      alsa-lib
-      systemd
-      udev
-    ] ++ lib.optional airtunesSupport openssl
-    ++ lib.optional jackaudioSupport libjack2
-    ++ lib.optional remoteControlSupport lirc
-    ++ lib.optional zeroconfSupport avahi
-    ++ [ webrtc-audio-processing ]
-  );
-
-  mesonFlags = [
-    "--localstatedir=/var"
-    "--sysconfdir=/etc"
-    "-Daccess_group=audio"
-    "-Dbashcompletiondir=${placeholder "out"}/share/bash-completions/completions"
-    "-Dman=false" # TODO: needs xmltoman; also doesn't check for this
-    "-Dsysconfdir_install=${placeholder "out"}/etc"
-    "-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user"
-    "-Dudevrulesdir=${placeholder "out"}/lib/udev/rules.d"
-    "-Dzshcompletiondir=${placeholder "out"}/share/zsh/site-functions"
-  ] ++ lib.optionals (!stdenv.isLinux) [
-    "-Dasyncns=disabled"
-    "-Ddbus=disabled"
-    "-Dglib=disabled"
-    "-Dgsettings=disabled"
-    "-Dgtk=disabled"
-  ] ++ lib.optionals (!stdenv.isLinux || libOnly) [
-    "-Dalsa=disabled"
-    "-Dsystemd=disabled"
-    "-Dudev=disabled"
-  ] ++ lib.optional libOnly "-Dwebrtc-aec=disabled"
-    ++ lib.optional (!x11Support) "-Dx11=disabled"
-    ++ lib.optional (!bluetoothSupport) "-Dbluez5=false"
-    ++ lib.optional (!airtunesSupport) "-Dopenssl=disabled"
-    ++ lib.optional (!jackaudioSupport) "-Djack=disabled"
-    ++ lib.optional (!remoteControlSupport) "-Dlirc=disabled"
-    ++ lib.optional (!zeroconfSupport) "-Davahi=disabled"
-    ++ lib.optional (!doCheck) "-Dtests=false";
-
-  # To create ~/.config/pulse
-  preCheck = ''
-    export HOME=$(mktemp -d)
-  '';
-
-  doCheck = true;
-
-  # not sure what the best practices are here -- can't seem to find a way
-  # for the compiler to bring in stdlib and stdio (etc.) properly
-  # the alternative is to copy the files from /usr/include to src, but there are
-  # probably a large number of files that would need to be copied (I stopped
-  # after the seventh)
-  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I/usr/include";
-
-  NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework CoreServices -framework Cocoa -framework AudioUnit";
-
-  postInstall = ''
-    moveToOutput lib/cmake "$dev"
-    rm -f $out/bin/qpaeq # this is packaged by the "qpaeq" package now, because of missing deps
-  '' + lib.optionalString libOnly ''
-    rm -rf $out/{bin,share,etc,lib/{pulse-*,systemd}}
-  '';
-
-  preFixup = lib.optionalString (stdenv.isLinux && !libOnly) ''
-    wrapProgram $out/libexec/pulse/gsettings-helper \
-     --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${pname}-${version}" \
-     --prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules"
-  '';
-
-  passthru = {
-    pulseDir = "lib/pulse-" + lib.versions.majorMinor version;
-  };
-
-  meta = with lib; {
-    description = "A featureful, general-purpose sound server";
-    homepage = "http://www.pulseaudio.org/";
-    license = licenses.lgpl2Plus;
-    maintainers = with maintainers; [ lovek323 ];
-    platforms = platforms.unix;
-    longDescription = ''
-      PulseAudio is a sound system for POSIX OSes, meaning that it is
-      a proxy for your sound applications. It allows you to do advanced
-      operations on your sound data as it passes between your application
-      and your hardware. Things like transferring the audio to a different machine,
-      changing the sample format or channel count and mixing several sounds into one
-      are easily achieved using a sound server.
-    '';
-  };
-}
diff --git a/pkgs/servers/roon-bridge/default.nix b/pkgs/servers/roon-bridge/default.nix
index 2607ade9931..4e590dd9818 100644
--- a/pkgs/servers/roon-bridge/default.nix
+++ b/pkgs/servers/roon-bridge/default.nix
@@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
       ${fixBin "${placeholder "out"}/Bridge/RoonBridgeHelper"}
 
       mkdir -p $out/bin
-      makeWrapper "$out/Bridge/RoonBridge" "$out/bin/RoonBridge" --run "cd $out"
+      makeWrapper "$out/Bridge/RoonBridge" "$out/bin/RoonBridge" --chdir "$out"
 
       runHook postInstall
     '';
diff --git a/pkgs/servers/roon-server/default.nix b/pkgs/servers/roon-server/default.nix
index 8decbf1341b..32d0a1310ef 100644
--- a/pkgs/servers/roon-server/default.nix
+++ b/pkgs/servers/roon-server/default.nix
@@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
             --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ alsa-lib icu66 ffmpeg openssl ]}" \
             --prefix PATH : "$dotnetDir" \
             --prefix PATH : "${lib.makeBinPath [ alsa-utils cifs-utils ffmpeg ]}" \
-            --run "cd $binDir" \
+            --chdir "$binDir" \
             --set DOTNET_ROOT "$dotnetDir"
         )
       '';
@@ -82,7 +82,7 @@ stdenv.mkDerivation rec {
       ${wrapBin "$out/Server/RoonServer"}
 
       mkdir -p $out/bin
-      makeWrapper "$out/Server/RoonServer" "$out/bin/RoonServer" --run "cd $out"
+      makeWrapper "$out/Server/RoonServer" "$out/bin/RoonServer" --chdir "$out"
 
       runHook postInstall
     '';
diff --git a/pkgs/servers/search/elasticsearch/6.x.nix b/pkgs/servers/search/elasticsearch/6.x.nix
index 56f0779c833..798fa83e6d5 100644
--- a/pkgs/servers/search/elasticsearch/6.x.nix
+++ b/pkgs/servers/search/elasticsearch/6.x.nix
@@ -62,9 +62,10 @@ stdenv.mkDerivation (rec {
   };
 } // optionalAttrs enableUnfree {
   dontPatchELF = true;
-  nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
+  nativeBuildInputs = [ makeWrapper ]
+    ++ optional stdenv.isLinux autoPatchelfHook;
   runtimeDependencies = [ zlib ];
-  postFixup = ''
+  postFixup = lib.optionalString stdenv.isLinux ''
     for exe in $(find $out/modules/x-pack-ml/platform/linux-x86_64/bin -executable -type f); do
       echo "patching $exe..."
       patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$exe"
diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix
index b863a40dfc5..b30ee9034b0 100644
--- a/pkgs/servers/web-apps/discourse/default.nix
+++ b/pkgs/servers/web-apps/discourse/default.nix
@@ -101,7 +101,7 @@ let
         ${lib.concatStrings (lib.mapAttrsToList (name: value: "--set ${name} '${value}' ") runtimeEnv)} \
         --prefix PATH : ${lib.makeBinPath runtimeDeps} \
         --set RAKEOPT '-f ${discourse}/share/discourse/Rakefile' \
-        --run 'cd ${discourse}/share/discourse'
+        --chdir '${discourse}/share/discourse'
   '';
 
   rubyEnv = bundlerEnv {
diff --git a/pkgs/servers/web-apps/virtlyst/default.nix b/pkgs/servers/web-apps/virtlyst/default.nix
index 3ff42050eb2..d6a72916fae 100644
--- a/pkgs/servers/web-apps/virtlyst/default.nix
+++ b/pkgs/servers/web-apps/virtlyst/default.nix
@@ -18,9 +18,13 @@ stdenv.mkDerivation rec {
   dontWrapQtApps = true;
 
   installPhase = ''
+    runHook preInstall
+
     mkdir -p $out/lib
-    cp src/libVirtlyst.so $out/lib
+    cp src/libVirtlyst${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib
     cp -r ../root $out
+
+    runHook postInstall
   '';
 
   patches = [ ./add-admin-password-env.patch ];
@@ -29,6 +33,7 @@ stdenv.mkDerivation rec {
     description = "Web interface to manage virtual machines with libvirt";
     homepage = "https://github.com/cutelyst/Virtlyst";
     license = licenses.agpl3Plus;
+    platforms = platforms.unix;
     maintainers = with maintainers; [ fpletz ];
   };
 }
diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix
index 932372d2b3d..0b11138ec23 100644
--- a/pkgs/servers/x11/xorg/default.nix
+++ b/pkgs/servers/x11/xorg/default.nix
@@ -2127,11 +2127,11 @@ lib.makeScope newScope (self: with self; {
   # THIS IS A GENERATED FILE.  DO NOT EDIT!
   xf86videoati = callPackage ({ stdenv, pkg-config, fetchurl, xorgproto, mesa, libGL, libdrm, udev, libpciaccess, xorgserver }: stdenv.mkDerivation {
     pname = "xf86-video-ati";
-    version = "19.1.0";
+    version = "5eba006e4129e8015b822f9e1d2f1e613e252cda";
     builder = ./builder.sh;
     src = fetchurl {
-      url = "mirror://xorg/individual/driver/xf86-video-ati-19.1.0.tar.bz2";
-      sha256 = "0j9w4axsqlycv4v14g53xyhkm9h7d27b2fcv9lrzb9gf54b5m7v5";
+      url = "https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/archive/5eba006e4129e8015b822f9e1d2f1e613e252cda/xf86-video-ati-5eba006e4129e8015b822f9e1d2f1e613e252cda.tar.bz2";
+      sha256 = "0gmymk8207fd9rjliq05l2gvx220h432rj3h75hv2ylr3k9vmp2b";
     };
     hardeningDisable = [ "bindnow" "relro" ];
     nativeBuildInputs = [ pkg-config ];
@@ -2337,11 +2337,11 @@ lib.makeScope newScope (self: with self; {
   # THIS IS A GENERATED FILE.  DO NOT EDIT!
   xf86videonouveau = callPackage ({ stdenv, pkg-config, fetchurl, xorgproto, libdrm, udev, libpciaccess, xorgserver }: stdenv.mkDerivation {
     pname = "xf86-video-nouveau";
-    version = "1.0.17";
+    version = "3ee7cbca8f9144a3bb5be7f71ce70558f548d268";
     builder = ./builder.sh;
     src = fetchurl {
-      url = "mirror://xorg/individual/driver/xf86-video-nouveau-1.0.17.tar.bz2";
-      sha256 = "0sqm1jwjg15sp8v7039y2hsbhph8gpjd2bdzcqqiij2mgbi254s9";
+      url = "https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/archive/3ee7cbca8f9144a3bb5be7f71ce70558f548d268/xf86-video-nouveau-3ee7cbca8f9144a3bb5be7f71ce70558f548d268.tar.bz2";
+      sha256 = "0rhs3z274jdzd82pcsl25xn8hmw6i4cxs2kwfnphpfhxbbkiq7wl";
     };
     hardeningDisable = [ "bindnow" "relro" ];
     nativeBuildInputs = [ pkg-config ];
@@ -3100,17 +3100,17 @@ lib.makeScope newScope (self: with self; {
   }) {};
 
   # THIS IS A GENERATED FILE.  DO NOT EDIT!
-  xorgserver = callPackage ({ stdenv, pkg-config, fetchurl, xorgproto, openssl, libX11, libXau, libXaw, libxcb, xcbutil, xcbutilwm, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, libXdmcp, libXfixes, libxkbfile, libXmu, libXpm, libXrender, libXres, libXt }: stdenv.mkDerivation {
+  xorgserver = callPackage ({ stdenv, pkg-config, fetchurl, xorgproto, openssl, libX11, libXau, libxcb, xcbutil, xcbutilwm, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, libXdmcp, libXfixes, libxkbfile }: stdenv.mkDerivation {
     pname = "xorg-server";
-    version = "1.20.13";
+    version = "21.1.3";
     builder = ./builder.sh;
     src = fetchurl {
-      url = "mirror://xorg/individual/xserver/xorg-server-1.20.13.tar.xz";
-      sha256 = "003371ad64bz7i2hx7idnh90yw12dbh116ssy40s70balnb4xaj0";
+      url = "mirror://xorg/individual/xserver/xorg-server-21.1.3.tar.xz";
+      sha256 = "1rgbrld7spg7plkv3c3bbnlnszpflk5z1mqbjrmi2ymlnvasmmk1";
     };
     hardeningDisable = [ "bindnow" "relro" ];
     nativeBuildInputs = [ pkg-config ];
-    buildInputs = [ xorgproto openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
+    buildInputs = [ xorgproto openssl libX11 libXau libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile ];
     meta.platforms = lib.platforms.unix;
   }) {};
 
diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
index bd81f7fa513..69ff9a70155 100755
--- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
+++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
@@ -57,7 +57,7 @@ while (<>) {
       $tarball =~ /\/((?:(?:[A-Za-z0-9]|(?:-[^0-9])|(?:-[0-9]*[a-z]))+))[^\/]*$/;
       die unless defined $1;
       $pkg = $1;
-      $pkg =~ s/-//g;
+      $pkg =~ s/(-|[a-f0-9]{40})//g; # Remove hyphen-minus and SHA-1
       #next unless $pkg eq "xcbutil";
     }
 
@@ -71,8 +71,8 @@ while (<>) {
         next;
     }
 
-    # split by first occurence of hyphen followd by only numbers ends line or another hyphen follows
-    my ($name, $version) = split(/-(?=[.0-9]+(?:$|-))/, $pkgName, 2);
+    # Split by first occurrence of hyphen followed by only numbers, ends line, another hyphen follows, or SHA-1
+    my ($name, $version) = split(/-(?=[.0-9]+(?:$|-)|[a-f0-9]{40})/, $pkgName, 2);
 
     $pkgURLs{$pkg} = $tarball;
     $pkgNames{$pkg} = $name;
diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
index 3ec0360c063..c210070b8ac 100644
--- a/pkgs/servers/x11/xorg/overrides.nix
+++ b/pkgs/servers/x11/xorg/overrides.nix
@@ -442,6 +442,17 @@ self: super:
 
   xf86videoati = super.xf86videoati.overrideAttrs (attrs: {
     NIX_CFLAGS_COMPILE = "-I${self.xorgserver.dev or self.xorgserver}/include/xorg";
+    nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [ autoreconfHook utilmacros ];
+    patches = [
+      (fetchpatch {
+        url = "https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/commit/e0511968d04b42abf11bc0ffb387f143582bc144.patch";
+        sha256 = "sha256-79nqKuJRgMYXDEMB8IWxdmbxtI/m+Oca1wSLYeGMuEk=";
+      })
+    ];
+  });
+
+  xf86videonouveau = super.xf86videonouveau.overrideAttrs (attrs: {
+    nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [ autoreconfHook utilmacros ];
   });
 
   xf86videovmware = super.xf86videovmware.overrideAttrs (attrs: {
@@ -620,7 +631,7 @@ self: super:
     in attrs //
     (let
       version = lib.getVersion attrs;
-      commonBuildInputs = attrs.buildInputs ++ [ xtrans ];
+      commonBuildInputs = attrs.buildInputs ++ [ libxcvt xtrans ];
       commonPropagatedBuildInputs = [
         zlib libGL libGLU dbus
         xorgproto
@@ -653,28 +664,10 @@ self: super:
       then {
         outputs = [ "out" "dev" ];
         patches = [
-          # https://lists.x.org/archives/xorg-announce/2021-December/003122.html
-          (fpgit "ebce7e2d80e7c80e1dda60f2f0bc886f1106ba60"
-            "sNi16FqN4rS4s8j5+PUVeOQBasccCkB5KvywP7xl28M=" "CVE-2021-4008")
-          (fpgit "b5196750099ae6ae582e1f46bd0a6dad29550e02"
-            "5hgzQXBBaJfhSTa9hs8K2N1fQ6+Vp8TTkertmQhkw8Y=" "CVE-2021-4009")
-          (fpgit "6c4c53010772e3cb4cb8acd54950c8eec9c00d21"
-            "1gGG9RpjLMi7Emwh13/z5CN1+ISLsPL3hJXP5gQcNkE=" "CVE-2021-4010")
-          (fpgit "e56f61c79fc3cee26d83cda0f84ae56d5979f768"
-            "e1KgSXGwwI3GgcYeWaF3KHPmkE4tf9VTqvfTYqRpysY=" "CVE-2021-4011")
-
           # The build process tries to create the specified logdir when building.
           #
           # We set it to /var/log which can't be touched from inside the sandbox causing the build to hard-fail
           ./dont-create-logdir-during-build.patch
-
-          # Fix e.g. xorg.xf86videovmware with libdrm 2.4.108
-          # TODO: remove with xorgserver >= 1.21
-          (fetchpatch {
-            name = "stdbool.patch";
-            url = "https://gitlab.freedesktop.org/xorg/xserver/-/commit/454b3a826edb5fc6d0fea3a9cfd1a5e8fc568747.diff";
-            sha256 = "1l9qg905jvlw3r0kx4xfw5m12pbs0782v2g3267d1m6q4m6fj1zy";
-          })
         ];
         buildInputs = commonBuildInputs ++ [ libdrm mesa ];
         propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ libpciaccess libepoxy ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [
diff --git a/pkgs/servers/x11/xorg/tarballs.list b/pkgs/servers/x11/xorg/tarballs.list
index 96a5ac712f4..3a0cce1ee05 100644
--- a/pkgs/servers/x11/xorg/tarballs.list
+++ b/pkgs/servers/x11/xorg/tarballs.list
@@ -90,7 +90,7 @@ mirror://xorg/individual/driver/xf86-video-amdgpu-21.0.0.tar.bz2
 mirror://xorg/individual/driver/xf86-video-apm-1.3.0.tar.bz2
 mirror://xorg/individual/driver/xf86-video-ark-0.7.5.tar.bz2
 mirror://xorg/individual/driver/xf86-video-ast-1.1.5.tar.bz2
-mirror://xorg/individual/driver/xf86-video-ati-19.1.0.tar.bz2
+https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/archive/5eba006e4129e8015b822f9e1d2f1e613e252cda/xf86-video-ati-5eba006e4129e8015b822f9e1d2f1e613e252cda.tar.bz2
 mirror://xorg/individual/driver/xf86-video-chips-1.4.0.tar.bz2
 mirror://xorg/individual/driver/xf86-video-cirrus-1.5.3.tar.bz2
 mirror://xorg/individual/driver/xf86-video-dummy-0.3.8.tar.bz2
@@ -104,7 +104,7 @@ mirror://xorg/individual/driver/xf86-video-intel-2.99.917.tar.bz2
 mirror://xorg/individual/driver/xf86-video-mga-2.0.0.tar.bz2
 mirror://xorg/individual/driver/xf86-video-neomagic-1.3.0.tar.bz2
 mirror://xorg/individual/driver/xf86-video-newport-0.2.4.tar.bz2
-mirror://xorg/individual/driver/xf86-video-nouveau-1.0.17.tar.bz2
+https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/archive/3ee7cbca8f9144a3bb5be7f71ce70558f548d268/xf86-video-nouveau-3ee7cbca8f9144a3bb5be7f71ce70558f548d268.tar.bz2
 mirror://xorg/individual/driver/xf86-video-nv-2.1.21.tar.bz2
 mirror://xorg/individual/driver/xf86-video-omap-0.4.5.tar.bz2
 mirror://xorg/individual/driver/xf86-video-openchrome-0.6.0.tar.bz2
@@ -218,4 +218,4 @@ mirror://xorg/individual/util/lndir-1.0.3.tar.bz2
 mirror://xorg/individual/util/makedepend-1.0.6.tar.bz2
 mirror://xorg/individual/util/util-macros-1.19.3.tar.bz2
 mirror://xorg/individual/util/xorg-cf-files-1.0.7.tar.bz2
-mirror://xorg/individual/xserver/xorg-server-1.20.13.tar.xz
+mirror://xorg/individual/xserver/xorg-server-21.1.3.tar.xz
diff --git a/pkgs/shells/powershell/default.nix b/pkgs/shells/powershell/default.nix
index a2fe61c3323..19ca69ecb94 100644
--- a/pkgs/shells/powershell/default.nix
+++ b/pkgs/shells/powershell/default.nix
@@ -29,7 +29,8 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ less ] ++ libraries;
-  nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ]
+    ++ lib.optional stdenv.isLinux autoPatchelfHook;
 
   installPhase =
   let
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index 350fff48252..6d30e6c01ff 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -1305,6 +1305,23 @@ showPhaseHeader() {
 }
 
 
+showPhaseFooter() {
+    local phase="$1"
+    local startTime="$2"
+    local endTime="$3"
+    local delta=$(( endTime - startTime ))
+    (( $delta < 30 )) && return
+
+    local H=$((delta/3600))
+    local M=$((delta%3600/60))
+    local S=$((delta%60))
+    echo -n "$phase completed in "
+    (( $H > 0 )) && echo -n "$H hours "
+    (( $M > 0 )) && echo -n "$M minutes "
+    echo "$S seconds"
+}
+
+
 genericBuild() {
     if [ -f "${buildCommandPath:-}" ]; then
         source "$buildCommandPath"
@@ -1340,11 +1357,20 @@ genericBuild() {
         showPhaseHeader "$curPhase"
         dumpVars
 
+        local startTime=$(date +"%s")
+
         # Evaluate the variable named $curPhase if it exists, otherwise the
         # function named $curPhase.
         eval "${!curPhase:-$curPhase}"
 
+        local endTime=$(date +"%s")
+
+        showPhaseFooter "$curPhase" "$startTime" "$endTime"
+
         if [ "$curPhase" = unpackPhase ]; then
+            # make sure we can cd into the directory
+            [ -z "${sourceRoot}" ] || chmod +x "${sourceRoot}"
+
             cd "${sourceRoot:-.}"
         fi
     done
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index d2c28b97ff9..2b613d118c5 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -204,7 +204,7 @@ in
     # Rebuild binutils to use from stage2 onwards.
     overrides = self: super: {
       binutils-unwrapped = super.binutils-unwrapped.override {
-        gold = false;
+        enableGold = false;
       };
       inherit (prevStage)
         ccWrapperStdenv
diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix
index 1d6ebe6284f..2263341b23f 100644
--- a/pkgs/stdenv/linux/make-bootstrap-tools.nix
+++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix
@@ -37,7 +37,7 @@ in with pkgs; rec {
   bootBinutils = binutils.bintools.override {
     withAllTargets = false;
     # Don't need two linkers, disable whatever's not primary/default.
-    gold = false;
+    enableGold = false;
     # bootstrap is easier w/static
     enableShared = false;
   };
@@ -175,7 +175,7 @@ in with pkgs; rec {
         for i in as ld ar ranlib nm strip readelf objdump; do
           cp ${bootBinutils.out}/bin/$i $out/bin
         done
-        cp '${lib.getLib binutils.bintools}'/lib/* "$out/lib/"
+        cp -r '${lib.getLib binutils.bintools}'/lib/* "$out/lib/"
 
         chmod -R u+w $out
 
@@ -189,6 +189,7 @@ in with pkgs; rec {
 
         nuke-refs $out/bin/*
         nuke-refs $out/lib/*
+        nuke-refs $out/lib/*/*
         nuke-refs $out/libexec/gcc/*/*/*
         nuke-refs $out/lib/gcc/*/*/*
         nuke-refs $out/lib/gcc/*/*/include-fixed/*{,/*}
diff --git a/pkgs/tools/X11/nx-libs/default.nix b/pkgs/tools/X11/nx-libs/default.nix
index ed28cfbb8d8..64fa84ba4a1 100644
--- a/pkgs/tools/X11/nx-libs/default.nix
+++ b/pkgs/tools/X11/nx-libs/default.nix
@@ -38,6 +38,12 @@ stdenv.mkDerivation rec {
     ln -s libNX_X11.so.6.3.0
   '';
 
+  preConfigure = ''
+    # binutils 2.37 fix
+    # https://github.com/ArcticaProject/nx-libs/issues/1003
+    substituteInPlace nx-X11/config/cf/Imake.tmpl --replace "clq" "cq"
+  '';
+
   PREFIX=""; # Don't install to $out/usr/local
   installPhase = ''
     make DESTDIR="$out" install
diff --git a/pkgs/tools/admin/awscli/default.nix b/pkgs/tools/admin/awscli/default.nix
index 1e82459f4c6..1319a8b4270 100644
--- a/pkgs/tools/admin/awscli/default.nix
+++ b/pkgs/tools/admin/awscli/default.nix
@@ -35,11 +35,11 @@ let
 in
 with py.pkgs; buildPythonApplication rec {
   pname = "awscli";
-  version = "1.22.67"; # N.B: if you change this, change botocore and boto3 to a matching version too
+  version = "1.22.88"; # N.B: if you change this, change botocore and boto3 to a matching version too
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-ofgxL9V/jTn/itxSOLGYkAmgQXES7aVUM/vM6nWdbBc=";
+    hash = "sha256-fwbejwcT4piC8Zr6+ubxMd+TuF9O4icOentI2GlhYrc=";
   };
 
   # https://github.com/aws/aws-cli/issues/4837
diff --git a/pkgs/tools/admin/oci-cli/default.nix b/pkgs/tools/admin/oci-cli/default.nix
index 21d115407f6..2272a7efdfb 100644
--- a/pkgs/tools/admin/oci-cli/default.nix
+++ b/pkgs/tools/admin/oci-cli/default.nix
@@ -16,6 +16,14 @@ let
         };
       });
 
+      jmespath = super.jmespath.overridePythonAttrs (oldAttrs: rec {
+        version = "0.10.0";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9";
+        };
+      });
+
     };
   };
 in
@@ -23,14 +31,14 @@ with py.pkgs;
 
 buildPythonApplication rec {
   pname = "oci-cli";
-  version = "3.6.0";
+  version = "3.7.2";
   format = "setuptools";
 
   src = fetchFromGitHub {
     owner = "oracle";
     repo = "oci-cli";
     rev = "v${version}";
-    hash = "sha256-ADjHPRG3QzSWR7FvcTIJdcBYmzZK+SWipdY1giNtaME=";
+    hash = "sha256-20Tnn0s+sfLEsAG9S6f61OVGpRf53wFPtt4a2/TJbCg=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/tools/admin/pgadmin/default.nix b/pkgs/tools/admin/pgadmin/default.nix
index 29d0d91a012..84781688ec1 100644
--- a/pkgs/tools/admin/pgadmin/default.nix
+++ b/pkgs/tools/admin/pgadmin/default.nix
@@ -54,7 +54,8 @@ python3.pkgs.buildPythonApplication rec {
       --replace "cryptography==3.*" "cryptography>=3.0" \
       --replace "requests==2.25.*" "requests>=2.25.0" \
       --replace "boto3==1.20.*" "boto3>=1.20" \
-      --replace "botocore==1.23.*" "botocore>=1.23"
+      --replace "botocore==1.23.*" "botocore>=1.23" \
+      --replace "pytz==2021.*" "pytz"
     # don't use Server Mode (can be overridden later)
     substituteInPlace pkg/pip/setup_pip.py \
       --replace "req = req.replace('psycopg2', 'psycopg2-binary')" "req = req" \
diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix
index 6789bd5f962..0bdbe9d345d 100644
--- a/pkgs/tools/audio/beets/default.nix
+++ b/pkgs/tools/audio/beets/default.nix
@@ -129,7 +129,7 @@ in pythonPackages.buildPythonApplication rec {
     gobject-introspection
   ] ++ lib.optional enableAbsubmit         essentia-extractor
     ++ lib.optional enableAcoustid         pythonPackages.pyacoustid
-    ++ lib.optional enableBeatport         pythonPackages.requests_oauthlib
+    ++ lib.optional enableBeatport         pythonPackages.requests-oauthlib
     ++ lib.optional enableConvert          ffmpeg
     ++ lib.optional enableDiscogs          pythonPackages.discogs-client
     ++ lib.optional (enableFetchart
diff --git a/pkgs/tools/backup/borgbackup/default.nix b/pkgs/tools/backup/borgbackup/default.nix
index 03446be5341..8202786dde8 100644
--- a/pkgs/tools/backup/borgbackup/default.nix
+++ b/pkgs/tools/backup/borgbackup/default.nix
@@ -90,7 +90,6 @@ python3.pkgs.buildPythonApplication rec {
   ];
 
   pytestFlagsArray = [
-    "--numprocesses" "$NIX_BUILD_CORES"
     "--benchmark-skip"
     "--pyargs" "borg.testsuite"
   ];
@@ -109,6 +108,8 @@ python3.pkgs.buildPythonApplication rec {
     "test_get_keys_dir"
     "test_get_security_dir"
     "test_get_config_dir"
+    # https://github.com/borgbackup/borg/issues/6573
+    "test_basic_functionality"
   ];
 
   preCheck = ''
diff --git a/pkgs/tools/backup/gphotos-sync/default.nix b/pkgs/tools/backup/gphotos-sync/default.nix
index cce9c5b77b7..515bfc31cf2 100644
--- a/pkgs/tools/backup/gphotos-sync/default.nix
+++ b/pkgs/tools/backup/gphotos-sync/default.nix
@@ -1,4 +1,8 @@
-{ lib, fetchFromGitHub, python3Packages, ffmpeg }:
+{ lib
+, fetchFromGitHub
+, python3Packages
+, ffmpeg
+}:
 
 python3Packages.buildPythonApplication rec {
   pname = "gphotos-sync";
@@ -17,10 +21,12 @@ python3Packages.buildPythonApplication rec {
     exif
     psutil
     pyyaml
-    requests_oauthlib
+    requests-oauthlib
   ];
 
-  buildInputs = [ ffmpeg ];
+  buildInputs = [
+    ffmpeg
+  ];
 
   checkInputs = with python3Packages; [
     pytestCheckHook
@@ -41,8 +47,8 @@ python3Packages.buildPythonApplication rec {
 
   meta = with lib; {
     description = "Google Photos and Albums backup with Google Photos Library API";
-    homepage    = "https://github.com/gilesknap/gphotos-sync";
-    license     = licenses.mit;
+    homepage = "https://github.com/gilesknap/gphotos-sync";
+    license = licenses.mit;
     maintainers = with maintainers; [ dnr ];
   };
 }
diff --git a/pkgs/tools/backup/grab-site/default.nix b/pkgs/tools/backup/grab-site/default.nix
index fe6496bf212..3b7e0a9a600 100644
--- a/pkgs/tools/backup/grab-site/default.nix
+++ b/pkgs/tools/backup/grab-site/default.nix
@@ -7,8 +7,9 @@ let
         version = "1.3.24";
         src = oldAttrs.src.override {
           inherit version;
-          sha256 = "ebbb777cbf9312359b897bf81ba00dae0f5cb69fba2a18265dcc18a6f5ef7519";
+          hash = "sha256-67t3fL+TEjWbiXv4G6ANrg9ctp+6KhgmXcwYpvXvdRk=";
         };
+        doCheck = false;
       });
       tornado = super.tornado_4;
     };
diff --git a/pkgs/tools/cd-dvd/ventoy-bin/default.nix b/pkgs/tools/cd-dvd/ventoy-bin/default.nix
index cf573472307..5aeaffdb504 100644
--- a/pkgs/tools/cd-dvd/ventoy-bin/default.nix
+++ b/pkgs/tools/cd-dvd/ventoy-bin/default.nix
@@ -97,7 +97,7 @@ in stdenv.mkDerivation rec {
         local bin="''${f%_*}" wrapper="''${f#*_}"
         makeWrapper "$VENTOY_PATH/$bin" "$out/bin/$wrapper" \
                     --prefix PATH : "${lib.makeBinPath buildInputs}" \
-                    --run "cd '$VENTOY_PATH' || exit 1"
+                    --chdir "$VENTOY_PATH"
     done
   '' + lib.optionalString (withGtk3 || withQt5) ''
     # VentoGUI uses the `ventoy_gui_type` file to determine the type of GUI.
@@ -105,7 +105,7 @@ in stdenv.mkDerivation rec {
     echo "${defaultGuiType}" > "$VENTOY_PATH/ventoy_gui_type"
     makeWrapper "$VENTOY_PATH/VentoyGUI.$ARCH" "$out/bin/ventoy-gui" \
                 --prefix PATH : "${lib.makeBinPath buildInputs}" \
-                --run "cd '$VENTOY_PATH' || exit 1"
+                --chdir "$VENTOY_PATH"
   '' + lib.optionalString (!withGtk3) ''
     rm "$VENTOY_PATH/tool/$ARCH/Ventoy2Disk.gtk3"
   '' + lib.optionalString (!withQt5) ''
diff --git a/pkgs/tools/filesystems/e2fsprogs/default.nix b/pkgs/tools/filesystems/e2fsprogs/default.nix
index 6fbc0b9b45f..d4c4738be75 100644
--- a/pkgs/tools/filesystems/e2fsprogs/default.nix
+++ b/pkgs/tools/filesystems/e2fsprogs/default.nix
@@ -1,4 +1,5 @@
 { lib, stdenv, buildPackages, fetchurl, fetchpatch, pkg-config, libuuid, gettext, texinfo
+, fuse
 , shared ? !stdenv.hostPlatform.isStatic
 , e2fsprogs, runCommand
 }:
@@ -12,11 +13,14 @@ stdenv.mkDerivation rec {
     sha256 = "1fgvwbj9ihz5svzrd2l0s18k16r4qg3wimrniv71fn3vdcg0shxp";
   };
 
-  outputs = [ "bin" "dev" "out" "man" "info" ];
+  # fuse2fs adds 14mb of dependencies
+  outputs = [ "bin" "dev" "out" "man" "info" ]
+    ++ lib.optionals stdenv.isLinux [ "fuse2fs" ];
 
   depsBuildBuild = [ buildPackages.stdenv.cc ];
   nativeBuildInputs = [ pkg-config texinfo ];
-  buildInputs = [ libuuid gettext ];
+  buildInputs = [ libuuid gettext ]
+    ++ lib.optionals stdenv.isLinux [ fuse ];
 
   # Only use glibc's __GNUC_PREREQ(X,Y) (checks if compiler is gcc version >= X.Y) when using glibc
   patches = if stdenv.hostPlatform.libc == "glibc" then null
@@ -62,6 +66,9 @@ stdenv.mkDerivation rec {
     if [ -f $out/lib/${pname}/e2scrub_all_cron ]; then
       mv $out/lib/${pname}/e2scrub_all_cron $bin/bin/
     fi
+  '' + lib.optionalString stdenv.isLinux ''
+    mkdir -p $fuse2fs/bin
+    mv $bin/bin/fuse2fs $fuse2fs/bin/fuse2fs
   '';
 
   enableParallelBuilding = true;
diff --git a/pkgs/tools/games/ajour/default.nix b/pkgs/tools/games/ajour/default.nix
index 49fef3edca9..11df34256d4 100644
--- a/pkgs/tools/games/ajour/default.nix
+++ b/pkgs/tools/games/ajour/default.nix
@@ -1,4 +1,5 @@
-{ lib
+{ stdenv
+, lib
 , fetchFromGitHub
 , rustPlatform
 , autoPatchelfHook
@@ -79,6 +80,7 @@ in rustPlatform.buildRustPackage rec {
     homepage = "https://github.com/casperstorm/ajour";
     changelog = "https://github.com/casperstorm/ajour/blob/master/CHANGELOG.md";
     license = licenses.mit;
+    broken = stdenv.isDarwin;
     maintainers = with maintainers; [ hexa ];
   };
 }
diff --git a/pkgs/tools/graphics/snapdragon-profiler/default.nix b/pkgs/tools/graphics/snapdragon-profiler/default.nix
index 7486a885a54..caf187cb4c1 100644
--- a/pkgs/tools/graphics/snapdragon-profiler/default.nix
+++ b/pkgs/tools/graphics/snapdragon-profiler/default.nix
@@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
       --suffix PATH : ${lib.makeBinPath [ jre androidenv.androidPkgs_9_0.platform-tools coreutils ]} \
       --prefix MONO_GAC_PREFIX : ${gtk-sharp-2_0} \
       --suffix LD_LIBRARY_PATH : $(echo $NIX_LDFLAGS | sed 's/ -L/:/g;s/ -rpath /:/g;s/-rpath //') \
-      --run "cd $out/lib/snapdragon-profiler" # Fixes themes not loading correctly
+      --chdir "$out/lib/snapdragon-profiler" # Fixes themes not loading correctly
 
     wrestool -x -t 14 SnapdragonProfiler.exe > snapdragon-profiler.ico
     icotool -x -i 1 -o $out/share/icons/hicolor/16x16/apps/snapdragon-profiler.png snapdragon-profiler.ico
diff --git a/pkgs/tools/graphics/structure-synth/default.nix b/pkgs/tools/graphics/structure-synth/default.nix
index ab32657236a..ce97f1c7034 100644
--- a/pkgs/tools/graphics/structure-synth/default.nix
+++ b/pkgs/tools/graphics/structure-synth/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
   # either $HOME or $PWD - so help it along by moving $PWD to 'share',
   # where we just copied those two directories:
   preFixup = ''
-    wrapProgram "$out/bin/structure-synth" --run "cd $out/share"
+    wrapProgram "$out/bin/structure-synth" --chdir "$out/share"
   '';
 
   meta = with lib; {
diff --git a/pkgs/tools/misc/archi/default.nix b/pkgs/tools/misc/archi/default.nix
index d0beb7d40d7..e6f16b93f7d 100644
--- a/pkgs/tools/misc/archi/default.nix
+++ b/pkgs/tools/misc/archi/default.nix
@@ -30,9 +30,8 @@ stdenv.mkDerivation rec {
   ];
 
   nativeBuildInputs = [
-    autoPatchelfHook
     makeWrapper
-  ];
+  ] ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
 
   installPhase =
     if stdenv.hostPlatform.system == "x86_64-linux" then
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index befe53b9d90..86a91a09c3e 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -82,6 +82,7 @@ stdenv.mkDerivation (rec {
   '');
 
   outputs = [ "out" "info" ];
+  separateDebugInfo = true;
 
   nativeBuildInputs = [ perl xz.bin autoreconfHook ] # autoreconfHook is due to patch, normally only needed for cygwin
     ++ optionals stdenv.hostPlatform.isCygwin [ texinfo ];  # due to patch
diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix
index 56d710c8545..3c3b15962a7 100644
--- a/pkgs/tools/misc/findutils/default.nix
+++ b/pkgs/tools/misc/findutils/default.nix
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
     && (stdenv.hostPlatform.libc != "musl")
     && stdenv.hostPlatform == stdenv.buildPlatform;
 
-  outputs = [ "out" "info" ];
+  outputs = [ "out" "info" "locate"];
 
   configureFlags = [
     # "sort" need not be on the PATH as a run-time dep, so we need to tell
@@ -46,6 +46,18 @@ stdenv.mkDerivation rec {
     "-D__nonnull\\(params\\)="
   ];
 
+  postInstall = ''
+    moveToOutput bin/locate $locate
+    moveToOutput bin/updatedb $locate
+  '';
+
+  # can't move man pages in postInstall because the multi-output hook will move them back to $out
+  postFixup = ''
+    moveToOutput share/man/man5 $locate
+    moveToOutput share/man/man1/locate.1.gz $locate
+    moveToOutput share/man/man1/updatedb.1.gz $locate
+  '';
+
   enableParallelBuilding = true;
 
   meta = {
@@ -62,9 +74,12 @@ stdenv.mkDerivation rec {
       The tools supplied with this package are:
 
           * find - search for files in a directory hierarchy;
+          * xargs - build and execute command lines from standard input.
+
+      The following are available in the locate output:
+
           * locate - list files in databases that match a pattern;
           * updatedb - update a file name database;
-          * xargs - build and execute command lines from standard input.
     '';
 
     platforms = lib.platforms.all;
diff --git a/pkgs/tools/misc/lookatme/default.nix b/pkgs/tools/misc/lookatme/default.nix
index b046e156904..7d2f7338ec2 100644
--- a/pkgs/tools/misc/lookatme/default.nix
+++ b/pkgs/tools/misc/lookatme/default.nix
@@ -37,7 +37,17 @@ buildPythonApplication rec {
     sha256 = "sha256-qIZMkgOm5jXmxTFLTqMBhpLBhfCL8xvUxxqpS6NjcVw=";
   };
 
-  checkInputs = [ pytest ];
+  checkInputs = [
+    pytest-mock
+    pytestCheckHook
+    six
+  ];
+
+  disabledTests = [
+    # https://github.com/d0c-s4vage/lookatme/issues/126
+    "test_sanity_check_that_errors_are_detected"
+    "test_styles_defaults"
+  ];
 
   propagatedBuildInputs = [
     click
diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix
index 7263e4de336..6a3bca40471 100644
--- a/pkgs/tools/misc/man-db/default.nix
+++ b/pkgs/tools/misc/man-db/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "man-db";
-  version = "2.10.1";
+  version = "2.10.2";
 
   src = fetchurl {
     url = "mirror://savannah/man-db/man-db-${version}.tar.xz";
-    sha256 = "sha256-L/2PLoASL+cuYMdAyFHmo+FcmnkhGF60dSwcZygkvtY=";
+    sha256 = "sha256-7peVTUkqE3MZA8nQcnubAeUIntvWlfDNtY1AWlr1UU0=";
   };
 
   outputs = [ "out" "doc" ];
diff --git a/pkgs/tools/misc/pre-commit/default.nix b/pkgs/tools/misc/pre-commit/default.nix
index addd7134b7f..df211378f4b 100644
--- a/pkgs/tools/misc/pre-commit/default.nix
+++ b/pkgs/tools/misc/pre-commit/default.nix
@@ -74,7 +74,6 @@ buildPythonPackage rec {
   '';
 
   pytestFlagsArray = [
-    "--numprocesses $NIX_BUILD_CORES"
     "--forked"
   ];
 
diff --git a/pkgs/tools/package-management/pdm/default.nix b/pkgs/tools/package-management/pdm/default.nix
index cae4431ea65..7458262b168 100644
--- a/pkgs/tools/package-management/pdm/default.nix
+++ b/pkgs/tools/package-management/pdm/default.nix
@@ -24,13 +24,13 @@ in
 with python.pkgs;
 buildPythonApplication rec {
   pname = "pdm";
-  version = "1.13.3";
+  version = "1.14.0";
   format = "pyproject";
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-5+bjjljmk3AHaDVjYzNuC7lkkvlpLa9/grKgdmERC7k=";
+    sha256 = "sha256-ZUbcuIRutSoHW5egCpwCKca2IZCgQsRAd72ueDzGySI=";
   };
 
   # this patch allows us to run additional tests that invoke pdm, which checks
@@ -71,7 +71,6 @@ buildPythonApplication rec {
   ];
 
   pytestFlagsArray = [
-    "--numprocesses $NIX_BUILD_CORES"
     "-m 'not network'"
   ];
 
diff --git a/pkgs/tools/virtualization/awsebcli/default.nix b/pkgs/tools/virtualization/awsebcli/default.nix
index 998ae80e306..c431980125a 100644
--- a/pkgs/tools/virtualization/awsebcli/default.nix
+++ b/pkgs/tools/virtualization/awsebcli/default.nix
@@ -17,6 +17,7 @@ let
       packageOverrides = self: super: {
         cement = changeVersion super.cement.overridePythonAttrs "2.8.2" "1li2whjzfhbpg6fjb6r1r92fb3967p1xv6hqs3j787865h2ysrc7";
         botocore = changeVersion super.botocore.overridePythonAttrs "1.23.54" "sha256-S7m6FszO5fWiYCBJvD4ttoZTRrJVBmfzATvfM7CgHOs=";
+        jmespath = changeVersion super.jmespath.overridePythonAttrs "0.10.0" "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9";
         colorama = changeVersion super.colorama.overridePythonAttrs "0.4.3" "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9";
         future = changeVersion super.future.overridePythonAttrs "0.16.0" "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773";
         requests = super.requests.overridePythonAttrs (oldAttrs: rec {
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index dde08c9d5e9..8e0d0a75ffa 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -413,6 +413,7 @@ mapAliases ({
   fslint = throw "fslint has been removed: end of life. Upstream recommends using czkawka (https://qarmin.github.io/czkawka/) instead"; # Added 2022-01-15
   fuse_exfat = throw "'fuse_exfat' has been renamed to/replaced by 'exfat'"; # Converted to throw 2022-02-22
   fuseki = throw "'fuseki' has been renamed to/replaced by 'apache-jena-fuseki'"; # Converted to throw 2022-02-22
+  fuse2fs = if stdenv.isLinux then e2fsprogs.fuse2fs else null; # Added 2022-03-27 preserve, reason: convenience, arch has a package named fuse2fs too.
   fwupdate = throw "fwupdate was merged into fwupd"; # Added 2020-05-19
 
   ### G ###
@@ -1032,6 +1033,8 @@ mapAliases ({
   prometheus-cups-exporter = throw "outdated and broken by design; removed by developer"; # Added 2021-03-16
   prometheus-mesos-exporter = throw "prometheus-mesos-exporter is deprecated and archived by upstream"; # Added 2022-04-05
   proxytunnel = throw "proxytunnel has been removed from nixpkgs, because it has not been update upstream since it was added to nixpkgs in 2008 and has therefore bitrotted."; # added 2021-12-15
+  pulseaudio-hsphfpd = throw "pulseaudio-hsphfpd upstream has been abandoned"; # Added 2022-03-23
+  pulseaudio-modules-bt = throw "pulseaudio-modules-bt has been abandoned, and is superseded by pulseaudio's native bt functionality"; # Added 2022-04-01
   pulseaudioLight = throw "'pulseaudioLight' has been renamed to/replaced by 'pulseaudio'"; # Converted to throw 2022-02-22
   pulseeffects = throw "Use pulseeffects-legacy if you use PulseAudio and easyeffects if you use PipeWire"; # Added 2021-02-13
   pulseeffects-pw = easyeffects; # Added 2021-07-07
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 2bb6b6c348b..f813eb94175 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -155,6 +155,7 @@ with pkgs;
       pythonInterpreter = "${python3.withPackages (ps: [ ps.pyelftools ])}/bin/python";
       autoPatchelfScript = ../build-support/setup-hooks/auto-patchelf.py;
     };
+    meta.platforms = lib.platforms.linux;
   } ../build-support/setup-hooks/auto-patchelf.sh;
 
   appflowy = callPackage ../applications/office/appflowy { };
@@ -859,7 +860,9 @@ with pkgs;
   setJavaClassPath = makeSetupHook { } ../build-support/setup-hooks/set-java-classpath.sh;
 
   fixDarwinDylibNames = makeSetupHook {
+    name = "fix-darwin-dylib-names-hook";
     substitutions = { inherit (binutils) targetPrefix; };
+    meta.platforms = lib.platforms.darwin;
   } ../build-support/setup-hooks/fix-darwin-dylib-names.sh;
 
   writeDarwinBundle = callPackage ../build-support/make-darwin-bundle/write-darwin-bundle.nix { };
@@ -5320,7 +5323,8 @@ with pkgs;
   };
 
   exempi = callPackage ../development/libraries/exempi {
-    stdenv = if stdenv.isi686 then gcc6Stdenv else stdenv;
+    stdenv = if stdenv.isi686 then gcc6Stdenv else gcc9Stdenv;
+    boost  = boost15x;
   };
 
   execline = skawarePackages.execline;
@@ -9440,6 +9444,8 @@ with pkgs;
     rekor-cli
     rekor-server;
 
+  rich-cli = callPackage ../misc/rich-cli { };
+
   richgo = callPackage ../development/tools/richgo {  };
 
   rs = callPackage ../tools/text/rs { };
@@ -12129,6 +12135,7 @@ with pkgs;
       num =
         if (with stdenv.targetPlatform; isVc4 || libc == "relibc") then 6
         else if (stdenv.targetPlatform.isAarch64 && stdenv.isDarwin) then 11
+        else if (stdenv.targetPlatform.isx86_64) then 11
         else if stdenv.targetPlatform.isAarch64 then 9
         else 10;
       numS = toString num;
@@ -12361,8 +12368,14 @@ with pkgs;
 
   gcc_latest = gcc11;
 
-  # aarch64-darwin doesn't support earlier gcc
-  gfortran = if (stdenv.isDarwin && stdenv.isAarch64) then gfortran11 else gfortran9;
+  # Use the same GCC version as the one from stdenv by default
+  gfortran = wrapCC (gccStdenv.cc.cc.override {
+    name = "gfortran";
+    langFortran = true;
+    langCC = false;
+    langC = false;
+    profiledCompiler = false;
+  });
 
   gfortran48 = wrapCC (gcc48.cc.override {
     name = "gfortran";
@@ -13248,18 +13261,18 @@ with pkgs;
     inherit (darwin) apple_sdk;
   };
 
-  rust_1_59 = callPackage ../development/compilers/rust/1_59.nix {
+  rust_1_60 = callPackage ../development/compilers/rust/1_60.nix {
     inherit (darwin.apple_sdk.frameworks) CoreFoundation Security SystemConfiguration;
-    llvm_13 = llvmPackages_13.libllvm;
+    llvm_14 = llvmPackages_14.libllvm;
   };
-  rust = rust_1_59;
+  rust = rust_1_60;
 
   mrustc = callPackage ../development/compilers/mrustc { };
   mrustc-minicargo = callPackage ../development/compilers/mrustc/minicargo.nix { };
   mrustc-bootstrap = callPackage ../development/compilers/mrustc/bootstrap.nix { };
 
-  rustPackages_1_59 = rust_1_59.packages.stable;
-  rustPackages = rustPackages_1_59;
+  rustPackages_1_60 = rust_1_60.packages.stable;
+  rustPackages = rustPackages_1_60;
 
   inherit (rustPackages) cargo clippy rustc rustPlatform;
 
@@ -14567,7 +14580,7 @@ with pkgs;
   bingrep = callPackage ../development/tools/analysis/bingrep { };
 
   binutils-unwrapped = callPackage ../development/tools/misc/binutils {
-    autoreconfHook = if targetPlatform.isiOS then autoreconfHook269 else autoreconfHook;
+    autoreconfHook = autoreconfHook269;
     # FHS sys dirs presumably only have stuff for the build platform
     noSysDirs = (stdenv.targetPlatform != stdenv.hostPlatform) || noSysDirs;
   };
@@ -14582,7 +14595,7 @@ with pkgs;
   };
   binutils_nogold = lowPrio (wrapBintoolsWith {
     bintools = binutils-unwrapped.override {
-      gold = false;
+      enableGold = false;
     };
   });
   binutilsNoLibc = wrapBintoolsWith {
@@ -17160,7 +17173,12 @@ with pkgs;
 
   grilo-plugins = callPackage ../development/libraries/grilo-plugins { };
 
-  grpc = callPackage ../development/libraries/grpc { };
+  grpc = callPackage ../development/libraries/grpc {
+    # grpc builds with c++14 so abseil must also be built that way
+    abseil-cpp = abseil-cpp.override {
+      cxxStandard = "14";
+    };
+  };
 
   gsettings-qt = libsForQt5.callPackage ../development/libraries/gsettings-qt { };
 
@@ -19372,7 +19390,9 @@ with pkgs;
     inherit (darwin.apple_sdk.frameworks) CoreServices;
   };
 
-  nss = lowPrio (callPackage ../development/libraries/nss { });
+  nss_latest = callPackage ../development/libraries/nss/latest.nix { };
+  nss_esr = callPackage ../development/libraries/nss/esr.nix { };
+  nss = nss_esr;
   nssTools = nss.tools;
 
   nss_wrapper = callPackage ../development/libraries/nss_wrapper { };
@@ -21695,16 +21715,8 @@ with pkgs;
 
   hsphfpd = callPackage ../servers/pulseaudio/hsphfpd.nix { };
 
-  pulseaudio-hsphfpd = callPackage ../servers/pulseaudio/pali.nix {
-    inherit (darwin.apple_sdk.frameworks) CoreServices AudioUnit Cocoa;
-  };
-
   pulseaudio = callPackage ../servers/pulseaudio ({
     inherit (darwin.apple_sdk.frameworks) CoreServices AudioUnit Cocoa;
-  } // lib.optionalAttrs stdenv.isDarwin {
-    # Default autoreconfHook (2.70) fails on darwin,
-    # with "configure: error: *** Compiler does not support -std=gnu11"
-    autoreconfHook = buildPackages.autoreconfHook269;
   });
 
   qpaeq = libsForQt5.callPackage ../servers/pulseaudio/qpaeq.nix { };
@@ -22413,11 +22425,6 @@ with pkgs;
     withExperimental = true;
   };
 
-  pulseaudio-modules-bt = callPackage ../applications/audio/pulseaudio-modules-bt {
-    # pulseaudio-modules-bt is most likely to be used with pulseaudioFull
-    pulseaudio = pulseaudioFull;
-  };
-
   bluez = bluez5;
 
   inherit (python3Packages) bedup;
@@ -22919,6 +22926,10 @@ with pkgs;
     # which depends on lvm2 again.  But we only need the libudev part
     # which does not depend on cryptsetup.
     udev = systemdMinimal;
+    # break the cyclic dependency:
+    # util-linux (non-minimal) depends (optionally, but on by default) on systemd,
+    # systemd (optionally, but on by default) on cryptsetup and cryptsetup depends on lvm2
+    util-linux = util-linuxMinimal;
   };
   lvm2-2_02 = callPackage ../os-specific/linux/lvm2/2_02.nix {
     udev = systemdMinimal;
@@ -26184,6 +26195,7 @@ with pkgs;
     svnSupport = true;
     guiSupport = true;
     sendEmailSupport = true;
+    withSsh = true;
     withLibsecret = !stdenv.isDarwin;
   };
 
@@ -28312,7 +28324,7 @@ with pkgs;
 
   vivaldi-widevine = callPackage ../applications/networking/browsers/vivaldi/widevine.nix { };
 
-  libopenmpt = callPackage ../applications/audio/libopenmpt { };
+  libopenmpt = callPackage ../development/libraries/audio/libopenmpt { };
 
   openrazer-daemon = with python3Packages; toPythonApplication openrazer-daemon;
 
diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix
index cbbde9c8802..b2359347199 100644
--- a/pkgs/top-level/python-aliases.nix
+++ b/pkgs/top-level/python-aliases.nix
@@ -43,6 +43,7 @@ mapAliases ({
   class-registry = phx-class-registry; # added 2021-10-05
   ConfigArgParse = configargparse; # added 2021-03-18
   cozy = throw "cozy was removed because it was not actually https://pypi.org/project/Cozy/."; # added 2022-01-14
+  cryptography_vectors = "cryptography_vectors is no longer exposed in python*Packages because it is used for testing cryptography only."; # Added 2022-03-23
   dateutil = python-dateutil; # added 2021-07-03
   demjson = throw "demjson has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-18
   detox = throw "detox is no longer maintained, and was broken since may 2019"; # added 2020-07-04
@@ -54,6 +55,7 @@ mapAliases ({
   django_appconf = django-appconf; # added 2022-03-03
   django_environ = django-environ; # added 2021-12-25
   django_extensions = django-extensions; # added 2022-01-09
+  django_modelcluster = django-modelcluster; # added 2022-04-02
   django_redis = django-redis; # added 2021-10-11
   django_taggit = django-taggit; # added 2021-10-11
   dns = dnspython; # added 2017-12-10
@@ -80,6 +82,8 @@ mapAliases ({
   nose-cover3 = throw "nose-cover3 has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-02-16
   pam = python-pam; # added 2020-09-07.
   PasteDeploy = pastedeploy; # added 2021-10-07
+  pathpy = path; # added 2022-04-12
+  pep257 = pydocstyle; # added 2022-04-12
   powerlineMemSegment = powerline-mem-segment; # added 2021-10-08
   privacyidea = throw "privacyidea has been renamed to pkgs.privacyidea"; # added 2021-06-20
   prometheus_client = prometheus-client; # added 2021-06-10
@@ -93,6 +97,7 @@ mapAliases ({
   pytest_6 = pytest; # added 2022-02-10
   pytestcov = pytest-cov; # added 2021-01-04
   pytest-pep8 = pytestpep8; # added 2021-01-04
+  pytest-pep257 = throw "pytest-pep257 was removed, as the pep257 package was migrated into pycodestyle"; # added 2022-04-12
   pytest-pythonpath = throw "pytest-pythonpath is obsolete as of pytest 7.0.0 and has been removed"; # added 2022-03-09
   pytestpep8 = throw "pytestpep8 was removed because it is abandoned and no longer compatible with pytest v6.0"; # added 2020-12-10
   pytestquickcheck = pytest-quickcheck; # added 2021-07-20
@@ -108,8 +113,10 @@ mapAliases ({
   qiskit-aqua = throw "qiskit-aqua has been removed due to deprecation, with its functionality moved to different qiskit packages";
   rdflib-jsonld = throw "rdflib-jsonld is not compatible with rdflib 6"; # added 2021-11-05
   repeated_test = throw "repeated_test is no longer maintained"; # added 2022-01-11
+  requests_oauthlib = requests-oauthlib; # added 2022-02-12
   requests_toolbelt = requests-toolbelt; # added 2017-09-26
   roboschool = throw "roboschool is deprecated in favor of PyBullet and has been removed"; # added 2022-01-15
+  ROPGadget = ropgadget; # added 2021-07-06
   rotate-backups = throw "rotate-backups was removed in favor of the top-level rotate-backups"; # added 2021-07-01
   ruamel_base = ruamel-base; # added 2021-11-01
   ruamel_yaml = ruamel-yaml; # added 2021-11-01
@@ -117,11 +124,12 @@ mapAliases ({
   scikitlearn = scikit-learn; # added 2021-07-21
   selectors34 = throw "selectors34 has been removed: functionality provided by Python itself; archived by upstream."; # added 2021-06-10
   setuptools_scm = setuptools-scm; # added 2021-06-03
-  ROPGadget = ropgadget; # added 2021-07-06
   smart_open = smart-open; # added 2021-03-14
   smmap2 = throw "smmap2 has been deprecated, use smmap instead."; # added 2020-03-14
+  SPARQLWrapper = sparqlwrapper;
   sphinxcontrib_plantuml = sphinxcontrib-plantuml; # added 2021-08-02
   sqlalchemy_migrate = sqlalchemy-migrate; # added 2021-10-28
+  SQLAlchemy-ImageAttach = throw "sqlalchemy-imageattach has been removed as it is incompatible with sqlalchemy 1.4 and unmaintained"; # added 2022-04-23
   tensorflow-bin_2 = tensorflow-bin; # added 2021-11-25
   tensorflow-build_2 = tensorflow-build; # added 2021-11-25
   tensorflow-estimator_2 = tensorflow-estimator; # added 2021-11-25
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 4037d1b86f6..684c3097433 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1927,10 +1927,9 @@ in {
 
   cryptography = callPackage ../development/python-modules/cryptography {
     inherit (pkgs.darwin) libiconv;
+    inherit (pkgs.darwin.apple_sdk.frameworks) Security;
   };
 
-  cryptography_vectors = callPackage ../development/python-modules/cryptography/vectors.nix { };
-
   crytic-compile = callPackage ../development/python-modules/crytic-compile { };
 
   csrmesh  = callPackage ../development/python-modules/csrmesh { };
@@ -1987,6 +1986,15 @@ in {
 
   cython = callPackage ../development/python-modules/Cython { };
 
+  cython_3 = self.cython.overridePythonAttrs (old: rec {
+    version = "3.0.0a10";
+    src = old.src.override {
+      inherit version;
+      sha256 = "342e95121a3d1a67cbcf7b340391eb40cc5ce3d2a79d7873e005e8783353d89d";
+    };
+    patches = [ ];
+  });
+
   cytoolz = callPackage ../development/python-modules/cytoolz { };
 
   d2to1 = callPackage ../development/python-modules/d2to1 { };
@@ -2294,7 +2302,7 @@ in {
 
   django-mailman3 = callPackage ../development/python-modules/django-mailman3 { };
 
-  django_modelcluster = callPackage ../development/python-modules/django_modelcluster { };
+  django-modelcluster = callPackage ../development/python-modules/django_modelcluster { };
 
   django-multiselectfield = callPackage ../development/python-modules/django-multiselectfield { };
 
@@ -2663,6 +2671,8 @@ in {
 
   ephem = callPackage ../development/python-modules/ephem { };
 
+  ephemeral-port-reserve = callPackage ../development/python-modules/ephemeral-port-reserve { };
+
   epson-projector = callPackage ../development/python-modules/epson-projector { };
 
   eradicate = callPackage ../development/python-modules/eradicate { };
@@ -4215,6 +4225,8 @@ in {
 
   jaraco_text = callPackage ../development/python-modules/jaraco_text { };
 
+  jarowinkler = callPackage ../development/python-modules/jarowinkler { };
+
   javaobj-py3 = callPackage ../development/python-modules/javaobj-py3 { };
 
   javaproperties = callPackage ../development/python-modules/javaproperties { };
@@ -6019,6 +6031,8 @@ in {
 
   patch-ng = callPackage ../development/python-modules/patch-ng { };
 
+  path = callPackage ../development/python-modules/path { };
+
   path-and-address = callPackage ../development/python-modules/path-and-address { };
 
   pathable = callPackage ../development/python-modules/pathable { };
@@ -6029,8 +6043,6 @@ in {
 
   pathos = callPackage ../development/python-modules/pathos { };
 
-  pathpy = callPackage ../development/python-modules/path.py { };
-
   pathspec = callPackage ../development/python-modules/pathspec { };
 
   pathtools = callPackage ../development/python-modules/pathtools { };
@@ -6093,8 +6105,6 @@ in {
 
   pendulum = callPackage ../development/python-modules/pendulum { };
 
-  pep257 = callPackage ../development/python-modules/pep257 { };
-
   pep440 = callPackage ../development/python-modules/pep440 { };
 
   pep517 = callPackage ../development/python-modules/pep517 { };
@@ -7986,8 +7996,6 @@ in {
 
   pytest-ordering = callPackage ../development/python-modules/pytest-ordering { };
 
-  pytest-pep257 = callPackage ../development/python-modules/pytest-pep257 { };
-
   pytest-pylint = callPackage ../development/python-modules/pytest-pylint { };
 
   pytest-qt = callPackage ../development/python-modules/pytest-qt { };
@@ -8676,6 +8684,8 @@ in {
 
   rapidfuzz = callPackage ../development/python-modules/rapidfuzz { };
 
+  rapidfuzz-capi = callPackage ../development/python-modules/rapidfuzz-capi { };
+
   rarfile = callPackage ../development/python-modules/rarfile {
     inherit (pkgs) libarchive;
   };
@@ -8796,7 +8806,7 @@ in {
 
   requests_ntlm = callPackage ../development/python-modules/requests_ntlm { };
 
-  requests_oauthlib = callPackage ../development/python-modules/requests-oauthlib { };
+  requests-oauthlib = callPackage ../development/python-modules/requests-oauthlib { };
 
   requests-pkcs12 = callPackage ../development/python-modules/requests-pkcs12 { };
 
@@ -9485,7 +9495,7 @@ in {
 
   sparklines = callPackage ../development/python-modules/sparklines { };
 
-  SPARQLWrapper = callPackage ../development/python-modules/sparqlwrapper { };
+  sparqlwrapper = callPackage ../development/python-modules/sparqlwrapper { };
 
   sparse = callPackage ../development/python-modules/sparse { };
 
@@ -9611,8 +9621,6 @@ in {
 
   sqlalchemy-i18n = callPackage ../development/python-modules/sqlalchemy-i18n { };
 
-  SQLAlchemy-ImageAttach = callPackage ../development/python-modules/sqlalchemy-imageattach { };
-
   sqlalchemy-jsonfield = callPackage ../development/python-modules/sqlalchemy-jsonfield { };
 
   sqlalchemy-migrate = callPackage ../development/python-modules/sqlalchemy-migrate { };
diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix
index 224acec1625..c915fc5c8c5 100644
--- a/pkgs/top-level/python2-packages.nix
+++ b/pkgs/top-level/python2-packages.nix
@@ -30,8 +30,6 @@ with self; with super; {
 
   cryptography = callPackage ../development/python2-modules/cryptography { };
 
-  cryptography_vectors = callPackage ../development/python2-modules/cryptography-vectors { };
-
   decorator = callPackage ../development/python2-modules/decorator { };
 
   enum = callPackage ../development/python2-modules/enum { };